From d3930f4d3902b8020123ebd297b3943bd7bcd78c Mon Sep 17 00:00:00 2001 From: spaaaacccee Date: Thu, 13 Jun 2024 03:07:28 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Shortest?= =?UTF-8?q?PathLab/posthoc-app@79b81b740c3c655db8848e060e5d2e5d0b86a50f=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...532bc.js => D2Renderer.worker-32d1b7b8.js} | 2 +- .../{index-9099f480.js => index-9b775582.js} | 132 +++++++++--------- index.html | 2 +- 3 files changed, 68 insertions(+), 68 deletions(-) rename assets/{D2Renderer.worker-b68532bc.js => D2Renderer.worker-32d1b7b8.js} (98%) rename assets/{index-9099f480.js => index-9b775582.js} (83%) diff --git a/assets/D2Renderer.worker-b68532bc.js b/assets/D2Renderer.worker-32d1b7b8.js similarity index 98% rename from assets/D2Renderer.worker-b68532bc.js rename to assets/D2Renderer.worker-32d1b7b8.js index 7863497..d1551d6 100644 --- a/assets/D2Renderer.worker-b68532bc.js +++ b/assets/D2Renderer.worker-32d1b7b8.js @@ -26,5 +26,5 @@ function print() { __p += __j.call(arguments, '') } `)+P+`return __p }`;var Q=ih(function(){return ae(g,$+"return "+P).apply(r,m)});if(Q.source=P,wa(Q))throw Q;return Q}function A2(e){return fe(e).toLowerCase()}function S2(e){return fe(e).toUpperCase()}function E2(e,n,i){if(e=fe(e),e&&(i||n===r))return pl(e);if(!e||!(n=Ve(n)))return e;var o=vn(e),l=vn(n),g=gl(o,l),m=dl(o,l)+1;return Jn(o,g,m).join("")}function R2(e,n,i){if(e=fe(e),e&&(i||n===r))return e.slice(0,ml(e)+1);if(!e||!(n=Ve(n)))return e;var o=vn(e),l=dl(o,vn(n))+1;return Jn(o,0,l).join("")}function O2(e,n,i){if(e=fe(e),e&&(i||n===r))return e.replace(wo,"");if(!e||!(n=Ve(n)))return e;var o=vn(e),l=gl(o,vn(n));return Jn(o,l).join("")}function C2(e,n){var i=Ue,o=en;if(me(n)){var l="separator"in n?n.separator:l;i="length"in n?J(n.length):i,o="omission"in n?Ve(n.omission):o}e=fe(e);var g=e.length;if(Nt(e)){var m=vn(e);g=m.length}if(i>=g)return e;var _=i-$t(o);if(_<1)return o;var w=m?Jn(m,0,_).join(""):e.slice(0,_);if(l===r)return w+o;if(m&&(_+=w.length-_),xa(l)){if(e.slice(_).search(l)){var I,B=w;for(l.global||(l=qo(l.source,fe(Ps.exec(l))+"g")),l.lastIndex=0;I=l.exec(B);)var P=I.index;w=w.slice(0,P===r?_:P)}}else if(e.indexOf(Ve(l),_)!=_){var q=w.lastIndexOf(l);q>-1&&(w=w.slice(0,q))}return w+o}function M2(e){return e=fe(e),e&&Ng.test(e)?e.replace(Bs,i1):e}var F2=zt(function(e,n,i){return e+(i?" ":"")+n.toUpperCase()}),Ea=uc("toUpperCase");function rh(e,n,i){return e=fe(e),n=i?r:n,n===r?jd(e)?a1(e):Wd(e):e.match(n)||[]}var ih=j(function(e,n){try{return Ke(e,r,n)}catch(i){return wa(i)?i:new z(i)}}),I2=Tn(function(e,n){return rn(n,function(i){i=An(i),In(e,i,_a(e[i],e))}),e});function B2(e){var n=e==null?0:e.length,i=X();return e=n?ve(e,function(o){if(typeof o[1]!="function")throw new un(c);return[i(o[0]),o[1]]}):[],j(function(o){for(var l=-1;++l$e)return[];var i=bn,o=Ie(e,bn);n=X(n),e-=bn;for(var l=Po(o,n);++i0||n<0)?new ie(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),n!==r&&(n=J(n),i=n<0?i.dropRight(-n):i.take(n-e)),i)},ie.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ie.prototype.toArray=function(){return this.take(bn)},wn(ie.prototype,function(e,n){var i=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),l=h[o?"take"+(n=="last"?"Right":""):n],g=o||/^find/.test(n);l&&(h.prototype[n]=function(){var m=this.__wrapped__,_=o?[1]:arguments,w=m instanceof ie,I=_[0],B=w||V(m),P=function(re){var ue=l.apply(h,kn([re],_));return o&&q?ue[0]:ue};B&&i&&typeof I=="function"&&I.length!=1&&(w=B=!1);var q=this.__chain__,$=!!this.__actions__.length,W=g&&!q,Q=w&&!$;if(!g&&B){m=Q?m:new ie(this);var k=e.apply(m,_);return k.__actions__.push({func:Ui,args:[P],thisArg:r}),new on(k,q)}return W&&Q?e.apply(this,_):(k=this.thru(P),W?o?k.value()[0]:k.value():k)})}),rn(["pop","push","shift","sort","splice","unshift"],function(e){var n=yi[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);h.prototype[e]=function(){var l=arguments;if(o&&!this.__chain__){var g=this.value();return n.apply(V(g)?g:[],l)}return this[i](function(m){return n.apply(V(m)?m:[],l)})}}),wn(ie.prototype,function(e,n){var i=h[n];if(i){var o=i.name+"";se.call(kt,o)||(kt[o]=[]),kt[o].push({name:n,func:i})}}),kt[Gi(r,M).name]=[{name:"wrapper",func:r}],ie.prototype.clone=M1,ie.prototype.reverse=F1,ie.prototype.value=I1,h.prototype.at=oy,h.prototype.chain=ay,h.prototype.commit=fy,h.prototype.next=sy,h.prototype.plant=cy,h.prototype.reverse=hy,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=py,h.prototype.first=h.prototype.head,xr&&(h.prototype[xr]=ly),h},Yt=f1();ht?((ht.exports=Yt)._=Yt,Oo._=Yt):Ce._=Yt}).call(he)}(Dr,Dr.exports);var oe=Dr.exports,gh=function(){},dh=gh(),jn=function(t){return t!==dh&&t!==null},vh=jn,mh=Array.prototype.forEach,yh=Object.create,_h=function(t,u){var r;for(r in t)u[r]=t[r]},Ta=function(t){var u=yh(null);return mh.call(arguments,function(r){vh(r)&&_h(Object(r),u)}),u},bh=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1},nu,La;function wh(){return La||(La=1,nu=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}),nu}var xh=bh()?Math.sign:wh(),Ah=xh,Sh=Math.abs,Eh=Math.floor,Rh=function(t){return isNaN(t)?0:(t=Number(t),t===0||!isFinite(t)?t:Ah(t)*Eh(Sh(t)))},Oh=Rh,Ch=Math.max,et=function(t){return Ch(0,Oh(t))},Mh=et,Pa=function(t,u,r){var a;return isNaN(t)?(a=u,a>=0?r&&a?a-1:a:1):t===!1?!1:Mh(t)},qn=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");return t},Fh=jn,wt=function(t){if(!Fh(t))throw new TypeError("Cannot use null or undefined");return t},Ih=qn,Bh=wt,Th=Function.prototype.bind,Ha=Function.prototype.call,Lh=Object.keys,Ph=Object.prototype.propertyIsEnumerable,Hh=function(t,u){return function(r,a){var f,s=arguments[2],c=arguments[3];return r=Object(Bh(r)),Ih(a),f=Lh(r),c&&f.sort(typeof c=="function"?Th.call(c,r):void 0),typeof t!="function"&&(t=f[t]),Ha.call(t,f,function(p,v){return Ph.call(r,p)?Ha.call(a,s,r[p],p,r,v):u})}},qr=Hh("forEach"),nt={},Da={exports:{}},Dh=function(){var t=Object.assign,u;return typeof t!="function"?!1:(u={foo:"raz"},t(u,{bar:"dwa"},{trzy:"trzy"}),u.foo+u.bar+u.trzy==="razdwatrzy")},tu,qa;function qh(){return qa||(qa=1,tu=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),tu}var ru,Ga;function Gh(){if(Ga)return ru;Ga=1;var t=jn,u=Object.keys;return ru=function(r){return u(t(r)?Object(r):r)},ru}var iu,Na;function Nh(){return Na||(Na=1,iu=qh()()?Object.keys:Gh()),iu}var uu,$a;function $h(){if($a)return uu;$a=1;var t=Nh(),u=wt,r=Math.max;return uu=function(a,f){var s,c,p=r(arguments.length,2),v;for(a=Object(u(a)),v=function(d){try{a[d]=f[d]}catch(y){s||(s=y)}},c=1;c-1},lu}var o0=i0()?String.prototype.contains:u0(),Gr=Qa,ef=r0,nf=Ya,tf=Ta,Qt=o0,a0=Ja.exports=function(t,u){var r,a,f,s,c;return arguments.length<2||typeof t!="string"?(s=u,u=t,t=null):s=arguments[2],Gr(t)?(r=Qt.call(t,"c"),a=Qt.call(t,"e"),f=Qt.call(t,"w")):(r=f=!0,a=!1),c={value:u,configurable:r,enumerable:a,writable:f},s?nf(tf(s),c):c};a0.gs=function(t,u,r){var a,f,s,c;return typeof t!="string"?(s=r,r=u,u=t,t=null):s=arguments[3],Gr(u)?ef(u)?Gr(r)?ef(r)||(s=r,r=void 0):r=void 0:(s=u,u=r=void 0):u=void 0,Gr(t)?(a=Qt.call(t,"c"),f=Qt.call(t,"e")):(a=!0,f=!1),c={get:u,set:r,configurable:a,enumerable:f},s?nf(tf(s),c):c};var tt=Ja.exports,cu={exports:{}};(function(t,u){var r=tt,a=qn,f=Function.prototype.apply,s=Function.prototype.call,c=Object.create,p=Object.defineProperty,v=Object.defineProperties,d=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0},x,R,O,T,H,E,M;x=function(L,A){var F;return a(A),d.call(this,"__ee__")?F=this.__ee__:(F=y.value=c(null),p(this,"__ee__",y),y.value=null),F[L]?typeof F[L]=="object"?F[L].push(A):F[L]=[F[L],A]:F[L]=A,this},R=function(L,A){var F,D;return a(A),D=this,x.call(this,L,F=function(){O.call(D,L,F),f.call(A,this,arguments)}),F.__eeOnceListener__=A,this},O=function(L,A){var F,D,N,U;if(a(A),!d.call(this,"__ee__"))return this;if(F=this.__ee__,!F[L])return this;if(D=F[L],typeof D=="object")for(U=0;N=D[U];++U)(N===A||N.__eeOnceListener__===A)&&(D.length===2?F[L]=D[U?0:1]:D.splice(U,1));else(D===A||D.__eeOnceListener__===A)&&delete F[L];return this},T=function(L){var A,F,D,N,U;if(d.call(this,"__ee__")&&(N=this.__ee__[L],!!N))if(typeof N=="object"){for(F=arguments.length,U=new Array(F-1),A=1;A=55296&&F<=56319&&(Z+=R[++E])),Z=O?d.call(O,T,Z,M):Z,H?(y.value=Z,x(L,M,y)):L[M]=Z,++M;A=M}}if(A===void 0)for(A=a(R.length),H&&(L=new H(A)),E=0;E=0?y=c(y):y=u(this.length)-c(s(y)),v=y;v"}},Vu}var Zu,Kf;function tp(){if(Kf)return Zu;Kf=1;var t=np(),u=/[\n\r\u2028\u2029]/g;return Zu=function(r){var a=t(r);return a.length>100&&(a=a.slice(0,99)+"…"),a=a.replace(u,function(f){return JSON.stringify(f).slice(1,-1)}),a},Zu}var Wr={exports:{}},zf;function Vf(){if(zf)return Wr.exports;zf=1,Wr.exports=t,Wr.exports.default=t;function t(u){return!!u&&(typeof u=="object"||typeof u=="function")&&typeof u.then=="function"}return Wr.exports}var Zf;function rp(){if(Zf)return Nf;Zf=1;var t=Df(),u=Q0(),r=ep(),a=tp(),f=Vf(),s=Wu(),c=Object.create,p=u("then","then:finally","done","done:finally");return nt.promise=function(v,d){var y=c(null),x=c(null),R=c(null);if(v===!0)v=null;else if(v=r(v),!p[v])throw new TypeError("'"+a(v)+"' is not valid promise mode");d.on("set",function(O,T,H){var E=!1;if(!f(H)){x[O]=H,d.emit("setasync",O,1);return}y[O]=1,R[O]=H;var M=function(D){var N=y[O];if(E)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) Consider to rely on 'then' or 'done' mode instead.`);N&&(delete y[O],x[O]=D,d.emit("setasync",O,N))},L=function(){E=!0,y[O]&&(delete y[O],delete R[O],d.delete(O))},A=v;if(A||(A="then"),A==="then"){var F=function(){s(L)};H=H.then(function(D){s(M.bind(this,D))},F),typeof H.finally=="function"&&H.finally(F)}else if(A==="done"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");H.done(M,L)}else if(A==="done:finally"){if(typeof H.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof H.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");H.done(M),H.finally(L)}}),d.on("get",function(O,T,H){var E;if(y[O]){++y[O];return}E=R[O];var M=function(){d.emit("getasync",O,T,H)};f(E)?typeof E.done=="function"?E.done(M):E.then(function(){s(M)}):M()}),d.on("delete",function(O){if(delete R[O],y[O]){delete y[O];return}if(hasOwnProperty.call(x,O)){var T=x[O];delete x[O],d.emit("deleteasync",O,[T])}}),d.on("clear",function(){var O=x;x=c(null),y=c(null),R=c(null),d.emit("clearasync",t(O,function(T){return[T]}))})},Nf}var Jf={},Qf;function ip(){if(Qf)return Jf;Qf=1;var t=qn,u=qr,r=nt,a=Function.prototype.apply;return r.dispose=function(f,s,c){var p;if(t(f),c.async&&r.async||c.promise&&r.promise){s.on("deleteasync",p=function(v,d){a.call(f,null,d)}),s.on("clearasync",function(v){u(v,function(d,y){p(y,d)})});return}s.on("delete",p=function(v,d){f(d)}),s.on("clear",function(v){u(v,function(d,y){p(y,d)})})},Jf}var jf={},Ju,es;function up(){return es||(es=1,Ju=2147483647),Ju}var Qu,ns;function op(){if(ns)return Qu;ns=1;var t=et,u=up();return Qu=function(r){if(r=t(r),r>u)throw new TypeError(r+" exceeds maximum possible timeout");return r},Qu}var ts;function ap(){if(ts)return jf;ts=1;var t=Mu(),u=qr,r=Wu(),a=Vf(),f=op(),s=nt,c=Function.prototype,p=Math.max,v=Math.min,d=Object.create;return s.maxAge=function(y,x,R){var O,T,H,E;y=f(y),y&&(O=d(null),T=R.async&&s.async||R.promise&&s.promise?"async":"",x.on("set"+T,function(M){O[M]=setTimeout(function(){x.delete(M)},y),typeof O[M].unref=="function"&&O[M].unref(),E&&(E[M]&&E[M]!=="nextTick"&&clearTimeout(E[M]),E[M]=setTimeout(function(){delete E[M]},H),typeof E[M].unref=="function"&&E[M].unref())}),x.on("delete"+T,function(M){clearTimeout(O[M]),delete O[M],E&&(E[M]!=="nextTick"&&clearTimeout(E[M]),delete E[M])}),R.preFetch&&(R.preFetch===!0||isNaN(R.preFetch)?H=.333:H=p(v(Number(R.preFetch),1),0),H&&(E={},H=(1-H)*y,x.on("get"+T,function(M,L,A){E[M]||(E[M]="nextTick",r(function(){var F;E[M]==="nextTick"&&(delete E[M],x.delete(M),R.async&&(L=t(L),L.push(c)),F=x.memoized.apply(A,L),R.promise&&a(F)&&(typeof F.done=="function"?F.done(c,c):F.then(c,c)))}))}))),x.on("clear"+T,function(){u(O,function(M){clearTimeout(M)}),O={},E&&(u(E,function(M){M!=="nextTick"&&clearTimeout(M)}),E={})}))},jf}var rs={},ju,is;function fp(){if(is)return ju;is=1;var t=et,u=Object.create,r=Object.prototype.hasOwnProperty;return ju=function(a){var f=0,s=1,c=u(null),p=u(null),v=0,d;return a=t(a),{hit:function(y){var x=p[y],R=++v;if(c[R]=y,p[y]=R,!x)return++f,f<=a?void 0:(y=c[s],d(y),y);if(delete c[x],s===x)for(;!r.call(c,++s););},delete:d=function(y){var x=p[y];if(x&&(delete c[x],delete p[y],--f,s===x)){if(!f){v=0,s=1;return}for(;!r.call(c,++s););}},clear:function(){f=0,s=1,c=u(null),p=u(null),v=0}}},ju}var us;function sp(){if(us)return rs;us=1;var t=et,u=fp(),r=nt;return r.max=function(a,f,s){var c,p,v;a=t(a),a&&(p=u(a),c=s.async&&r.async||s.promise&&r.promise?"async":"",f.on("set"+c,v=function(d){d=p.hit(d),d!==void 0&&f.delete(d)}),f.on("get"+c,v),f.on("delete"+c,p.delete),f.on("clear"+c,p.clear))},rs}var os={},as;function lp(){if(as)return os;as=1;var t=tt,u=nt,r=Object.create,a=Object.defineProperties;return u.refCounter=function(f,s,c){var p,v;p=r(null),v=c.async&&u.async||c.promise&&u.promise?"async":"",s.on("set"+v,function(d,y){p[d]=y||1}),s.on("get"+v,function(d){++p[d]}),s.on("delete"+v,function(d){delete p[d]}),s.on("clear"+v,function(){p={}}),a(s.memoized,{deleteRef:t(function(){var d=s.get(arguments);return d===null||!p[d]?null:--p[d]?!1:(s.delete(d),!0)}),getRefCount:t(function(){var d=s.get(arguments);return d===null||!p[d]?0:p[d]})})},os}var cp=Ta,hp=Pa,pp=Y0,gp=function(t){var u=cp(arguments[1]),r;return u.normalizer||(r=u.length=hp(u.length,t.length,u.async),r!==0&&(u.primitive?r===!1?u.normalizer=X0():r>1&&(u.normalizer=W0()(r)):r===!1?u.normalizer=z0()():r===1?u.normalizer=V0()():u.normalizer=Z0()(r))),u.async&&J0(),u.promise&&rp(),u.dispose&&ip(),u.maxAge&&ap(),u.max&&sp(),u.refCounter&&lp(),pp(t,u)},dp=_e(gp);function vp(t,u,r,a,f){fs(t,u,r||0,a||t.length-1,f||mp)}function fs(t,u,r,a,f){for(;a>r;){if(a-r>600){var s=a-r+1,c=u-r+1,p=Math.log(s),v=.5*Math.exp(2*p/3),d=.5*Math.sqrt(p*v*(s-v)/s)*(c-s/2<0?-1:1),y=Math.max(r,Math.floor(u-c*v/s+d)),x=Math.min(a,Math.floor(u+(s-c)*v/s+d));fs(t,u,y,x,f)}var R=t[u],O=r,T=a;for(er(t,r,u),f(t[a],R)>0&&er(t,r,a);O0;)T--}f(t[r],R)===0?er(t,r,T):(T++,er(t,T,a)),T<=u&&(r=T+1),u<=T&&(a=T-1)}}function er(t,u,r){var a=t[u];t[u]=t[r],t[r]=a}function mp(t,u){return tu?1:0}class yp{constructor(u=9){this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(u){let r=this.data;const a=[];if(!Ur(u,r))return a;const f=this.toBBox,s=[];for(;r;){for(let c=0;c=0&&s[r].children.length>this._maxEntries;)this._split(s,r),r--;this._adjustParentBBoxes(f,s,r)}_split(u,r){const a=u[r],f=a.children.length,s=this._minEntries;this._chooseSplitAxis(a,s,f);const c=this._chooseSplitIndex(a,s,f),p=At(a.children.splice(c,a.children.length-c));p.height=a.height,p.leaf=a.leaf,xt(a,this.toBBox),xt(p,this.toBBox),r?u[r-1].children.push(p):this._splitRoot(a,p)}_splitRoot(u,r){this.data=At([u,r]),this.data.height=u.height+1,this.data.leaf=!1,xt(this.data,this.toBBox)}_chooseSplitIndex(u,r,a){let f,s=1/0,c=1/0;for(let p=r;p<=a-r;p++){const v=nr(u,0,p,this.toBBox),d=nr(u,p,a,this.toBBox),y=Ap(v,d),x=eo(v)+eo(d);y=r;d--){const y=u.children[d];tr(p,u.leaf?s(y):y),v+=kr(p)}return v}_adjustParentBBoxes(u,r,a){for(let f=a;f>=0;f--)tr(r[f],u)}_condense(u){for(let r=u.length-1,a;r>=0;r--)u[r].children.length===0?r>0?(a=u[r-1].children,a.splice(a.indexOf(u[r]),1)):this.clear():xt(u[r],this.toBBox)}}function _p(t,u,r){if(!r)return u.indexOf(t);for(let a=0;a=t.minX&&u.maxY>=t.minY}function At(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ss(t,u,r,a,f){const s=[u,r];for(;s.length;){if(r=s.pop(),u=s.pop(),r-u<=a)continue;const c=u+Math.ceil((r-u)/a/2)*a;vp(t,c,u,r,f),s.push(u,c,c,r)}}class Sp extends yp{toBBox(u){return{minX:u.left,minY:u.top,maxX:u.right,maxY:u.bottom}}compareMinX(u,r){return u.left-r.left}compareMinY(u,r){return u.top-r.top}}const Ep={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,errorColor:"#f44336",backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:500,increment:.5,maxScale:1.5,minScale:1,dtMax:1.5,dtMin:1.1}};var ls={exports:{}};(function(t){var u=Object.prototype.hasOwnProperty,r="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(r=!1));function f(v,d,y){this.fn=v,this.context=d,this.once=y||!1}function s(v,d,y,x,R){if(typeof y!="function")throw new TypeError("The listener must be a function");var O=new f(y,x||v,R),T=r?r+d:d;return v._events[T]?v._events[T].fn?v._events[T]=[v._events[T],O]:v._events[T].push(O):(v._events[T]=O,v._eventsCount++),v}function c(v,d){--v._eventsCount===0?v._events=new a:delete v._events[d]}function p(){this._events=new a,this._eventsCount=0}p.prototype.eventNames=function(){var d=[],y,x;if(this._eventsCount===0)return d;for(x in y=this._events)u.call(y,x)&&d.push(r?x.slice(1):x);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(y)):d},p.prototype.listeners=function(d){var y=r?r+d:d,x=this._events[y];if(!x)return[];if(x.fn)return[x.fn];for(var R=0,O=x.length,T=new Array(O);R=6&&(r-=6),Y(r<1?255*((u-t)*r+t):r<3?255*u:r<4?255*((u-t)*(4-r)+t):255*t)},Re=function(t,u,r){u/=100;var a=(r/=100)<=.5?r*(u+1):r+u-r*u,f=2*r-a;return{r:uo(f,a,(t/=60)+2),g:uo(f,a,t),b:uo(f,a,t-2)}},oo=function(t,u,r,a){return{r:Y(255*(1-t)*(a=1-a)),g:Y(255*(1-u)*a),b:Y(255*(1-r)*a)}},ps=function(t,u,r){t/=255,u/=255,r/=255;var a=1-Math.max(t,u,r),f=1-a,s=f&&(f-u)/f,c=f&&(f-r)/f;return{c:Y(100*(f&&(f-t)/f)),m:Y(100*s),y:Y(100*c),k:Y(100*a)}},Et=function(t,u,r,a){a===void 0&&(a=1),t/=255,u/=255,r/=255,a=Math.min(a,1);var f=Math.max(t,u,r),s=Math.min(t,u,r),c=f-s,p=0,v=0,d=(f+s)/2;if(c!==0){switch(f){case t:p=(u-r)/c%6;break;case u:p=(r-t)/c+2;break;case r:p=(t-u)/c+4}(p=Y(60*p))<0&&(p+=360),v=c/(1-Math.abs(2*d-1))}return{h:p,s:Y(100*v),l:Y(100*d),a}},gs=function(t,u){if(t<0&&(t+=360),t>360&&(t-=360),t===360||t===0)return t;var r=[[0,120],[120,180],[180,240],[240,360]],a=[[0,60],[60,120],[120,240],[240,360]],f=u?a:r,s=0,c=0,p=0,v=0;return(u?r:a).find(function(d,y){return t>=d[0]&&t360||t<0)&&(t-=360*Math.floor(t/360)),t},Te=function(t){return typeof t=="string"&&(t=St.test(t)?zr(t)/100:+t),isNaN(+t)||t>1?1:Y(t)},Rt=function(t,u,r){return u.reduce(function(a,f){return to(to([],a,!0),[ne(ne({},t),{h:r===Ge.ADDITIVE?fr(t.h+f):fr(gs(gs(t.h,!1)+f,!0))})],!1)},[ne({},t)])},Lp=function(t,u){return Rt(t,[30,-30],u)},Pp=function(t,u){return Rt(t,[180],u)},Hp=function(t,u){return Rt(t,[150,-150],u)},Dp=function(t,u){return Rt(t,[120,-120],u)},qp=function(t,u){return Rt(t,[60,-120,180],u)},Gp=function(t,u){return Rt(t,[90,-90,180],u)},je=function(t){return typeof t=="string"?function(u){var r;if(Object.keys(K).some(function(a){if(ar[a].test(u))return r=a,!0}),!r&&~cs.indexOf(u)&&(r=K.HEX),!r)throw new Error(Bp);return r}(t):function(u){var r,a=!1,f=hs(Object.keys(u));if(ro[f]&&(r=ro[f]),r&&r===K.RGB){var s=Object.entries(u).some(function(p){return!io.test("".concat(p[1]))}),c=Object.entries(u).some(function(p){return!(St.test("".concat(p[1]))||!io.test("".concat(p[1]))&&!isNaN(+p[1])&&+p[1]<=255)});s&&c&&(a=!0),s||(r=K.HEX)}if(!r||a)throw new Error(Tp);return r}(t)},Np=((ur={})[K.HEX]=function(t){var u=(~cs.indexOf(t)?Kr[t]:t).match(ar.HEX),r={r:Zr(u[1]||u[5]),g:Zr(u[2]||u[6]),b:Zr(u[3]||u[7])},a=u[4]||u[8];return a!==void 0&&(r.a=Zr(a)/255),r},ur[K.RGB]=function(t){var u=t.match(ar.RGB),r=ut(u[1]||u[5]),a=ut(u[2]||u[6]),f=ut(u[3]||u[7]),s=u[4]||u[8],c={r:Math.min(r,255),g:Math.min(a,255),b:Math.min(f,255)};return s!==void 0&&(c.a=Te(s)),c},ur[K.HSL]=function(t){var u=t.match(ar.HSL),r=fr(u[1]||u[5]),a=Vr(u[2]||u[6]),f=Vr(u[3]||u[7]),s=u[4]||u[8],c=Re(r,a,f);return s!==void 0&&(c.a=Te(s)),c},ur[K.CMYK]=function(t){var u=t.match(ar.CMYK),r=Gn(u[1]||u[6]),a=Gn(u[2]||u[7]),f=Gn(u[3]||u[8]),s=Gn(u[4]||u[9]),c=u[5]||u[10],p=oo(r,a,f,s);return c!==void 0&&(p.a=Te(c)),p},ur),$p=((or={})[K.HEX]=function(t){var u={r:ut("".concat(t.r)),g:ut("".concat(t.g)),b:ut("".concat(t.b))};return Fe(t,"a")&&(u.a=Math.min(ut("".concat(t.a),!0),1)),u},or[K.RGB]=function(t){return this.HEX(t)},or[K.HSL]=function(t){var u=Vr("".concat(t.s)),r=Vr("".concat(t.l)),a=Re(fr(t.h),u,r);return Fe(t,"a")&&(a.a=Te(t.a)),a},or[K.CMYK]=function(t){var u=Gn("".concat(t.c)),r=Gn("".concat(t.m)),a=Gn("".concat(t.y)),f=Gn("".concat(t.k)),s=oo(u,r,a,f);return Fe(t,"a")&&(s.a=Te(t.a)),s},or),ot=function(t,u){return u===void 0&&(u=je(t)),typeof t=="string"?Np[u](t):$p[u](t)},te=((On={})[K.HEX]=function(t){return{r:Jr(t.r),g:Jr(t.g),b:Jr(t.b)}},On.HEXA=function(t){var u=te.HEX(t);return u.a=Fe(t,"a")?Jr(255*t.a):"0xFF",u},On[K.RGB]=function(t,u){return Fe(t,"a")&&delete t.a,at(t,u)},On.RGBA=function(t,u){return t.a=Fe(t,"a")?Y(t.a):1,at(t,u)},On[K.HSL]=function(t,u){var r=Et(t.r,t.g,t.b);return delete r.a,Mt(r,u)},On.HSLA=function(t,u){var r=te.HSL(t,u);return r.a=Fe(t,"a")?Y(t.a,u):1,r},On[K.CMYK]=function(t,u){return Yp(ps(t.r,t.g,t.b),u)},On.CMYKA=function(t,u){var r=te.CMYK(t,u);return r.a=Fe(t,"a")?Y(t.a,u):1,r},On),ds=function(t,u,r,a){var f=je(t),s=typeof t=="string",c=ot(t,f),p=typeof t=="string"&&Fe(c,"a")||typeof t!="string"&&Fe(t,"a"),v=Et(c.r,c.g,c.b,c.a);p||delete v.a;var d=r?v.l/(u+1):(100-v.l)/(u+1),y=Array(u).fill(null).map(function(x,R){return ne(ne({},v),{l:v.l+d*(R+1)*(1-2*+r)})});switch(f){case K.HEX:default:return y.map(function(x){var R=Re(x.h,x.s,x.l);return p&&(R.a=x.a),s?p?ee.HEX(at(ne(ne({},R),{a:Y(255*R.a)}),a)):ee.HEX(at(R,a)):p?te.HEXA(R):te.HEX(R)});case K.RGB:return y.map(function(x){var R=Re(x.h,x.s,x.l);return p&&(R.a=x.a),s?ee.RGB(at(R,a)):p?te.RGBA(R,a):te.RGB(R,a)});case K.HSL:return y.map(function(x){return s?ee.HSL(Mt(x,a)):p?te.HSLA(ne(ne({},Re(x.h,x.s,x.l)),{a:x.a}),a):te.HSL(Re(x.h,x.s,x.l),a)})}},Ot=((rt={buildHarmony:function(t,u,r,a){var f=je(t),s=ot(t,f),c=Et(s.r,s.g,s.b,s.a),p=typeof t=="string"&&Fe(s,"a")||typeof t!="string"&&Fe(t,"a"),v=typeof t=="string";switch(f){case K.HEX:default:return p?this.HEXA(Mt(c,0),u,r,v):this.HEX(Mt(c,0),u,r,v);case K.HSL:return p?this.HSLA(c,u,r,v,a):this.HSL(c,u,r,v,a);case K.RGB:return p?this.RGBA(c,u,r,v,a):this.RGB(c,u,r,v,a)}}})[K.HEX]=function(t,u,r,a){return u(t,r).map(function(f){return a?ee.HEX(Re(f.h,f.s,f.l)):te.HEX(Re(f.h,f.s,f.l))})},rt.HEXA=function(t,u,r,a){return u(t,r).map(function(f){return a?ee.HEX(ne(ne({},Re(f.h,f.s,f.l)),{a:255*Te(f.a)})):te.HEXA(ne(ne({},Re(f.h,f.s,f.l)),{a:Te(f.a)}))})},rt[K.RGB]=function(t,u,r,a,f){return u(t,r).map(function(s){return a?ee.RGB(at(Re(s.h,s.s,s.l),f)):te.RGB(Re(s.h,s.s,s.l),f)})},rt.RGBA=function(t,u,r,a,f){return u(t,r).map(function(s){return a?ee.RGB(at(ne(ne({},Re(s.h,s.s,s.l)),{a:Te(s.a)}),f)):te.RGBA(ne(ne({},Re(s.h,s.s,s.l)),{a:Te(s.a)}),f)})},rt[K.HSL]=function(t,u,r,a,f){return u(t,r).map(function(s){return a?ee.HSL(Mt({h:s.h,s:s.s,l:s.l},f)):te.HSL(Re(s.h,s.s,s.l),f)})},rt.HSLA=function(t,u,r,a,f){return u(t,r).map(function(s){return a?ee.HSL(Mt(ne(ne({},s),{a:Te(s.a)}),f)):te.HSLA(ne(ne({},Re(s.h,s.s,s.l)),{a:Te(s.a)}),f)})},rt),Ct=((it={mix:function(t,u){var r,a,f,s,c,p,v,d,y,x,R,O,T,H,E,M=t.map(function(D){var N=je(D);return ot(D,N)}),L=u===Ge.SUBTRACTIVE?M.map(function(D){var N,U,Z,ge,Ue,en,nn,cr,lt,hr,pr,pn,$e,Pt,ct=(N=D.r,U=D.g,Z=D.b,ge=Math.min(N,U,Z),Ue=Math.min(255-N,255-U,255-Z),en=N-ge,nn=U-ge,cr=Z-ge,lt=Math.min(en,nn),hr=en-lt,pr=(nn+lt)/2,pn=(cr+nn-lt)/2,$e=Math.max(hr,pr,pn)/Math.max(en,nn,cr),Pt=isNaN($e)||$e===1/0||$e<=0?1:$e,{r:hr/Pt+Ue,y:pr/Pt+Ue,b:pn/Pt+Ue});return Fe(D,"a")&&(ct.a=D.a),ct}):null;function A(D){var N=u===Ge.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return D.reduce(function(U,Z){var ge=Fe(Z,"a")?Z.a:1,Ue={r:Math.min(U.r+Z.r*ge,255),b:Math.min(U.b+Z.b*ge,255),a:1-(1-ge)*(1-U.a)},en="g"in U?U.g:U.y,nn="g"in Z?Z.g:Z.y;return ne(ne({},Ue),u===Ge.ADDITIVE?{g:Math.min(en+nn*ge,255)}:{y:Math.min(en+nn*ge,255)})},N)}if(u===Ge.ADDITIVE)r=A(M);else{var F=A(L);a=F.r,f=F.y,s=F.b,c=Math.min(a,f,s),p=Math.min(255-a,255-f,255-s),v=a-c,d=f-c,y=s-c,x=Math.min(d,y),R=v+d-x,O=d+x,T=2*(y-x),H=Math.max(R,O,T)/Math.max(v,d,y),E=isNaN(H)||H===1/0||H<=0?1:H,(r={r:R/E+p,g:O/E+p,b:T/E+p}).a=F.a}return{r:Y(r.r),g:Y(r.g),b:Y(r.b),a:hn(r.a,0,1)}}})[K.HEX]=function(t,u,r){var a=this.mix(t,u);return delete a.a,r?ee.HEX(a):te.HEX(a)},it.HEXA=function(t,u,r){var a=this.mix(t,u);return a.a=r?255*Te(a.a):Te(a.a),r?ee.HEX(a):te.HEXA(a)},it[K.RGB]=function(t,u,r,a){var f=this.mix(t,u);return delete f.a,r?ee.RGB(f):te.RGB(f,a)},it.RGBA=function(t,u,r,a){var f=this.mix(t,u);return r?ee.RGB(f):te.RGBA(f,a)},it[K.HSL]=function(t,u,r,a){var f=this.mix(t,u),s=Et(f.r,f.g,f.b);return delete f.a,delete s.a,r?ee.HSL(s):te.HSL(f,a)},it.HSLA=function(t,u,r,a){var f=this.mix(t,u),s=Et(f.r,f.g,f.b,f.a);return r?ee.HSL(s):te.HSLA(f,a)},it),at=function(t,u){return ne({r:Y(t.r,u),g:Y(t.g,u),b:Y(t.b,u)},Fe(t,"a")?{a:Y(t.a,u)}:{})},Mt=function(t,u){return ne({h:Y(t.h,u),s:Y(t.s,u),l:Y(t.l,u)},Fe(t,"a")?{a:Y(t.a,u)}:{})},Yp=function(t,u){return{c:Y(t.c,u),m:Y(t.m,u),y:Y(t.y,u),k:Y(t.k,u)}},Nn=function(t,u,r,a,f,s){var c=f(ot(t,u),a);return r?s(c):c},Ft=function(t,u,r,a,f,s,c){r<1&&(r=5);var p=function(v,d,y){var x=y-1,R=(d.r-v.r)/x,O=(d.g-v.g)/x,T=(d.b-v.b)/x,H=Te(v.a),E=(Te(d.a)-H)/x;return Array(y).fill(null).map(function(M,L){return L===0?v:L===x?d:{r:Y(v.r+R*L),g:Y(v.g+O*L),b:Y(v.b+T*L),a:Y(H+E*L)}})}(ot(t),ot(u),r);return p.map(function(v){var d=s(v,f);return a?c(d):d})},Xp=function(){function t(u,r){r===void 0&&(r=6),this.rgb=ot(u),this._decimals=r,this.updateHSL(),this.updateCMYK()}return t.prototype.updateRGB=function(){this.rgb=ne(ne({},Re(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},t.prototype.updateRGBFromCMYK=function(){this.rgb=ne(ne({},oo(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},t.prototype.updateHSL=function(){this.hsl=Et(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},t.prototype.updateCMYK=function(){this.cmyk=ps(this.rgb.r,this.rgb.g,this.rgb.b)},t.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},t.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},t.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},t.prototype.setDecimals=function(u){return this._decimals=u,this},t.prototype.setH=function(u){return this.hsl.h=fr(u),this.updateRGBAndCMYK()},t.prototype.setS=function(u){return this.hsl.s=hn(u,0,100),this.updateRGBAndCMYK()},t.prototype.setL=function(u){return this.hsl.l=hn(u,0,100),this.updateRGBAndCMYK()},t.prototype.setR=function(u){return this.rgb.r=hn(u,0,255),this.updateHSLAndCMYK()},t.prototype.setG=function(u){return this.rgb.g=hn(u,0,255),this.updateHSLAndCMYK()},t.prototype.setB=function(u){return this.rgb.b=hn(u,0,255),this.updateHSLAndCMYK()},t.prototype.setA=function(u){return this.hsl.a=this.rgb.a=hn(u,0,1),this},t.prototype.setC=function(u){return this.cmyk.c=hn(u,0,100),this.updateRGBAndHSL()},t.prototype.setM=function(u){return this.cmyk.m=hn(u,0,100),this.updateRGBAndHSL()},t.prototype.setY=function(u){return this.cmyk.y=hn(u,0,100),this.updateRGBAndHSL()},t.prototype.setK=function(u){return this.cmyk.k=hn(u,0,100),this.updateRGBAndHSL()},Object.defineProperty(t.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"H",{get:function(){return Y(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"S",{get:function(){return Y(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"L",{get:function(){return Y(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R",{get:function(){return Y(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"G",{get:function(){return Y(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"B",{get:function(){return Y(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"A",{get:function(){return Y(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"C",{get:function(){return Y(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"M",{get:function(){return Y(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Y",{get:function(){return Y(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"K",{get:function(){return Y(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXObject",{get:function(){return te.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXAObject",{get:function(){return te.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBAObject",{get:function(){return ne(ne({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLAObject",{get:function(){return ne(ne({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKAObject",{get:function(){return ne(ne({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEX",{get:function(){return ee.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HEXA",{get:function(){return ee.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGB",{get:function(){return ee.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RGBA",{get:function(){return ee.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSL",{get:function(){return ee.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HSLA",{get:function(){return ee.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYK",{get:function(){return ee.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CMYKA",{get:function(){return ee.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),t.toHEX=function(u,r){r===void 0&&(r=!0);var a=je(u);return Nn(u,a,r,0,te.HEX,ee.HEX)},t.toHEXA=function(u,r){r===void 0&&(r=!0);var a=je(u);return Nn(u,a,r,0,te.HEXA,ee.HEX)},t.toRGB=function(u,r,a){r===void 0&&(r=!0),a===void 0&&(a=6);var f=je(u);return Nn(u,f,r,a,te.RGB,ee.RGB)},t.toRGBA=function(u,r,a){r===void 0&&(r=!0),a===void 0&&(a=6);var f=je(u);return Nn(u,f,r,a,te.RGBA,ee.RGB)},t.toHSL=function(u,r,a){r===void 0&&(r=!0),a===void 0&&(a=6);var f=je(u);return Nn(u,f,r,a,te.HSL,ee.HSL)},t.toHSLA=function(u,r,a){r===void 0&&(r=!0),a===void 0&&(a=6);var f=je(u);return Nn(u,f,r,a,te.HSLA,ee.HSL)},t.toCMYK=function(u,r,a){r===void 0&&(r=!0),a===void 0&&(a=6);var f=je(u);return Nn(u,f,r,a,te.CMYK,ee.CMYK)},t.toCMYKA=function(u,r,a){r===void 0&&(r=!0),a===void 0&&(a=6);var f=je(u);return Nn(u,f,r,a,te.CMYKA,ee.CMYK)},t.getBlendHEX=function(u,r,a,f,s){return a===void 0&&(a=5),f===void 0&&(f=!0),s===void 0&&(s=6),Ft(u,r,a,f,s,te.HEX,ee.HEX)},t.getBlendHEXA=function(u,r,a,f,s){return a===void 0&&(a=5),f===void 0&&(f=!0),s===void 0&&(s=6),Ft(u,r,a,f,s,te.HEXA,ee.HEX)},t.getBlendRGB=function(u,r,a,f,s){return a===void 0&&(a=5),f===void 0&&(f=!0),s===void 0&&(s=6),Ft(u,r,a,f,s,te.RGB,ee.RGB)},t.getBlendRGBA=function(u,r,a,f,s){return a===void 0&&(a=5),f===void 0&&(f=!0),s===void 0&&(s=6),Ft(u,r,a,f,s,te.RGBA,ee.RGB)},t.getBlendHSL=function(u,r,a,f,s){return a===void 0&&(a=5),f===void 0&&(f=!0),s===void 0&&(s=6),Ft(u,r,a,f,s,te.HSL,ee.HSL)},t.getBlendHSLA=function(u,r,a,f,s){return a===void 0&&(a=5),f===void 0&&(f=!0),s===void 0&&(s=6),Ft(u,r,a,f,s,te.HSLA,ee.HSL)},t.getMixHEX=function(u,r,a){return r===void 0&&(r=Ge.ADDITIVE),a===void 0&&(a=!0),Ct.HEX(u,r,a)},t.getMixHEXA=function(u,r,a){return r===void 0&&(r=Ge.ADDITIVE),a===void 0&&(a=!0),Ct.HEXA(u,r,a)},t.getMixRGB=function(u,r,a,f){return r===void 0&&(r=Ge.ADDITIVE),a===void 0&&(a=!0),f===void 0&&(f=6),Ct.RGB(u,r,a,f)},t.getMixRGBA=function(u,r,a,f){return r===void 0&&(r=Ge.ADDITIVE),a===void 0&&(a=!0),f===void 0&&(f=6),Ct.RGBA(u,r,a,f)},t.getMixHSL=function(u,r,a,f){return r===void 0&&(r=Ge.ADDITIVE),a===void 0&&(a=!0),f===void 0&&(f=6),Ct.HSL(u,r,a,f)},t.getMixHSLA=function(u,r,a,f){return r===void 0&&(r=Ge.ADDITIVE),a===void 0&&(a=!0),f===void 0&&(f=6),Ct.HSLA(u,r,a,f)},t.getShades=function(u,r,a){return a===void 0&&(a=6),ds(u,r,!0,a)},t.getTints=function(u,r,a){return a===void 0&&(a=6),ds(u,r,!1,a)},t.getHarmony=function(u,r,a,f){return r===void 0&&(r=Rn.COMPLEMENTARY),a===void 0&&(a=Ge.ADDITIVE),f===void 0&&(f=6),function(s,c,p,v){var d;return(d={},d[Rn.ANALOGOUS]=Ot.buildHarmony(c,Lp,v,p),d[Rn.COMPLEMENTARY]=Ot.buildHarmony(c,Pp,v,p),d[Rn.SPLIT_COMPLEMENTARY]=Ot.buildHarmony(c,Hp,v,p),d[Rn.TRIADIC]=Ot.buildHarmony(c,Dp,v,p),d[Rn.TETRADIC]=Ot.buildHarmony(c,qp,v,p),d[Rn.SQUARE]=Ot.buildHarmony(c,Gp,v,p),d)[s]}(r,u,f,a)},t}();const Wp={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1};var Le=63710088e-1,vs={centimeters:Le*100,centimetres:Le*100,degrees:Le/111325,feet:Le*3.28084,inches:Le*39.37,kilometers:Le/1e3,kilometres:Le/1e3,meters:Le,metres:Le,miles:Le/1609.344,millimeters:Le*1e3,millimetres:Le*1e3,nauticalmiles:Le/1852,radians:1,yards:Le*1.0936};function It(t,u,r){r===void 0&&(r={});var a={type:"Feature"};return(r.id===0||r.id)&&(a.id=r.id),r.bbox&&(a.bbox=r.bbox),a.properties=u||{},a.geometry=t,a}function ms(t,u,r){if(r===void 0&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!bs(t[0])||!bs(t[1]))throw new Error("coordinates must contain numbers");var a={type:"Point",coordinates:t};return It(a,u,r)}function ao(t,u,r){if(r===void 0&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var a={type:"LineString",coordinates:t};return It(a,u,r)}function ys(t,u){u===void 0&&(u="kilometers");var r=vs[u];if(!r)throw new Error(u+" units is invalid");return t*r}function kp(t,u){u===void 0&&(u="kilometers");var r=vs[u];if(!r)throw new Error(u+" units is invalid");return t/r}function ei(t){var u=t%360;return u*Math.PI/180}function _s(t,u,r){if(u===void 0&&(u="kilometers"),r===void 0&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return ys(kp(t,u),r)}function bs(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function ni(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ws(t,u,r){if(!t)throw new Error("No feature passed");if(!r)throw new Error(".featureOf() requires a name");if(!t||t.type!=="Feature"||!t.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!t.geometry||t.geometry.type!==u)throw new Error("Invalid input to "+r+": must be a "+u+", given "+t.geometry.type)}function Up(t,u,r){r===void 0&&(r={});var a=ni(t),f=ni(u),s=ei(f[1]-a[1]),c=ei(f[0]-a[0]),p=ei(a[1]),v=ei(f[1]),d=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(p)*Math.cos(v);return ys(2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)),r.units)}function xs(t,u,r){if(t!==null)for(var a,f,s,c,p,v,d,y=0,x=0,R,O=t.type,T=O==="FeatureCollection",H=O==="Feature",E=T?t.features.length:1,M=0;Mv||T>d||H>y){p=x,v=a,d=T,y=H,s=0;return}var E=ao([p,x],r.properties);if(u(E,a,f,H,s)===!1)return!1;s++,p=x})===!1)return!1}}})}function Zp(t,u,r){r===void 0&&(r={});var a=ni(t),f=ni(u);f[0]+=f[0]-a[0]>180?-360:a[0]-f[0]>180?360:0;var s=Jp(a,f),c=_s(s,"meters",r.units);return c}function Jp(t,u,r){r=r===void 0?Le:Number(r);var a=r,f=t[1]*Math.PI/180,s=u[1]*Math.PI/180,c=s-f,p=Math.abs(u[0]-t[0])*Math.PI/180;p>Math.PI&&(p-=2*Math.PI);var v=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(f/2+Math.PI/4)),d=Math.abs(v)>1e-11?c/v:Math.cos(f),y=Math.sqrt(c*c+d*d*p*p),x=y*a;return x}function Qp(t,u,r){if(r===void 0&&(r={}),r.method||(r.method="geodesic"),r.units||(r.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=ms(t):t.type==="Point"?t=It(t):ws(t,"Point","point"),!u)throw new Error("line is required");Array.isArray(u)?u=ao(u):u.type==="LineString"?u=It(u):ws(u,"LineString","line");var a=1/0,f=t.geometry.coordinates;return Vp(u,function(s){var c=s.geometry.coordinates[0],p=s.geometry.coordinates[1],v=jp(f,c,p,r);vnew Xp(t).setA(u??Wp.alpha).RGBA,ng=(t,u)=>sr(t,u);function $n(t,u){return{width:t.width*u.scale.x,height:t.height*u.scale.y,x:t.x*u.scale.x+u.x,y:t.y*u.scale.y+u.y}}const so={text:{draw(t,u,r){const a=t.label??t.text;if(a){const f=$n(t,{x:t["label-x"]??t.textX??0,y:t["label-y"]??t.textY??0,scale:{x:1,y:1}}),s=$n(f,r);u.font=`${(t["label-size"]??t.fontSize??4)*r.scale.x}px Inter`,u.fillStyle=sr(t["label-color"]??t.fontColor??"grey",1),u.fillText(a,s.x,s.y)}},test(t){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}},narrow(){return!0}},path:{draw(t,u,r){const[a,...f]=t.points;u.beginPath(),u.lineCap="round",u.lineJoin="round",u.strokeStyle=ng(t.fill,t.alpha);const{x:s,y:c,width:p}=$n({...a,width:t["line-width"]??t.lineWidth,height:0},r);u.lineWidth=Oe(p),u.moveTo(Oe(s),Oe(c));for(const v of f){const{x:d,y}=$n({...v,width:0,height:0},r);u.lineTo(Oe(d),Oe(y))}u.stroke()},test(t){var r,a,f,s;const u=t["line-width"]??t.lineWidth;return{left:(((r=oe.minBy(t.points,"x"))==null?void 0:r.x)??0-u??0)-1,right:(((a=oe.maxBy(t.points,"x"))==null?void 0:a.x)??0+u??0)+1,top:(((f=oe.minBy(t.points,"y"))==null?void 0:f.y)??0-u??0)-1,bottom:(((s=oe.maxBy(t.points,"y"))==null?void 0:s.y)??0+u??0)+1}},narrow(t,u){return Qp(ms([u.x,u.y]),ao(t.points.map(({x:r,y:a})=>[r,a])))<500*t.lineWidth}},rect:{draw(t,u,r){const{x:a,y:f,width:s,height:c}=$n(t,r);u.fillStyle=sr(t.fill,t.alpha),u.fillRect(Oe(a),Oe(f),Oe(s)||1,Oe(c)||1)},test(t){return{left:t.x,right:t.x+t.width,top:t.y,bottom:t.y+t.height}},narrow(){return!0}},polygon:{draw(t,u,r){const[a,...f]=t.points;u.beginPath(),u.fillStyle=sr(t.fill,t.alpha);const{x:s,y:c}=$n({...a,width:0,height:0},r);u.moveTo(Oe(s),Oe(c));for(const p of f){const{x:v,y:d}=$n({...p,width:0,height:0},r);u.lineTo(Oe(v),Oe(d))}u.closePath(),u.fill()},test(t){var u,r,a,f;return{left:((u=oe.minBy(t.points,"x"))==null?void 0:u.x)??0,right:((r=oe.maxBy(t.points,"x"))==null?void 0:r.x)??0,top:((a=oe.minBy(t.points,"y"))==null?void 0:a.y)??0,bottom:((f=oe.maxBy(t.points,"y"))==null?void 0:f.y)??0}},narrow(){return!0}},circle:{draw(t,u,r){u.fillStyle=sr(t.fill,t.alpha),u.beginPath();const a=$n({...t,width:t.radius,height:t.radius},r);u.ellipse(Oe(a.x),Oe(a.y),Oe(a.width),Oe(a.height),0,0,2*eg),u.fill()},test(t){return{left:t.x-t.radius,right:t.x+t.radius,top:t.y-t.radius,bottom:t.y+t.radius}},narrow(){return!0}}},tg=t=>new Error(`The component ${t.$} is not supported by this renderer.`);function Ss(t,u,r,a){if(t in so)so[t].draw(u,r,a);else throw tg(u)}const rg=(t,u,r)=>{Ss(t.$,t,u,r),(t.text||t.label)&&Ss("text",t,u,r)},ig=({x:t,y:u})=>{const r=Math.abs(t),a=Math.abs(u),f=Math.max(r,a),s=2*f,c=Math.pow(s-1,2);return t==f&&u>-f?c+u-(-f+1):u==f?c+f-t+s-1:t==-f?c+f-u+2*s-1:u==-f?c+t+f+3*s-1:0};var ug={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Es=ug,og=ag,Rs={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function ag(t){var u,r=[],a=1,f;if(typeof t=="string")if(t=t.toLowerCase(),Es[t])r=Es[t].slice(),f="rgb";else if(t==="transparent")a=0,f="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var s=t.slice(1),c=s.length,p=c<=4;a=1,p?(r=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],c===4&&(a=parseInt(s[3]+s[3],16)/255)):(r=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],c===8&&(a=parseInt(s[6]+s[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),f="rgb"}else if(u=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var v=u[1],d=v==="rgb",s=v.replace(/a$/,"");f=s;var c=s==="cmyk"?4:s==="gray"?1:3;r=u[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(R,O){if(/%$/.test(R))return O===c?parseFloat(R)/100:s==="rgb"?parseFloat(R)*255/100:parseFloat(R);if(s[O]==="h"){if(/deg$/.test(R))return parseFloat(R);if(Rs[R]!==void 0)return Rs[R]}return parseFloat(R)}),v===s&&r.push(1),a=d||r[c]===void 0?1:r[c],r=r.slice(0,c)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(r=t.match(/([0-9]+)/g).map(function(y){return parseFloat(y)}),f=t.match(/([a-z])/ig).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(r=[t[0],t[1],t[2]],f="rgb",a=t.length===4?t[3]:1):t instanceof Object&&(t.r!=null||t.red!=null||t.R!=null?(f="rgb",r=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(f="hsl",r=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),a=t.a||t.alpha||t.opacity||1,t.opacity!=null&&(a/=100)):(f="rgb",r=[t>>>16,(t&65280)>>>8,t&255]);return{space:f,values:r,alpha:a}}var fg={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},sg=fg,lg={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var u=t[0]/360,r=t[1]/100,a=t[2]/100,f,s,c,p,v;if(r===0)return v=a*255,[v,v,v];a<.5?s=a*(1+r):s=a+r-a*r,f=2*a-s,p=[0,0,0];for(var d=0;d<3;d++)c=u+1/3*-(d-1),c<0?c++:c>1&&c--,6*c<1?v=f+(s-f)*6*c:2*c<1?v=s:3*c<2?v=f+(s-f)*(2/3-c)*6:v=f,p[d]=v*255;return p}};sg.hsl=function(t){var u=t[0]/255,r=t[1]/255,a=t[2]/255,f=Math.min(u,r,a),s=Math.max(u,r,a),c=s-f,p,v,d;return s===f?p=0:u===s?p=(r-a)/c:r===s?p=2+(a-u)/c:a===s&&(p=4+(u-r)/c),p=Math.min(p*60,360),p<0&&(p+=360),d=(f+s)/2,s===f?v=0:d<=.5?v=c/(s+f):v=c/(2-s-f),[p,v*100,d*100]};function cg(t,u,r){return t*(1-r)+u*r}var hg=cg,pg=gg;function gg(t,u,r){return ur?r:t:tu?u:t}const dg=og,vg=lg,mg=hg,yg=pg;var _g=bg;function bg(t){return t=t.map(function(u){if(u=dg(u),u.space!="rgb"){if(u.space!="hsl")throw"c.spacespace is not supported.";u.values=vg.rgb(u.values)}return u.values.push(u.alpha),u.values}),function(u,r){r=r||mg,u=yg(u,0,1);var a=(t.length-1)*u,f=Math.floor(a),s=Math.ceil(a);u=a-f;var c=t[f],p=t[s],v=c.map(function(d,y){return d=r(d,p[y],u),y<3&&(d=Math.round(d)),d});return v[3]===1?"rgb("+v.slice(0,3)+")":"rgba("+v+")"}}var wg=_e(_g);const Os=JSON.stringify,{log2:xg,max:Ag}=Math,Cs=t=>oe.floor(xg(t+1));function Sg(t,u){return oe.chain(t).split(" ").reduce((r,a)=>a.length+r.width>u?{text:`${r.text} -${a} `,width:a.length+1}:{text:`${r.text}${a} `,width:r.width+a.length+1},{width:0,text:""}).value().text}function Eg({right:t,left:u,bottom:r,top:a},f){const s=Ag(Cs(t-u),Cs(r-a))-f,c=2**s,p={left:oe.floor(u/c),right:oe.ceil((t+1)/c),top:oe.floor(a/c),bottom:oe.ceil((r+1)/c)};return{zoom:s,order:c,tiles:oe.shuffle(ph({x:oe.range(p.left,p.right+1),y:oe.range(p.top,p.bottom+1)}).map(v=>{const d=v.x*c,y=v.y*c;return{tile:v,bounds:{left:d-c/2,right:d+c/2,top:y-c/2,bottom:y+c/2}}}))}}const Rg=200,ti=t=>oe.isNumber(t)&&!isNaN(t);class Og extends Cp{constructor(){super(...arguments);qe(this,ri);qe(this,st);qe(this,ii);qe(this,ui);qe(this,oi);qe(this,ai);qe(this,Ne,void 0);qe(this,Bt,void 0);qe(this,Yn,void 0);qe(this,Xn,void 0);qe(this,lr,void 0);qe(this,Tt,void 0);qe(this,ft,void 0);qe(this,Lt,void 0);cn(this,Ne,Ep),cn(this,Bt,{bottom:256,top:0,left:0,right:256}),cn(this,Yn,new Sp(16)),cn(this,Xn,{}),cn(this,lr,0),cn(this,Tt,{}),cn(this,ft,{}),this.loadFont=oe.once(async()=>{try{const r=new FontFace("Inter","local('Inter'), local('Inter UI'), url('/public/fonts/inter.woff2') format('woff2'), url(https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2) format('woff2'), local('-apple-system'), local('BlinkMacSystemFont'), local('Arial'), local('Helvetica'), local('sans-serif')");self.fonts.add(r),await r.load()}catch(r){console.warn(r)}}),cn(this,Lt,oe.once(()=>oe.debounce(()=>this.render(),ce(this,Ne).refreshInterval,{leading:!1,trailing:!0}))),this.renderTile=dp((r,a)=>Sn(this,ai,hh).call(this,r,a),{normalizer:JSON.stringify,max:Rg})}getView(){return{system:ce(this,Yn),world:ce(this,Xn)}}setFrustum(r){cn(this,Bt,r),ce(this,Lt).call(this)()}setTileResolution(r){oe.isEqual(r,ce(this,Ne).tileResolution)||(Object.assign(ce(this,Ne),{tileResolution:r}),Sn(this,st,Hr).call(this))}add(r,a){const f=oe.map(r,({component:c,meta:p})=>({...so[c.$].test(c),component:c,meta:oe.pick(p,"sourceLayerIndex","sourceLayerAlpha","sourceLayerDisplayMode"),index:Sn(this,ri,fh).call(this)})),s=f.find(c=>!ti(c.top)||!ti(c.bottom)||!ti(c.left)||!ti(c.right));if(s){ce(this,ft)[a]=`Component '${s.component.$}' is missing properties. Check these: width, height, x, y.`;return}ce(this,Yn).load(f),ce(this,Xn)[a]=f,Sn(this,st,Hr).call(this)}remove(r){oe.map(ce(this,Xn)[r],a=>{ce(this,Yn).remove(a)}),delete ce(this,Xn)[r],delete ce(this,ft)[r],Sn(this,st,Hr).call(this)}setup(r){cn(this,Ne,r),Sn(this,st,Hr).call(this)}async render(){await this.loadFont();for(const{tile:r,bounds:a}of Eg(ce(this,Bt),ce(this,Ne).tileSubdivision).tiles)if(Sn(this,ii,sh).call(this,r)){const f=this.renderTile(a,ce(this,Ne).tileResolution);f&&this.emit("message",{action:"update",payload:{bounds:a,bitmap:f}},[])}}}Ne=new WeakMap,Bt=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,lr=new WeakMap,ri=new WeakSet,fh=function(){return ah(this,lr)._++},Tt=new WeakMap,ft=new WeakMap,st=new WeakSet,Hr=function(){this.renderTile.clear(),ce(this,Lt).call(this)()},Lt=new WeakMap,ii=new WeakSet,sh=function({x:r,y:a}){const{workerCount:f,workerIndex:s}=ce(this,Ne);return ig({x:r,y:a})%f===s},ui=new WeakSet,lh=function(){const{tileResolution:r,tileSubdivision:a}=ce(this,Ne);return r.width*2**a/4096},oi=new WeakSet,ch=function(r,a=""){const{errorColor:c,backgroundColor:p}=ce(this,Ne),v=new OffscreenCanvas(r.width,r.height),d=v.getContext("2d",{alpha:!1}),y=Sn(this,ui,lh).call(this);d.fillStyle=wg([p,c])(.05),d.fillRect(0,0,r.width,r.height),d.font=`${y*64}px Inter, Helvetica, Arial, sans-serif`,d.fillStyle=c;for(const[x,R]of Sg(oe.truncate(a,{length:100}),28).split(` +${a} `,width:a.length+1}:{text:`${r.text}${a} `,width:r.width+a.length+1},{width:0,text:""}).value().text}function Eg({right:t,left:u,bottom:r,top:a},f){const s=Ag(Cs(t-u),Cs(r-a))-f,c=2**s,p={left:oe.floor(u/c),right:oe.ceil((t+1)/c),top:oe.floor(a/c),bottom:oe.ceil((r+1)/c)};return{zoom:s,order:c,tiles:oe.shuffle(ph({x:oe.range(p.left,p.right+1),y:oe.range(p.top,p.bottom+1)}).map(v=>{const d=v.x*c,y=v.y*c;return{tile:v,bounds:{left:d-c/2,right:d+c/2,top:y-c/2,bottom:y+c/2}}}))}}const Rg=200,ti=t=>oe.isNumber(t)&&!isNaN(t);class Og extends Cp{constructor(){super(...arguments);qe(this,ri);qe(this,st);qe(this,ii);qe(this,ui);qe(this,oi);qe(this,ai);qe(this,Ne,void 0);qe(this,Bt,void 0);qe(this,Yn,void 0);qe(this,Xn,void 0);qe(this,lr,void 0);qe(this,Tt,void 0);qe(this,ft,void 0);qe(this,Lt,void 0);cn(this,Ne,Ep),cn(this,Bt,{bottom:256,top:0,left:0,right:256}),cn(this,Yn,new Sp(16)),cn(this,Xn,{}),cn(this,lr,0),cn(this,Tt,{}),cn(this,ft,{}),this.loadFont=oe.once(async()=>{try{const r=new FontFace("Inter","local('Inter'), local('Inter UI'), url('/fonts/inter.woff2') format('woff2'), url(https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2) format('woff2'), local('-apple-system'), local('BlinkMacSystemFont'), local('Arial'), local('Helvetica'), local('sans-serif')");self.fonts.add(r),await r.load()}catch(r){console.warn(r)}}),cn(this,Lt,oe.once(()=>oe.debounce(()=>this.render(),ce(this,Ne).refreshInterval,{leading:!1,trailing:!0}))),this.renderTile=dp((r,a)=>Sn(this,ai,hh).call(this,r,a),{normalizer:JSON.stringify,max:Rg})}getView(){return{system:ce(this,Yn),world:ce(this,Xn)}}setFrustum(r){cn(this,Bt,r),ce(this,Lt).call(this)()}setTileResolution(r){oe.isEqual(r,ce(this,Ne).tileResolution)||(Object.assign(ce(this,Ne),{tileResolution:r}),Sn(this,st,Hr).call(this))}add(r,a){const f=oe.map(r,({component:c,meta:p})=>({...so[c.$].test(c),component:c,meta:oe.pick(p,"sourceLayerIndex","sourceLayerAlpha","sourceLayerDisplayMode"),index:Sn(this,ri,fh).call(this)})),s=f.find(c=>!ti(c.top)||!ti(c.bottom)||!ti(c.left)||!ti(c.right));if(s){ce(this,ft)[a]=`Component '${s.component.$}' is missing properties. Check these: width, height, x, y.`;return}ce(this,Yn).load(f),ce(this,Xn)[a]=f,Sn(this,st,Hr).call(this)}remove(r){oe.map(ce(this,Xn)[r],a=>{ce(this,Yn).remove(a)}),delete ce(this,Xn)[r],delete ce(this,ft)[r],Sn(this,st,Hr).call(this)}setup(r){cn(this,Ne,r),Sn(this,st,Hr).call(this)}async render(){await this.loadFont();for(const{tile:r,bounds:a}of Eg(ce(this,Bt),ce(this,Ne).tileSubdivision).tiles)if(Sn(this,ii,sh).call(this,r)){const f=this.renderTile(a,ce(this,Ne).tileResolution);f&&this.emit("message",{action:"update",payload:{bounds:a,bitmap:f}},[])}}}Ne=new WeakMap,Bt=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,lr=new WeakMap,ri=new WeakSet,fh=function(){return ah(this,lr)._++},Tt=new WeakMap,ft=new WeakMap,st=new WeakSet,Hr=function(){this.renderTile.clear(),ce(this,Lt).call(this)()},Lt=new WeakMap,ii=new WeakSet,sh=function({x:r,y:a}){const{workerCount:f,workerIndex:s}=ce(this,Ne);return ig({x:r,y:a})%f===s},ui=new WeakSet,lh=function(){const{tileResolution:r,tileSubdivision:a}=ce(this,Ne);return r.width*2**a/4096},oi=new WeakSet,ch=function(r,a=""){const{errorColor:c,backgroundColor:p}=ce(this,Ne),v=new OffscreenCanvas(r.width,r.height),d=v.getContext("2d",{alpha:!1}),y=Sn(this,ui,lh).call(this);d.fillStyle=wg([p,c])(.05),d.fillRect(0,0,r.width,r.height),d.font=`${y*64}px Inter, Helvetica, Arial, sans-serif`,d.fillStyle=c;for(const[x,R]of Sg(oe.truncate(a,{length:100}),28).split(` `).map((...O)=>O))d.fillText(x,y*64,y*64*2+(12+64)*y*R);return d.lineWidth=y*.5,d.strokeStyle=c,d.strokeRect(0,0,r.width,r.height),v},ai=new WeakSet,hh=function(r,a){try{const f=oe.values(ce(this,ft)).find(oe.identity);if(f)throw new Error(f);const{top:s,right:c,bottom:p,left:v}=r,d={x:a.width/(c-v),y:a.height/(p-s)},y=oe.sortBy(ce(this,Yn).search({minX:v,maxX:c,maxY:p,minY:s}),"index"),x=Os(oe.map(y,"index")),R=Os([s,c,p,v,a.width,a.height]),O=ce(this,Tt)[R];if(!O||x!==O.hash){const T=new OffscreenCanvas(a.width,a.height),H=T.getContext("2d",{alpha:!1});H.imageSmoothingEnabled=!1,H.fillStyle=ce(this,Ne).backgroundColor,H.fillRect(0,0,a.width,a.height);const E=a.width*.05,M=1;H.fillStyle="rgba(127,127,127,0.36)",H.fillRect((a.width-E)/2,(a.height-M)/2,E,M),H.fillRect((a.width-M)/2,(a.height-E)/2,M,E),oe.chain(y).sortBy(A=>{var F;return-(((F=A.meta)==null?void 0:F.sourceLayerIndex)??0)}).groupBy(A=>{var F;return((F=A.meta)==null?void 0:F.sourceLayerIndex)??0}).forEach(A=>{var Z,ge,Ue,en;const F=new OffscreenCanvas(a.width,a.height),D=F.getContext("2d");for(const{component:nn}of A)rg(nn,D,{scale:d,x:-v*d.x,y:-s*d.y});const N=((ge=(Z=oe.head(A))==null?void 0:Z.meta)==null?void 0:ge.sourceLayerAlpha)??1,U=((en=(Ue=oe.head(A))==null?void 0:Ue.meta)==null?void 0:en.sourceLayerDisplayMode)??"source-over";H.globalCompositeOperation=U,H.globalAlpha=N,H.drawImage(F,0,0)}).value();const L=T.transferToImageBitmap();return ce(this,Tt)[R]={hash:x,tile:L},L}else return O.tile}catch(f){return console.error(f),Sn(this,oi,ch).call(this,a,oe.get(f,"message")).transferToImageBitmap()}};const Ms=new Og;Ms.on("message",(t,u)=>self.postMessage(t,u)),self.onmessage=t=>{const{action:u,payload:r}=t.data;Ms[u](...r)}})(); diff --git a/assets/index-9099f480.js b/assets/index-9b775582.js similarity index 83% rename from assets/index-9099f480.js rename to assets/index-9b775582.js index 1a125fc..6b25801 100644 --- a/assets/index-9099f480.js +++ b/assets/index-9b775582.js @@ -27,7 +27,7 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function styled$3(ne,oe){return newStyled(ne,oe)}const internal_processStyles=(ne,oe)=>{Array.isArray(ne.__emotion_styles)&&(ne.__emotion_styles=oe(ne.__emotion_styles))},styledEngine=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:GlobalStyles$2,StyledEngineProvider,ThemeContext:ThemeContext$2,css,default:styled$3,internal_processStyles,keyframes},Symbol.toStringTag,{value:"Module"}));function isPlainObject$4(ne){if(typeof ne!="object"||ne===null)return!1;const oe=Object.getPrototypeOf(ne);return(oe===null||oe===Object.prototype||Object.getPrototypeOf(oe)===null)&&!(Symbol.toStringTag in ne)&&!(Symbol.iterator in ne)}function deepClone(ne){if(!isPlainObject$4(ne))return ne;const oe={};return Object.keys(ne).forEach(ce=>{oe[ce]=deepClone(ne[ce])}),oe}function deepmerge$1(ne,oe,ce={clone:!0}){const ue=ce.clone?_extends$2({},ne):ne;return isPlainObject$4(ne)&&isPlainObject$4(oe)&&Object.keys(oe).forEach(pe=>{pe!=="__proto__"&&(isPlainObject$4(oe[pe])&&pe in ne&&isPlainObject$4(ne[pe])?ue[pe]=deepmerge$1(ne[pe],oe[pe],ce):ce.clone?ue[pe]=isPlainObject$4(oe[pe])?deepClone(oe[pe]):oe[pe]:ue[pe]=oe[pe])}),ue}const deepmerge=Object.freeze(Object.defineProperty({__proto__:null,default:deepmerge$1,isPlainObject:isPlainObject$4},Symbol.toStringTag,{value:"Module"})),_excluded$1i=["values","unit","step"],sortBreakpointsValues=ne=>{const oe=Object.keys(ne).map(ce=>({key:ce,val:ne[ce]}))||[];return oe.sort((ce,ue)=>ce.val-ue.val),oe.reduce((ce,ue)=>_extends$2({},ce,{[ue.key]:ue.val}),{})};function createBreakpoints(ne){const{values:oe={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:ce="px",step:ue=5}=ne,pe=_objectWithoutPropertiesLoose$2(ne,_excluded$1i),me=sortBreakpointsValues(oe),ge=Object.keys(me);function ye($e){return`@media (min-width:${typeof oe[$e]=="number"?oe[$e]:$e}${ce})`}function ve($e){return`@media (max-width:${(typeof oe[$e]=="number"?oe[$e]:$e)-ue/100}${ce})`}function xe($e,Re){const Ae=ge.indexOf(Re);return`@media (min-width:${typeof oe[$e]=="number"?oe[$e]:$e}${ce}) and (max-width:${(Ae!==-1&&typeof oe[ge[Ae]]=="number"?oe[ge[Ae]]:Re)-ue/100}${ce})`}function _e($e){return ge.indexOf($e)+1`@media (min-width:${values$1[ne]}px)`};function handleBreakpoints(ne,oe,ce){const ue=ne.theme||{};if(Array.isArray(oe)){const me=ue.breakpoints||defaultBreakpoints;return oe.reduce((ge,ye,ve)=>(ge[me.up(me.keys[ve])]=ce(oe[ve]),ge),{})}if(typeof oe=="object"){const me=ue.breakpoints||defaultBreakpoints;return Object.keys(oe).reduce((ge,ye)=>{if(Object.keys(me.values||values$1).indexOf(ye)!==-1){const ve=me.up(ye);ge[ve]=ce(oe[ye],ye)}else{const ve=ye;ge[ve]=oe[ve]}return ge},{})}return ce(oe)}function createEmptyBreakpointObject(ne={}){var oe;return((oe=ne.keys)==null?void 0:oe.reduce((ue,pe)=>{const me=ne.up(pe);return ue[me]={},ue},{}))||{}}function removeUnusedBreakpoints(ne,oe){return ne.reduce((ce,ue)=>{const pe=ce[ue];return(!pe||Object.keys(pe).length===0)&&delete ce[ue],ce},oe)}function mergeBreakpointsInOrder(ne,...oe){const ce=createEmptyBreakpointObject(ne),ue=[ce,...oe].reduce((pe,me)=>deepmerge$1(pe,me),{});return removeUnusedBreakpoints(Object.keys(ce),ue)}function computeBreakpointsBase(ne,oe){if(typeof ne!="object")return{};const ce={},ue=Object.keys(oe);return Array.isArray(ne)?ue.forEach((pe,me)=>{me{ne[pe]!=null&&(ce[pe]=!0)}),ce}function resolveBreakpointValues({values:ne,breakpoints:oe,base:ce}){const ue=ce||computeBreakpointsBase(ne,oe),pe=Object.keys(ue);if(pe.length===0)return ne;let me;return pe.reduce((ge,ye,ve)=>(Array.isArray(ne)?(ge[ye]=ne[ve]!=null?ne[ve]:ne[me],me=ve):typeof ne=="object"?(ge[ye]=ne[ye]!=null?ne[ye]:ne[me],me=ye):ge[ye]=ne,ge),{})}function capitalize$1(ne){if(typeof ne!="string")throw new Error(formatMuiErrorMessage$1(7));return ne.charAt(0).toUpperCase()+ne.slice(1)}const capitalize=Object.freeze(Object.defineProperty({__proto__:null,default:capitalize$1},Symbol.toStringTag,{value:"Module"}));function getPath(ne,oe,ce=!0){if(!oe||typeof oe!="string")return null;if(ne&&ne.vars&&ce){const ue=`vars.${oe}`.split(".").reduce((pe,me)=>pe&&pe[me]?pe[me]:null,ne);if(ue!=null)return ue}return oe.split(".").reduce((ue,pe)=>ue&&ue[pe]!=null?ue[pe]:null,ne)}function getStyleValue$1(ne,oe,ce,ue=ce){let pe;return typeof ne=="function"?pe=ne(ce):Array.isArray(ne)?pe=ne[ce]||ue:pe=getPath(ne,ce)||ue,oe&&(pe=oe(pe,ue,ne)),pe}function style$4(ne){const{prop:oe,cssProperty:ce=ne.prop,themeKey:ue,transform:pe}=ne,me=ge=>{if(ge[oe]==null)return null;const ye=ge[oe],ve=ge.theme,xe=getPath(ve,ue)||{};return handleBreakpoints(ge,ye,Se=>{let $e=getStyleValue$1(xe,pe,Se);return Se===$e&&typeof Se=="string"&&($e=getStyleValue$1(xe,pe,`${oe}${Se==="default"?"":capitalize$1(Se)}`,Se)),ce===!1?$e:{[ce]:$e}})};return me.propTypes={},me.filterProps=[oe],me}function memoize$1(ne){const oe={};return ce=>(oe[ce]===void 0&&(oe[ce]=ne(ce)),oe[ce])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases$1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize$1(ne=>{if(ne.length>2)if(aliases$1[ne])ne=aliases$1[ne];else return[ne];const[oe,ce]=ne.split(""),ue=properties[oe],pe=directions[ce]||"";return Array.isArray(pe)?pe.map(me=>ue+me):[ue+pe]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...marginKeys,...paddingKeys];function createUnaryUnit(ne,oe,ce,ue){var pe;const me=(pe=getPath(ne,oe,!1))!=null?pe:ce;return typeof me=="number"?ge=>typeof ge=="string"?ge:me*ge:Array.isArray(me)?ge=>typeof ge=="string"?ge:me[ge]:typeof me=="function"?me:()=>{}}function createUnarySpacing(ne){return createUnaryUnit(ne,"spacing",8)}function getValue$2(ne,oe){if(typeof oe=="string"||oe==null)return oe;const ce=Math.abs(oe),ue=ne(ce);return oe>=0?ue:typeof ue=="number"?-ue:`-${ue}`}function getStyleFromPropValue(ne,oe){return ce=>ne.reduce((ue,pe)=>(ue[pe]=getValue$2(oe,ce),ue),{})}function resolveCssProperty(ne,oe,ce,ue){if(oe.indexOf(ce)===-1)return null;const pe=getCssProperties(ce),me=getStyleFromPropValue(pe,ue),ge=ne[ce];return handleBreakpoints(ne,ge,me)}function style$3(ne,oe){const ce=createUnarySpacing(ne.theme);return Object.keys(ne).map(ue=>resolveCssProperty(ne,oe,ue,ce)).reduce(merge$5,{})}function margin(ne){return style$3(ne,marginKeys)}margin.propTypes={};margin.filterProps=marginKeys;function padding(ne){return style$3(ne,paddingKeys)}padding.propTypes={};padding.filterProps=paddingKeys;function createSpacing(ne=8){if(ne.mui)return ne;const oe=createUnarySpacing({spacing:ne}),ce=(...ue)=>(ue.length===0?[1]:ue).map(me=>{const ge=oe(me);return typeof ge=="number"?`${ge}px`:ge}).join(" ");return ce.mui=!0,ce}function compose$4(...ne){const oe=ne.reduce((ue,pe)=>(pe.filterProps.forEach(me=>{ue[me]=pe}),ue),{}),ce=ue=>Object.keys(ue).reduce((pe,me)=>oe[me]?merge$5(pe,oe[me](ue)):pe,{});return ce.propTypes={},ce.filterProps=ne.reduce((ue,pe)=>ue.concat(pe.filterProps),[]),ce}function borderTransform(ne){return typeof ne!="number"?ne:`${ne}px solid`}function createBorderStyle(ne,oe){return style$4({prop:ne,themeKey:"borders",transform:oe})}const border=createBorderStyle("border",borderTransform),borderTop=createBorderStyle("borderTop",borderTransform),borderRight=createBorderStyle("borderRight",borderTransform),borderBottom=createBorderStyle("borderBottom",borderTransform),borderLeft=createBorderStyle("borderLeft",borderTransform),borderColor=createBorderStyle("borderColor"),borderTopColor=createBorderStyle("borderTopColor"),borderRightColor=createBorderStyle("borderRightColor"),borderBottomColor=createBorderStyle("borderBottomColor"),borderLeftColor=createBorderStyle("borderLeftColor"),outline=createBorderStyle("outline",borderTransform),outlineColor=createBorderStyle("outlineColor"),borderRadius=ne=>{if(ne.borderRadius!==void 0&&ne.borderRadius!==null){const oe=createUnaryUnit(ne.theme,"shape.borderRadius",4),ce=ue=>({borderRadius:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.borderRadius,ce)}return null};borderRadius.propTypes={};borderRadius.filterProps=["borderRadius"];compose$4(border,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius,outline,outlineColor);const gap$1=ne=>{if(ne.gap!==void 0&&ne.gap!==null){const oe=createUnaryUnit(ne.theme,"spacing",8),ce=ue=>({gap:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.gap,ce)}return null};gap$1.propTypes={};gap$1.filterProps=["gap"];const columnGap=ne=>{if(ne.columnGap!==void 0&&ne.columnGap!==null){const oe=createUnaryUnit(ne.theme,"spacing",8),ce=ue=>({columnGap:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.columnGap,ce)}return null};columnGap.propTypes={};columnGap.filterProps=["columnGap"];const rowGap=ne=>{if(ne.rowGap!==void 0&&ne.rowGap!==null){const oe=createUnaryUnit(ne.theme,"spacing",8),ce=ue=>({rowGap:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.rowGap,ce)}return null};rowGap.propTypes={};rowGap.filterProps=["rowGap"];const gridColumn=style$4({prop:"gridColumn"}),gridRow=style$4({prop:"gridRow"}),gridAutoFlow=style$4({prop:"gridAutoFlow"}),gridAutoColumns=style$4({prop:"gridAutoColumns"}),gridAutoRows=style$4({prop:"gridAutoRows"}),gridTemplateColumns=style$4({prop:"gridTemplateColumns"}),gridTemplateRows=style$4({prop:"gridTemplateRows"}),gridTemplateAreas=style$4({prop:"gridTemplateAreas"}),gridArea=style$4({prop:"gridArea"});compose$4(gap$1,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);function paletteTransform(ne,oe){return oe==="grey"?oe:ne}const color=style$4({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$4({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor=style$4({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});compose$4(color,bgcolor,backgroundColor);function sizingTransform(ne){return ne<=1&&ne!==0?`${ne*100}%`:ne}const width=style$4({prop:"width",transform:sizingTransform}),maxWidth=ne=>{if(ne.maxWidth!==void 0&&ne.maxWidth!==null){const oe=ce=>{var ue,pe;const me=((ue=ne.theme)==null||(ue=ue.breakpoints)==null||(ue=ue.values)==null?void 0:ue[ce])||values$1[ce];return me?((pe=ne.theme)==null||(pe=pe.breakpoints)==null?void 0:pe.unit)!=="px"?{maxWidth:`${me}${ne.theme.breakpoints.unit}`}:{maxWidth:me}:{maxWidth:sizingTransform(ce)}};return handleBreakpoints(ne,ne.maxWidth,oe)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$4({prop:"minWidth",transform:sizingTransform}),height=style$4({prop:"height",transform:sizingTransform}),maxHeight=style$4({prop:"maxHeight",transform:sizingTransform}),minHeight=style$4({prop:"minHeight",transform:sizingTransform});style$4({prop:"size",cssProperty:"width",transform:sizingTransform});style$4({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$4({prop:"boxSizing"});compose$4(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding},pt:{style:padding},pr:{style:padding},pb:{style:padding},pl:{style:padding},px:{style:padding},py:{style:padding},padding:{style:padding},paddingTop:{style:padding},paddingRight:{style:padding},paddingBottom:{style:padding},paddingLeft:{style:padding},paddingX:{style:padding},paddingY:{style:padding},paddingInline:{style:padding},paddingInlineStart:{style:padding},paddingInlineEnd:{style:padding},paddingBlock:{style:padding},paddingBlockStart:{style:padding},paddingBlockEnd:{style:padding},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:ne=>({"@media print":{display:ne}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap$1},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},defaultSxConfig$1=defaultSxConfig;function objectsHaveSameKeys(...ne){const oe=ne.reduce((ue,pe)=>ue.concat(Object.keys(pe)),[]),ce=new Set(oe);return ne.every(ue=>ce.size===Object.keys(ue).length)}function callIfFn(ne,oe){return typeof ne=="function"?ne(oe):ne}function unstable_createStyleFunctionSx(){function ne(ce,ue,pe,me){const ge={[ce]:ue,theme:pe},ye=me[ce];if(!ye)return{[ce]:ue};const{cssProperty:ve=ce,themeKey:xe,transform:_e,style:Se}=ye;if(ue==null)return null;if(xe==="typography"&&ue==="inherit")return{[ce]:ue};const $e=getPath(pe,xe)||{};return Se?Se(ge):handleBreakpoints(ge,ue,Ae=>{let Ie=getStyleValue$1($e,_e,Ae);return Ae===Ie&&typeof Ae=="string"&&(Ie=getStyleValue$1($e,_e,`${ce}${Ae==="default"?"":capitalize$1(Ae)}`,Ae)),ve===!1?Ie:{[ve]:Ie}})}function oe(ce){var ue;const{sx:pe,theme:me={}}=ce||{};if(!pe)return null;const ge=(ue=me.unstable_sxConfig)!=null?ue:defaultSxConfig$1;function ye(ve){let xe=ve;if(typeof ve=="function")xe=ve(me);else if(typeof ve!="object")return ve;if(!xe)return null;const _e=createEmptyBreakpointObject(me.breakpoints),Se=Object.keys(_e);let $e=_e;return Object.keys(xe).forEach(Re=>{const Ae=callIfFn(xe[Re],me);if(Ae!=null)if(typeof Ae=="object")if(ge[Re])$e=merge$5($e,ne(Re,Ae,me,ge));else{const Ie=handleBreakpoints({theme:me},Ae,ke=>({[Re]:ke}));objectsHaveSameKeys(Ie,Ae)?$e[Re]=oe({sx:Ae,theme:me}):$e=merge$5($e,Ie)}else $e=merge$5($e,ne(Re,Ae,me,ge))}),removeUnusedBreakpoints(Se,$e)}return Array.isArray(pe)?pe.map(ye):ye(pe)}return oe}const styleFunctionSx$1=unstable_createStyleFunctionSx();styleFunctionSx$1.filterProps=["sx"];const styleFunctionSx$2=styleFunctionSx$1;function applyStyles$2(ne,oe){const ce=this;return ce.vars&&typeof ce.getColorSchemeSelector=="function"?{[ce.getColorSchemeSelector(ne).replace(/(\[[^\]]+\])/,"*:where($1)")]:oe}:ce.palette.mode===ne?oe:{}}const _excluded$1h=["breakpoints","palette","spacing","shape"];function createTheme$2(ne={},...oe){const{breakpoints:ce={},palette:ue={},spacing:pe,shape:me={}}=ne,ge=_objectWithoutPropertiesLoose$2(ne,_excluded$1h),ye=createBreakpoints(ce),ve=createSpacing(pe);let xe=deepmerge$1({breakpoints:ye,direction:"ltr",components:{},palette:_extends$2({mode:"light"},ue),spacing:ve,shape:_extends$2({},shape$1,me)},ge);return xe.applyStyles=applyStyles$2,xe=oe.reduce((_e,Se)=>deepmerge$1(_e,Se),xe),xe.unstable_sxConfig=_extends$2({},defaultSxConfig$1,ge==null?void 0:ge.unstable_sxConfig),xe.unstable_sx=function(Se){return styleFunctionSx$2({sx:Se,theme:this})},xe}const createTheme$1=Object.freeze(Object.defineProperty({__proto__:null,default:createTheme$2,private_createBreakpoints:createBreakpoints,unstable_applyStyles:applyStyles$2},Symbol.toStringTag,{value:"Module"}));function isObjectEmpty$1(ne){return Object.keys(ne).length===0}function useTheme$4(ne=null){const oe=reactExports.useContext(ThemeContext$2);return!oe||isObjectEmpty$1(oe)?ne:oe}const systemDefaultTheme$2=createTheme$2();function useTheme$3(ne=systemDefaultTheme$2){return useTheme$4(ne)}function GlobalStyles$1({styles:ne,themeId:oe,defaultTheme:ce={}}){const ue=useTheme$3(ce),pe=typeof ne=="function"?ne(oe&&ue[oe]||ue):ne;return jsxRuntimeExports.jsx(GlobalStyles$2,{styles:pe})}const _excluded$1g=["sx"],splitProps=ne=>{var oe,ce;const ue={systemProps:{},otherProps:{}},pe=(oe=ne==null||(ce=ne.theme)==null?void 0:ce.unstable_sxConfig)!=null?oe:defaultSxConfig$1;return Object.keys(ne).forEach(me=>{pe[me]?ue.systemProps[me]=ne[me]:ue.otherProps[me]=ne[me]}),ue};function extendSxProp(ne){const{sx:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$1g),{systemProps:ue,otherProps:pe}=splitProps(ce);let me;return Array.isArray(oe)?me=[ue,...oe]:typeof oe=="function"?me=(...ge)=>{const ye=oe(...ge);return isPlainObject$4(ye)?_extends$2({},ue,ye):ue}:me=_extends$2({},ue,oe),_extends$2({},pe,{sx:me})}const styleFunctionSx=Object.freeze(Object.defineProperty({__proto__:null,default:styleFunctionSx$2,extendSxProp,unstable_createStyleFunctionSx,unstable_defaultSxConfig:defaultSxConfig$1},Symbol.toStringTag,{value:"Module"})),defaultGenerator$1=ne=>ne,createClassNameGenerator$1=()=>{let ne=defaultGenerator$1;return{configure(oe){ne=oe},generate(oe){return ne(oe)},reset(){ne=defaultGenerator$1}}},ClassNameGenerator$2=createClassNameGenerator$1(),ClassNameGenerator$3=ClassNameGenerator$2;function r$8(ne){var oe,ce,ue="";if(typeof ne=="string"||typeof ne=="number")ue+=ne;else if(typeof ne=="object")if(Array.isArray(ne)){var pe=ne.length;for(oe=0;oeye!=="theme"&&ye!=="sx"&&ye!=="as"})(styleFunctionSx$2);return reactExports.forwardRef(function(ve,xe){const _e=useTheme$3(ce),Se=extendSxProp(ve),{className:$e,component:Re="div"}=Se,Ae=_objectWithoutPropertiesLoose$2(Se,_excluded$1f);return jsxRuntimeExports.jsx(me,_extends$2({as:Re,ref:xe,className:clsx($e,pe?pe(ue):ue),theme:oe&&_e[oe]||_e},Ae))})}const globalStateClasses$1={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass$2(ne,oe,ce="Mui"){const ue=globalStateClasses$1[oe];return ue?`${ce}-${ue}`:`${ClassNameGenerator$3.generate(ne)}-${oe}`}function generateUtilityClasses$2(ne,oe,ce="Mui"){const ue={};return oe.forEach(pe=>{ue[pe]=generateUtilityClass$2(ne,pe,ce)}),ue}var reactIs$2={exports:{}},reactIs_production_min$2={};/** + */function styled$3(ne,oe){return newStyled(ne,oe)}const internal_processStyles=(ne,oe)=>{Array.isArray(ne.__emotion_styles)&&(ne.__emotion_styles=oe(ne.__emotion_styles))},styledEngine=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:GlobalStyles$2,StyledEngineProvider,ThemeContext:ThemeContext$2,css,default:styled$3,internal_processStyles,keyframes},Symbol.toStringTag,{value:"Module"}));function isPlainObject$4(ne){if(typeof ne!="object"||ne===null)return!1;const oe=Object.getPrototypeOf(ne);return(oe===null||oe===Object.prototype||Object.getPrototypeOf(oe)===null)&&!(Symbol.toStringTag in ne)&&!(Symbol.iterator in ne)}function deepClone(ne){if(!isPlainObject$4(ne))return ne;const oe={};return Object.keys(ne).forEach(ce=>{oe[ce]=deepClone(ne[ce])}),oe}function deepmerge$1(ne,oe,ce={clone:!0}){const ue=ce.clone?_extends$2({},ne):ne;return isPlainObject$4(ne)&&isPlainObject$4(oe)&&Object.keys(oe).forEach(pe=>{pe!=="__proto__"&&(isPlainObject$4(oe[pe])&&pe in ne&&isPlainObject$4(ne[pe])?ue[pe]=deepmerge$1(ne[pe],oe[pe],ce):ce.clone?ue[pe]=isPlainObject$4(oe[pe])?deepClone(oe[pe]):oe[pe]:ue[pe]=oe[pe])}),ue}const deepmerge=Object.freeze(Object.defineProperty({__proto__:null,default:deepmerge$1,isPlainObject:isPlainObject$4},Symbol.toStringTag,{value:"Module"})),_excluded$1j=["values","unit","step"],sortBreakpointsValues=ne=>{const oe=Object.keys(ne).map(ce=>({key:ce,val:ne[ce]}))||[];return oe.sort((ce,ue)=>ce.val-ue.val),oe.reduce((ce,ue)=>_extends$2({},ce,{[ue.key]:ue.val}),{})};function createBreakpoints(ne){const{values:oe={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:ce="px",step:ue=5}=ne,pe=_objectWithoutPropertiesLoose$2(ne,_excluded$1j),me=sortBreakpointsValues(oe),ge=Object.keys(me);function ye($e){return`@media (min-width:${typeof oe[$e]=="number"?oe[$e]:$e}${ce})`}function ve($e){return`@media (max-width:${(typeof oe[$e]=="number"?oe[$e]:$e)-ue/100}${ce})`}function xe($e,Re){const Ae=ge.indexOf(Re);return`@media (min-width:${typeof oe[$e]=="number"?oe[$e]:$e}${ce}) and (max-width:${(Ae!==-1&&typeof oe[ge[Ae]]=="number"?oe[ge[Ae]]:Re)-ue/100}${ce})`}function _e($e){return ge.indexOf($e)+1`@media (min-width:${values$1[ne]}px)`};function handleBreakpoints(ne,oe,ce){const ue=ne.theme||{};if(Array.isArray(oe)){const me=ue.breakpoints||defaultBreakpoints;return oe.reduce((ge,ye,ve)=>(ge[me.up(me.keys[ve])]=ce(oe[ve]),ge),{})}if(typeof oe=="object"){const me=ue.breakpoints||defaultBreakpoints;return Object.keys(oe).reduce((ge,ye)=>{if(Object.keys(me.values||values$1).indexOf(ye)!==-1){const ve=me.up(ye);ge[ve]=ce(oe[ye],ye)}else{const ve=ye;ge[ve]=oe[ve]}return ge},{})}return ce(oe)}function createEmptyBreakpointObject(ne={}){var oe;return((oe=ne.keys)==null?void 0:oe.reduce((ue,pe)=>{const me=ne.up(pe);return ue[me]={},ue},{}))||{}}function removeUnusedBreakpoints(ne,oe){return ne.reduce((ce,ue)=>{const pe=ce[ue];return(!pe||Object.keys(pe).length===0)&&delete ce[ue],ce},oe)}function mergeBreakpointsInOrder(ne,...oe){const ce=createEmptyBreakpointObject(ne),ue=[ce,...oe].reduce((pe,me)=>deepmerge$1(pe,me),{});return removeUnusedBreakpoints(Object.keys(ce),ue)}function computeBreakpointsBase(ne,oe){if(typeof ne!="object")return{};const ce={},ue=Object.keys(oe);return Array.isArray(ne)?ue.forEach((pe,me)=>{me{ne[pe]!=null&&(ce[pe]=!0)}),ce}function resolveBreakpointValues({values:ne,breakpoints:oe,base:ce}){const ue=ce||computeBreakpointsBase(ne,oe),pe=Object.keys(ue);if(pe.length===0)return ne;let me;return pe.reduce((ge,ye,ve)=>(Array.isArray(ne)?(ge[ye]=ne[ve]!=null?ne[ve]:ne[me],me=ve):typeof ne=="object"?(ge[ye]=ne[ye]!=null?ne[ye]:ne[me],me=ye):ge[ye]=ne,ge),{})}function capitalize$1(ne){if(typeof ne!="string")throw new Error(formatMuiErrorMessage$1(7));return ne.charAt(0).toUpperCase()+ne.slice(1)}const capitalize=Object.freeze(Object.defineProperty({__proto__:null,default:capitalize$1},Symbol.toStringTag,{value:"Module"}));function getPath(ne,oe,ce=!0){if(!oe||typeof oe!="string")return null;if(ne&&ne.vars&&ce){const ue=`vars.${oe}`.split(".").reduce((pe,me)=>pe&&pe[me]?pe[me]:null,ne);if(ue!=null)return ue}return oe.split(".").reduce((ue,pe)=>ue&&ue[pe]!=null?ue[pe]:null,ne)}function getStyleValue$1(ne,oe,ce,ue=ce){let pe;return typeof ne=="function"?pe=ne(ce):Array.isArray(ne)?pe=ne[ce]||ue:pe=getPath(ne,ce)||ue,oe&&(pe=oe(pe,ue,ne)),pe}function style$4(ne){const{prop:oe,cssProperty:ce=ne.prop,themeKey:ue,transform:pe}=ne,me=ge=>{if(ge[oe]==null)return null;const ye=ge[oe],ve=ge.theme,xe=getPath(ve,ue)||{};return handleBreakpoints(ge,ye,Se=>{let $e=getStyleValue$1(xe,pe,Se);return Se===$e&&typeof Se=="string"&&($e=getStyleValue$1(xe,pe,`${oe}${Se==="default"?"":capitalize$1(Se)}`,Se)),ce===!1?$e:{[ce]:$e}})};return me.propTypes={},me.filterProps=[oe],me}function memoize$1(ne){const oe={};return ce=>(oe[ce]===void 0&&(oe[ce]=ne(ce)),oe[ce])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases$1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize$1(ne=>{if(ne.length>2)if(aliases$1[ne])ne=aliases$1[ne];else return[ne];const[oe,ce]=ne.split(""),ue=properties[oe],pe=directions[ce]||"";return Array.isArray(pe)?pe.map(me=>ue+me):[ue+pe]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...marginKeys,...paddingKeys];function createUnaryUnit(ne,oe,ce,ue){var pe;const me=(pe=getPath(ne,oe,!1))!=null?pe:ce;return typeof me=="number"?ge=>typeof ge=="string"?ge:me*ge:Array.isArray(me)?ge=>typeof ge=="string"?ge:me[ge]:typeof me=="function"?me:()=>{}}function createUnarySpacing(ne){return createUnaryUnit(ne,"spacing",8)}function getValue$2(ne,oe){if(typeof oe=="string"||oe==null)return oe;const ce=Math.abs(oe),ue=ne(ce);return oe>=0?ue:typeof ue=="number"?-ue:`-${ue}`}function getStyleFromPropValue(ne,oe){return ce=>ne.reduce((ue,pe)=>(ue[pe]=getValue$2(oe,ce),ue),{})}function resolveCssProperty(ne,oe,ce,ue){if(oe.indexOf(ce)===-1)return null;const pe=getCssProperties(ce),me=getStyleFromPropValue(pe,ue),ge=ne[ce];return handleBreakpoints(ne,ge,me)}function style$3(ne,oe){const ce=createUnarySpacing(ne.theme);return Object.keys(ne).map(ue=>resolveCssProperty(ne,oe,ue,ce)).reduce(merge$5,{})}function margin(ne){return style$3(ne,marginKeys)}margin.propTypes={};margin.filterProps=marginKeys;function padding(ne){return style$3(ne,paddingKeys)}padding.propTypes={};padding.filterProps=paddingKeys;function createSpacing(ne=8){if(ne.mui)return ne;const oe=createUnarySpacing({spacing:ne}),ce=(...ue)=>(ue.length===0?[1]:ue).map(me=>{const ge=oe(me);return typeof ge=="number"?`${ge}px`:ge}).join(" ");return ce.mui=!0,ce}function compose$4(...ne){const oe=ne.reduce((ue,pe)=>(pe.filterProps.forEach(me=>{ue[me]=pe}),ue),{}),ce=ue=>Object.keys(ue).reduce((pe,me)=>oe[me]?merge$5(pe,oe[me](ue)):pe,{});return ce.propTypes={},ce.filterProps=ne.reduce((ue,pe)=>ue.concat(pe.filterProps),[]),ce}function borderTransform(ne){return typeof ne!="number"?ne:`${ne}px solid`}function createBorderStyle(ne,oe){return style$4({prop:ne,themeKey:"borders",transform:oe})}const border=createBorderStyle("border",borderTransform),borderTop=createBorderStyle("borderTop",borderTransform),borderRight=createBorderStyle("borderRight",borderTransform),borderBottom=createBorderStyle("borderBottom",borderTransform),borderLeft=createBorderStyle("borderLeft",borderTransform),borderColor=createBorderStyle("borderColor"),borderTopColor=createBorderStyle("borderTopColor"),borderRightColor=createBorderStyle("borderRightColor"),borderBottomColor=createBorderStyle("borderBottomColor"),borderLeftColor=createBorderStyle("borderLeftColor"),outline=createBorderStyle("outline",borderTransform),outlineColor=createBorderStyle("outlineColor"),borderRadius=ne=>{if(ne.borderRadius!==void 0&&ne.borderRadius!==null){const oe=createUnaryUnit(ne.theme,"shape.borderRadius",4),ce=ue=>({borderRadius:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.borderRadius,ce)}return null};borderRadius.propTypes={};borderRadius.filterProps=["borderRadius"];compose$4(border,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius,outline,outlineColor);const gap$1=ne=>{if(ne.gap!==void 0&&ne.gap!==null){const oe=createUnaryUnit(ne.theme,"spacing",8),ce=ue=>({gap:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.gap,ce)}return null};gap$1.propTypes={};gap$1.filterProps=["gap"];const columnGap=ne=>{if(ne.columnGap!==void 0&&ne.columnGap!==null){const oe=createUnaryUnit(ne.theme,"spacing",8),ce=ue=>({columnGap:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.columnGap,ce)}return null};columnGap.propTypes={};columnGap.filterProps=["columnGap"];const rowGap=ne=>{if(ne.rowGap!==void 0&&ne.rowGap!==null){const oe=createUnaryUnit(ne.theme,"spacing",8),ce=ue=>({rowGap:getValue$2(oe,ue)});return handleBreakpoints(ne,ne.rowGap,ce)}return null};rowGap.propTypes={};rowGap.filterProps=["rowGap"];const gridColumn=style$4({prop:"gridColumn"}),gridRow=style$4({prop:"gridRow"}),gridAutoFlow=style$4({prop:"gridAutoFlow"}),gridAutoColumns=style$4({prop:"gridAutoColumns"}),gridAutoRows=style$4({prop:"gridAutoRows"}),gridTemplateColumns=style$4({prop:"gridTemplateColumns"}),gridTemplateRows=style$4({prop:"gridTemplateRows"}),gridTemplateAreas=style$4({prop:"gridTemplateAreas"}),gridArea=style$4({prop:"gridArea"});compose$4(gap$1,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);function paletteTransform(ne,oe){return oe==="grey"?oe:ne}const color=style$4({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$4({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor=style$4({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});compose$4(color,bgcolor,backgroundColor);function sizingTransform(ne){return ne<=1&&ne!==0?`${ne*100}%`:ne}const width=style$4({prop:"width",transform:sizingTransform}),maxWidth=ne=>{if(ne.maxWidth!==void 0&&ne.maxWidth!==null){const oe=ce=>{var ue,pe;const me=((ue=ne.theme)==null||(ue=ue.breakpoints)==null||(ue=ue.values)==null?void 0:ue[ce])||values$1[ce];return me?((pe=ne.theme)==null||(pe=pe.breakpoints)==null?void 0:pe.unit)!=="px"?{maxWidth:`${me}${ne.theme.breakpoints.unit}`}:{maxWidth:me}:{maxWidth:sizingTransform(ce)}};return handleBreakpoints(ne,ne.maxWidth,oe)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$4({prop:"minWidth",transform:sizingTransform}),height=style$4({prop:"height",transform:sizingTransform}),maxHeight=style$4({prop:"maxHeight",transform:sizingTransform}),minHeight=style$4({prop:"minHeight",transform:sizingTransform});style$4({prop:"size",cssProperty:"width",transform:sizingTransform});style$4({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$4({prop:"boxSizing"});compose$4(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding},pt:{style:padding},pr:{style:padding},pb:{style:padding},pl:{style:padding},px:{style:padding},py:{style:padding},padding:{style:padding},paddingTop:{style:padding},paddingRight:{style:padding},paddingBottom:{style:padding},paddingLeft:{style:padding},paddingX:{style:padding},paddingY:{style:padding},paddingInline:{style:padding},paddingInlineStart:{style:padding},paddingInlineEnd:{style:padding},paddingBlock:{style:padding},paddingBlockStart:{style:padding},paddingBlockEnd:{style:padding},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:ne=>({"@media print":{display:ne}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap$1},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},defaultSxConfig$1=defaultSxConfig;function objectsHaveSameKeys(...ne){const oe=ne.reduce((ue,pe)=>ue.concat(Object.keys(pe)),[]),ce=new Set(oe);return ne.every(ue=>ce.size===Object.keys(ue).length)}function callIfFn(ne,oe){return typeof ne=="function"?ne(oe):ne}function unstable_createStyleFunctionSx(){function ne(ce,ue,pe,me){const ge={[ce]:ue,theme:pe},ye=me[ce];if(!ye)return{[ce]:ue};const{cssProperty:ve=ce,themeKey:xe,transform:_e,style:Se}=ye;if(ue==null)return null;if(xe==="typography"&&ue==="inherit")return{[ce]:ue};const $e=getPath(pe,xe)||{};return Se?Se(ge):handleBreakpoints(ge,ue,Ae=>{let Ie=getStyleValue$1($e,_e,Ae);return Ae===Ie&&typeof Ae=="string"&&(Ie=getStyleValue$1($e,_e,`${ce}${Ae==="default"?"":capitalize$1(Ae)}`,Ae)),ve===!1?Ie:{[ve]:Ie}})}function oe(ce){var ue;const{sx:pe,theme:me={}}=ce||{};if(!pe)return null;const ge=(ue=me.unstable_sxConfig)!=null?ue:defaultSxConfig$1;function ye(ve){let xe=ve;if(typeof ve=="function")xe=ve(me);else if(typeof ve!="object")return ve;if(!xe)return null;const _e=createEmptyBreakpointObject(me.breakpoints),Se=Object.keys(_e);let $e=_e;return Object.keys(xe).forEach(Re=>{const Ae=callIfFn(xe[Re],me);if(Ae!=null)if(typeof Ae=="object")if(ge[Re])$e=merge$5($e,ne(Re,Ae,me,ge));else{const Ie=handleBreakpoints({theme:me},Ae,ke=>({[Re]:ke}));objectsHaveSameKeys(Ie,Ae)?$e[Re]=oe({sx:Ae,theme:me}):$e=merge$5($e,Ie)}else $e=merge$5($e,ne(Re,Ae,me,ge))}),removeUnusedBreakpoints(Se,$e)}return Array.isArray(pe)?pe.map(ye):ye(pe)}return oe}const styleFunctionSx$1=unstable_createStyleFunctionSx();styleFunctionSx$1.filterProps=["sx"];const styleFunctionSx$2=styleFunctionSx$1;function applyStyles$2(ne,oe){const ce=this;return ce.vars&&typeof ce.getColorSchemeSelector=="function"?{[ce.getColorSchemeSelector(ne).replace(/(\[[^\]]+\])/,"*:where($1)")]:oe}:ce.palette.mode===ne?oe:{}}const _excluded$1i=["breakpoints","palette","spacing","shape"];function createTheme$2(ne={},...oe){const{breakpoints:ce={},palette:ue={},spacing:pe,shape:me={}}=ne,ge=_objectWithoutPropertiesLoose$2(ne,_excluded$1i),ye=createBreakpoints(ce),ve=createSpacing(pe);let xe=deepmerge$1({breakpoints:ye,direction:"ltr",components:{},palette:_extends$2({mode:"light"},ue),spacing:ve,shape:_extends$2({},shape$1,me)},ge);return xe.applyStyles=applyStyles$2,xe=oe.reduce((_e,Se)=>deepmerge$1(_e,Se),xe),xe.unstable_sxConfig=_extends$2({},defaultSxConfig$1,ge==null?void 0:ge.unstable_sxConfig),xe.unstable_sx=function(Se){return styleFunctionSx$2({sx:Se,theme:this})},xe}const createTheme$1=Object.freeze(Object.defineProperty({__proto__:null,default:createTheme$2,private_createBreakpoints:createBreakpoints,unstable_applyStyles:applyStyles$2},Symbol.toStringTag,{value:"Module"}));function isObjectEmpty$1(ne){return Object.keys(ne).length===0}function useTheme$4(ne=null){const oe=reactExports.useContext(ThemeContext$2);return!oe||isObjectEmpty$1(oe)?ne:oe}const systemDefaultTheme$2=createTheme$2();function useTheme$3(ne=systemDefaultTheme$2){return useTheme$4(ne)}function GlobalStyles$1({styles:ne,themeId:oe,defaultTheme:ce={}}){const ue=useTheme$3(ce),pe=typeof ne=="function"?ne(oe&&ue[oe]||ue):ne;return jsxRuntimeExports.jsx(GlobalStyles$2,{styles:pe})}const _excluded$1h=["sx"],splitProps=ne=>{var oe,ce;const ue={systemProps:{},otherProps:{}},pe=(oe=ne==null||(ce=ne.theme)==null?void 0:ce.unstable_sxConfig)!=null?oe:defaultSxConfig$1;return Object.keys(ne).forEach(me=>{pe[me]?ue.systemProps[me]=ne[me]:ue.otherProps[me]=ne[me]}),ue};function extendSxProp(ne){const{sx:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$1h),{systemProps:ue,otherProps:pe}=splitProps(ce);let me;return Array.isArray(oe)?me=[ue,...oe]:typeof oe=="function"?me=(...ge)=>{const ye=oe(...ge);return isPlainObject$4(ye)?_extends$2({},ue,ye):ue}:me=_extends$2({},ue,oe),_extends$2({},pe,{sx:me})}const styleFunctionSx=Object.freeze(Object.defineProperty({__proto__:null,default:styleFunctionSx$2,extendSxProp,unstable_createStyleFunctionSx,unstable_defaultSxConfig:defaultSxConfig$1},Symbol.toStringTag,{value:"Module"})),defaultGenerator$1=ne=>ne,createClassNameGenerator$1=()=>{let ne=defaultGenerator$1;return{configure(oe){ne=oe},generate(oe){return ne(oe)},reset(){ne=defaultGenerator$1}}},ClassNameGenerator$2=createClassNameGenerator$1(),ClassNameGenerator$3=ClassNameGenerator$2;function r$8(ne){var oe,ce,ue="";if(typeof ne=="string"||typeof ne=="number")ue+=ne;else if(typeof ne=="object")if(Array.isArray(ne)){var pe=ne.length;for(oe=0;oeye!=="theme"&&ye!=="sx"&&ye!=="as"})(styleFunctionSx$2);return reactExports.forwardRef(function(ve,xe){const _e=useTheme$3(ce),Se=extendSxProp(ve),{className:$e,component:Re="div"}=Se,Ae=_objectWithoutPropertiesLoose$2(Se,_excluded$1g);return jsxRuntimeExports.jsx(me,_extends$2({as:Re,ref:xe,className:clsx($e,pe?pe(ue):ue),theme:oe&&_e[oe]||_e},Ae))})}const globalStateClasses$1={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass$2(ne,oe,ce="Mui"){const ue=globalStateClasses$1[oe];return ue?`${ce}-${ue}`:`${ClassNameGenerator$3.generate(ne)}-${oe}`}function generateUtilityClasses$2(ne,oe,ce="Mui"){const ue={};return oe.forEach(pe=>{ue[pe]=generateUtilityClass$2(ne,pe,ce)}),ue}var reactIs$2={exports:{}},reactIs_production_min$2={};/** * @license React * react-is.production.min.js * @@ -35,7 +35,7 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var b$a=Symbol.for("react.element"),c$8=Symbol.for("react.portal"),d$c=Symbol.for("react.fragment"),e$8=Symbol.for("react.strict_mode"),f$a=Symbol.for("react.profiler"),g$8=Symbol.for("react.provider"),h$c=Symbol.for("react.context"),k$a=Symbol.for("react.server_context"),l$a=Symbol.for("react.forward_ref"),m$a=Symbol.for("react.suspense"),n$9=Symbol.for("react.suspense_list"),p$c=Symbol.for("react.memo"),q$9=Symbol.for("react.lazy"),t$8=Symbol.for("react.offscreen"),u$a;u$a=Symbol.for("react.module.reference");function v$a(ne){if(typeof ne=="object"&&ne!==null){var oe=ne.$$typeof;switch(oe){case b$a:switch(ne=ne.type,ne){case d$c:case f$a:case e$8:case m$a:case n$9:return ne;default:switch(ne=ne&&ne.$$typeof,ne){case k$a:case h$c:case l$a:case q$9:case p$c:case g$8:return ne;default:return oe}}case c$8:return oe}}}reactIs_production_min$2.ContextConsumer=h$c;reactIs_production_min$2.ContextProvider=g$8;reactIs_production_min$2.Element=b$a;reactIs_production_min$2.ForwardRef=l$a;reactIs_production_min$2.Fragment=d$c;reactIs_production_min$2.Lazy=q$9;reactIs_production_min$2.Memo=p$c;reactIs_production_min$2.Portal=c$8;reactIs_production_min$2.Profiler=f$a;reactIs_production_min$2.StrictMode=e$8;reactIs_production_min$2.Suspense=m$a;reactIs_production_min$2.SuspenseList=n$9;reactIs_production_min$2.isAsyncMode=function(){return!1};reactIs_production_min$2.isConcurrentMode=function(){return!1};reactIs_production_min$2.isContextConsumer=function(ne){return v$a(ne)===h$c};reactIs_production_min$2.isContextProvider=function(ne){return v$a(ne)===g$8};reactIs_production_min$2.isElement=function(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===b$a};reactIs_production_min$2.isForwardRef=function(ne){return v$a(ne)===l$a};reactIs_production_min$2.isFragment=function(ne){return v$a(ne)===d$c};reactIs_production_min$2.isLazy=function(ne){return v$a(ne)===q$9};reactIs_production_min$2.isMemo=function(ne){return v$a(ne)===p$c};reactIs_production_min$2.isPortal=function(ne){return v$a(ne)===c$8};reactIs_production_min$2.isProfiler=function(ne){return v$a(ne)===f$a};reactIs_production_min$2.isStrictMode=function(ne){return v$a(ne)===e$8};reactIs_production_min$2.isSuspense=function(ne){return v$a(ne)===m$a};reactIs_production_min$2.isSuspenseList=function(ne){return v$a(ne)===n$9};reactIs_production_min$2.isValidElementType=function(ne){return typeof ne=="string"||typeof ne=="function"||ne===d$c||ne===f$a||ne===e$8||ne===m$a||ne===n$9||ne===t$8||typeof ne=="object"&&ne!==null&&(ne.$$typeof===q$9||ne.$$typeof===p$c||ne.$$typeof===g$8||ne.$$typeof===h$c||ne.$$typeof===l$a||ne.$$typeof===u$a||ne.getModuleId!==void 0)};reactIs_production_min$2.typeOf=v$a;reactIs$2.exports=reactIs_production_min$2;var reactIsExports$2=reactIs$2.exports;const fnNameMatchRegex=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function getFunctionName(ne){const oe=`${ne}`.match(fnNameMatchRegex);return oe&&oe[1]||""}function getFunctionComponentName(ne,oe=""){return ne.displayName||ne.name||getFunctionName(ne)||oe}function getWrappedName(ne,oe,ce){const ue=getFunctionComponentName(oe);return ne.displayName||(ue!==""?`${ce}(${ue})`:ce)}function getDisplayName$1(ne){if(ne!=null){if(typeof ne=="string")return ne;if(typeof ne=="function")return getFunctionComponentName(ne,"Component");if(typeof ne=="object")switch(ne.$$typeof){case reactIsExports$2.ForwardRef:return getWrappedName(ne,ne.render,"ForwardRef");case reactIsExports$2.Memo:return getWrappedName(ne,ne.type,"memo");default:return}}}const getDisplayName=Object.freeze(Object.defineProperty({__proto__:null,default:getDisplayName$1,getFunctionName},Symbol.toStringTag,{value:"Module"})),_excluded$1e=["ownerState"],_excluded2$8=["variants"],_excluded3$3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function isEmpty$5(ne){return Object.keys(ne).length===0}function isStringTag$1(ne){return typeof ne=="string"&&ne.charCodeAt(0)>96}function shouldForwardProp$1(ne){return ne!=="ownerState"&&ne!=="theme"&&ne!=="sx"&&ne!=="as"}const systemDefaultTheme$1=createTheme$2(),lowercaseFirstLetter$1=ne=>ne&&ne.charAt(0).toLowerCase()+ne.slice(1);function resolveTheme$1({defaultTheme:ne,theme:oe,themeId:ce}){return isEmpty$5(oe)?ne:oe[ce]||oe}function defaultOverridesResolver$1(ne){return ne?(oe,ce)=>ce[ne]:null}function processStyleArg$1(ne,oe){let{ownerState:ce}=oe,ue=_objectWithoutPropertiesLoose$2(oe,_excluded$1e);const pe=typeof ne=="function"?ne(_extends$2({ownerState:ce},ue)):ne;if(Array.isArray(pe))return pe.flatMap(me=>processStyleArg$1(me,_extends$2({ownerState:ce},ue)));if(pe&&typeof pe=="object"&&Array.isArray(pe.variants)){const{variants:me=[]}=pe;let ye=_objectWithoutPropertiesLoose$2(pe,_excluded2$8);return me.forEach(ve=>{let xe=!0;typeof ve.props=="function"?xe=ve.props(_extends$2({ownerState:ce},ue,ce)):Object.keys(ve.props).forEach(_e=>{(ce==null?void 0:ce[_e])!==ve.props[_e]&&ue[_e]!==ve.props[_e]&&(xe=!1)}),xe&&(Array.isArray(ye)||(ye=[ye]),ye.push(typeof ve.style=="function"?ve.style(_extends$2({ownerState:ce},ue,ce)):ve.style))}),ye}return pe}function createStyled$2(ne={}){const{themeId:oe,defaultTheme:ce=systemDefaultTheme$1,rootShouldForwardProp:ue=shouldForwardProp$1,slotShouldForwardProp:pe=shouldForwardProp$1}=ne,me=ge=>styleFunctionSx$2(_extends$2({},ge,{theme:resolveTheme$1(_extends$2({},ge,{defaultTheme:ce,themeId:oe}))}));return me.__mui_systemSx=!0,(ge,ye={})=>{internal_processStyles(ge,We=>We.filter(qe=>!(qe!=null&&qe.__mui_systemSx)));const{name:ve,slot:xe,skipVariantsResolver:_e,skipSx:Se,overridesResolver:$e=defaultOverridesResolver$1(lowercaseFirstLetter$1(xe))}=ye,Re=_objectWithoutPropertiesLoose$2(ye,_excluded3$3),Ae=_e!==void 0?_e:xe&&xe!=="Root"&&xe!=="root"||!1,Ie=Se||!1;let ke,Be=shouldForwardProp$1;xe==="Root"||xe==="root"?Be=ue:xe?Be=pe:isStringTag$1(ge)&&(Be=void 0);const Ne=styled$3(ge,_extends$2({shouldForwardProp:Be,label:ke},Re)),Fe=We=>typeof We=="function"&&We.__emotion_real!==We||isPlainObject$4(We)?qe=>processStyleArg$1(We,_extends$2({},qe,{theme:resolveTheme$1({theme:qe.theme,defaultTheme:ce,themeId:oe})})):We,Ue=(We,...qe)=>{let ze=Fe(We);const Ge=qe?qe.map(Fe):[];ve&&$e&&Ge.push(Je=>{const Ut=resolveTheme$1(_extends$2({},Je,{defaultTheme:ce,themeId:oe}));if(!Ut.components||!Ut.components[ve]||!Ut.components[ve].styleOverrides)return null;const jt=Ut.components[ve].styleOverrides,Ke={};return Object.entries(jt).forEach(([an,Zt])=>{Ke[an]=processStyleArg$1(Zt,_extends$2({},Je,{theme:Ut}))}),$e(Je,Ke)}),ve&&!Ae&&Ge.push(Je=>{var Ut;const jt=resolveTheme$1(_extends$2({},Je,{defaultTheme:ce,themeId:oe})),Ke=jt==null||(Ut=jt.components)==null||(Ut=Ut[ve])==null?void 0:Ut.variants;return processStyleArg$1({variants:Ke},_extends$2({},Je,{theme:jt}))}),Ie||Ge.push(me);const Ze=Ge.length-qe.length;if(Array.isArray(We)&&Ze>0){const Je=new Array(Ze).fill("");ze=[...We,...Je],ze.raw=[...We.raw,...Je]}const Dt=Ne(ze,...Ge);return ge.muiName&&(Dt.muiName=ge.muiName),Dt};return Ne.withConfig&&(Ue.withConfig=Ne.withConfig),Ue}}const styled$2=createStyled$2(),systemStyled=styled$2;function resolveProps(ne,oe){const ce=_extends$2({},oe);return Object.keys(ne).forEach(ue=>{if(ue.toString().match(/^(components|slots)$/))ce[ue]=_extends$2({},ne[ue],ce[ue]);else if(ue.toString().match(/^(componentsProps|slotProps)$/)){const pe=ne[ue]||{},me=oe[ue];ce[ue]={},!me||!Object.keys(me)?ce[ue]=pe:!pe||!Object.keys(pe)?ce[ue]=me:(ce[ue]=_extends$2({},me),Object.keys(pe).forEach(ge=>{ce[ue][ge]=resolveProps(pe[ge],me[ge])}))}else ce[ue]===void 0&&(ce[ue]=ne[ue])}),ce}function getThemeProps(ne){const{theme:oe,name:ce,props:ue}=ne;return!oe||!oe.components||!oe.components[ce]||!oe.components[ce].defaultProps?ue:resolveProps(oe.components[ce].defaultProps,ue)}function useThemeProps$4({props:ne,name:oe,defaultTheme:ce,themeId:ue}){let pe=useTheme$3(ce);return ue&&(pe=pe[ue]||pe),getThemeProps({theme:pe,name:oe,props:ne})}const useEnhancedEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,useEnhancedEffect$1=useEnhancedEffect;function useMediaQueryOld(ne,oe,ce,ue,pe){const[me,ge]=reactExports.useState(()=>pe&&ce?ce(ne).matches:ue?ue(ne).matches:oe);return useEnhancedEffect$1(()=>{let ye=!0;if(!ce)return;const ve=ce(ne),xe=()=>{ye&&ge(ve.matches)};return xe(),ve.addListener(xe),()=>{ye=!1,ve.removeListener(xe)}},[ne,ce]),me}const maybeReactUseSyncExternalStore=React$3["useSyncExternalStore"];function useMediaQueryNew(ne,oe,ce,ue,pe){const me=reactExports.useCallback(()=>oe,[oe]),ge=reactExports.useMemo(()=>{if(pe&&ce)return()=>ce(ne).matches;if(ue!==null){const{matches:_e}=ue(ne);return()=>_e}return me},[me,ne,ue,pe,ce]),[ye,ve]=reactExports.useMemo(()=>{if(ce===null)return[me,()=>()=>{}];const _e=ce(ne);return[()=>_e.matches,Se=>(_e.addListener(Se),()=>{_e.removeListener(Se)})]},[me,ce,ne]);return maybeReactUseSyncExternalStore(ve,ye,ge)}function useMediaQuery(ne,oe={}){const ce=useTheme$4(),ue=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:pe=!1,matchMedia:me=ue?window.matchMedia:null,ssrMatchMedia:ge=null,noSsr:ye=!1}=getThemeProps({name:"MuiUseMediaQuery",props:oe,theme:ce});let ve=typeof ne=="function"?ne(ce):ne;return ve=ve.replace(/^@media( ?)/m,""),(maybeReactUseSyncExternalStore!==void 0?useMediaQueryNew:useMediaQueryOld)(ve,pe,me,ge,ye)}function clamp$3(ne,oe=Number.MIN_SAFE_INTEGER,ce=Number.MAX_SAFE_INTEGER){return Math.max(oe,Math.min(ne,ce))}const clamp$2=Object.freeze(Object.defineProperty({__proto__:null,default:clamp$3},Symbol.toStringTag,{value:"Module"}));function clampWrapper$1(ne,oe=0,ce=1){return clamp$3(ne,oe,ce)}function hexToRgb$1(ne){ne=ne.slice(1);const oe=new RegExp(`.{1,${ne.length>=6?2:1}}`,"g");let ce=ne.match(oe);return ce&&ce[0].length===1&&(ce=ce.map(ue=>ue+ue)),ce?`rgb${ce.length===4?"a":""}(${ce.map((ue,pe)=>pe<3?parseInt(ue,16):Math.round(parseInt(ue,16)/255*1e3)/1e3).join(", ")})`:""}function intToHex$1(ne){const oe=ne.toString(16);return oe.length===1?`0${oe}`:oe}function decomposeColor$1(ne){if(ne.type)return ne;if(ne.charAt(0)==="#")return decomposeColor$1(hexToRgb$1(ne));const oe=ne.indexOf("("),ce=ne.substring(0,oe);if(["rgb","rgba","hsl","hsla","color"].indexOf(ce)===-1)throw new Error(formatMuiErrorMessage$1(9,ne));let ue=ne.substring(oe+1,ne.length-1),pe;if(ce==="color"){if(ue=ue.split(" "),pe=ue.shift(),ue.length===4&&ue[3].charAt(0)==="/"&&(ue[3]=ue[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(pe)===-1)throw new Error(formatMuiErrorMessage$1(10,pe))}else ue=ue.split(",");return ue=ue.map(me=>parseFloat(me)),{type:ce,values:ue,colorSpace:pe}}function recomposeColor$1(ne){const{type:oe,colorSpace:ce}=ne;let{values:ue}=ne;return oe.indexOf("rgb")!==-1?ue=ue.map((pe,me)=>me<3?parseInt(pe,10):pe):oe.indexOf("hsl")!==-1&&(ue[1]=`${ue[1]}%`,ue[2]=`${ue[2]}%`),oe.indexOf("color")!==-1?ue=`${ce} ${ue.join(" ")}`:ue=`${ue.join(", ")}`,`${oe}(${ue})`}function rgbToHex$1(ne){if(ne.indexOf("#")===0)return ne;const{values:oe}=decomposeColor$1(ne);return`#${oe.map((ce,ue)=>intToHex$1(ue===3?Math.round(255*ce):ce)).join("")}`}function hslToRgb$1(ne){ne=decomposeColor$1(ne);const{values:oe}=ne,ce=oe[0],ue=oe[1]/100,pe=oe[2]/100,me=ue*Math.min(pe,1-pe),ge=(xe,_e=(xe+ce/30)%12)=>pe-me*Math.max(Math.min(_e-3,9-_e,1),-1);let ye="rgb";const ve=[Math.round(ge(0)*255),Math.round(ge(8)*255),Math.round(ge(4)*255)];return ne.type==="hsla"&&(ye+="a",ve.push(oe[3])),recomposeColor$1({type:ye,values:ve})}function getLuminance$1(ne){ne=decomposeColor$1(ne);let oe=ne.type==="hsl"||ne.type==="hsla"?decomposeColor$1(hslToRgb$1(ne)).values:ne.values;return oe=oe.map(ce=>(ne.type!=="color"&&(ce/=255),ce<=.03928?ce/12.92:((ce+.055)/1.055)**2.4)),Number((.2126*oe[0]+.7152*oe[1]+.0722*oe[2]).toFixed(3))}function getContrastRatio$1(ne,oe){const ce=getLuminance$1(ne),ue=getLuminance$1(oe);return(Math.max(ce,ue)+.05)/(Math.min(ce,ue)+.05)}function alpha$1(ne,oe){return ne=decomposeColor$1(ne),oe=clampWrapper$1(oe),(ne.type==="rgb"||ne.type==="hsl")&&(ne.type+="a"),ne.type==="color"?ne.values[3]=`/${oe}`:ne.values[3]=oe,recomposeColor$1(ne)}function createChainedFunction(...ne){return ne.reduce((oe,ce)=>ce==null?oe:function(...pe){oe.apply(this,pe),ce.apply(this,pe)},()=>{})}function debounce$2(ne,oe=166){let ce;function ue(...pe){const me=()=>{ne.apply(this,pe)};clearTimeout(ce),ce=setTimeout(me,oe)}return ue.clear=()=>{clearTimeout(ce)},ue}function isMuiElement(ne,oe){var ce,ue;return reactExports.isValidElement(ne)&&oe.indexOf((ce=ne.type.muiName)!=null?ce:(ue=ne.type)==null||(ue=ue._payload)==null||(ue=ue.value)==null?void 0:ue.muiName)!==-1}function ownerDocument(ne){return ne&&ne.ownerDocument||document}function ownerWindow(ne){return ownerDocument(ne).defaultView||window}function setRef$1(ne,oe){typeof ne=="function"?ne(oe):ne&&(ne.current=oe)}let globalId=0;function useGlobalId(ne){const[oe,ce]=reactExports.useState(ne),ue=ne||oe;return reactExports.useEffect(()=>{oe==null&&(globalId+=1,ce(`mui-${globalId}`))},[oe]),ue}const maybeReactUseId=React$3["useId".toString()];function useId(ne){if(maybeReactUseId!==void 0){const oe=maybeReactUseId();return ne??oe}return useGlobalId(ne)}function useControlled({controlled:ne,default:oe,name:ce,state:ue="value"}){const{current:pe}=reactExports.useRef(ne!==void 0),[me,ge]=reactExports.useState(oe),ye=pe?ne:me,ve=reactExports.useCallback(xe=>{pe||ge(xe)},[]);return[ye,ve]}function useEventCallback(ne){const oe=reactExports.useRef(ne);return useEnhancedEffect$1(()=>{oe.current=ne}),reactExports.useRef((...ce)=>(0,oe.current)(...ce)).current}function useForkRef(...ne){return reactExports.useMemo(()=>ne.every(oe=>oe==null)?null:oe=>{ne.forEach(ce=>{setRef$1(ce,oe)})},ne)}const UNINITIALIZED={};function useLazyRef(ne,oe){const ce=reactExports.useRef(UNINITIALIZED);return ce.current===UNINITIALIZED&&(ce.current=ne(oe)),ce}const EMPTY=[];function useOnMount(ne){reactExports.useEffect(ne,EMPTY)}class Timeout{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Timeout}start(oe,ce){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,ce()},oe)}}function useTimeout(){const ne=useLazyRef(Timeout.create).current;return useOnMount(ne.disposeEffect),ne}let hadKeyboardEvent=!0,hadFocusVisibleRecently=!1;const hadFocusVisibleRecentlyTimeout=new Timeout,inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(ne){const{type:oe,tagName:ce}=ne;return!!(ce==="INPUT"&&inputTypesWhitelist[oe]&&!ne.readOnly||ce==="TEXTAREA"&&!ne.readOnly||ne.isContentEditable)}function handleKeyDown(ne){ne.metaKey||ne.altKey||ne.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState==="hidden"&&hadFocusVisibleRecently&&(hadKeyboardEvent=!0)}function prepare(ne){ne.addEventListener("keydown",handleKeyDown,!0),ne.addEventListener("mousedown",handlePointerDown,!0),ne.addEventListener("pointerdown",handlePointerDown,!0),ne.addEventListener("touchstart",handlePointerDown,!0),ne.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(ne){const{target:oe}=ne;try{return oe.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(oe)}function useIsFocusVisible(){const ne=reactExports.useCallback(pe=>{pe!=null&&prepare(pe.ownerDocument)},[]),oe=reactExports.useRef(!1);function ce(){return oe.current?(hadFocusVisibleRecently=!0,hadFocusVisibleRecentlyTimeout.start(100,()=>{hadFocusVisibleRecently=!1}),oe.current=!1,!0):!1}function ue(pe){return isFocusVisible(pe)?(oe.current=!0,!0):!1}return{isFocusVisibleRef:oe,onFocus:ue,onBlur:ce,ref:ne}}function getScrollbarSize(ne){const oe=ne.documentElement.clientWidth;return Math.abs(window.innerWidth-oe)}let cachedType;function detectScrollType(){if(cachedType)return cachedType;const ne=document.createElement("div"),oe=document.createElement("div");return oe.style.width="10px",oe.style.height="1px",ne.appendChild(oe),ne.dir="rtl",ne.style.fontSize="14px",ne.style.width="4px",ne.style.height="1px",ne.style.position="absolute",ne.style.top="-1000px",ne.style.overflow="scroll",document.body.appendChild(ne),cachedType="reverse",ne.scrollLeft>0?cachedType="default":(ne.scrollLeft=1,ne.scrollLeft===0&&(cachedType="negative")),document.body.removeChild(ne),cachedType}function getNormalizedScrollLeft(ne,oe){const ce=ne.scrollLeft;if(oe!=="rtl")return ce;switch(detectScrollType()){case"negative":return ne.scrollWidth-ne.clientWidth+ce;case"reverse":return ne.scrollWidth-ne.clientWidth-ce;default:return ce}}const visuallyHidden$2={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},visuallyHidden$3=visuallyHidden$2;function composeClasses$1(ne,oe,ce=void 0){const ue={};return Object.keys(ne).forEach(pe=>{ue[pe]=ne[pe].reduce((me,ge)=>{if(ge){const ye=oe(ge);ye!==""&&me.push(ye),ce&&ce[ge]&&me.push(ce[ge])}return me},[]).join(" ")}),ue}const ThemeContext=reactExports.createContext(null),ThemeContext$1=ThemeContext;function useTheme$2(){return reactExports.useContext(ThemeContext$1)}const hasSymbol=typeof Symbol=="function"&&Symbol.for,nested=hasSymbol?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(ne,oe){return typeof oe=="function"?oe(ne):_extends$2({},ne,oe)}function ThemeProvider$2(ne){const{children:oe,theme:ce}=ne,ue=useTheme$2(),pe=reactExports.useMemo(()=>{const me=ue===null?ce:mergeOuterLocalTheme(ue,ce);return me!=null&&(me[nested]=ue!==null),me},[ce,ue]);return jsxRuntimeExports.jsx(ThemeContext$1.Provider,{value:pe,children:oe})}const _excluded$1d=["value"],RtlContext=reactExports.createContext();function RtlProvider(ne){let{value:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$1d);return jsxRuntimeExports.jsx(RtlContext.Provider,_extends$2({value:oe??!0},ce))}const useRtl=()=>{const ne=reactExports.useContext(RtlContext);return ne??!1},EMPTY_THEME={};function useThemeScoping(ne,oe,ce,ue=!1){return reactExports.useMemo(()=>{const pe=ne&&oe[ne]||oe;if(typeof ce=="function"){const me=ce(pe),ge=ne?_extends$2({},oe,{[ne]:me}):me;return ue?()=>ge:ge}return ne?_extends$2({},oe,{[ne]:ce}):_extends$2({},oe,ce)},[ne,oe,ce,ue])}function ThemeProvider$1(ne){const{children:oe,theme:ce,themeId:ue}=ne,pe=useTheme$4(EMPTY_THEME),me=useTheme$2()||EMPTY_THEME,ge=useThemeScoping(ue,pe,ce),ye=useThemeScoping(ue,me,ce,!0),ve=ge.direction==="rtl";return jsxRuntimeExports.jsx(ThemeProvider$2,{theme:ye,children:jsxRuntimeExports.jsx(ThemeContext$2.Provider,{value:ge,children:jsxRuntimeExports.jsx(RtlProvider,{value:ve,children:oe})})})}function _typeof$1(ne){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(oe){return typeof oe}:function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},_typeof$1(ne)}function toPrimitive$2(ne,oe){if(_typeof$1(ne)!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(_typeof$1(ue)!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function toPropertyKey$2(ne){var oe=toPrimitive$2(ne,"string");return _typeof$1(oe)=="symbol"?oe:oe+""}const _excluded$1c=["component","direction","spacing","divider","children","className","useFlexGap"],defaultTheme$3=createTheme$2(),defaultCreateStyledComponent=systemStyled("div",{name:"MuiStack",slot:"Root",overridesResolver:(ne,oe)=>oe.root});function useThemePropsDefault(ne){return useThemeProps$4({props:ne,name:"MuiStack",defaultTheme:defaultTheme$3})}function joinChildren(ne,oe){const ce=reactExports.Children.toArray(ne).filter(Boolean);return ce.reduce((ue,pe,me)=>(ue.push(pe),me({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[ne],style$2=({ownerState:ne,theme:oe})=>{let ce=_extends$2({display:"flex",flexDirection:"column"},handleBreakpoints({theme:oe},resolveBreakpointValues({values:ne.direction,breakpoints:oe.breakpoints.values}),ue=>({flexDirection:ue})));if(ne.spacing){const ue=createUnarySpacing(oe),pe=Object.keys(oe.breakpoints.values).reduce((ve,xe)=>((typeof ne.spacing=="object"&&ne.spacing[xe]!=null||typeof ne.direction=="object"&&ne.direction[xe]!=null)&&(ve[xe]=!0),ve),{}),me=resolveBreakpointValues({values:ne.direction,base:pe}),ge=resolveBreakpointValues({values:ne.spacing,base:pe});typeof me=="object"&&Object.keys(me).forEach((ve,xe,_e)=>{if(!me[ve]){const $e=xe>0?me[_e[xe-1]]:"column";me[ve]=$e}}),ce=deepmerge$1(ce,handleBreakpoints({theme:oe},ge,(ve,xe)=>ne.useFlexGap?{gap:getValue$2(ue,ve)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${getSideFromDirection(xe?me[xe]:ne.direction)}`]:getValue$2(ue,ve)}}))}return ce=mergeBreakpointsInOrder(oe.breakpoints,ce),ce};function createStack(ne={}){const{createStyledComponent:oe=defaultCreateStyledComponent,useThemeProps:ce=useThemePropsDefault,componentName:ue="MuiStack"}=ne,pe=()=>composeClasses$1({root:["root"]},ve=>generateUtilityClass$2(ue,ve),{}),me=oe(style$2);return reactExports.forwardRef(function(ve,xe){const _e=ce(ve),Se=extendSxProp(_e),{component:$e="div",direction:Re="column",spacing:Ae=0,divider:Ie,children:ke,className:Be,useFlexGap:Ne=!1}=Se,Fe=_objectWithoutPropertiesLoose$2(Se,_excluded$1c),Ue={direction:Re,spacing:Ae,useFlexGap:Ne},We=pe();return jsxRuntimeExports.jsx(me,_extends$2({as:$e,ownerState:Ue,ref:xe,className:clsx(We.root,Be)},Fe,{children:Ie?joinChildren(ke,Ie):ke}))})}function createMixins(ne,oe){return _extends$2({toolbar:{minHeight:56,[ne.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[ne.up("sm")]:{minHeight:64}}},oe)}var colorManipulator={},interopRequireDefault={exports:{}};(function(ne){function oe(ce){return ce&&ce.__esModule?ce:{default:ce}}ne.exports=oe,ne.exports.__esModule=!0,ne.exports.default=ne.exports})(interopRequireDefault);var interopRequireDefaultExports=interopRequireDefault.exports;const require$$1$1=getAugmentedNamespace(formatMuiErrorMessage),require$$2=getAugmentedNamespace(clamp$2);var _interopRequireDefault$1=interopRequireDefaultExports;Object.defineProperty(colorManipulator,"__esModule",{value:!0});var alpha_1=colorManipulator.alpha=alpha;colorManipulator.blend=blend;colorManipulator.colorChannel=void 0;var darken_1=colorManipulator.darken=darken;colorManipulator.decomposeColor=decomposeColor;var emphasize_1=colorManipulator.emphasize=emphasize,getContrastRatio_1=colorManipulator.getContrastRatio=getContrastRatio;colorManipulator.getLuminance=getLuminance;colorManipulator.hexToRgb=hexToRgb;colorManipulator.hslToRgb=hslToRgb;var lighten_1=colorManipulator.lighten=lighten;colorManipulator.private_safeAlpha=private_safeAlpha;colorManipulator.private_safeColorChannel=void 0;colorManipulator.private_safeDarken=private_safeDarken;colorManipulator.private_safeEmphasize=private_safeEmphasize;colorManipulator.private_safeLighten=private_safeLighten;colorManipulator.recomposeColor=recomposeColor;colorManipulator.rgbToHex=rgbToHex;var _formatMuiErrorMessage2=_interopRequireDefault$1(require$$1$1),_clamp=_interopRequireDefault$1(require$$2);function clampWrapper(ne,oe=0,ce=1){return(0,_clamp.default)(ne,oe,ce)}function hexToRgb(ne){ne=ne.slice(1);const oe=new RegExp(`.{1,${ne.length>=6?2:1}}`,"g");let ce=ne.match(oe);return ce&&ce[0].length===1&&(ce=ce.map(ue=>ue+ue)),ce?`rgb${ce.length===4?"a":""}(${ce.map((ue,pe)=>pe<3?parseInt(ue,16):Math.round(parseInt(ue,16)/255*1e3)/1e3).join(", ")})`:""}function intToHex(ne){const oe=ne.toString(16);return oe.length===1?`0${oe}`:oe}function decomposeColor(ne){if(ne.type)return ne;if(ne.charAt(0)==="#")return decomposeColor(hexToRgb(ne));const oe=ne.indexOf("("),ce=ne.substring(0,oe);if(["rgb","rgba","hsl","hsla","color"].indexOf(ce)===-1)throw new Error((0,_formatMuiErrorMessage2.default)(9,ne));let ue=ne.substring(oe+1,ne.length-1),pe;if(ce==="color"){if(ue=ue.split(" "),pe=ue.shift(),ue.length===4&&ue[3].charAt(0)==="/"&&(ue[3]=ue[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(pe)===-1)throw new Error((0,_formatMuiErrorMessage2.default)(10,pe))}else ue=ue.split(",");return ue=ue.map(me=>parseFloat(me)),{type:ce,values:ue,colorSpace:pe}}const colorChannel=ne=>{const oe=decomposeColor(ne);return oe.values.slice(0,3).map((ce,ue)=>oe.type.indexOf("hsl")!==-1&&ue!==0?`${ce}%`:ce).join(" ")};colorManipulator.colorChannel=colorChannel;const private_safeColorChannel=(ne,oe)=>{try{return colorChannel(ne)}catch{return ne}};colorManipulator.private_safeColorChannel=private_safeColorChannel;function recomposeColor(ne){const{type:oe,colorSpace:ce}=ne;let{values:ue}=ne;return oe.indexOf("rgb")!==-1?ue=ue.map((pe,me)=>me<3?parseInt(pe,10):pe):oe.indexOf("hsl")!==-1&&(ue[1]=`${ue[1]}%`,ue[2]=`${ue[2]}%`),oe.indexOf("color")!==-1?ue=`${ce} ${ue.join(" ")}`:ue=`${ue.join(", ")}`,`${oe}(${ue})`}function rgbToHex(ne){if(ne.indexOf("#")===0)return ne;const{values:oe}=decomposeColor(ne);return`#${oe.map((ce,ue)=>intToHex(ue===3?Math.round(255*ce):ce)).join("")}`}function hslToRgb(ne){ne=decomposeColor(ne);const{values:oe}=ne,ce=oe[0],ue=oe[1]/100,pe=oe[2]/100,me=ue*Math.min(pe,1-pe),ge=(xe,_e=(xe+ce/30)%12)=>pe-me*Math.max(Math.min(_e-3,9-_e,1),-1);let ye="rgb";const ve=[Math.round(ge(0)*255),Math.round(ge(8)*255),Math.round(ge(4)*255)];return ne.type==="hsla"&&(ye+="a",ve.push(oe[3])),recomposeColor({type:ye,values:ve})}function getLuminance(ne){ne=decomposeColor(ne);let oe=ne.type==="hsl"||ne.type==="hsla"?decomposeColor(hslToRgb(ne)).values:ne.values;return oe=oe.map(ce=>(ne.type!=="color"&&(ce/=255),ce<=.03928?ce/12.92:((ce+.055)/1.055)**2.4)),Number((.2126*oe[0]+.7152*oe[1]+.0722*oe[2]).toFixed(3))}function getContrastRatio(ne,oe){const ce=getLuminance(ne),ue=getLuminance(oe);return(Math.max(ce,ue)+.05)/(Math.min(ce,ue)+.05)}function alpha(ne,oe){return ne=decomposeColor(ne),oe=clampWrapper(oe),(ne.type==="rgb"||ne.type==="hsl")&&(ne.type+="a"),ne.type==="color"?ne.values[3]=`/${oe}`:ne.values[3]=oe,recomposeColor(ne)}function private_safeAlpha(ne,oe,ce){try{return alpha(ne,oe)}catch{return ne}}function darken(ne,oe){if(ne=decomposeColor(ne),oe=clampWrapper(oe),ne.type.indexOf("hsl")!==-1)ne.values[2]*=1-oe;else if(ne.type.indexOf("rgb")!==-1||ne.type.indexOf("color")!==-1)for(let ce=0;ce<3;ce+=1)ne.values[ce]*=1-oe;return recomposeColor(ne)}function private_safeDarken(ne,oe,ce){try{return darken(ne,oe)}catch{return ne}}function lighten(ne,oe){if(ne=decomposeColor(ne),oe=clampWrapper(oe),ne.type.indexOf("hsl")!==-1)ne.values[2]+=(100-ne.values[2])*oe;else if(ne.type.indexOf("rgb")!==-1)for(let ce=0;ce<3;ce+=1)ne.values[ce]+=(255-ne.values[ce])*oe;else if(ne.type.indexOf("color")!==-1)for(let ce=0;ce<3;ce+=1)ne.values[ce]+=(1-ne.values[ce])*oe;return recomposeColor(ne)}function private_safeLighten(ne,oe,ce){try{return lighten(ne,oe)}catch{return ne}}function emphasize(ne,oe=.15){return getLuminance(ne)>.5?darken(ne,oe):lighten(ne,oe)}function private_safeEmphasize(ne,oe,ce){try{return emphasize(ne,oe)}catch{return ne}}function blend(ne,oe,ce,ue=1){const pe=(ve,xe)=>Math.round((ve**(1/ue)*(1-ce)+xe**(1/ue)*ce)**ue),me=decomposeColor(ne),ge=decomposeColor(oe),ye=[pe(me.values[0],ge.values[0]),pe(me.values[1],ge.values[1]),pe(me.values[2],ge.values[2])];return recomposeColor({type:"rgb",values:ye})}const _excluded$1b=["mode","contrastThreshold","tonalOffset"],light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$3.white,default:common$3.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dark={text:{primary:common$3.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common$3.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(ne,oe,ce,ue){const pe=ue.light||ue,me=ue.dark||ue*1.5;ne[oe]||(ne.hasOwnProperty(ce)?ne[oe]=ne[ce]:oe==="light"?ne.light=lighten_1(ne.main,pe):oe==="dark"&&(ne.dark=darken_1(ne.main,me)))}function getDefaultPrimary(ne="light"){return ne==="dark"?{main:blue$1[200],light:blue$1[50],dark:blue$1[400]}:{main:blue$1[700],light:blue$1[400],dark:blue$1[800]}}function getDefaultSecondary(ne="light"){return ne==="dark"?{main:purple$1[200],light:purple$1[50],dark:purple$1[400]}:{main:purple$1[500],light:purple$1[300],dark:purple$1[700]}}function getDefaultError(ne="light"){return ne==="dark"?{main:red$1[500],light:red$1[300],dark:red$1[700]}:{main:red$1[700],light:red$1[400],dark:red$1[800]}}function getDefaultInfo(ne="light"){return ne==="dark"?{main:lightBlue$1[400],light:lightBlue$1[300],dark:lightBlue$1[700]}:{main:lightBlue$1[700],light:lightBlue$1[500],dark:lightBlue$1[900]}}function getDefaultSuccess(ne="light"){return ne==="dark"?{main:green$1[400],light:green$1[300],dark:green$1[700]}:{main:green$1[800],light:green$1[500],dark:green$1[900]}}function getDefaultWarning(ne="light"){return ne==="dark"?{main:orange$1[400],light:orange$1[300],dark:orange$1[700]}:{main:"#ed6c02",light:orange$1[500],dark:orange$1[900]}}function createPalette(ne){const{mode:oe="light",contrastThreshold:ce=3,tonalOffset:ue=.2}=ne,pe=_objectWithoutPropertiesLoose$2(ne,_excluded$1b),me=ne.primary||getDefaultPrimary(oe),ge=ne.secondary||getDefaultSecondary(oe),ye=ne.error||getDefaultError(oe),ve=ne.info||getDefaultInfo(oe),xe=ne.success||getDefaultSuccess(oe),_e=ne.warning||getDefaultWarning(oe);function Se(Ie){return getContrastRatio_1(Ie,dark.text.primary)>=ce?dark.text.primary:light.text.primary}const $e=({color:Ie,name:ke,mainShade:Be=500,lightShade:Ne=300,darkShade:Fe=700})=>{if(Ie=_extends$2({},Ie),!Ie.main&&Ie[Be]&&(Ie.main=Ie[Be]),!Ie.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage$1(11,ke?` (${ke})`:"",Be));if(typeof Ie.main!="string")throw new Error(formatMuiErrorMessage$1(12,ke?` (${ke})`:"",JSON.stringify(Ie.main)));return addLightOrDark(Ie,"light",Ne,ue),addLightOrDark(Ie,"dark",Fe,ue),Ie.contrastText||(Ie.contrastText=Se(Ie.main)),Ie},Re={dark,light};return deepmerge$1(_extends$2({common:_extends$2({},common$3),mode:oe,primary:$e({color:me,name:"primary"}),secondary:$e({color:ge,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:$e({color:ye,name:"error"}),warning:$e({color:_e,name:"warning"}),info:$e({color:ve,name:"info"}),success:$e({color:xe,name:"success"}),grey:grey$1,contrastThreshold:ce,getContrastText:Se,augmentColor:$e,tonalOffset:ue},Re[oe]),pe)}const _excluded$1a=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function round$4(ne){return Math.round(ne*1e5)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(ne,oe){const ce=typeof oe=="function"?oe(ne):oe,{fontFamily:ue=defaultFontFamily,fontSize:pe=14,fontWeightLight:me=300,fontWeightRegular:ge=400,fontWeightMedium:ye=500,fontWeightBold:ve=700,htmlFontSize:xe=16,allVariants:_e,pxToRem:Se}=ce,$e=_objectWithoutPropertiesLoose$2(ce,_excluded$1a),Re=pe/14,Ae=Se||(Be=>`${Be/xe*Re}rem`),Ie=(Be,Ne,Fe,Ue,We)=>_extends$2({fontFamily:ue,fontWeight:Be,fontSize:Ae(Ne),lineHeight:Fe},ue===defaultFontFamily?{letterSpacing:`${round$4(Ue/Ne)}em`}:{},We,_e),ke={h1:Ie(me,96,1.167,-1.5),h2:Ie(me,60,1.2,-.5),h3:Ie(ge,48,1.167,0),h4:Ie(ge,34,1.235,.25),h5:Ie(ge,24,1.334,0),h6:Ie(ye,20,1.6,.15),subtitle1:Ie(ge,16,1.75,.15),subtitle2:Ie(ye,14,1.57,.1),body1:Ie(ge,16,1.5,.15),body2:Ie(ge,14,1.43,.15),button:Ie(ye,14,1.75,.4,caseAllCaps),caption:Ie(ge,12,1.66,.4),overline:Ie(ge,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge$1(_extends$2({htmlFontSize:xe,pxToRem:Ae,fontFamily:ue,fontSize:pe,fontWeightLight:me,fontWeightRegular:ge,fontWeightMedium:ye,fontWeightBold:ve},ke),$e,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...ne){return[`${ne[0]}px ${ne[1]}px ${ne[2]}px ${ne[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${ne[4]}px ${ne[5]}px ${ne[6]}px ${ne[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${ne[8]}px ${ne[9]}px ${ne[10]}px ${ne[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],shadows$1=shadows,_excluded$19=["duration","easing","delay"],easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(ne){return`${Math.round(ne)}ms`}function getAutoHeightDuration(ne){if(!ne)return 0;const oe=ne/36;return Math.round((4+15*oe**.25+oe/5)*10)}function createTransitions(ne){const oe=_extends$2({},easing,ne.easing),ce=_extends$2({},duration,ne.duration);return _extends$2({getAutoHeightDuration,create:(pe=["all"],me={})=>{const{duration:ge=ce.standard,easing:ye=oe.easeInOut,delay:ve=0}=me;return _objectWithoutPropertiesLoose$2(me,_excluded$19),(Array.isArray(pe)?pe:[pe]).map(xe=>`${xe} ${typeof ge=="string"?ge:formatMs(ge)} ${ye} ${typeof ve=="string"?ve:formatMs(ve)}`).join(",")}},ne,{easing:oe,duration:ce})}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zIndex$1=zIndex,_excluded$18=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme(ne={},...oe){const{mixins:ce={},palette:ue={},transitions:pe={},typography:me={}}=ne,ge=_objectWithoutPropertiesLoose$2(ne,_excluded$18);if(ne.vars)throw new Error(formatMuiErrorMessage$1(18));const ye=createPalette(ue),ve=createTheme$2(ne);let xe=deepmerge$1(ve,{mixins:createMixins(ve.breakpoints,ce),palette:ye,shadows:shadows$1.slice(),typography:createTypography(ye,me),transitions:createTransitions(pe),zIndex:_extends$2({},zIndex$1)});return xe=deepmerge$1(xe,ge),xe=oe.reduce((_e,Se)=>deepmerge$1(_e,Se),xe),xe.unstable_sxConfig=_extends$2({},defaultSxConfig$1,ge==null?void 0:ge.unstable_sxConfig),xe.unstable_sx=function(Se){return styleFunctionSx$2({sx:Se,theme:this})},xe}function getUnit(ne){return String(ne).match(/[\d.\-+]*\s*(.*)/)[1]||""}function toUnitless(ne){return parseFloat(ne)}const defaultTheme$1=createTheme(),defaultTheme$2=defaultTheme$1;function useTheme$1(){const ne=useTheme$3(defaultTheme$2);return ne[THEME_ID]||ne}function useThemeProps$3({props:ne,name:oe}){return useThemeProps$4({props:ne,name:oe,defaultTheme:defaultTheme$2,themeId:THEME_ID})}var createStyled$1={},objectWithoutPropertiesLoose={exports:{}},hasRequiredObjectWithoutPropertiesLoose;function requireObjectWithoutPropertiesLoose(){return hasRequiredObjectWithoutPropertiesLoose||(hasRequiredObjectWithoutPropertiesLoose=1,function(ne){function oe(ce,ue){if(ce==null)return{};var pe={};for(var me in ce)if(Object.prototype.hasOwnProperty.call(ce,me)){if(ue.indexOf(me)>=0)continue;pe[me]=ce[me]}return pe}ne.exports=oe,ne.exports.__esModule=!0,ne.exports.default=ne.exports}(objectWithoutPropertiesLoose)),objectWithoutPropertiesLoose.exports}const require$$1=getAugmentedNamespace(styledEngine),require$$4=getAugmentedNamespace(deepmerge),require$$5=getAugmentedNamespace(capitalize),require$$6=getAugmentedNamespace(getDisplayName),require$$7=getAugmentedNamespace(createTheme$1),require$$8=getAugmentedNamespace(styleFunctionSx);var _interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(createStyled$1,"__esModule",{value:!0});var _default$2=createStyled$1.default=createStyled;createStyled$1.shouldForwardProp=shouldForwardProp;createStyled$1.systemDefaultTheme=void 0;var _extends2=_interopRequireDefault(require_extends()),_objectWithoutPropertiesLoose2=_interopRequireDefault(requireObjectWithoutPropertiesLoose()),_styledEngine$1=_interopRequireWildcard$1(require$$1),_deepmerge=require$$4;_interopRequireDefault(require$$5);_interopRequireDefault(require$$6);var _createTheme=_interopRequireDefault(require$$7),_styleFunctionSx=_interopRequireDefault(require$$8);const _excluded$17=["ownerState"],_excluded2$7=["variants"],_excluded3$2=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function _getRequireWildcardCache$1(ne){if(typeof WeakMap!="function")return null;var oe=new WeakMap,ce=new WeakMap;return(_getRequireWildcardCache$1=function(ue){return ue?ce:oe})(ne)}function _interopRequireWildcard$1(ne,oe){if(!oe&&ne&&ne.__esModule)return ne;if(ne===null||typeof ne!="object"&&typeof ne!="function")return{default:ne};var ce=_getRequireWildcardCache$1(oe);if(ce&&ce.has(ne))return ce.get(ne);var ue={__proto__:null},pe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var me in ne)if(me!=="default"&&Object.prototype.hasOwnProperty.call(ne,me)){var ge=pe?Object.getOwnPropertyDescriptor(ne,me):null;ge&&(ge.get||ge.set)?Object.defineProperty(ue,me,ge):ue[me]=ne[me]}return ue.default=ne,ce&&ce.set(ne,ue),ue}function isEmpty$4(ne){return Object.keys(ne).length===0}function isStringTag(ne){return typeof ne=="string"&&ne.charCodeAt(0)>96}function shouldForwardProp(ne){return ne!=="ownerState"&&ne!=="theme"&&ne!=="sx"&&ne!=="as"}const systemDefaultTheme=createStyled$1.systemDefaultTheme=(0,_createTheme.default)(),lowercaseFirstLetter=ne=>ne&&ne.charAt(0).toLowerCase()+ne.slice(1);function resolveTheme({defaultTheme:ne,theme:oe,themeId:ce}){return isEmpty$4(oe)?ne:oe[ce]||oe}function defaultOverridesResolver(ne){return ne?(oe,ce)=>ce[ne]:null}function processStyleArg(ne,oe){let{ownerState:ce}=oe,ue=(0,_objectWithoutPropertiesLoose2.default)(oe,_excluded$17);const pe=typeof ne=="function"?ne((0,_extends2.default)({ownerState:ce},ue)):ne;if(Array.isArray(pe))return pe.flatMap(me=>processStyleArg(me,(0,_extends2.default)({ownerState:ce},ue)));if(pe&&typeof pe=="object"&&Array.isArray(pe.variants)){const{variants:me=[]}=pe;let ye=(0,_objectWithoutPropertiesLoose2.default)(pe,_excluded2$7);return me.forEach(ve=>{let xe=!0;typeof ve.props=="function"?xe=ve.props((0,_extends2.default)({ownerState:ce},ue,ce)):Object.keys(ve.props).forEach(_e=>{(ce==null?void 0:ce[_e])!==ve.props[_e]&&ue[_e]!==ve.props[_e]&&(xe=!1)}),xe&&(Array.isArray(ye)||(ye=[ye]),ye.push(typeof ve.style=="function"?ve.style((0,_extends2.default)({ownerState:ce},ue,ce)):ve.style))}),ye}return pe}function createStyled(ne={}){const{themeId:oe,defaultTheme:ce=systemDefaultTheme,rootShouldForwardProp:ue=shouldForwardProp,slotShouldForwardProp:pe=shouldForwardProp}=ne,me=ge=>(0,_styleFunctionSx.default)((0,_extends2.default)({},ge,{theme:resolveTheme((0,_extends2.default)({},ge,{defaultTheme:ce,themeId:oe}))}));return me.__mui_systemSx=!0,(ge,ye={})=>{(0,_styledEngine$1.internal_processStyles)(ge,We=>We.filter(qe=>!(qe!=null&&qe.__mui_systemSx)));const{name:ve,slot:xe,skipVariantsResolver:_e,skipSx:Se,overridesResolver:$e=defaultOverridesResolver(lowercaseFirstLetter(xe))}=ye,Re=(0,_objectWithoutPropertiesLoose2.default)(ye,_excluded3$2),Ae=_e!==void 0?_e:xe&&xe!=="Root"&&xe!=="root"||!1,Ie=Se||!1;let ke,Be=shouldForwardProp;xe==="Root"||xe==="root"?Be=ue:xe?Be=pe:isStringTag(ge)&&(Be=void 0);const Ne=(0,_styledEngine$1.default)(ge,(0,_extends2.default)({shouldForwardProp:Be,label:ke},Re)),Fe=We=>typeof We=="function"&&We.__emotion_real!==We||(0,_deepmerge.isPlainObject)(We)?qe=>processStyleArg(We,(0,_extends2.default)({},qe,{theme:resolveTheme({theme:qe.theme,defaultTheme:ce,themeId:oe})})):We,Ue=(We,...qe)=>{let ze=Fe(We);const Ge=qe?qe.map(Fe):[];ve&&$e&&Ge.push(Je=>{const Ut=resolveTheme((0,_extends2.default)({},Je,{defaultTheme:ce,themeId:oe}));if(!Ut.components||!Ut.components[ve]||!Ut.components[ve].styleOverrides)return null;const jt=Ut.components[ve].styleOverrides,Ke={};return Object.entries(jt).forEach(([an,Zt])=>{Ke[an]=processStyleArg(Zt,(0,_extends2.default)({},Je,{theme:Ut}))}),$e(Je,Ke)}),ve&&!Ae&&Ge.push(Je=>{var Ut;const jt=resolveTheme((0,_extends2.default)({},Je,{defaultTheme:ce,themeId:oe})),Ke=jt==null||(Ut=jt.components)==null||(Ut=Ut[ve])==null?void 0:Ut.variants;return processStyleArg({variants:Ke},(0,_extends2.default)({},Je,{theme:jt}))}),Ie||Ge.push(me);const Ze=Ge.length-qe.length;if(Array.isArray(We)&&Ze>0){const Je=new Array(Ze).fill("");ze=[...We,...Je],ze.raw=[...We.raw,...Je]}const Dt=Ne(ze,...Ge);return ge.muiName&&(Dt.muiName=ge.muiName),Dt};return Ne.withConfig&&(Ue.withConfig=Ne.withConfig),Ue}}function slotShouldForwardProp(ne){return ne!=="ownerState"&&ne!=="theme"&&ne!=="sx"&&ne!=="as"}const rootShouldForwardProp=ne=>slotShouldForwardProp(ne)&&ne!=="classes",rootShouldForwardProp$1=rootShouldForwardProp,styled=_default$2({themeId:THEME_ID,defaultTheme:defaultTheme$2,rootShouldForwardProp:rootShouldForwardProp$1}),styled$1=styled,_excluded$16=["theme"];function ThemeProvider(ne){let{theme:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$16);const ue=oe[THEME_ID];return jsxRuntimeExports.jsx(ThemeProvider$1,_extends$2({},ce,{themeId:ue?THEME_ID:void 0,theme:ue||oe}))}const getOverlayAlpha=ne=>{let oe;return ne<1?oe=5.11916*ne**2:oe=4.5*Math.log(ne+1)+2,(oe/100).toFixed(2)},getOverlayAlpha$1=getOverlayAlpha;function getSvgIconUtilityClass(ne){return generateUtilityClass$2("MuiSvgIcon",ne)}generateUtilityClasses$2("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const _excluded$15=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],useUtilityClasses$U=ne=>{const{color:oe,fontSize:ce,classes:ue}=ne,pe={root:["root",oe!=="inherit"&&`color${capitalize$1(oe)}`,`fontSize${capitalize$1(ce)}`]};return composeClasses$1(pe,getSvgIconUtilityClass,ue)},SvgIconRoot=styled$1("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.color!=="inherit"&&oe[`color${capitalize$1(ce.color)}`],oe[`fontSize${capitalize$1(ce.fontSize)}`]]}})(({theme:ne,ownerState:oe})=>{var ce,ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:oe.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(ce=ne.transitions)==null||(ue=ce.create)==null?void 0:ue.call(ce,"fill",{duration:(pe=ne.transitions)==null||(pe=pe.duration)==null?void 0:pe.shorter}),fontSize:{inherit:"inherit",small:((me=ne.typography)==null||(ge=me.pxToRem)==null?void 0:ge.call(me,20))||"1.25rem",medium:((ye=ne.typography)==null||(ve=ye.pxToRem)==null?void 0:ve.call(ye,24))||"1.5rem",large:((xe=ne.typography)==null||(_e=xe.pxToRem)==null?void 0:_e.call(xe,35))||"2.1875rem"}[oe.fontSize],color:(Se=($e=(ne.vars||ne).palette)==null||($e=$e[oe.color])==null?void 0:$e.main)!=null?Se:{action:(Re=(ne.vars||ne).palette)==null||(Re=Re.action)==null?void 0:Re.active,disabled:(Ae=(ne.vars||ne).palette)==null||(Ae=Ae.action)==null?void 0:Ae.disabled,inherit:void 0}[oe.color]}}),SvgIcon=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSvgIcon"}),{children:pe,className:me,color:ge="inherit",component:ye="svg",fontSize:ve="medium",htmlColor:xe,inheritViewBox:_e=!1,titleAccess:Se,viewBox:$e="0 0 24 24"}=ue,Re=_objectWithoutPropertiesLoose$2(ue,_excluded$15),Ae=reactExports.isValidElement(pe)&&pe.type==="svg",Ie=_extends$2({},ue,{color:ge,component:ye,fontSize:ve,instanceFontSize:oe.fontSize,inheritViewBox:_e,viewBox:$e,hasSvgAsChild:Ae}),ke={};_e||(ke.viewBox=$e);const Be=useUtilityClasses$U(Ie);return jsxRuntimeExports.jsxs(SvgIconRoot,_extends$2({as:ye,className:clsx(Be.root,me),focusable:"false",color:xe,"aria-hidden":Se?void 0:!0,role:Se?"img":void 0,ref:ce},ke,Re,Ae&&pe.props,{ownerState:Ie,children:[Ae?pe.props.children:pe,Se?jsxRuntimeExports.jsx("title",{children:Se}):null]}))});SvgIcon.muiName="SvgIcon";const SvgIcon$1=SvgIcon;function createSvgIcon(ne,oe){function ce(ue,pe){return jsxRuntimeExports.jsx(SvgIcon$1,_extends$2({"data-testid":`${oe}Icon`,ref:pe},ue,{children:ne}))}return ce.muiName=SvgIcon$1.muiName,reactExports.memo(reactExports.forwardRef(ce))}function createUseThemeProps(ne){return useThemeProps$3}function _setPrototypeOf$3(ne,oe){return _setPrototypeOf$3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ue,pe){return ue.__proto__=pe,ue},_setPrototypeOf$3(ne,oe)}function _inheritsLoose(ne,oe){ne.prototype=Object.create(oe.prototype),ne.prototype.constructor=ne,_setPrototypeOf$3(ne,oe)}var reactDom={exports:{}},reactDom_production={};/** + */var b$a=Symbol.for("react.element"),c$8=Symbol.for("react.portal"),d$c=Symbol.for("react.fragment"),e$8=Symbol.for("react.strict_mode"),f$a=Symbol.for("react.profiler"),g$8=Symbol.for("react.provider"),h$c=Symbol.for("react.context"),k$a=Symbol.for("react.server_context"),l$a=Symbol.for("react.forward_ref"),m$a=Symbol.for("react.suspense"),n$9=Symbol.for("react.suspense_list"),p$c=Symbol.for("react.memo"),q$9=Symbol.for("react.lazy"),t$8=Symbol.for("react.offscreen"),u$a;u$a=Symbol.for("react.module.reference");function v$a(ne){if(typeof ne=="object"&&ne!==null){var oe=ne.$$typeof;switch(oe){case b$a:switch(ne=ne.type,ne){case d$c:case f$a:case e$8:case m$a:case n$9:return ne;default:switch(ne=ne&&ne.$$typeof,ne){case k$a:case h$c:case l$a:case q$9:case p$c:case g$8:return ne;default:return oe}}case c$8:return oe}}}reactIs_production_min$2.ContextConsumer=h$c;reactIs_production_min$2.ContextProvider=g$8;reactIs_production_min$2.Element=b$a;reactIs_production_min$2.ForwardRef=l$a;reactIs_production_min$2.Fragment=d$c;reactIs_production_min$2.Lazy=q$9;reactIs_production_min$2.Memo=p$c;reactIs_production_min$2.Portal=c$8;reactIs_production_min$2.Profiler=f$a;reactIs_production_min$2.StrictMode=e$8;reactIs_production_min$2.Suspense=m$a;reactIs_production_min$2.SuspenseList=n$9;reactIs_production_min$2.isAsyncMode=function(){return!1};reactIs_production_min$2.isConcurrentMode=function(){return!1};reactIs_production_min$2.isContextConsumer=function(ne){return v$a(ne)===h$c};reactIs_production_min$2.isContextProvider=function(ne){return v$a(ne)===g$8};reactIs_production_min$2.isElement=function(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===b$a};reactIs_production_min$2.isForwardRef=function(ne){return v$a(ne)===l$a};reactIs_production_min$2.isFragment=function(ne){return v$a(ne)===d$c};reactIs_production_min$2.isLazy=function(ne){return v$a(ne)===q$9};reactIs_production_min$2.isMemo=function(ne){return v$a(ne)===p$c};reactIs_production_min$2.isPortal=function(ne){return v$a(ne)===c$8};reactIs_production_min$2.isProfiler=function(ne){return v$a(ne)===f$a};reactIs_production_min$2.isStrictMode=function(ne){return v$a(ne)===e$8};reactIs_production_min$2.isSuspense=function(ne){return v$a(ne)===m$a};reactIs_production_min$2.isSuspenseList=function(ne){return v$a(ne)===n$9};reactIs_production_min$2.isValidElementType=function(ne){return typeof ne=="string"||typeof ne=="function"||ne===d$c||ne===f$a||ne===e$8||ne===m$a||ne===n$9||ne===t$8||typeof ne=="object"&&ne!==null&&(ne.$$typeof===q$9||ne.$$typeof===p$c||ne.$$typeof===g$8||ne.$$typeof===h$c||ne.$$typeof===l$a||ne.$$typeof===u$a||ne.getModuleId!==void 0)};reactIs_production_min$2.typeOf=v$a;reactIs$2.exports=reactIs_production_min$2;var reactIsExports$2=reactIs$2.exports;const fnNameMatchRegex=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function getFunctionName(ne){const oe=`${ne}`.match(fnNameMatchRegex);return oe&&oe[1]||""}function getFunctionComponentName(ne,oe=""){return ne.displayName||ne.name||getFunctionName(ne)||oe}function getWrappedName(ne,oe,ce){const ue=getFunctionComponentName(oe);return ne.displayName||(ue!==""?`${ce}(${ue})`:ce)}function getDisplayName$1(ne){if(ne!=null){if(typeof ne=="string")return ne;if(typeof ne=="function")return getFunctionComponentName(ne,"Component");if(typeof ne=="object")switch(ne.$$typeof){case reactIsExports$2.ForwardRef:return getWrappedName(ne,ne.render,"ForwardRef");case reactIsExports$2.Memo:return getWrappedName(ne,ne.type,"memo");default:return}}}const getDisplayName=Object.freeze(Object.defineProperty({__proto__:null,default:getDisplayName$1,getFunctionName},Symbol.toStringTag,{value:"Module"})),_excluded$1f=["ownerState"],_excluded2$8=["variants"],_excluded3$3=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function isEmpty$5(ne){return Object.keys(ne).length===0}function isStringTag$1(ne){return typeof ne=="string"&&ne.charCodeAt(0)>96}function shouldForwardProp$1(ne){return ne!=="ownerState"&&ne!=="theme"&&ne!=="sx"&&ne!=="as"}const systemDefaultTheme$1=createTheme$2(),lowercaseFirstLetter$1=ne=>ne&&ne.charAt(0).toLowerCase()+ne.slice(1);function resolveTheme$1({defaultTheme:ne,theme:oe,themeId:ce}){return isEmpty$5(oe)?ne:oe[ce]||oe}function defaultOverridesResolver$1(ne){return ne?(oe,ce)=>ce[ne]:null}function processStyleArg$1(ne,oe){let{ownerState:ce}=oe,ue=_objectWithoutPropertiesLoose$2(oe,_excluded$1f);const pe=typeof ne=="function"?ne(_extends$2({ownerState:ce},ue)):ne;if(Array.isArray(pe))return pe.flatMap(me=>processStyleArg$1(me,_extends$2({ownerState:ce},ue)));if(pe&&typeof pe=="object"&&Array.isArray(pe.variants)){const{variants:me=[]}=pe;let ye=_objectWithoutPropertiesLoose$2(pe,_excluded2$8);return me.forEach(ve=>{let xe=!0;typeof ve.props=="function"?xe=ve.props(_extends$2({ownerState:ce},ue,ce)):Object.keys(ve.props).forEach(_e=>{(ce==null?void 0:ce[_e])!==ve.props[_e]&&ue[_e]!==ve.props[_e]&&(xe=!1)}),xe&&(Array.isArray(ye)||(ye=[ye]),ye.push(typeof ve.style=="function"?ve.style(_extends$2({ownerState:ce},ue,ce)):ve.style))}),ye}return pe}function createStyled$2(ne={}){const{themeId:oe,defaultTheme:ce=systemDefaultTheme$1,rootShouldForwardProp:ue=shouldForwardProp$1,slotShouldForwardProp:pe=shouldForwardProp$1}=ne,me=ge=>styleFunctionSx$2(_extends$2({},ge,{theme:resolveTheme$1(_extends$2({},ge,{defaultTheme:ce,themeId:oe}))}));return me.__mui_systemSx=!0,(ge,ye={})=>{internal_processStyles(ge,We=>We.filter(qe=>!(qe!=null&&qe.__mui_systemSx)));const{name:ve,slot:xe,skipVariantsResolver:_e,skipSx:Se,overridesResolver:$e=defaultOverridesResolver$1(lowercaseFirstLetter$1(xe))}=ye,Re=_objectWithoutPropertiesLoose$2(ye,_excluded3$3),Ae=_e!==void 0?_e:xe&&xe!=="Root"&&xe!=="root"||!1,Ie=Se||!1;let ke,Be=shouldForwardProp$1;xe==="Root"||xe==="root"?Be=ue:xe?Be=pe:isStringTag$1(ge)&&(Be=void 0);const Ne=styled$3(ge,_extends$2({shouldForwardProp:Be,label:ke},Re)),Fe=We=>typeof We=="function"&&We.__emotion_real!==We||isPlainObject$4(We)?qe=>processStyleArg$1(We,_extends$2({},qe,{theme:resolveTheme$1({theme:qe.theme,defaultTheme:ce,themeId:oe})})):We,Ue=(We,...qe)=>{let ze=Fe(We);const Ge=qe?qe.map(Fe):[];ve&&$e&&Ge.push(Je=>{const Ut=resolveTheme$1(_extends$2({},Je,{defaultTheme:ce,themeId:oe}));if(!Ut.components||!Ut.components[ve]||!Ut.components[ve].styleOverrides)return null;const jt=Ut.components[ve].styleOverrides,Ke={};return Object.entries(jt).forEach(([an,Zt])=>{Ke[an]=processStyleArg$1(Zt,_extends$2({},Je,{theme:Ut}))}),$e(Je,Ke)}),ve&&!Ae&&Ge.push(Je=>{var Ut;const jt=resolveTheme$1(_extends$2({},Je,{defaultTheme:ce,themeId:oe})),Ke=jt==null||(Ut=jt.components)==null||(Ut=Ut[ve])==null?void 0:Ut.variants;return processStyleArg$1({variants:Ke},_extends$2({},Je,{theme:jt}))}),Ie||Ge.push(me);const Ze=Ge.length-qe.length;if(Array.isArray(We)&&Ze>0){const Je=new Array(Ze).fill("");ze=[...We,...Je],ze.raw=[...We.raw,...Je]}const Dt=Ne(ze,...Ge);return ge.muiName&&(Dt.muiName=ge.muiName),Dt};return Ne.withConfig&&(Ue.withConfig=Ne.withConfig),Ue}}const styled$2=createStyled$2(),systemStyled=styled$2;function resolveProps(ne,oe){const ce=_extends$2({},oe);return Object.keys(ne).forEach(ue=>{if(ue.toString().match(/^(components|slots)$/))ce[ue]=_extends$2({},ne[ue],ce[ue]);else if(ue.toString().match(/^(componentsProps|slotProps)$/)){const pe=ne[ue]||{},me=oe[ue];ce[ue]={},!me||!Object.keys(me)?ce[ue]=pe:!pe||!Object.keys(pe)?ce[ue]=me:(ce[ue]=_extends$2({},me),Object.keys(pe).forEach(ge=>{ce[ue][ge]=resolveProps(pe[ge],me[ge])}))}else ce[ue]===void 0&&(ce[ue]=ne[ue])}),ce}function getThemeProps(ne){const{theme:oe,name:ce,props:ue}=ne;return!oe||!oe.components||!oe.components[ce]||!oe.components[ce].defaultProps?ue:resolveProps(oe.components[ce].defaultProps,ue)}function useThemeProps$4({props:ne,name:oe,defaultTheme:ce,themeId:ue}){let pe=useTheme$3(ce);return ue&&(pe=pe[ue]||pe),getThemeProps({theme:pe,name:oe,props:ne})}const useEnhancedEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,useEnhancedEffect$1=useEnhancedEffect;function useMediaQueryOld(ne,oe,ce,ue,pe){const[me,ge]=reactExports.useState(()=>pe&&ce?ce(ne).matches:ue?ue(ne).matches:oe);return useEnhancedEffect$1(()=>{let ye=!0;if(!ce)return;const ve=ce(ne),xe=()=>{ye&&ge(ve.matches)};return xe(),ve.addListener(xe),()=>{ye=!1,ve.removeListener(xe)}},[ne,ce]),me}const maybeReactUseSyncExternalStore=React$3["useSyncExternalStore"];function useMediaQueryNew(ne,oe,ce,ue,pe){const me=reactExports.useCallback(()=>oe,[oe]),ge=reactExports.useMemo(()=>{if(pe&&ce)return()=>ce(ne).matches;if(ue!==null){const{matches:_e}=ue(ne);return()=>_e}return me},[me,ne,ue,pe,ce]),[ye,ve]=reactExports.useMemo(()=>{if(ce===null)return[me,()=>()=>{}];const _e=ce(ne);return[()=>_e.matches,Se=>(_e.addListener(Se),()=>{_e.removeListener(Se)})]},[me,ce,ne]);return maybeReactUseSyncExternalStore(ve,ye,ge)}function useMediaQuery(ne,oe={}){const ce=useTheme$4(),ue=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:pe=!1,matchMedia:me=ue?window.matchMedia:null,ssrMatchMedia:ge=null,noSsr:ye=!1}=getThemeProps({name:"MuiUseMediaQuery",props:oe,theme:ce});let ve=typeof ne=="function"?ne(ce):ne;return ve=ve.replace(/^@media( ?)/m,""),(maybeReactUseSyncExternalStore!==void 0?useMediaQueryNew:useMediaQueryOld)(ve,pe,me,ge,ye)}function clamp$3(ne,oe=Number.MIN_SAFE_INTEGER,ce=Number.MAX_SAFE_INTEGER){return Math.max(oe,Math.min(ne,ce))}const clamp$2=Object.freeze(Object.defineProperty({__proto__:null,default:clamp$3},Symbol.toStringTag,{value:"Module"}));function clampWrapper$1(ne,oe=0,ce=1){return clamp$3(ne,oe,ce)}function hexToRgb$1(ne){ne=ne.slice(1);const oe=new RegExp(`.{1,${ne.length>=6?2:1}}`,"g");let ce=ne.match(oe);return ce&&ce[0].length===1&&(ce=ce.map(ue=>ue+ue)),ce?`rgb${ce.length===4?"a":""}(${ce.map((ue,pe)=>pe<3?parseInt(ue,16):Math.round(parseInt(ue,16)/255*1e3)/1e3).join(", ")})`:""}function intToHex$1(ne){const oe=ne.toString(16);return oe.length===1?`0${oe}`:oe}function decomposeColor$1(ne){if(ne.type)return ne;if(ne.charAt(0)==="#")return decomposeColor$1(hexToRgb$1(ne));const oe=ne.indexOf("("),ce=ne.substring(0,oe);if(["rgb","rgba","hsl","hsla","color"].indexOf(ce)===-1)throw new Error(formatMuiErrorMessage$1(9,ne));let ue=ne.substring(oe+1,ne.length-1),pe;if(ce==="color"){if(ue=ue.split(" "),pe=ue.shift(),ue.length===4&&ue[3].charAt(0)==="/"&&(ue[3]=ue[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(pe)===-1)throw new Error(formatMuiErrorMessage$1(10,pe))}else ue=ue.split(",");return ue=ue.map(me=>parseFloat(me)),{type:ce,values:ue,colorSpace:pe}}function recomposeColor$1(ne){const{type:oe,colorSpace:ce}=ne;let{values:ue}=ne;return oe.indexOf("rgb")!==-1?ue=ue.map((pe,me)=>me<3?parseInt(pe,10):pe):oe.indexOf("hsl")!==-1&&(ue[1]=`${ue[1]}%`,ue[2]=`${ue[2]}%`),oe.indexOf("color")!==-1?ue=`${ce} ${ue.join(" ")}`:ue=`${ue.join(", ")}`,`${oe}(${ue})`}function rgbToHex$1(ne){if(ne.indexOf("#")===0)return ne;const{values:oe}=decomposeColor$1(ne);return`#${oe.map((ce,ue)=>intToHex$1(ue===3?Math.round(255*ce):ce)).join("")}`}function hslToRgb$1(ne){ne=decomposeColor$1(ne);const{values:oe}=ne,ce=oe[0],ue=oe[1]/100,pe=oe[2]/100,me=ue*Math.min(pe,1-pe),ge=(xe,_e=(xe+ce/30)%12)=>pe-me*Math.max(Math.min(_e-3,9-_e,1),-1);let ye="rgb";const ve=[Math.round(ge(0)*255),Math.round(ge(8)*255),Math.round(ge(4)*255)];return ne.type==="hsla"&&(ye+="a",ve.push(oe[3])),recomposeColor$1({type:ye,values:ve})}function getLuminance$1(ne){ne=decomposeColor$1(ne);let oe=ne.type==="hsl"||ne.type==="hsla"?decomposeColor$1(hslToRgb$1(ne)).values:ne.values;return oe=oe.map(ce=>(ne.type!=="color"&&(ce/=255),ce<=.03928?ce/12.92:((ce+.055)/1.055)**2.4)),Number((.2126*oe[0]+.7152*oe[1]+.0722*oe[2]).toFixed(3))}function getContrastRatio$1(ne,oe){const ce=getLuminance$1(ne),ue=getLuminance$1(oe);return(Math.max(ce,ue)+.05)/(Math.min(ce,ue)+.05)}function alpha$1(ne,oe){return ne=decomposeColor$1(ne),oe=clampWrapper$1(oe),(ne.type==="rgb"||ne.type==="hsl")&&(ne.type+="a"),ne.type==="color"?ne.values[3]=`/${oe}`:ne.values[3]=oe,recomposeColor$1(ne)}function createChainedFunction(...ne){return ne.reduce((oe,ce)=>ce==null?oe:function(...pe){oe.apply(this,pe),ce.apply(this,pe)},()=>{})}function debounce$2(ne,oe=166){let ce;function ue(...pe){const me=()=>{ne.apply(this,pe)};clearTimeout(ce),ce=setTimeout(me,oe)}return ue.clear=()=>{clearTimeout(ce)},ue}function isMuiElement(ne,oe){var ce,ue;return reactExports.isValidElement(ne)&&oe.indexOf((ce=ne.type.muiName)!=null?ce:(ue=ne.type)==null||(ue=ue._payload)==null||(ue=ue.value)==null?void 0:ue.muiName)!==-1}function ownerDocument(ne){return ne&&ne.ownerDocument||document}function ownerWindow(ne){return ownerDocument(ne).defaultView||window}function setRef$1(ne,oe){typeof ne=="function"?ne(oe):ne&&(ne.current=oe)}let globalId=0;function useGlobalId(ne){const[oe,ce]=reactExports.useState(ne),ue=ne||oe;return reactExports.useEffect(()=>{oe==null&&(globalId+=1,ce(`mui-${globalId}`))},[oe]),ue}const maybeReactUseId=React$3["useId".toString()];function useId(ne){if(maybeReactUseId!==void 0){const oe=maybeReactUseId();return ne??oe}return useGlobalId(ne)}function useControlled({controlled:ne,default:oe,name:ce,state:ue="value"}){const{current:pe}=reactExports.useRef(ne!==void 0),[me,ge]=reactExports.useState(oe),ye=pe?ne:me,ve=reactExports.useCallback(xe=>{pe||ge(xe)},[]);return[ye,ve]}function useEventCallback(ne){const oe=reactExports.useRef(ne);return useEnhancedEffect$1(()=>{oe.current=ne}),reactExports.useRef((...ce)=>(0,oe.current)(...ce)).current}function useForkRef(...ne){return reactExports.useMemo(()=>ne.every(oe=>oe==null)?null:oe=>{ne.forEach(ce=>{setRef$1(ce,oe)})},ne)}const UNINITIALIZED={};function useLazyRef(ne,oe){const ce=reactExports.useRef(UNINITIALIZED);return ce.current===UNINITIALIZED&&(ce.current=ne(oe)),ce}const EMPTY=[];function useOnMount(ne){reactExports.useEffect(ne,EMPTY)}class Timeout{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Timeout}start(oe,ce){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,ce()},oe)}}function useTimeout(){const ne=useLazyRef(Timeout.create).current;return useOnMount(ne.disposeEffect),ne}let hadKeyboardEvent=!0,hadFocusVisibleRecently=!1;const hadFocusVisibleRecentlyTimeout=new Timeout,inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(ne){const{type:oe,tagName:ce}=ne;return!!(ce==="INPUT"&&inputTypesWhitelist[oe]&&!ne.readOnly||ce==="TEXTAREA"&&!ne.readOnly||ne.isContentEditable)}function handleKeyDown(ne){ne.metaKey||ne.altKey||ne.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState==="hidden"&&hadFocusVisibleRecently&&(hadKeyboardEvent=!0)}function prepare(ne){ne.addEventListener("keydown",handleKeyDown,!0),ne.addEventListener("mousedown",handlePointerDown,!0),ne.addEventListener("pointerdown",handlePointerDown,!0),ne.addEventListener("touchstart",handlePointerDown,!0),ne.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(ne){const{target:oe}=ne;try{return oe.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(oe)}function useIsFocusVisible(){const ne=reactExports.useCallback(pe=>{pe!=null&&prepare(pe.ownerDocument)},[]),oe=reactExports.useRef(!1);function ce(){return oe.current?(hadFocusVisibleRecently=!0,hadFocusVisibleRecentlyTimeout.start(100,()=>{hadFocusVisibleRecently=!1}),oe.current=!1,!0):!1}function ue(pe){return isFocusVisible(pe)?(oe.current=!0,!0):!1}return{isFocusVisibleRef:oe,onFocus:ue,onBlur:ce,ref:ne}}function getScrollbarSize(ne){const oe=ne.documentElement.clientWidth;return Math.abs(window.innerWidth-oe)}let cachedType;function detectScrollType(){if(cachedType)return cachedType;const ne=document.createElement("div"),oe=document.createElement("div");return oe.style.width="10px",oe.style.height="1px",ne.appendChild(oe),ne.dir="rtl",ne.style.fontSize="14px",ne.style.width="4px",ne.style.height="1px",ne.style.position="absolute",ne.style.top="-1000px",ne.style.overflow="scroll",document.body.appendChild(ne),cachedType="reverse",ne.scrollLeft>0?cachedType="default":(ne.scrollLeft=1,ne.scrollLeft===0&&(cachedType="negative")),document.body.removeChild(ne),cachedType}function getNormalizedScrollLeft(ne,oe){const ce=ne.scrollLeft;if(oe!=="rtl")return ce;switch(detectScrollType()){case"negative":return ne.scrollWidth-ne.clientWidth+ce;case"reverse":return ne.scrollWidth-ne.clientWidth-ce;default:return ce}}const visuallyHidden$2={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},visuallyHidden$3=visuallyHidden$2;function composeClasses$1(ne,oe,ce=void 0){const ue={};return Object.keys(ne).forEach(pe=>{ue[pe]=ne[pe].reduce((me,ge)=>{if(ge){const ye=oe(ge);ye!==""&&me.push(ye),ce&&ce[ge]&&me.push(ce[ge])}return me},[]).join(" ")}),ue}const ThemeContext=reactExports.createContext(null),ThemeContext$1=ThemeContext;function useTheme$2(){return reactExports.useContext(ThemeContext$1)}const hasSymbol=typeof Symbol=="function"&&Symbol.for,nested=hasSymbol?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(ne,oe){return typeof oe=="function"?oe(ne):_extends$2({},ne,oe)}function ThemeProvider$2(ne){const{children:oe,theme:ce}=ne,ue=useTheme$2(),pe=reactExports.useMemo(()=>{const me=ue===null?ce:mergeOuterLocalTheme(ue,ce);return me!=null&&(me[nested]=ue!==null),me},[ce,ue]);return jsxRuntimeExports.jsx(ThemeContext$1.Provider,{value:pe,children:oe})}const _excluded$1e=["value"],RtlContext=reactExports.createContext();function RtlProvider(ne){let{value:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$1e);return jsxRuntimeExports.jsx(RtlContext.Provider,_extends$2({value:oe??!0},ce))}const useRtl=()=>{const ne=reactExports.useContext(RtlContext);return ne??!1},EMPTY_THEME={};function useThemeScoping(ne,oe,ce,ue=!1){return reactExports.useMemo(()=>{const pe=ne&&oe[ne]||oe;if(typeof ce=="function"){const me=ce(pe),ge=ne?_extends$2({},oe,{[ne]:me}):me;return ue?()=>ge:ge}return ne?_extends$2({},oe,{[ne]:ce}):_extends$2({},oe,ce)},[ne,oe,ce,ue])}function ThemeProvider$1(ne){const{children:oe,theme:ce,themeId:ue}=ne,pe=useTheme$4(EMPTY_THEME),me=useTheme$2()||EMPTY_THEME,ge=useThemeScoping(ue,pe,ce),ye=useThemeScoping(ue,me,ce,!0),ve=ge.direction==="rtl";return jsxRuntimeExports.jsx(ThemeProvider$2,{theme:ye,children:jsxRuntimeExports.jsx(ThemeContext$2.Provider,{value:ge,children:jsxRuntimeExports.jsx(RtlProvider,{value:ve,children:oe})})})}function _typeof$1(ne){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(oe){return typeof oe}:function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},_typeof$1(ne)}function toPrimitive$2(ne,oe){if(_typeof$1(ne)!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(_typeof$1(ue)!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function toPropertyKey$2(ne){var oe=toPrimitive$2(ne,"string");return _typeof$1(oe)=="symbol"?oe:oe+""}const _excluded$1d=["component","direction","spacing","divider","children","className","useFlexGap"],defaultTheme$3=createTheme$2(),defaultCreateStyledComponent=systemStyled("div",{name:"MuiStack",slot:"Root",overridesResolver:(ne,oe)=>oe.root});function useThemePropsDefault(ne){return useThemeProps$4({props:ne,name:"MuiStack",defaultTheme:defaultTheme$3})}function joinChildren(ne,oe){const ce=reactExports.Children.toArray(ne).filter(Boolean);return ce.reduce((ue,pe,me)=>(ue.push(pe),me({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[ne],style$2=({ownerState:ne,theme:oe})=>{let ce=_extends$2({display:"flex",flexDirection:"column"},handleBreakpoints({theme:oe},resolveBreakpointValues({values:ne.direction,breakpoints:oe.breakpoints.values}),ue=>({flexDirection:ue})));if(ne.spacing){const ue=createUnarySpacing(oe),pe=Object.keys(oe.breakpoints.values).reduce((ve,xe)=>((typeof ne.spacing=="object"&&ne.spacing[xe]!=null||typeof ne.direction=="object"&&ne.direction[xe]!=null)&&(ve[xe]=!0),ve),{}),me=resolveBreakpointValues({values:ne.direction,base:pe}),ge=resolveBreakpointValues({values:ne.spacing,base:pe});typeof me=="object"&&Object.keys(me).forEach((ve,xe,_e)=>{if(!me[ve]){const $e=xe>0?me[_e[xe-1]]:"column";me[ve]=$e}}),ce=deepmerge$1(ce,handleBreakpoints({theme:oe},ge,(ve,xe)=>ne.useFlexGap?{gap:getValue$2(ue,ve)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${getSideFromDirection(xe?me[xe]:ne.direction)}`]:getValue$2(ue,ve)}}))}return ce=mergeBreakpointsInOrder(oe.breakpoints,ce),ce};function createStack(ne={}){const{createStyledComponent:oe=defaultCreateStyledComponent,useThemeProps:ce=useThemePropsDefault,componentName:ue="MuiStack"}=ne,pe=()=>composeClasses$1({root:["root"]},ve=>generateUtilityClass$2(ue,ve),{}),me=oe(style$2);return reactExports.forwardRef(function(ve,xe){const _e=ce(ve),Se=extendSxProp(_e),{component:$e="div",direction:Re="column",spacing:Ae=0,divider:Ie,children:ke,className:Be,useFlexGap:Ne=!1}=Se,Fe=_objectWithoutPropertiesLoose$2(Se,_excluded$1d),Ue={direction:Re,spacing:Ae,useFlexGap:Ne},We=pe();return jsxRuntimeExports.jsx(me,_extends$2({as:$e,ownerState:Ue,ref:xe,className:clsx(We.root,Be)},Fe,{children:Ie?joinChildren(ke,Ie):ke}))})}function createMixins(ne,oe){return _extends$2({toolbar:{minHeight:56,[ne.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[ne.up("sm")]:{minHeight:64}}},oe)}var colorManipulator={},interopRequireDefault={exports:{}};(function(ne){function oe(ce){return ce&&ce.__esModule?ce:{default:ce}}ne.exports=oe,ne.exports.__esModule=!0,ne.exports.default=ne.exports})(interopRequireDefault);var interopRequireDefaultExports=interopRequireDefault.exports;const require$$1$1=getAugmentedNamespace(formatMuiErrorMessage),require$$2=getAugmentedNamespace(clamp$2);var _interopRequireDefault$1=interopRequireDefaultExports;Object.defineProperty(colorManipulator,"__esModule",{value:!0});var alpha_1=colorManipulator.alpha=alpha;colorManipulator.blend=blend;colorManipulator.colorChannel=void 0;var darken_1=colorManipulator.darken=darken;colorManipulator.decomposeColor=decomposeColor;var emphasize_1=colorManipulator.emphasize=emphasize,getContrastRatio_1=colorManipulator.getContrastRatio=getContrastRatio;colorManipulator.getLuminance=getLuminance;colorManipulator.hexToRgb=hexToRgb;colorManipulator.hslToRgb=hslToRgb;var lighten_1=colorManipulator.lighten=lighten;colorManipulator.private_safeAlpha=private_safeAlpha;colorManipulator.private_safeColorChannel=void 0;colorManipulator.private_safeDarken=private_safeDarken;colorManipulator.private_safeEmphasize=private_safeEmphasize;colorManipulator.private_safeLighten=private_safeLighten;colorManipulator.recomposeColor=recomposeColor;colorManipulator.rgbToHex=rgbToHex;var _formatMuiErrorMessage2=_interopRequireDefault$1(require$$1$1),_clamp=_interopRequireDefault$1(require$$2);function clampWrapper(ne,oe=0,ce=1){return(0,_clamp.default)(ne,oe,ce)}function hexToRgb(ne){ne=ne.slice(1);const oe=new RegExp(`.{1,${ne.length>=6?2:1}}`,"g");let ce=ne.match(oe);return ce&&ce[0].length===1&&(ce=ce.map(ue=>ue+ue)),ce?`rgb${ce.length===4?"a":""}(${ce.map((ue,pe)=>pe<3?parseInt(ue,16):Math.round(parseInt(ue,16)/255*1e3)/1e3).join(", ")})`:""}function intToHex(ne){const oe=ne.toString(16);return oe.length===1?`0${oe}`:oe}function decomposeColor(ne){if(ne.type)return ne;if(ne.charAt(0)==="#")return decomposeColor(hexToRgb(ne));const oe=ne.indexOf("("),ce=ne.substring(0,oe);if(["rgb","rgba","hsl","hsla","color"].indexOf(ce)===-1)throw new Error((0,_formatMuiErrorMessage2.default)(9,ne));let ue=ne.substring(oe+1,ne.length-1),pe;if(ce==="color"){if(ue=ue.split(" "),pe=ue.shift(),ue.length===4&&ue[3].charAt(0)==="/"&&(ue[3]=ue[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(pe)===-1)throw new Error((0,_formatMuiErrorMessage2.default)(10,pe))}else ue=ue.split(",");return ue=ue.map(me=>parseFloat(me)),{type:ce,values:ue,colorSpace:pe}}const colorChannel=ne=>{const oe=decomposeColor(ne);return oe.values.slice(0,3).map((ce,ue)=>oe.type.indexOf("hsl")!==-1&&ue!==0?`${ce}%`:ce).join(" ")};colorManipulator.colorChannel=colorChannel;const private_safeColorChannel=(ne,oe)=>{try{return colorChannel(ne)}catch{return ne}};colorManipulator.private_safeColorChannel=private_safeColorChannel;function recomposeColor(ne){const{type:oe,colorSpace:ce}=ne;let{values:ue}=ne;return oe.indexOf("rgb")!==-1?ue=ue.map((pe,me)=>me<3?parseInt(pe,10):pe):oe.indexOf("hsl")!==-1&&(ue[1]=`${ue[1]}%`,ue[2]=`${ue[2]}%`),oe.indexOf("color")!==-1?ue=`${ce} ${ue.join(" ")}`:ue=`${ue.join(", ")}`,`${oe}(${ue})`}function rgbToHex(ne){if(ne.indexOf("#")===0)return ne;const{values:oe}=decomposeColor(ne);return`#${oe.map((ce,ue)=>intToHex(ue===3?Math.round(255*ce):ce)).join("")}`}function hslToRgb(ne){ne=decomposeColor(ne);const{values:oe}=ne,ce=oe[0],ue=oe[1]/100,pe=oe[2]/100,me=ue*Math.min(pe,1-pe),ge=(xe,_e=(xe+ce/30)%12)=>pe-me*Math.max(Math.min(_e-3,9-_e,1),-1);let ye="rgb";const ve=[Math.round(ge(0)*255),Math.round(ge(8)*255),Math.round(ge(4)*255)];return ne.type==="hsla"&&(ye+="a",ve.push(oe[3])),recomposeColor({type:ye,values:ve})}function getLuminance(ne){ne=decomposeColor(ne);let oe=ne.type==="hsl"||ne.type==="hsla"?decomposeColor(hslToRgb(ne)).values:ne.values;return oe=oe.map(ce=>(ne.type!=="color"&&(ce/=255),ce<=.03928?ce/12.92:((ce+.055)/1.055)**2.4)),Number((.2126*oe[0]+.7152*oe[1]+.0722*oe[2]).toFixed(3))}function getContrastRatio(ne,oe){const ce=getLuminance(ne),ue=getLuminance(oe);return(Math.max(ce,ue)+.05)/(Math.min(ce,ue)+.05)}function alpha(ne,oe){return ne=decomposeColor(ne),oe=clampWrapper(oe),(ne.type==="rgb"||ne.type==="hsl")&&(ne.type+="a"),ne.type==="color"?ne.values[3]=`/${oe}`:ne.values[3]=oe,recomposeColor(ne)}function private_safeAlpha(ne,oe,ce){try{return alpha(ne,oe)}catch{return ne}}function darken(ne,oe){if(ne=decomposeColor(ne),oe=clampWrapper(oe),ne.type.indexOf("hsl")!==-1)ne.values[2]*=1-oe;else if(ne.type.indexOf("rgb")!==-1||ne.type.indexOf("color")!==-1)for(let ce=0;ce<3;ce+=1)ne.values[ce]*=1-oe;return recomposeColor(ne)}function private_safeDarken(ne,oe,ce){try{return darken(ne,oe)}catch{return ne}}function lighten(ne,oe){if(ne=decomposeColor(ne),oe=clampWrapper(oe),ne.type.indexOf("hsl")!==-1)ne.values[2]+=(100-ne.values[2])*oe;else if(ne.type.indexOf("rgb")!==-1)for(let ce=0;ce<3;ce+=1)ne.values[ce]+=(255-ne.values[ce])*oe;else if(ne.type.indexOf("color")!==-1)for(let ce=0;ce<3;ce+=1)ne.values[ce]+=(1-ne.values[ce])*oe;return recomposeColor(ne)}function private_safeLighten(ne,oe,ce){try{return lighten(ne,oe)}catch{return ne}}function emphasize(ne,oe=.15){return getLuminance(ne)>.5?darken(ne,oe):lighten(ne,oe)}function private_safeEmphasize(ne,oe,ce){try{return emphasize(ne,oe)}catch{return ne}}function blend(ne,oe,ce,ue=1){const pe=(ve,xe)=>Math.round((ve**(1/ue)*(1-ce)+xe**(1/ue)*ce)**ue),me=decomposeColor(ne),ge=decomposeColor(oe),ye=[pe(me.values[0],ge.values[0]),pe(me.values[1],ge.values[1]),pe(me.values[2],ge.values[2])];return recomposeColor({type:"rgb",values:ye})}const _excluded$1c=["mode","contrastThreshold","tonalOffset"],light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$3.white,default:common$3.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dark={text:{primary:common$3.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common$3.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(ne,oe,ce,ue){const pe=ue.light||ue,me=ue.dark||ue*1.5;ne[oe]||(ne.hasOwnProperty(ce)?ne[oe]=ne[ce]:oe==="light"?ne.light=lighten_1(ne.main,pe):oe==="dark"&&(ne.dark=darken_1(ne.main,me)))}function getDefaultPrimary(ne="light"){return ne==="dark"?{main:blue$1[200],light:blue$1[50],dark:blue$1[400]}:{main:blue$1[700],light:blue$1[400],dark:blue$1[800]}}function getDefaultSecondary(ne="light"){return ne==="dark"?{main:purple$1[200],light:purple$1[50],dark:purple$1[400]}:{main:purple$1[500],light:purple$1[300],dark:purple$1[700]}}function getDefaultError(ne="light"){return ne==="dark"?{main:red$1[500],light:red$1[300],dark:red$1[700]}:{main:red$1[700],light:red$1[400],dark:red$1[800]}}function getDefaultInfo(ne="light"){return ne==="dark"?{main:lightBlue$1[400],light:lightBlue$1[300],dark:lightBlue$1[700]}:{main:lightBlue$1[700],light:lightBlue$1[500],dark:lightBlue$1[900]}}function getDefaultSuccess(ne="light"){return ne==="dark"?{main:green$1[400],light:green$1[300],dark:green$1[700]}:{main:green$1[800],light:green$1[500],dark:green$1[900]}}function getDefaultWarning(ne="light"){return ne==="dark"?{main:orange$1[400],light:orange$1[300],dark:orange$1[700]}:{main:"#ed6c02",light:orange$1[500],dark:orange$1[900]}}function createPalette(ne){const{mode:oe="light",contrastThreshold:ce=3,tonalOffset:ue=.2}=ne,pe=_objectWithoutPropertiesLoose$2(ne,_excluded$1c),me=ne.primary||getDefaultPrimary(oe),ge=ne.secondary||getDefaultSecondary(oe),ye=ne.error||getDefaultError(oe),ve=ne.info||getDefaultInfo(oe),xe=ne.success||getDefaultSuccess(oe),_e=ne.warning||getDefaultWarning(oe);function Se(Ie){return getContrastRatio_1(Ie,dark.text.primary)>=ce?dark.text.primary:light.text.primary}const $e=({color:Ie,name:ke,mainShade:Be=500,lightShade:Ne=300,darkShade:Fe=700})=>{if(Ie=_extends$2({},Ie),!Ie.main&&Ie[Be]&&(Ie.main=Ie[Be]),!Ie.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage$1(11,ke?` (${ke})`:"",Be));if(typeof Ie.main!="string")throw new Error(formatMuiErrorMessage$1(12,ke?` (${ke})`:"",JSON.stringify(Ie.main)));return addLightOrDark(Ie,"light",Ne,ue),addLightOrDark(Ie,"dark",Fe,ue),Ie.contrastText||(Ie.contrastText=Se(Ie.main)),Ie},Re={dark,light};return deepmerge$1(_extends$2({common:_extends$2({},common$3),mode:oe,primary:$e({color:me,name:"primary"}),secondary:$e({color:ge,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:$e({color:ye,name:"error"}),warning:$e({color:_e,name:"warning"}),info:$e({color:ve,name:"info"}),success:$e({color:xe,name:"success"}),grey:grey$1,contrastThreshold:ce,getContrastText:Se,augmentColor:$e,tonalOffset:ue},Re[oe]),pe)}const _excluded$1b=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function round$4(ne){return Math.round(ne*1e5)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(ne,oe){const ce=typeof oe=="function"?oe(ne):oe,{fontFamily:ue=defaultFontFamily,fontSize:pe=14,fontWeightLight:me=300,fontWeightRegular:ge=400,fontWeightMedium:ye=500,fontWeightBold:ve=700,htmlFontSize:xe=16,allVariants:_e,pxToRem:Se}=ce,$e=_objectWithoutPropertiesLoose$2(ce,_excluded$1b),Re=pe/14,Ae=Se||(Be=>`${Be/xe*Re}rem`),Ie=(Be,Ne,Fe,Ue,We)=>_extends$2({fontFamily:ue,fontWeight:Be,fontSize:Ae(Ne),lineHeight:Fe},ue===defaultFontFamily?{letterSpacing:`${round$4(Ue/Ne)}em`}:{},We,_e),ke={h1:Ie(me,96,1.167,-1.5),h2:Ie(me,60,1.2,-.5),h3:Ie(ge,48,1.167,0),h4:Ie(ge,34,1.235,.25),h5:Ie(ge,24,1.334,0),h6:Ie(ye,20,1.6,.15),subtitle1:Ie(ge,16,1.75,.15),subtitle2:Ie(ye,14,1.57,.1),body1:Ie(ge,16,1.5,.15),body2:Ie(ge,14,1.43,.15),button:Ie(ye,14,1.75,.4,caseAllCaps),caption:Ie(ge,12,1.66,.4),overline:Ie(ge,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge$1(_extends$2({htmlFontSize:xe,pxToRem:Ae,fontFamily:ue,fontSize:pe,fontWeightLight:me,fontWeightRegular:ge,fontWeightMedium:ye,fontWeightBold:ve},ke),$e,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...ne){return[`${ne[0]}px ${ne[1]}px ${ne[2]}px ${ne[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${ne[4]}px ${ne[5]}px ${ne[6]}px ${ne[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${ne[8]}px ${ne[9]}px ${ne[10]}px ${ne[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],shadows$1=shadows,_excluded$1a=["duration","easing","delay"],easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(ne){return`${Math.round(ne)}ms`}function getAutoHeightDuration(ne){if(!ne)return 0;const oe=ne/36;return Math.round((4+15*oe**.25+oe/5)*10)}function createTransitions(ne){const oe=_extends$2({},easing,ne.easing),ce=_extends$2({},duration,ne.duration);return _extends$2({getAutoHeightDuration,create:(pe=["all"],me={})=>{const{duration:ge=ce.standard,easing:ye=oe.easeInOut,delay:ve=0}=me;return _objectWithoutPropertiesLoose$2(me,_excluded$1a),(Array.isArray(pe)?pe:[pe]).map(xe=>`${xe} ${typeof ge=="string"?ge:formatMs(ge)} ${ye} ${typeof ve=="string"?ve:formatMs(ve)}`).join(",")}},ne,{easing:oe,duration:ce})}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zIndex$1=zIndex,_excluded$19=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme(ne={},...oe){const{mixins:ce={},palette:ue={},transitions:pe={},typography:me={}}=ne,ge=_objectWithoutPropertiesLoose$2(ne,_excluded$19);if(ne.vars)throw new Error(formatMuiErrorMessage$1(18));const ye=createPalette(ue),ve=createTheme$2(ne);let xe=deepmerge$1(ve,{mixins:createMixins(ve.breakpoints,ce),palette:ye,shadows:shadows$1.slice(),typography:createTypography(ye,me),transitions:createTransitions(pe),zIndex:_extends$2({},zIndex$1)});return xe=deepmerge$1(xe,ge),xe=oe.reduce((_e,Se)=>deepmerge$1(_e,Se),xe),xe.unstable_sxConfig=_extends$2({},defaultSxConfig$1,ge==null?void 0:ge.unstable_sxConfig),xe.unstable_sx=function(Se){return styleFunctionSx$2({sx:Se,theme:this})},xe}function getUnit(ne){return String(ne).match(/[\d.\-+]*\s*(.*)/)[1]||""}function toUnitless(ne){return parseFloat(ne)}const defaultTheme$1=createTheme(),defaultTheme$2=defaultTheme$1;function useTheme$1(){const ne=useTheme$3(defaultTheme$2);return ne[THEME_ID]||ne}function useThemeProps$3({props:ne,name:oe}){return useThemeProps$4({props:ne,name:oe,defaultTheme:defaultTheme$2,themeId:THEME_ID})}var createStyled$1={},objectWithoutPropertiesLoose={exports:{}},hasRequiredObjectWithoutPropertiesLoose;function requireObjectWithoutPropertiesLoose(){return hasRequiredObjectWithoutPropertiesLoose||(hasRequiredObjectWithoutPropertiesLoose=1,function(ne){function oe(ce,ue){if(ce==null)return{};var pe={};for(var me in ce)if(Object.prototype.hasOwnProperty.call(ce,me)){if(ue.indexOf(me)>=0)continue;pe[me]=ce[me]}return pe}ne.exports=oe,ne.exports.__esModule=!0,ne.exports.default=ne.exports}(objectWithoutPropertiesLoose)),objectWithoutPropertiesLoose.exports}const require$$1=getAugmentedNamespace(styledEngine),require$$4=getAugmentedNamespace(deepmerge),require$$5=getAugmentedNamespace(capitalize),require$$6=getAugmentedNamespace(getDisplayName),require$$7=getAugmentedNamespace(createTheme$1),require$$8=getAugmentedNamespace(styleFunctionSx);var _interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(createStyled$1,"__esModule",{value:!0});var _default$2=createStyled$1.default=createStyled;createStyled$1.shouldForwardProp=shouldForwardProp;createStyled$1.systemDefaultTheme=void 0;var _extends2=_interopRequireDefault(require_extends()),_objectWithoutPropertiesLoose2=_interopRequireDefault(requireObjectWithoutPropertiesLoose()),_styledEngine$1=_interopRequireWildcard$1(require$$1),_deepmerge=require$$4;_interopRequireDefault(require$$5);_interopRequireDefault(require$$6);var _createTheme=_interopRequireDefault(require$$7),_styleFunctionSx=_interopRequireDefault(require$$8);const _excluded$18=["ownerState"],_excluded2$7=["variants"],_excluded3$2=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function _getRequireWildcardCache$1(ne){if(typeof WeakMap!="function")return null;var oe=new WeakMap,ce=new WeakMap;return(_getRequireWildcardCache$1=function(ue){return ue?ce:oe})(ne)}function _interopRequireWildcard$1(ne,oe){if(!oe&&ne&&ne.__esModule)return ne;if(ne===null||typeof ne!="object"&&typeof ne!="function")return{default:ne};var ce=_getRequireWildcardCache$1(oe);if(ce&&ce.has(ne))return ce.get(ne);var ue={__proto__:null},pe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var me in ne)if(me!=="default"&&Object.prototype.hasOwnProperty.call(ne,me)){var ge=pe?Object.getOwnPropertyDescriptor(ne,me):null;ge&&(ge.get||ge.set)?Object.defineProperty(ue,me,ge):ue[me]=ne[me]}return ue.default=ne,ce&&ce.set(ne,ue),ue}function isEmpty$4(ne){return Object.keys(ne).length===0}function isStringTag(ne){return typeof ne=="string"&&ne.charCodeAt(0)>96}function shouldForwardProp(ne){return ne!=="ownerState"&&ne!=="theme"&&ne!=="sx"&&ne!=="as"}const systemDefaultTheme=createStyled$1.systemDefaultTheme=(0,_createTheme.default)(),lowercaseFirstLetter=ne=>ne&&ne.charAt(0).toLowerCase()+ne.slice(1);function resolveTheme({defaultTheme:ne,theme:oe,themeId:ce}){return isEmpty$4(oe)?ne:oe[ce]||oe}function defaultOverridesResolver(ne){return ne?(oe,ce)=>ce[ne]:null}function processStyleArg(ne,oe){let{ownerState:ce}=oe,ue=(0,_objectWithoutPropertiesLoose2.default)(oe,_excluded$18);const pe=typeof ne=="function"?ne((0,_extends2.default)({ownerState:ce},ue)):ne;if(Array.isArray(pe))return pe.flatMap(me=>processStyleArg(me,(0,_extends2.default)({ownerState:ce},ue)));if(pe&&typeof pe=="object"&&Array.isArray(pe.variants)){const{variants:me=[]}=pe;let ye=(0,_objectWithoutPropertiesLoose2.default)(pe,_excluded2$7);return me.forEach(ve=>{let xe=!0;typeof ve.props=="function"?xe=ve.props((0,_extends2.default)({ownerState:ce},ue,ce)):Object.keys(ve.props).forEach(_e=>{(ce==null?void 0:ce[_e])!==ve.props[_e]&&ue[_e]!==ve.props[_e]&&(xe=!1)}),xe&&(Array.isArray(ye)||(ye=[ye]),ye.push(typeof ve.style=="function"?ve.style((0,_extends2.default)({ownerState:ce},ue,ce)):ve.style))}),ye}return pe}function createStyled(ne={}){const{themeId:oe,defaultTheme:ce=systemDefaultTheme,rootShouldForwardProp:ue=shouldForwardProp,slotShouldForwardProp:pe=shouldForwardProp}=ne,me=ge=>(0,_styleFunctionSx.default)((0,_extends2.default)({},ge,{theme:resolveTheme((0,_extends2.default)({},ge,{defaultTheme:ce,themeId:oe}))}));return me.__mui_systemSx=!0,(ge,ye={})=>{(0,_styledEngine$1.internal_processStyles)(ge,We=>We.filter(qe=>!(qe!=null&&qe.__mui_systemSx)));const{name:ve,slot:xe,skipVariantsResolver:_e,skipSx:Se,overridesResolver:$e=defaultOverridesResolver(lowercaseFirstLetter(xe))}=ye,Re=(0,_objectWithoutPropertiesLoose2.default)(ye,_excluded3$2),Ae=_e!==void 0?_e:xe&&xe!=="Root"&&xe!=="root"||!1,Ie=Se||!1;let ke,Be=shouldForwardProp;xe==="Root"||xe==="root"?Be=ue:xe?Be=pe:isStringTag(ge)&&(Be=void 0);const Ne=(0,_styledEngine$1.default)(ge,(0,_extends2.default)({shouldForwardProp:Be,label:ke},Re)),Fe=We=>typeof We=="function"&&We.__emotion_real!==We||(0,_deepmerge.isPlainObject)(We)?qe=>processStyleArg(We,(0,_extends2.default)({},qe,{theme:resolveTheme({theme:qe.theme,defaultTheme:ce,themeId:oe})})):We,Ue=(We,...qe)=>{let ze=Fe(We);const Ge=qe?qe.map(Fe):[];ve&&$e&&Ge.push(Je=>{const Ut=resolveTheme((0,_extends2.default)({},Je,{defaultTheme:ce,themeId:oe}));if(!Ut.components||!Ut.components[ve]||!Ut.components[ve].styleOverrides)return null;const jt=Ut.components[ve].styleOverrides,Ke={};return Object.entries(jt).forEach(([an,Zt])=>{Ke[an]=processStyleArg(Zt,(0,_extends2.default)({},Je,{theme:Ut}))}),$e(Je,Ke)}),ve&&!Ae&&Ge.push(Je=>{var Ut;const jt=resolveTheme((0,_extends2.default)({},Je,{defaultTheme:ce,themeId:oe})),Ke=jt==null||(Ut=jt.components)==null||(Ut=Ut[ve])==null?void 0:Ut.variants;return processStyleArg({variants:Ke},(0,_extends2.default)({},Je,{theme:jt}))}),Ie||Ge.push(me);const Ze=Ge.length-qe.length;if(Array.isArray(We)&&Ze>0){const Je=new Array(Ze).fill("");ze=[...We,...Je],ze.raw=[...We.raw,...Je]}const Dt=Ne(ze,...Ge);return ge.muiName&&(Dt.muiName=ge.muiName),Dt};return Ne.withConfig&&(Ue.withConfig=Ne.withConfig),Ue}}function slotShouldForwardProp(ne){return ne!=="ownerState"&&ne!=="theme"&&ne!=="sx"&&ne!=="as"}const rootShouldForwardProp=ne=>slotShouldForwardProp(ne)&&ne!=="classes",rootShouldForwardProp$1=rootShouldForwardProp,styled=_default$2({themeId:THEME_ID,defaultTheme:defaultTheme$2,rootShouldForwardProp:rootShouldForwardProp$1}),styled$1=styled,_excluded$17=["theme"];function ThemeProvider(ne){let{theme:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$17);const ue=oe[THEME_ID];return jsxRuntimeExports.jsx(ThemeProvider$1,_extends$2({},ce,{themeId:ue?THEME_ID:void 0,theme:ue||oe}))}const getOverlayAlpha=ne=>{let oe;return ne<1?oe=5.11916*ne**2:oe=4.5*Math.log(ne+1)+2,(oe/100).toFixed(2)},getOverlayAlpha$1=getOverlayAlpha;function getSvgIconUtilityClass(ne){return generateUtilityClass$2("MuiSvgIcon",ne)}generateUtilityClasses$2("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const _excluded$16=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],useUtilityClasses$V=ne=>{const{color:oe,fontSize:ce,classes:ue}=ne,pe={root:["root",oe!=="inherit"&&`color${capitalize$1(oe)}`,`fontSize${capitalize$1(ce)}`]};return composeClasses$1(pe,getSvgIconUtilityClass,ue)},SvgIconRoot=styled$1("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.color!=="inherit"&&oe[`color${capitalize$1(ce.color)}`],oe[`fontSize${capitalize$1(ce.fontSize)}`]]}})(({theme:ne,ownerState:oe})=>{var ce,ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:oe.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(ce=ne.transitions)==null||(ue=ce.create)==null?void 0:ue.call(ce,"fill",{duration:(pe=ne.transitions)==null||(pe=pe.duration)==null?void 0:pe.shorter}),fontSize:{inherit:"inherit",small:((me=ne.typography)==null||(ge=me.pxToRem)==null?void 0:ge.call(me,20))||"1.25rem",medium:((ye=ne.typography)==null||(ve=ye.pxToRem)==null?void 0:ve.call(ye,24))||"1.5rem",large:((xe=ne.typography)==null||(_e=xe.pxToRem)==null?void 0:_e.call(xe,35))||"2.1875rem"}[oe.fontSize],color:(Se=($e=(ne.vars||ne).palette)==null||($e=$e[oe.color])==null?void 0:$e.main)!=null?Se:{action:(Re=(ne.vars||ne).palette)==null||(Re=Re.action)==null?void 0:Re.active,disabled:(Ae=(ne.vars||ne).palette)==null||(Ae=Ae.action)==null?void 0:Ae.disabled,inherit:void 0}[oe.color]}}),SvgIcon=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSvgIcon"}),{children:pe,className:me,color:ge="inherit",component:ye="svg",fontSize:ve="medium",htmlColor:xe,inheritViewBox:_e=!1,titleAccess:Se,viewBox:$e="0 0 24 24"}=ue,Re=_objectWithoutPropertiesLoose$2(ue,_excluded$16),Ae=reactExports.isValidElement(pe)&&pe.type==="svg",Ie=_extends$2({},ue,{color:ge,component:ye,fontSize:ve,instanceFontSize:oe.fontSize,inheritViewBox:_e,viewBox:$e,hasSvgAsChild:Ae}),ke={};_e||(ke.viewBox=$e);const Be=useUtilityClasses$V(Ie);return jsxRuntimeExports.jsxs(SvgIconRoot,_extends$2({as:ye,className:clsx(Be.root,me),focusable:"false",color:xe,"aria-hidden":Se?void 0:!0,role:Se?"img":void 0,ref:ce},ke,Re,Ae&&pe.props,{ownerState:Ie,children:[Ae?pe.props.children:pe,Se?jsxRuntimeExports.jsx("title",{children:Se}):null]}))});SvgIcon.muiName="SvgIcon";const SvgIcon$1=SvgIcon;function createSvgIcon(ne,oe){function ce(ue,pe){return jsxRuntimeExports.jsx(SvgIcon$1,_extends$2({"data-testid":`${oe}Icon`,ref:pe},ue,{children:ne}))}return ce.muiName=SvgIcon$1.muiName,reactExports.memo(reactExports.forwardRef(ce))}function createUseThemeProps(ne){return useThemeProps$3}function _setPrototypeOf$3(ne,oe){return _setPrototypeOf$3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ue,pe){return ue.__proto__=pe,ue},_setPrototypeOf$3(ne,oe)}function _inheritsLoose(ne,oe){ne.prototype=Object.create(oe.prototype),ne.prototype.constructor=ne,_setPrototypeOf$3(ne,oe)}var reactDom={exports:{}},reactDom_production={};/** * @license React * react-dom.production.js * @@ -43,7 +43,7 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function formatProdErrorMessage$2(ne){var oe="https://react.dev/errors/"+ne;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE$1)}catch(ne){console.error(ne)}}checkDCE$1(),reactDom.exports=reactDom_production;var reactDomExports=reactDom.exports;const ReactDOM$1=getDefaultExportFromCjs(reactDomExports),config$2={disabled:!1},TransitionGroupContext=React$2.createContext(null);var forceReflow=function(oe){return oe.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition=function(ne){_inheritsLoose(oe,ne);function oe(ue,pe){var me;me=ne.call(this,ue,pe)||this;var ge=pe,ye=ge&&!ge.isMounting?ue.enter:ue.appear,ve;return me.appearStatus=null,ue.in?ye?(ve=EXITED,me.appearStatus=ENTERING):ve=ENTERED:ue.unmountOnExit||ue.mountOnEnter?ve=UNMOUNTED:ve=EXITED,me.state={status:ve},me.nextCallback=null,me}oe.getDerivedStateFromProps=function(pe,me){var ge=pe.in;return ge&&me.status===UNMOUNTED?{status:EXITED}:null};var ce=oe.prototype;return ce.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},ce.componentDidUpdate=function(pe){var me=null;if(pe!==this.props){var ge=this.state.status;this.props.in?ge!==ENTERING&&ge!==ENTERED&&(me=ENTERING):(ge===ENTERING||ge===ENTERED)&&(me=EXITING)}this.updateStatus(!1,me)},ce.componentWillUnmount=function(){this.cancelNextCallback()},ce.getTimeouts=function(){var pe=this.props.timeout,me,ge,ye;return me=ge=ye=pe,pe!=null&&typeof pe!="number"&&(me=pe.exit,ge=pe.enter,ye=pe.appear!==void 0?pe.appear:ge),{exit:me,enter:ge,appear:ye}},ce.updateStatus=function(pe,me){if(pe===void 0&&(pe=!1),me!==null)if(this.cancelNextCallback(),me===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var ge=this.props.nodeRef?this.props.nodeRef.current:ReactDOM$1.findDOMNode(this);ge&&forceReflow(ge)}this.performEnter(pe)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},ce.performEnter=function(pe){var me=this,ge=this.props.enter,ye=this.context?this.context.isMounting:pe,ve=this.props.nodeRef?[ye]:[ReactDOM$1.findDOMNode(this),ye],xe=ve[0],_e=ve[1],Se=this.getTimeouts(),$e=ye?Se.appear:Se.enter;if(!pe&&!ge||config$2.disabled){this.safeSetState({status:ENTERED},function(){me.props.onEntered(xe)});return}this.props.onEnter(xe,_e),this.safeSetState({status:ENTERING},function(){me.props.onEntering(xe,_e),me.onTransitionEnd($e,function(){me.safeSetState({status:ENTERED},function(){me.props.onEntered(xe,_e)})})})},ce.performExit=function(){var pe=this,me=this.props.exit,ge=this.getTimeouts(),ye=this.props.nodeRef?void 0:ReactDOM$1.findDOMNode(this);if(!me||config$2.disabled){this.safeSetState({status:EXITED},function(){pe.props.onExited(ye)});return}this.props.onExit(ye),this.safeSetState({status:EXITING},function(){pe.props.onExiting(ye),pe.onTransitionEnd(ge.exit,function(){pe.safeSetState({status:EXITED},function(){pe.props.onExited(ye)})})})},ce.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},ce.safeSetState=function(pe,me){me=this.setNextCallback(me),this.setState(pe,me)},ce.setNextCallback=function(pe){var me=this,ge=!0;return this.nextCallback=function(ye){ge&&(ge=!1,me.nextCallback=null,pe(ye))},this.nextCallback.cancel=function(){ge=!1},this.nextCallback},ce.onTransitionEnd=function(pe,me){this.setNextCallback(me);var ge=this.props.nodeRef?this.props.nodeRef.current:ReactDOM$1.findDOMNode(this),ye=pe==null&&!this.props.addEndListener;if(!ge||ye){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var ve=this.props.nodeRef?[this.nextCallback]:[ge,this.nextCallback],xe=ve[0],_e=ve[1];this.props.addEndListener(xe,_e)}pe!=null&&setTimeout(this.nextCallback,pe)},ce.render=function(){var pe=this.state.status;if(pe===UNMOUNTED)return null;var me=this.props,ge=me.children;me.in,me.mountOnEnter,me.unmountOnExit,me.appear,me.enter,me.exit,me.timeout,me.addEndListener,me.onEnter,me.onEntering,me.onEntered,me.onExit,me.onExiting,me.onExited,me.nodeRef;var ye=_objectWithoutPropertiesLoose$2(me,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$2.createElement(TransitionGroupContext.Provider,{value:null},typeof ge=="function"?ge(pe,ye):React$2.cloneElement(React$2.Children.only(ge),ye))},oe}(React$2.Component);Transition.contextType=TransitionGroupContext;Transition.propTypes={};function noop$b(){}Transition.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$b,onEntering:noop$b,onEntered:noop$b,onExit:noop$b,onExiting:noop$b,onExited:noop$b};Transition.UNMOUNTED=UNMOUNTED;Transition.EXITED=EXITED;Transition.ENTERING=ENTERING;Transition.ENTERED=ENTERED;Transition.EXITING=EXITING;const Transition$1=Transition;function _assertThisInitialized$3(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function getChildMapping(ne,oe){var ce=function(me){return oe&&reactExports.isValidElement(me)?oe(me):me},ue=Object.create(null);return ne&&reactExports.Children.map(ne,function(pe){return pe}).forEach(function(pe){ue[pe.key]=ce(pe)}),ue}function mergeChildMappings(ne,oe){ne=ne||{},oe=oe||{};function ce(_e){return _e in oe?oe[_e]:ne[_e]}var ue=Object.create(null),pe=[];for(var me in ne)me in oe?pe.length&&(ue[me]=pe,pe=[]):pe.push(me);var ge,ye={};for(var ve in oe){if(ue[ve])for(ge=0;gene.scrollTop;function getTransitionProps$1(ne,oe){var ce,ue;const{timeout:pe,easing:me,style:ge={}}=ne;return{duration:(ce=ge.transitionDuration)!=null?ce:typeof pe=="number"?pe:pe[oe.mode]||0,easing:(ue=ge.transitionTimingFunction)!=null?ue:typeof me=="object"?me[oe.mode]:me,delay:ge.transitionDelay}}function getCollapseUtilityClass(ne){return generateUtilityClass$2("MuiCollapse",ne)}generateUtilityClasses$2("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const _excluded$14=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],useUtilityClasses$T=ne=>{const{orientation:oe,classes:ce}=ne,ue={root:["root",`${oe}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${oe}`],wrapperInner:["wrapperInner",`${oe}`]};return composeClasses$1(ue,getCollapseUtilityClass,ce)},CollapseRoot=styled$1("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.orientation],ce.state==="entered"&&oe.entered,ce.state==="exited"&&!ce.in&&ce.collapsedSize==="0px"&&oe.hidden]}})(({theme:ne,ownerState:oe})=>_extends$2({height:0,overflow:"hidden",transition:ne.transitions.create("height")},oe.orientation==="horizontal"&&{height:"auto",width:0,transition:ne.transitions.create("width")},oe.state==="entered"&&_extends$2({height:"auto",overflow:"visible"},oe.orientation==="horizontal"&&{width:"auto"}),oe.state==="exited"&&!oe.in&&oe.collapsedSize==="0px"&&{visibility:"hidden"})),CollapseWrapper=styled$1("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(ne,oe)=>oe.wrapper})(({ownerState:ne})=>_extends$2({display:"flex",width:"100%"},ne.orientation==="horizontal"&&{width:"auto",height:"100%"})),CollapseWrapperInner=styled$1("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(ne,oe)=>oe.wrapperInner})(({ownerState:ne})=>_extends$2({width:"100%"},ne.orientation==="horizontal"&&{width:"auto",height:"100%"})),Collapse=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCollapse"}),{addEndListener:pe,children:me,className:ge,collapsedSize:ye="0px",component:ve,easing:xe,in:_e,onEnter:Se,onEntered:$e,onEntering:Re,onExit:Ae,onExited:Ie,onExiting:ke,orientation:Be="vertical",style:Ne,timeout:Fe=duration.standard,TransitionComponent:Ue=Transition$1}=ue,We=_objectWithoutPropertiesLoose$2(ue,_excluded$14),qe=_extends$2({},ue,{orientation:Be,collapsedSize:ye}),ze=useUtilityClasses$T(qe),Ge=useTheme$1(),Ze=useTimeout(),Dt=reactExports.useRef(null),Je=reactExports.useRef(),Ut=typeof ye=="number"?`${ye}px`:ye,jt=Be==="horizontal",Ke=jt?"width":"height",an=reactExports.useRef(null),Zt=useForkRef(ce,an),en=Nt=>Yt=>{if(Nt){const Jt=an.current;Yt===void 0?Nt(Jt):Nt(Jt,Yt)}},Kt=()=>Dt.current?Dt.current[jt?"clientWidth":"clientHeight"]:0,Wt=en((Nt,Yt)=>{Dt.current&&jt&&(Dt.current.style.position="absolute"),Nt.style[Ke]=Ut,Se&&Se(Nt,Yt)}),un=en((Nt,Yt)=>{const Jt=Kt();Dt.current&&jt&&(Dt.current.style.position="");const{duration:hn,easing:Ye}=getTransitionProps$1({style:Ne,timeout:Fe,easing:xe},{mode:"enter"});if(Fe==="auto"){const Xe=Ge.transitions.getAutoHeightDuration(Jt);Nt.style.transitionDuration=`${Xe}ms`,Je.current=Xe}else Nt.style.transitionDuration=typeof hn=="string"?hn:`${hn}ms`;Nt.style[Ke]=`${Jt}px`,Nt.style.transitionTimingFunction=Ye,Re&&Re(Nt,Yt)}),Xt=en((Nt,Yt)=>{Nt.style[Ke]="auto",$e&&$e(Nt,Yt)}),nn=en(Nt=>{Nt.style[Ke]=`${Kt()}px`,Ae&&Ae(Nt)}),vn=en(Ie),Sn=en(Nt=>{const Yt=Kt(),{duration:Jt,easing:hn}=getTransitionProps$1({style:Ne,timeout:Fe,easing:xe},{mode:"exit"});if(Fe==="auto"){const Ye=Ge.transitions.getAutoHeightDuration(Yt);Nt.style.transitionDuration=`${Ye}ms`,Je.current=Ye}else Nt.style.transitionDuration=typeof Jt=="string"?Jt:`${Jt}ms`;Nt.style[Ke]=Ut,Nt.style.transitionTimingFunction=hn,ke&&ke(Nt)}),Cn=Nt=>{Fe==="auto"&&Ze.start(Je.current||0,Nt),pe&&pe(an.current,Nt)};return jsxRuntimeExports.jsx(Ue,_extends$2({in:_e,onEnter:Wt,onEntered:Xt,onEntering:un,onExit:nn,onExited:vn,onExiting:Sn,addEndListener:Cn,nodeRef:an,timeout:Fe==="auto"?null:Fe},We,{children:(Nt,Yt)=>jsxRuntimeExports.jsx(CollapseRoot,_extends$2({as:ve,className:clsx(ze.root,ge,{entered:ze.entered,exited:!_e&&Ut==="0px"&&ze.hidden}[Nt]),style:_extends$2({[jt?"minWidth":"minHeight"]:Ut},Ne),ref:Zt},Yt,{ownerState:_extends$2({},qe,{state:Nt}),children:jsxRuntimeExports.jsx(CollapseWrapper,{ownerState:_extends$2({},qe,{state:Nt}),className:ze.wrapper,ref:Dt,children:jsxRuntimeExports.jsx(CollapseWrapperInner,{ownerState:_extends$2({},qe,{state:Nt}),className:ze.wrapperInner,children:me})})}))}))});Collapse.muiSupportAuto=!0;const Collapse$1=Collapse;function getPaperUtilityClass(ne){return generateUtilityClass$2("MuiPaper",ne)}generateUtilityClasses$2("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const _excluded$13=["className","component","elevation","square","variant"],useUtilityClasses$S=ne=>{const{square:oe,elevation:ce,variant:ue,classes:pe}=ne,me={root:["root",ue,!oe&&"rounded",ue==="elevation"&&`elevation${ce}`]};return composeClasses$1(me,getPaperUtilityClass,pe)},PaperRoot=styled$1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],!ce.square&&oe.rounded,ce.variant==="elevation"&&oe[`elevation${ce.elevation}`]]}})(({theme:ne,ownerState:oe})=>{var ce;return _extends$2({backgroundColor:(ne.vars||ne).palette.background.paper,color:(ne.vars||ne).palette.text.primary,transition:ne.transitions.create("box-shadow")},!oe.square&&{borderRadius:ne.shape.borderRadius},oe.variant==="outlined"&&{border:`1px solid ${(ne.vars||ne).palette.divider}`},oe.variant==="elevation"&&_extends$2({boxShadow:(ne.vars||ne).shadows[oe.elevation]},!ne.vars&&ne.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${alpha_1("#fff",getOverlayAlpha$1(oe.elevation))}, ${alpha_1("#fff",getOverlayAlpha$1(oe.elevation))})`},ne.vars&&{backgroundImage:(ce=ne.vars.overlays)==null?void 0:ce[oe.elevation]}))}),Paper=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiPaper"}),{className:pe,component:me="div",elevation:ge=1,square:ye=!1,variant:ve="elevation"}=ue,xe=_objectWithoutPropertiesLoose$2(ue,_excluded$13),_e=_extends$2({},ue,{component:me,elevation:ge,square:ye,variant:ve}),Se=useUtilityClasses$S(_e);return jsxRuntimeExports.jsx(PaperRoot,_extends$2({as:me,ownerState:_e,className:clsx(Se.root,pe),ref:ce},xe))}),Paper$1=Paper;function isHostComponent(ne){return typeof ne=="string"}function appendOwnerState(ne,oe,ce){return ne===void 0||isHostComponent(ne)?oe:_extends$2({},oe,{ownerState:_extends$2({},oe.ownerState,ce)})}function areArraysEqual$2(ne,oe,ce=(ue,pe)=>ue===pe){return ne.length===oe.length&&ne.every((ue,pe)=>ce(ue,oe[pe]))}const defaultContextValue={disableDefaultClasses:!1},ClassNameConfiguratorContext=reactExports.createContext(defaultContextValue);function useClassNamesOverride(ne){const{disableDefaultClasses:oe}=reactExports.useContext(ClassNameConfiguratorContext);return ce=>oe?"":ne(ce)}function extractEventHandlers(ne,oe=[]){if(ne===void 0)return{};const ce={};return Object.keys(ne).filter(ue=>ue.match(/^on[A-Z]/)&&typeof ne[ue]=="function"&&!oe.includes(ue)).forEach(ue=>{ce[ue]=ne[ue]}),ce}function resolveComponentProps(ne,oe,ce){return typeof ne=="function"?ne(oe,ce):ne}function omitEventHandlers(ne){if(ne===void 0)return{};const oe={};return Object.keys(ne).filter(ce=>!(ce.match(/^on[A-Z]/)&&typeof ne[ce]=="function")).forEach(ce=>{oe[ce]=ne[ce]}),oe}function mergeSlotProps(ne){const{getSlotProps:oe,additionalProps:ce,externalSlotProps:ue,externalForwardedProps:pe,className:me}=ne;if(!oe){const Re=clsx(ce==null?void 0:ce.className,me,pe==null?void 0:pe.className,ue==null?void 0:ue.className),Ae=_extends$2({},ce==null?void 0:ce.style,pe==null?void 0:pe.style,ue==null?void 0:ue.style),Ie=_extends$2({},ce,pe,ue);return Re.length>0&&(Ie.className=Re),Object.keys(Ae).length>0&&(Ie.style=Ae),{props:Ie,internalRef:void 0}}const ge=extractEventHandlers(_extends$2({},pe,ue)),ye=omitEventHandlers(ue),ve=omitEventHandlers(pe),xe=oe(ge),_e=clsx(xe==null?void 0:xe.className,ce==null?void 0:ce.className,me,pe==null?void 0:pe.className,ue==null?void 0:ue.className),Se=_extends$2({},xe==null?void 0:xe.style,ce==null?void 0:ce.style,pe==null?void 0:pe.style,ue==null?void 0:ue.style),$e=_extends$2({},xe,ce,ve,ye);return _e.length>0&&($e.className=_e),Object.keys(Se).length>0&&($e.style=Se),{props:$e,internalRef:xe.ref}}const _excluded$12=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function useSlotProps(ne){var oe;const{elementType:ce,externalSlotProps:ue,ownerState:pe,skipResolvingSlotProps:me=!1}=ne,ge=_objectWithoutPropertiesLoose$2(ne,_excluded$12),ye=me?{}:resolveComponentProps(ue,pe),{props:ve,internalRef:xe}=mergeSlotProps(_extends$2({},ge,{externalSlotProps:ye})),_e=useForkRef(xe,ye==null?void 0:ye.ref,(oe=ne.additionalProps)==null?void 0:oe.ref);return appendOwnerState(ce,_extends$2({},ve,{ref:_e}),pe)}const _excluded$11=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],_excluded2$6=["component","slots","slotProps"],_excluded3$1=["component"];function useSlot(ne,oe){const{className:ce,elementType:ue,ownerState:pe,externalForwardedProps:me,getSlotOwnerState:ge,internalForwardedProps:ye}=oe,ve=_objectWithoutPropertiesLoose$2(oe,_excluded$11),{component:xe,slots:_e={[ne]:void 0},slotProps:Se={[ne]:void 0}}=me,$e=_objectWithoutPropertiesLoose$2(me,_excluded2$6),Re=_e[ne]||ue,Ae=resolveComponentProps(Se[ne],pe),Ie=mergeSlotProps(_extends$2({className:ce},ve,{externalForwardedProps:ne==="root"?$e:void 0,externalSlotProps:Ae})),{props:{component:ke},internalRef:Be}=Ie,Ne=_objectWithoutPropertiesLoose$2(Ie.props,_excluded3$1),Fe=useForkRef(Be,Ae==null?void 0:Ae.ref,oe.ref),Ue=ge?ge(Ne):{},We=_extends$2({},pe,Ue),qe=ne==="root"?ke||xe:ke,ze=appendOwnerState(Re,_extends$2({},ne==="root"&&!xe&&!_e[ne]&&ye,ne!=="root"&&!_e[ne]&&ye,Ne,qe&&{as:qe},{ref:Fe}),We);return Object.keys(Ue).forEach(Ge=>{delete ze[Ge]}),[Re,ze]}function Ripple(ne){const{className:oe,classes:ce,pulsate:ue=!1,rippleX:pe,rippleY:me,rippleSize:ge,in:ye,onExited:ve,timeout:xe}=ne,[_e,Se]=reactExports.useState(!1),$e=clsx(oe,ce.ripple,ce.rippleVisible,ue&&ce.ripplePulsate),Re={width:ge,height:ge,top:-(ge/2)+me,left:-(ge/2)+pe},Ae=clsx(ce.child,_e&&ce.childLeaving,ue&&ce.childPulsate);return!ye&&!_e&&Se(!0),reactExports.useEffect(()=>{if(!ye&&ve!=null){const Ie=setTimeout(ve,xe);return()=>{clearTimeout(Ie)}}},[ve,ye,xe]),jsxRuntimeExports.jsx("span",{className:$e,style:Re,children:jsxRuntimeExports.jsx("span",{className:Ae})})}const touchRippleClasses=generateUtilityClasses$2("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),touchRippleClasses$1=touchRippleClasses,_excluded$10=["center","classes","className"];let _$a=ne=>ne,_t$4,_t2$3,_t3$3,_t4$3;const DURATION=550,DELAY_RIPPLE=80,enterKeyframe=keyframes(_t$4||(_t$4=_$a` + */function formatProdErrorMessage$2(ne){var oe="https://react.dev/errors/"+ne;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE$1)}catch(ne){console.error(ne)}}checkDCE$1(),reactDom.exports=reactDom_production;var reactDomExports=reactDom.exports;const ReactDOM$1=getDefaultExportFromCjs(reactDomExports),config$2={disabled:!1},TransitionGroupContext=React$2.createContext(null);var forceReflow=function(oe){return oe.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition=function(ne){_inheritsLoose(oe,ne);function oe(ue,pe){var me;me=ne.call(this,ue,pe)||this;var ge=pe,ye=ge&&!ge.isMounting?ue.enter:ue.appear,ve;return me.appearStatus=null,ue.in?ye?(ve=EXITED,me.appearStatus=ENTERING):ve=ENTERED:ue.unmountOnExit||ue.mountOnEnter?ve=UNMOUNTED:ve=EXITED,me.state={status:ve},me.nextCallback=null,me}oe.getDerivedStateFromProps=function(pe,me){var ge=pe.in;return ge&&me.status===UNMOUNTED?{status:EXITED}:null};var ce=oe.prototype;return ce.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},ce.componentDidUpdate=function(pe){var me=null;if(pe!==this.props){var ge=this.state.status;this.props.in?ge!==ENTERING&&ge!==ENTERED&&(me=ENTERING):(ge===ENTERING||ge===ENTERED)&&(me=EXITING)}this.updateStatus(!1,me)},ce.componentWillUnmount=function(){this.cancelNextCallback()},ce.getTimeouts=function(){var pe=this.props.timeout,me,ge,ye;return me=ge=ye=pe,pe!=null&&typeof pe!="number"&&(me=pe.exit,ge=pe.enter,ye=pe.appear!==void 0?pe.appear:ge),{exit:me,enter:ge,appear:ye}},ce.updateStatus=function(pe,me){if(pe===void 0&&(pe=!1),me!==null)if(this.cancelNextCallback(),me===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var ge=this.props.nodeRef?this.props.nodeRef.current:ReactDOM$1.findDOMNode(this);ge&&forceReflow(ge)}this.performEnter(pe)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},ce.performEnter=function(pe){var me=this,ge=this.props.enter,ye=this.context?this.context.isMounting:pe,ve=this.props.nodeRef?[ye]:[ReactDOM$1.findDOMNode(this),ye],xe=ve[0],_e=ve[1],Se=this.getTimeouts(),$e=ye?Se.appear:Se.enter;if(!pe&&!ge||config$2.disabled){this.safeSetState({status:ENTERED},function(){me.props.onEntered(xe)});return}this.props.onEnter(xe,_e),this.safeSetState({status:ENTERING},function(){me.props.onEntering(xe,_e),me.onTransitionEnd($e,function(){me.safeSetState({status:ENTERED},function(){me.props.onEntered(xe,_e)})})})},ce.performExit=function(){var pe=this,me=this.props.exit,ge=this.getTimeouts(),ye=this.props.nodeRef?void 0:ReactDOM$1.findDOMNode(this);if(!me||config$2.disabled){this.safeSetState({status:EXITED},function(){pe.props.onExited(ye)});return}this.props.onExit(ye),this.safeSetState({status:EXITING},function(){pe.props.onExiting(ye),pe.onTransitionEnd(ge.exit,function(){pe.safeSetState({status:EXITED},function(){pe.props.onExited(ye)})})})},ce.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},ce.safeSetState=function(pe,me){me=this.setNextCallback(me),this.setState(pe,me)},ce.setNextCallback=function(pe){var me=this,ge=!0;return this.nextCallback=function(ye){ge&&(ge=!1,me.nextCallback=null,pe(ye))},this.nextCallback.cancel=function(){ge=!1},this.nextCallback},ce.onTransitionEnd=function(pe,me){this.setNextCallback(me);var ge=this.props.nodeRef?this.props.nodeRef.current:ReactDOM$1.findDOMNode(this),ye=pe==null&&!this.props.addEndListener;if(!ge||ye){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var ve=this.props.nodeRef?[this.nextCallback]:[ge,this.nextCallback],xe=ve[0],_e=ve[1];this.props.addEndListener(xe,_e)}pe!=null&&setTimeout(this.nextCallback,pe)},ce.render=function(){var pe=this.state.status;if(pe===UNMOUNTED)return null;var me=this.props,ge=me.children;me.in,me.mountOnEnter,me.unmountOnExit,me.appear,me.enter,me.exit,me.timeout,me.addEndListener,me.onEnter,me.onEntering,me.onEntered,me.onExit,me.onExiting,me.onExited,me.nodeRef;var ye=_objectWithoutPropertiesLoose$2(me,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$2.createElement(TransitionGroupContext.Provider,{value:null},typeof ge=="function"?ge(pe,ye):React$2.cloneElement(React$2.Children.only(ge),ye))},oe}(React$2.Component);Transition.contextType=TransitionGroupContext;Transition.propTypes={};function noop$b(){}Transition.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$b,onEntering:noop$b,onEntered:noop$b,onExit:noop$b,onExiting:noop$b,onExited:noop$b};Transition.UNMOUNTED=UNMOUNTED;Transition.EXITED=EXITED;Transition.ENTERING=ENTERING;Transition.ENTERED=ENTERED;Transition.EXITING=EXITING;const Transition$1=Transition;function _assertThisInitialized$3(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function getChildMapping(ne,oe){var ce=function(me){return oe&&reactExports.isValidElement(me)?oe(me):me},ue=Object.create(null);return ne&&reactExports.Children.map(ne,function(pe){return pe}).forEach(function(pe){ue[pe.key]=ce(pe)}),ue}function mergeChildMappings(ne,oe){ne=ne||{},oe=oe||{};function ce(_e){return _e in oe?oe[_e]:ne[_e]}var ue=Object.create(null),pe=[];for(var me in ne)me in oe?pe.length&&(ue[me]=pe,pe=[]):pe.push(me);var ge,ye={};for(var ve in oe){if(ue[ve])for(ge=0;gene.scrollTop;function getTransitionProps$1(ne,oe){var ce,ue;const{timeout:pe,easing:me,style:ge={}}=ne;return{duration:(ce=ge.transitionDuration)!=null?ce:typeof pe=="number"?pe:pe[oe.mode]||0,easing:(ue=ge.transitionTimingFunction)!=null?ue:typeof me=="object"?me[oe.mode]:me,delay:ge.transitionDelay}}function getCollapseUtilityClass(ne){return generateUtilityClass$2("MuiCollapse",ne)}generateUtilityClasses$2("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const _excluded$15=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],useUtilityClasses$U=ne=>{const{orientation:oe,classes:ce}=ne,ue={root:["root",`${oe}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${oe}`],wrapperInner:["wrapperInner",`${oe}`]};return composeClasses$1(ue,getCollapseUtilityClass,ce)},CollapseRoot=styled$1("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.orientation],ce.state==="entered"&&oe.entered,ce.state==="exited"&&!ce.in&&ce.collapsedSize==="0px"&&oe.hidden]}})(({theme:ne,ownerState:oe})=>_extends$2({height:0,overflow:"hidden",transition:ne.transitions.create("height")},oe.orientation==="horizontal"&&{height:"auto",width:0,transition:ne.transitions.create("width")},oe.state==="entered"&&_extends$2({height:"auto",overflow:"visible"},oe.orientation==="horizontal"&&{width:"auto"}),oe.state==="exited"&&!oe.in&&oe.collapsedSize==="0px"&&{visibility:"hidden"})),CollapseWrapper=styled$1("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(ne,oe)=>oe.wrapper})(({ownerState:ne})=>_extends$2({display:"flex",width:"100%"},ne.orientation==="horizontal"&&{width:"auto",height:"100%"})),CollapseWrapperInner=styled$1("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(ne,oe)=>oe.wrapperInner})(({ownerState:ne})=>_extends$2({width:"100%"},ne.orientation==="horizontal"&&{width:"auto",height:"100%"})),Collapse=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCollapse"}),{addEndListener:pe,children:me,className:ge,collapsedSize:ye="0px",component:ve,easing:xe,in:_e,onEnter:Se,onEntered:$e,onEntering:Re,onExit:Ae,onExited:Ie,onExiting:ke,orientation:Be="vertical",style:Ne,timeout:Fe=duration.standard,TransitionComponent:Ue=Transition$1}=ue,We=_objectWithoutPropertiesLoose$2(ue,_excluded$15),qe=_extends$2({},ue,{orientation:Be,collapsedSize:ye}),ze=useUtilityClasses$U(qe),Ge=useTheme$1(),Ze=useTimeout(),Dt=reactExports.useRef(null),Je=reactExports.useRef(),Ut=typeof ye=="number"?`${ye}px`:ye,jt=Be==="horizontal",Ke=jt?"width":"height",an=reactExports.useRef(null),Zt=useForkRef(ce,an),en=Nt=>Yt=>{if(Nt){const Jt=an.current;Yt===void 0?Nt(Jt):Nt(Jt,Yt)}},Kt=()=>Dt.current?Dt.current[jt?"clientWidth":"clientHeight"]:0,Wt=en((Nt,Yt)=>{Dt.current&&jt&&(Dt.current.style.position="absolute"),Nt.style[Ke]=Ut,Se&&Se(Nt,Yt)}),un=en((Nt,Yt)=>{const Jt=Kt();Dt.current&&jt&&(Dt.current.style.position="");const{duration:hn,easing:Ye}=getTransitionProps$1({style:Ne,timeout:Fe,easing:xe},{mode:"enter"});if(Fe==="auto"){const Xe=Ge.transitions.getAutoHeightDuration(Jt);Nt.style.transitionDuration=`${Xe}ms`,Je.current=Xe}else Nt.style.transitionDuration=typeof hn=="string"?hn:`${hn}ms`;Nt.style[Ke]=`${Jt}px`,Nt.style.transitionTimingFunction=Ye,Re&&Re(Nt,Yt)}),Xt=en((Nt,Yt)=>{Nt.style[Ke]="auto",$e&&$e(Nt,Yt)}),nn=en(Nt=>{Nt.style[Ke]=`${Kt()}px`,Ae&&Ae(Nt)}),vn=en(Ie),Sn=en(Nt=>{const Yt=Kt(),{duration:Jt,easing:hn}=getTransitionProps$1({style:Ne,timeout:Fe,easing:xe},{mode:"exit"});if(Fe==="auto"){const Ye=Ge.transitions.getAutoHeightDuration(Yt);Nt.style.transitionDuration=`${Ye}ms`,Je.current=Ye}else Nt.style.transitionDuration=typeof Jt=="string"?Jt:`${Jt}ms`;Nt.style[Ke]=Ut,Nt.style.transitionTimingFunction=hn,ke&&ke(Nt)}),Cn=Nt=>{Fe==="auto"&&Ze.start(Je.current||0,Nt),pe&&pe(an.current,Nt)};return jsxRuntimeExports.jsx(Ue,_extends$2({in:_e,onEnter:Wt,onEntered:Xt,onEntering:un,onExit:nn,onExited:vn,onExiting:Sn,addEndListener:Cn,nodeRef:an,timeout:Fe==="auto"?null:Fe},We,{children:(Nt,Yt)=>jsxRuntimeExports.jsx(CollapseRoot,_extends$2({as:ve,className:clsx(ze.root,ge,{entered:ze.entered,exited:!_e&&Ut==="0px"&&ze.hidden}[Nt]),style:_extends$2({[jt?"minWidth":"minHeight"]:Ut},Ne),ref:Zt},Yt,{ownerState:_extends$2({},qe,{state:Nt}),children:jsxRuntimeExports.jsx(CollapseWrapper,{ownerState:_extends$2({},qe,{state:Nt}),className:ze.wrapper,ref:Dt,children:jsxRuntimeExports.jsx(CollapseWrapperInner,{ownerState:_extends$2({},qe,{state:Nt}),className:ze.wrapperInner,children:me})})}))}))});Collapse.muiSupportAuto=!0;const Collapse$1=Collapse;function getPaperUtilityClass(ne){return generateUtilityClass$2("MuiPaper",ne)}generateUtilityClasses$2("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const _excluded$14=["className","component","elevation","square","variant"],useUtilityClasses$T=ne=>{const{square:oe,elevation:ce,variant:ue,classes:pe}=ne,me={root:["root",ue,!oe&&"rounded",ue==="elevation"&&`elevation${ce}`]};return composeClasses$1(me,getPaperUtilityClass,pe)},PaperRoot=styled$1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],!ce.square&&oe.rounded,ce.variant==="elevation"&&oe[`elevation${ce.elevation}`]]}})(({theme:ne,ownerState:oe})=>{var ce;return _extends$2({backgroundColor:(ne.vars||ne).palette.background.paper,color:(ne.vars||ne).palette.text.primary,transition:ne.transitions.create("box-shadow")},!oe.square&&{borderRadius:ne.shape.borderRadius},oe.variant==="outlined"&&{border:`1px solid ${(ne.vars||ne).palette.divider}`},oe.variant==="elevation"&&_extends$2({boxShadow:(ne.vars||ne).shadows[oe.elevation]},!ne.vars&&ne.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${alpha_1("#fff",getOverlayAlpha$1(oe.elevation))}, ${alpha_1("#fff",getOverlayAlpha$1(oe.elevation))})`},ne.vars&&{backgroundImage:(ce=ne.vars.overlays)==null?void 0:ce[oe.elevation]}))}),Paper=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiPaper"}),{className:pe,component:me="div",elevation:ge=1,square:ye=!1,variant:ve="elevation"}=ue,xe=_objectWithoutPropertiesLoose$2(ue,_excluded$14),_e=_extends$2({},ue,{component:me,elevation:ge,square:ye,variant:ve}),Se=useUtilityClasses$T(_e);return jsxRuntimeExports.jsx(PaperRoot,_extends$2({as:me,ownerState:_e,className:clsx(Se.root,pe),ref:ce},xe))}),Paper$1=Paper;function isHostComponent(ne){return typeof ne=="string"}function appendOwnerState(ne,oe,ce){return ne===void 0||isHostComponent(ne)?oe:_extends$2({},oe,{ownerState:_extends$2({},oe.ownerState,ce)})}function areArraysEqual$2(ne,oe,ce=(ue,pe)=>ue===pe){return ne.length===oe.length&&ne.every((ue,pe)=>ce(ue,oe[pe]))}const defaultContextValue={disableDefaultClasses:!1},ClassNameConfiguratorContext=reactExports.createContext(defaultContextValue);function useClassNamesOverride(ne){const{disableDefaultClasses:oe}=reactExports.useContext(ClassNameConfiguratorContext);return ce=>oe?"":ne(ce)}function extractEventHandlers(ne,oe=[]){if(ne===void 0)return{};const ce={};return Object.keys(ne).filter(ue=>ue.match(/^on[A-Z]/)&&typeof ne[ue]=="function"&&!oe.includes(ue)).forEach(ue=>{ce[ue]=ne[ue]}),ce}function resolveComponentProps(ne,oe,ce){return typeof ne=="function"?ne(oe,ce):ne}function omitEventHandlers(ne){if(ne===void 0)return{};const oe={};return Object.keys(ne).filter(ce=>!(ce.match(/^on[A-Z]/)&&typeof ne[ce]=="function")).forEach(ce=>{oe[ce]=ne[ce]}),oe}function mergeSlotProps(ne){const{getSlotProps:oe,additionalProps:ce,externalSlotProps:ue,externalForwardedProps:pe,className:me}=ne;if(!oe){const Re=clsx(ce==null?void 0:ce.className,me,pe==null?void 0:pe.className,ue==null?void 0:ue.className),Ae=_extends$2({},ce==null?void 0:ce.style,pe==null?void 0:pe.style,ue==null?void 0:ue.style),Ie=_extends$2({},ce,pe,ue);return Re.length>0&&(Ie.className=Re),Object.keys(Ae).length>0&&(Ie.style=Ae),{props:Ie,internalRef:void 0}}const ge=extractEventHandlers(_extends$2({},pe,ue)),ye=omitEventHandlers(ue),ve=omitEventHandlers(pe),xe=oe(ge),_e=clsx(xe==null?void 0:xe.className,ce==null?void 0:ce.className,me,pe==null?void 0:pe.className,ue==null?void 0:ue.className),Se=_extends$2({},xe==null?void 0:xe.style,ce==null?void 0:ce.style,pe==null?void 0:pe.style,ue==null?void 0:ue.style),$e=_extends$2({},xe,ce,ve,ye);return _e.length>0&&($e.className=_e),Object.keys(Se).length>0&&($e.style=Se),{props:$e,internalRef:xe.ref}}const _excluded$13=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function useSlotProps(ne){var oe;const{elementType:ce,externalSlotProps:ue,ownerState:pe,skipResolvingSlotProps:me=!1}=ne,ge=_objectWithoutPropertiesLoose$2(ne,_excluded$13),ye=me?{}:resolveComponentProps(ue,pe),{props:ve,internalRef:xe}=mergeSlotProps(_extends$2({},ge,{externalSlotProps:ye})),_e=useForkRef(xe,ye==null?void 0:ye.ref,(oe=ne.additionalProps)==null?void 0:oe.ref);return appendOwnerState(ce,_extends$2({},ve,{ref:_e}),pe)}const _excluded$12=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],_excluded2$6=["component","slots","slotProps"],_excluded3$1=["component"];function useSlot(ne,oe){const{className:ce,elementType:ue,ownerState:pe,externalForwardedProps:me,getSlotOwnerState:ge,internalForwardedProps:ye}=oe,ve=_objectWithoutPropertiesLoose$2(oe,_excluded$12),{component:xe,slots:_e={[ne]:void 0},slotProps:Se={[ne]:void 0}}=me,$e=_objectWithoutPropertiesLoose$2(me,_excluded2$6),Re=_e[ne]||ue,Ae=resolveComponentProps(Se[ne],pe),Ie=mergeSlotProps(_extends$2({className:ce},ve,{externalForwardedProps:ne==="root"?$e:void 0,externalSlotProps:Ae})),{props:{component:ke},internalRef:Be}=Ie,Ne=_objectWithoutPropertiesLoose$2(Ie.props,_excluded3$1),Fe=useForkRef(Be,Ae==null?void 0:Ae.ref,oe.ref),Ue=ge?ge(Ne):{},We=_extends$2({},pe,Ue),qe=ne==="root"?ke||xe:ke,ze=appendOwnerState(Re,_extends$2({},ne==="root"&&!xe&&!_e[ne]&&ye,ne!=="root"&&!_e[ne]&&ye,Ne,qe&&{as:qe},{ref:Fe}),We);return Object.keys(Ue).forEach(Ge=>{delete ze[Ge]}),[Re,ze]}function Ripple(ne){const{className:oe,classes:ce,pulsate:ue=!1,rippleX:pe,rippleY:me,rippleSize:ge,in:ye,onExited:ve,timeout:xe}=ne,[_e,Se]=reactExports.useState(!1),$e=clsx(oe,ce.ripple,ce.rippleVisible,ue&&ce.ripplePulsate),Re={width:ge,height:ge,top:-(ge/2)+me,left:-(ge/2)+pe},Ae=clsx(ce.child,_e&&ce.childLeaving,ue&&ce.childPulsate);return!ye&&!_e&&Se(!0),reactExports.useEffect(()=>{if(!ye&&ve!=null){const Ie=setTimeout(ve,xe);return()=>{clearTimeout(Ie)}}},[ve,ye,xe]),jsxRuntimeExports.jsx("span",{className:$e,style:Re,children:jsxRuntimeExports.jsx("span",{className:Ae})})}const touchRippleClasses=generateUtilityClasses$2("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),touchRippleClasses$1=touchRippleClasses,_excluded$11=["center","classes","className"];let _$a=ne=>ne,_t$4,_t2$3,_t3$3,_t4$3;const DURATION=550,DELAY_RIPPLE=80,enterKeyframe=keyframes(_t$4||(_t$4=_$a` 0% { transform: scale(0); opacity: 0.1; @@ -116,8 +116,8 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 animation-iteration-count: infinite; animation-delay: 200ms; } -`),touchRippleClasses$1.rippleVisible,enterKeyframe,DURATION,({theme:ne})=>ne.transitions.easing.easeInOut,touchRippleClasses$1.ripplePulsate,({theme:ne})=>ne.transitions.duration.shorter,touchRippleClasses$1.child,touchRippleClasses$1.childLeaving,exitKeyframe,DURATION,({theme:ne})=>ne.transitions.easing.easeInOut,touchRippleClasses$1.childPulsate,pulsateKeyframe,({theme:ne})=>ne.transitions.easing.easeInOut),TouchRipple=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTouchRipple"}),{center:pe=!1,classes:me={},className:ge}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$10),[ve,xe]=reactExports.useState([]),_e=reactExports.useRef(0),Se=reactExports.useRef(null);reactExports.useEffect(()=>{Se.current&&(Se.current(),Se.current=null)},[ve]);const $e=reactExports.useRef(!1),Re=useTimeout(),Ae=reactExports.useRef(null),Ie=reactExports.useRef(null),ke=reactExports.useCallback(Ue=>{const{pulsate:We,rippleX:qe,rippleY:ze,rippleSize:Ge,cb:Ze}=Ue;xe(Dt=>[...Dt,jsxRuntimeExports.jsx(TouchRippleRipple,{classes:{ripple:clsx(me.ripple,touchRippleClasses$1.ripple),rippleVisible:clsx(me.rippleVisible,touchRippleClasses$1.rippleVisible),ripplePulsate:clsx(me.ripplePulsate,touchRippleClasses$1.ripplePulsate),child:clsx(me.child,touchRippleClasses$1.child),childLeaving:clsx(me.childLeaving,touchRippleClasses$1.childLeaving),childPulsate:clsx(me.childPulsate,touchRippleClasses$1.childPulsate)},timeout:DURATION,pulsate:We,rippleX:qe,rippleY:ze,rippleSize:Ge},_e.current)]),_e.current+=1,Se.current=Ze},[me]),Be=reactExports.useCallback((Ue={},We={},qe=()=>{})=>{const{pulsate:ze=!1,center:Ge=pe||We.pulsate,fakeElement:Ze=!1}=We;if((Ue==null?void 0:Ue.type)==="mousedown"&&$e.current){$e.current=!1;return}(Ue==null?void 0:Ue.type)==="touchstart"&&($e.current=!0);const Dt=Ze?null:Ie.current,Je=Dt?Dt.getBoundingClientRect():{width:0,height:0,left:0,top:0};let Ut,jt,Ke;if(Ge||Ue===void 0||Ue.clientX===0&&Ue.clientY===0||!Ue.clientX&&!Ue.touches)Ut=Math.round(Je.width/2),jt=Math.round(Je.height/2);else{const{clientX:an,clientY:Zt}=Ue.touches&&Ue.touches.length>0?Ue.touches[0]:Ue;Ut=Math.round(an-Je.left),jt=Math.round(Zt-Je.top)}if(Ge)Ke=Math.sqrt((2*Je.width**2+Je.height**2)/3),Ke%2===0&&(Ke+=1);else{const an=Math.max(Math.abs((Dt?Dt.clientWidth:0)-Ut),Ut)*2+2,Zt=Math.max(Math.abs((Dt?Dt.clientHeight:0)-jt),jt)*2+2;Ke=Math.sqrt(an**2+Zt**2)}Ue!=null&&Ue.touches?Ae.current===null&&(Ae.current=()=>{ke({pulsate:ze,rippleX:Ut,rippleY:jt,rippleSize:Ke,cb:qe})},Re.start(DELAY_RIPPLE,()=>{Ae.current&&(Ae.current(),Ae.current=null)})):ke({pulsate:ze,rippleX:Ut,rippleY:jt,rippleSize:Ke,cb:qe})},[pe,ke,Re]),Ne=reactExports.useCallback(()=>{Be({},{pulsate:!0})},[Be]),Fe=reactExports.useCallback((Ue,We)=>{if(Re.clear(),(Ue==null?void 0:Ue.type)==="touchend"&&Ae.current){Ae.current(),Ae.current=null,Re.start(0,()=>{Fe(Ue,We)});return}Ae.current=null,xe(qe=>qe.length>0?qe.slice(1):qe),Se.current=We},[Re]);return reactExports.useImperativeHandle(ce,()=>({pulsate:Ne,start:Be,stop:Fe}),[Ne,Be,Fe]),jsxRuntimeExports.jsx(TouchRippleRoot,_extends$2({className:clsx(touchRippleClasses$1.root,me.root,ge),ref:Ie},ye,{children:jsxRuntimeExports.jsx(TransitionGroup$1,{component:null,exit:!0,children:ve})}))}),TouchRipple$1=TouchRipple;function getButtonBaseUtilityClass(ne){return generateUtilityClass$2("MuiButtonBase",ne)}const buttonBaseClasses=generateUtilityClasses$2("MuiButtonBase",["root","disabled","focusVisible"]),buttonBaseClasses$1=buttonBaseClasses,_excluded$$=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],useUtilityClasses$R=ne=>{const{disabled:oe,focusVisible:ce,focusVisibleClassName:ue,classes:pe}=ne,ge=composeClasses$1({root:["root",oe&&"disabled",ce&&"focusVisible"]},getButtonBaseUtilityClass,pe);return ce&&ue&&(ge.root+=` ${ue}`),ge},ButtonBaseRoot=styled$1("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${buttonBaseClasses$1.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ButtonBase=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiButtonBase"}),{action:pe,centerRipple:me=!1,children:ge,className:ye,component:ve="button",disabled:xe=!1,disableRipple:_e=!1,disableTouchRipple:Se=!1,focusRipple:$e=!1,LinkComponent:Re="a",onBlur:Ae,onClick:Ie,onContextMenu:ke,onDragLeave:Be,onFocus:Ne,onFocusVisible:Fe,onKeyDown:Ue,onKeyUp:We,onMouseDown:qe,onMouseLeave:ze,onMouseUp:Ge,onTouchEnd:Ze,onTouchMove:Dt,onTouchStart:Je,tabIndex:Ut=0,TouchRippleProps:jt,touchRippleRef:Ke,type:an}=ue,Zt=_objectWithoutPropertiesLoose$2(ue,_excluded$$),en=reactExports.useRef(null),Kt=reactExports.useRef(null),Wt=useForkRef(Kt,Ke),{isFocusVisibleRef:un,onFocus:Xt,onBlur:nn,ref:vn}=useIsFocusVisible(),[Sn,Cn]=reactExports.useState(!1);xe&&Sn&&Cn(!1),reactExports.useImperativeHandle(pe,()=>({focusVisible:()=>{Cn(!0),en.current.focus()}}),[]);const[Nt,Yt]=reactExports.useState(!1);reactExports.useEffect(()=>{Yt(!0)},[]);const Jt=Nt&&!_e&&!xe;reactExports.useEffect(()=>{Sn&&$e&&!_e&&Nt&&Kt.current.pulsate()},[_e,$e,Sn,Nt]);function hn(Gt,bn,kn=Se){return useEventCallback(jn=>(bn&&bn(jn),!kn&&Kt.current&&Kt.current[Gt](jn),!0))}const Ye=hn("start",qe),Xe=hn("stop",ke),Pt=hn("stop",Be),sn=hn("stop",Ge),yn=hn("stop",Gt=>{Sn&&Gt.preventDefault(),ze&&ze(Gt)}),qt=hn("start",Je),wn=hn("stop",Ze),Tn=hn("stop",Dt),xn=hn("stop",Gt=>{nn(Gt),un.current===!1&&Cn(!1),Ae&&Ae(Gt)},!1),Nn=useEventCallback(Gt=>{en.current||(en.current=Gt.currentTarget),Xt(Gt),un.current===!0&&(Cn(!0),Fe&&Fe(Gt)),Ne&&Ne(Gt)}),zn=()=>{const Gt=en.current;return ve&&ve!=="button"&&!(Gt.tagName==="A"&&Gt.href)},Yn=reactExports.useRef(!1),Kn=useEventCallback(Gt=>{$e&&!Yn.current&&Sn&&Kt.current&&Gt.key===" "&&(Yn.current=!0,Kt.current.stop(Gt,()=>{Kt.current.start(Gt)})),Gt.target===Gt.currentTarget&&zn()&&Gt.key===" "&&Gt.preventDefault(),Ue&&Ue(Gt),Gt.target===Gt.currentTarget&&zn()&&Gt.key==="Enter"&&!xe&&(Gt.preventDefault(),Ie&&Ie(Gt))}),Rn=useEventCallback(Gt=>{$e&&Gt.key===" "&&Kt.current&&Sn&&!Gt.defaultPrevented&&(Yn.current=!1,Kt.current.stop(Gt,()=>{Kt.current.pulsate(Gt)})),We&&We(Gt),Ie&&Gt.target===Gt.currentTarget&&zn()&&Gt.key===" "&&!Gt.defaultPrevented&&Ie(Gt)});let Mn=ve;Mn==="button"&&(Zt.href||Zt.to)&&(Mn=Re);const Xn={};Mn==="button"?(Xn.type=an===void 0?"button":an,Xn.disabled=xe):(!Zt.href&&!Zt.to&&(Xn.role="button"),xe&&(Xn["aria-disabled"]=xe));const Jn=useForkRef(ce,vn,en),pn=_extends$2({},ue,{centerRipple:me,component:ve,disabled:xe,disableRipple:_e,disableTouchRipple:Se,focusRipple:$e,tabIndex:Ut,focusVisible:Sn}),tn=useUtilityClasses$R(pn);return jsxRuntimeExports.jsxs(ButtonBaseRoot,_extends$2({as:Mn,className:clsx(tn.root,ye),ownerState:pn,onBlur:xn,onClick:Ie,onContextMenu:Xe,onFocus:Nn,onKeyDown:Kn,onKeyUp:Rn,onMouseDown:Ye,onMouseLeave:yn,onMouseUp:sn,onDragLeave:Pt,onTouchEnd:wn,onTouchMove:Tn,onTouchStart:qt,ref:Jn,tabIndex:xe?-1:Ut,type:an},Xn,Zt,{children:[ge,Jt?jsxRuntimeExports.jsx(TouchRipple$1,_extends$2({ref:Wt,center:me},jt)):null]}))}),ButtonBase$1=ButtonBase;function getIconButtonUtilityClass(ne){return generateUtilityClass$2("MuiIconButton",ne)}const iconButtonClasses=generateUtilityClasses$2("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),iconButtonClasses$1=iconButtonClasses,_excluded$_=["edge","children","className","color","disabled","disableFocusRipple","size"],useUtilityClasses$Q=ne=>{const{classes:oe,disabled:ce,color:ue,edge:pe,size:me}=ne,ge={root:["root",ce&&"disabled",ue!=="default"&&`color${capitalize$1(ue)}`,pe&&`edge${capitalize$1(pe)}`,`size${capitalize$1(me)}`]};return composeClasses$1(ge,getIconButtonUtilityClass,oe)},IconButtonRoot=styled$1(ButtonBase$1,{name:"MuiIconButton",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`],ce.edge&&oe[`edge${capitalize$1(ce.edge)}`],oe[`size${capitalize$1(ce.size)}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({textAlign:"center",flex:"0 0 auto",fontSize:ne.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(ne.vars||ne).palette.action.active,transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shortest})},!oe.disableRipple&&{"&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.activeChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette.action.active,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},oe.edge==="start"&&{marginLeft:oe.size==="small"?-3:-12},oe.edge==="end"&&{marginRight:oe.size==="small"?-3:-12}),({theme:ne,ownerState:oe})=>{var ce;const ue=(ce=(ne.vars||ne).palette)==null?void 0:ce[oe.color];return _extends$2({},oe.color==="inherit"&&{color:"inherit"},oe.color!=="inherit"&&oe.color!=="default"&&_extends$2({color:ue==null?void 0:ue.main},!oe.disableRipple&&{"&:hover":_extends$2({},ue&&{backgroundColor:ne.vars?`rgba(${ue.mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ue.main,ne.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),oe.size==="small"&&{padding:5,fontSize:ne.typography.pxToRem(18)},oe.size==="large"&&{padding:12,fontSize:ne.typography.pxToRem(28)},{[`&.${iconButtonClasses$1.disabled}`]:{backgroundColor:"transparent",color:(ne.vars||ne).palette.action.disabled}})}),IconButton=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiIconButton"}),{edge:pe=!1,children:me,className:ge,color:ye="default",disabled:ve=!1,disableFocusRipple:xe=!1,size:_e="medium"}=ue,Se=_objectWithoutPropertiesLoose$2(ue,_excluded$_),$e=_extends$2({},ue,{edge:pe,color:ye,disabled:ve,disableFocusRipple:xe,size:_e}),Re=useUtilityClasses$Q($e);return jsxRuntimeExports.jsx(IconButtonRoot,_extends$2({className:clsx(Re.root,ge),centerRipple:!0,focusRipple:!xe,disabled:ve,ref:ce},Se,{ownerState:$e,children:me}))}),IconButton$1=IconButton;function getTypographyUtilityClass(ne){return generateUtilityClass$2("MuiTypography",ne)}generateUtilityClasses$2("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _excluded$Z=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],useUtilityClasses$P=ne=>{const{align:oe,gutterBottom:ce,noWrap:ue,paragraph:pe,variant:me,classes:ge}=ne,ye={root:["root",me,ne.align!=="inherit"&&`align${capitalize$1(oe)}`,ce&&"gutterBottom",ue&&"noWrap",pe&&"paragraph"]};return composeClasses$1(ye,getTypographyUtilityClass,ge)},TypographyRoot=styled$1("span",{name:"MuiTypography",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.variant&&oe[ce.variant],ce.align!=="inherit"&&oe[`align${capitalize$1(ce.align)}`],ce.noWrap&&oe.noWrap,ce.gutterBottom&&oe.gutterBottom,ce.paragraph&&oe.paragraph]}})(({theme:ne,ownerState:oe})=>_extends$2({margin:0},oe.variant==="inherit"&&{font:"inherit"},oe.variant!=="inherit"&&ne.typography[oe.variant],oe.align!=="inherit"&&{textAlign:oe.align},oe.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},oe.gutterBottom&&{marginBottom:"0.35em"},oe.paragraph&&{marginBottom:16})),defaultVariantMapping={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},colorTransformations={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},transformDeprecatedColors=ne=>colorTransformations[ne]||ne,Typography=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTypography"}),pe=transformDeprecatedColors(ue.color),me=extendSxProp(_extends$2({},ue,{color:pe})),{align:ge="inherit",className:ye,component:ve,gutterBottom:xe=!1,noWrap:_e=!1,paragraph:Se=!1,variant:$e="body1",variantMapping:Re=defaultVariantMapping}=me,Ae=_objectWithoutPropertiesLoose$2(me,_excluded$Z),Ie=_extends$2({},me,{align:ge,color:pe,className:ye,component:ve,gutterBottom:xe,noWrap:_e,paragraph:Se,variant:$e,variantMapping:Re}),ke=ve||(Se?"p":Re[$e]||defaultVariantMapping[$e])||"span",Be=useUtilityClasses$P(Ie);return jsxRuntimeExports.jsx(TypographyRoot,_extends$2({as:ke,ref:ce,ownerState:Ie,className:clsx(Be.root,ye)},Ae))}),Type$2=Typography;function getAppBarUtilityClass(ne){return generateUtilityClass$2("MuiAppBar",ne)}generateUtilityClasses$2("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const _excluded$Y=["className","color","enableColorOnDark","position"],useUtilityClasses$O=ne=>{const{color:oe,position:ce,classes:ue}=ne,pe={root:["root",`color${capitalize$1(oe)}`,`position${capitalize$1(ce)}`]};return composeClasses$1(pe,getAppBarUtilityClass,ue)},joinVars=(ne,oe)=>ne?`${ne==null?void 0:ne.replace(")","")}, ${oe})`:oe,AppBarRoot=styled$1(Paper$1,{name:"MuiAppBar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`position${capitalize$1(ce.position)}`],oe[`color${capitalize$1(ce.color)}`]]}})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light"?ne.palette.grey[100]:ne.palette.grey[900];return _extends$2({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},oe.position==="fixed"&&{position:"fixed",zIndex:(ne.vars||ne).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},oe.position==="absolute"&&{position:"absolute",zIndex:(ne.vars||ne).zIndex.appBar,top:0,left:"auto",right:0},oe.position==="sticky"&&{position:"sticky",zIndex:(ne.vars||ne).zIndex.appBar,top:0,left:"auto",right:0},oe.position==="static"&&{position:"static"},oe.position==="relative"&&{position:"relative"},!ne.vars&&_extends$2({},oe.color==="default"&&{backgroundColor:ce,color:ne.palette.getContrastText(ce)},oe.color&&oe.color!=="default"&&oe.color!=="inherit"&&oe.color!=="transparent"&&{backgroundColor:ne.palette[oe.color].main,color:ne.palette[oe.color].contrastText},oe.color==="inherit"&&{color:"inherit"},ne.palette.mode==="dark"&&!oe.enableColorOnDark&&{backgroundColor:null,color:null},oe.color==="transparent"&&_extends$2({backgroundColor:"transparent",color:"inherit"},ne.palette.mode==="dark"&&{backgroundImage:"none"})),ne.vars&&_extends$2({},oe.color==="default"&&{"--AppBar-background":oe.enableColorOnDark?ne.vars.palette.AppBar.defaultBg:joinVars(ne.vars.palette.AppBar.darkBg,ne.vars.palette.AppBar.defaultBg),"--AppBar-color":oe.enableColorOnDark?ne.vars.palette.text.primary:joinVars(ne.vars.palette.AppBar.darkColor,ne.vars.palette.text.primary)},oe.color&&!oe.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":oe.enableColorOnDark?ne.vars.palette[oe.color].main:joinVars(ne.vars.palette.AppBar.darkBg,ne.vars.palette[oe.color].main),"--AppBar-color":oe.enableColorOnDark?ne.vars.palette[oe.color].contrastText:joinVars(ne.vars.palette.AppBar.darkColor,ne.vars.palette[oe.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:oe.color==="inherit"?"inherit":"var(--AppBar-color)"},oe.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),AppBar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiAppBar"}),{className:pe,color:me="primary",enableColorOnDark:ge=!1,position:ye="fixed"}=ue,ve=_objectWithoutPropertiesLoose$2(ue,_excluded$Y),xe=_extends$2({},ue,{color:me,position:ye,enableColorOnDark:ge}),_e=useUtilityClasses$O(xe);return jsxRuntimeExports.jsx(AppBarRoot,_extends$2({square:!0,component:"header",ownerState:xe,elevation:4,className:clsx(_e.root,pe,ye==="fixed"&&"mui-fixed"),ref:ce},ve))}),AppBar$1=AppBar,GLOBAL_CLASS_PREFIX="base";function buildStateClass(ne){return`${GLOBAL_CLASS_PREFIX}--${ne}`}function buildSlotClass(ne,oe){return`${GLOBAL_CLASS_PREFIX}-${ne}-${oe}`}function generateUtilityClass$1(ne,oe){const ce=globalStateClasses$1[oe];return ce?buildStateClass(ce):buildSlotClass(ne,oe)}function generateUtilityClasses$1(ne,oe){const ce={};return oe.forEach(ue=>{ce[ue]=generateUtilityClass$1(ne,ue)}),ce}function mapEventPropToEvent(ne){return ne.substring(2).toLowerCase()}function clickedRootScrollbar(ne,oe){return oe.documentElement.clientWidth(setTimeout(()=>{ve.current=!0},0),()=>{ve.current=!1}),[]);const _e=useForkRef(oe.ref,ye),Se=useEventCallback(Ae=>{const Ie=xe.current;xe.current=!1;const ke=ownerDocument(ye.current);if(!ve.current||!ye.current||"clientX"in Ae&&clickedRootScrollbar(Ae,ke))return;if(ge.current){ge.current=!1;return}let Be;Ae.composedPath?Be=Ae.composedPath().indexOf(ye.current)>-1:Be=!ke.documentElement.contains(Ae.target)||ye.current.contains(Ae.target),!Be&&(ce||!Ie)&&pe(Ae)}),$e=Ae=>Ie=>{xe.current=!0;const ke=oe.props[Ae];ke&&ke(Ie)},Re={ref:_e};return me!==!1&&(Re[me]=$e(me)),reactExports.useEffect(()=>{if(me!==!1){const Ae=mapEventPropToEvent(me),Ie=ownerDocument(ye.current),ke=()=>{ge.current=!0};return Ie.addEventListener(Ae,Se),Ie.addEventListener("touchmove",ke),()=>{Ie.removeEventListener(Ae,Se),Ie.removeEventListener("touchmove",ke)}}},[Se,me]),ue!==!1&&(Re[ue]=$e(ue)),reactExports.useEffect(()=>{if(ue!==!1){const Ae=mapEventPropToEvent(ue),Ie=ownerDocument(ye.current);return Ie.addEventListener(Ae,Se),()=>{Ie.removeEventListener(Ae,Se)}}},[Se,ue]),jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(oe,Re)})}const candidatesSelector=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(ne){const oe=parseInt(ne.getAttribute("tabindex")||"",10);return Number.isNaN(oe)?ne.contentEditable==="true"||(ne.nodeName==="AUDIO"||ne.nodeName==="VIDEO"||ne.nodeName==="DETAILS")&&ne.getAttribute("tabindex")===null?0:ne.tabIndex:oe}function isNonTabbableRadio(ne){if(ne.tagName!=="INPUT"||ne.type!=="radio"||!ne.name)return!1;const oe=ue=>ne.ownerDocument.querySelector(`input[type="radio"]${ue}`);let ce=oe(`[name="${ne.name}"]:checked`);return ce||(ce=oe(`[name="${ne.name}"]`)),ce!==ne}function isNodeMatchingSelectorFocusable(ne){return!(ne.disabled||ne.tagName==="INPUT"&&ne.type==="hidden"||isNonTabbableRadio(ne))}function defaultGetTabbable(ne){const oe=[],ce=[];return Array.from(ne.querySelectorAll(candidatesSelector)).forEach((ue,pe)=>{const me=getTabIndex(ue);me===-1||!isNodeMatchingSelectorFocusable(ue)||(me===0?oe.push(ue):ce.push({documentOrder:pe,tabIndex:me,node:ue}))}),ce.sort((ue,pe)=>ue.tabIndex===pe.tabIndex?ue.documentOrder-pe.documentOrder:ue.tabIndex-pe.tabIndex).map(ue=>ue.node).concat(oe)}function defaultIsEnabled(){return!0}function FocusTrap(ne){const{children:oe,disableAutoFocus:ce=!1,disableEnforceFocus:ue=!1,disableRestoreFocus:pe=!1,getTabbable:me=defaultGetTabbable,isEnabled:ge=defaultIsEnabled,open:ye}=ne,ve=reactExports.useRef(!1),xe=reactExports.useRef(null),_e=reactExports.useRef(null),Se=reactExports.useRef(null),$e=reactExports.useRef(null),Re=reactExports.useRef(!1),Ae=reactExports.useRef(null),Ie=useForkRef(oe.ref,Ae),ke=reactExports.useRef(null);reactExports.useEffect(()=>{!ye||!Ae.current||(Re.current=!ce)},[ce,ye]),reactExports.useEffect(()=>{if(!ye||!Ae.current)return;const Fe=ownerDocument(Ae.current);return Ae.current.contains(Fe.activeElement)||(Ae.current.hasAttribute("tabIndex")||Ae.current.setAttribute("tabIndex","-1"),Re.current&&Ae.current.focus()),()=>{pe||(Se.current&&Se.current.focus&&(ve.current=!0,Se.current.focus()),Se.current=null)}},[ye]),reactExports.useEffect(()=>{if(!ye||!Ae.current)return;const Fe=ownerDocument(Ae.current),Ue=ze=>{ke.current=ze,!(ue||!ge()||ze.key!=="Tab")&&Fe.activeElement===Ae.current&&ze.shiftKey&&(ve.current=!0,_e.current&&_e.current.focus())},We=()=>{const ze=Ae.current;if(ze===null)return;if(!Fe.hasFocus()||!ge()||ve.current){ve.current=!1;return}if(ze.contains(Fe.activeElement)||ue&&Fe.activeElement!==xe.current&&Fe.activeElement!==_e.current)return;if(Fe.activeElement!==$e.current)$e.current=null;else if($e.current!==null)return;if(!Re.current)return;let Ge=[];if((Fe.activeElement===xe.current||Fe.activeElement===_e.current)&&(Ge=me(Ae.current)),Ge.length>0){var Ze,Dt;const Je=!!((Ze=ke.current)!=null&&Ze.shiftKey&&((Dt=ke.current)==null?void 0:Dt.key)==="Tab"),Ut=Ge[0],jt=Ge[Ge.length-1];typeof Ut!="string"&&typeof jt!="string"&&(Je?jt.focus():Ut.focus())}else ze.focus()};Fe.addEventListener("focusin",We),Fe.addEventListener("keydown",Ue,!0);const qe=setInterval(()=>{Fe.activeElement&&Fe.activeElement.tagName==="BODY"&&We()},50);return()=>{clearInterval(qe),Fe.removeEventListener("focusin",We),Fe.removeEventListener("keydown",Ue,!0)}},[ce,ue,pe,ge,ye,me]);const Be=Fe=>{Se.current===null&&(Se.current=Fe.relatedTarget),Re.current=!0,$e.current=Fe.target;const Ue=oe.props.onFocus;Ue&&Ue(Fe)},Ne=Fe=>{Se.current===null&&(Se.current=Fe.relatedTarget),Re.current=!0};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{tabIndex:ye?0:-1,onFocus:Ne,ref:xe,"data-testid":"sentinelStart"}),reactExports.cloneElement(oe,{ref:Ie,onFocus:Be}),jsxRuntimeExports.jsx("div",{tabIndex:ye?0:-1,onFocus:Ne,ref:_e,"data-testid":"sentinelEnd"})]})}function getContainer$1(ne){return typeof ne=="function"?ne():ne}const Portal=reactExports.forwardRef(function(oe,ce){const{children:ue,container:pe,disablePortal:me=!1}=oe,[ge,ye]=reactExports.useState(null),ve=useForkRef(reactExports.isValidElement(ue)?ue.ref:null,ce);if(useEnhancedEffect$1(()=>{me||ye(getContainer$1(pe)||document.body)},[pe,me]),useEnhancedEffect$1(()=>{if(ge&&!me)return setRef$1(ce,ge),()=>{setRef$1(ce,null)}},[ce,ge,me]),me){if(reactExports.isValidElement(ue)){const xe={ref:ve};return reactExports.cloneElement(ue,xe)}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:ue})}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:ge&&reactDomExports.createPortal(ue,ge)})});function isOverflowing(ne){const oe=ownerDocument(ne);return oe.body===ne?ownerWindow(ne).innerWidth>oe.documentElement.clientWidth:ne.scrollHeight>ne.clientHeight}function ariaHidden(ne,oe){oe?ne.setAttribute("aria-hidden","true"):ne.removeAttribute("aria-hidden")}function getPaddingRight(ne){return parseInt(ownerWindow(ne).getComputedStyle(ne).paddingRight,10)||0}function isAriaHiddenForbiddenOnElement(ne){const ce=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(ne.tagName)!==-1,ue=ne.tagName==="INPUT"&&ne.getAttribute("type")==="hidden";return ce||ue}function ariaHiddenSiblings(ne,oe,ce,ue,pe){const me=[oe,ce,...ue];[].forEach.call(ne.children,ge=>{const ye=me.indexOf(ge)===-1,ve=!isAriaHiddenForbiddenOnElement(ge);ye&&ve&&ariaHidden(ge,pe)})}function findIndexOf(ne,oe){let ce=-1;return ne.some((ue,pe)=>oe(ue)?(ce=pe,!0):!1),ce}function handleContainer(ne,oe){const ce=[],ue=ne.container;if(!oe.disableScrollLock){if(isOverflowing(ue)){const ge=getScrollbarSize(ownerDocument(ue));ce.push({value:ue.style.paddingRight,property:"padding-right",el:ue}),ue.style.paddingRight=`${getPaddingRight(ue)+ge}px`;const ye=ownerDocument(ue).querySelectorAll(".mui-fixed");[].forEach.call(ye,ve=>{ce.push({value:ve.style.paddingRight,property:"padding-right",el:ve}),ve.style.paddingRight=`${getPaddingRight(ve)+ge}px`})}let me;if(ue.parentNode instanceof DocumentFragment)me=ownerDocument(ue).body;else{const ge=ue.parentElement,ye=ownerWindow(ue);me=(ge==null?void 0:ge.nodeName)==="HTML"&&ye.getComputedStyle(ge).overflowY==="scroll"?ge:ue}ce.push({value:me.style.overflow,property:"overflow",el:me},{value:me.style.overflowX,property:"overflow-x",el:me},{value:me.style.overflowY,property:"overflow-y",el:me}),me.style.overflow="hidden"}return()=>{ce.forEach(({value:me,el:ge,property:ye})=>{me?ge.style.setProperty(ye,me):ge.style.removeProperty(ye)})}}function getHiddenSiblings(ne){const oe=[];return[].forEach.call(ne.children,ce=>{ce.getAttribute("aria-hidden")==="true"&&oe.push(ce)}),oe}class ModalManager{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(oe,ce){let ue=this.modals.indexOf(oe);if(ue!==-1)return ue;ue=this.modals.length,this.modals.push(oe),oe.modalRef&&ariaHidden(oe.modalRef,!1);const pe=getHiddenSiblings(ce);ariaHiddenSiblings(ce,oe.mount,oe.modalRef,pe,!0);const me=findIndexOf(this.containers,ge=>ge.container===ce);return me!==-1?(this.containers[me].modals.push(oe),ue):(this.containers.push({modals:[oe],container:ce,restore:null,hiddenSiblings:pe}),ue)}mount(oe,ce){const ue=findIndexOf(this.containers,me=>me.modals.indexOf(oe)!==-1),pe=this.containers[ue];pe.restore||(pe.restore=handleContainer(pe,ce))}remove(oe,ce=!0){const ue=this.modals.indexOf(oe);if(ue===-1)return ue;const pe=findIndexOf(this.containers,ge=>ge.modals.indexOf(oe)!==-1),me=this.containers[pe];if(me.modals.splice(me.modals.indexOf(oe),1),this.modals.splice(ue,1),me.modals.length===0)me.restore&&me.restore(),oe.modalRef&&ariaHidden(oe.modalRef,ce),ariaHiddenSiblings(me.container,oe.mount,oe.modalRef,me.hiddenSiblings,!1),this.containers.splice(pe,1);else{const ge=me.modals[me.modals.length-1];ge.modalRef&&ariaHidden(ge.modalRef,!1)}return ue}isTopModal(oe){return this.modals.length>0&&this.modals[this.modals.length-1]===oe}}function getContainer(ne){return typeof ne=="function"?ne():ne}function getHasTransition(ne){return ne?ne.props.hasOwnProperty("in"):!1}const defaultManager=new ModalManager;function useModal(ne){const{container:oe,disableEscapeKeyDown:ce=!1,disableScrollLock:ue=!1,manager:pe=defaultManager,closeAfterTransition:me=!1,onTransitionEnter:ge,onTransitionExited:ye,children:ve,onClose:xe,open:_e,rootRef:Se}=ne,$e=reactExports.useRef({}),Re=reactExports.useRef(null),Ae=reactExports.useRef(null),Ie=useForkRef(Ae,Se),[ke,Be]=reactExports.useState(!_e),Ne=getHasTransition(ve);let Fe=!0;(ne["aria-hidden"]==="false"||ne["aria-hidden"]===!1)&&(Fe=!1);const Ue=()=>ownerDocument(Re.current),We=()=>($e.current.modalRef=Ae.current,$e.current.mount=Re.current,$e.current),qe=()=>{pe.mount(We(),{disableScrollLock:ue}),Ae.current&&(Ae.current.scrollTop=0)},ze=useEventCallback(()=>{const Zt=getContainer(oe)||Ue().body;pe.add(We(),Zt),Ae.current&&qe()}),Ge=reactExports.useCallback(()=>pe.isTopModal(We()),[pe]),Ze=useEventCallback(Zt=>{Re.current=Zt,Zt&&(_e&&Ge()?qe():Ae.current&&ariaHidden(Ae.current,Fe))}),Dt=reactExports.useCallback(()=>{pe.remove(We(),Fe)},[Fe,pe]);reactExports.useEffect(()=>()=>{Dt()},[Dt]),reactExports.useEffect(()=>{_e?ze():(!Ne||!me)&&Dt()},[_e,Dt,Ne,me,ze]);const Je=Zt=>en=>{var Kt;(Kt=Zt.onKeyDown)==null||Kt.call(Zt,en),!(en.key!=="Escape"||en.which===229||!Ge())&&(ce||(en.stopPropagation(),xe&&xe(en,"escapeKeyDown")))},Ut=Zt=>en=>{var Kt;(Kt=Zt.onClick)==null||Kt.call(Zt,en),en.target===en.currentTarget&&xe&&xe(en,"backdropClick")};return{getRootProps:(Zt={})=>{const en=extractEventHandlers(ne);delete en.onTransitionEnter,delete en.onTransitionExited;const Kt=_extends$2({},en,Zt);return _extends$2({role:"presentation"},Kt,{onKeyDown:Je(Kt),ref:Ie})},getBackdropProps:(Zt={})=>{const en=Zt;return _extends$2({"aria-hidden":!0},en,{onClick:Ut(en),open:_e})},getTransitionProps:()=>{const Zt=()=>{Be(!1),ge&&ge()},en=()=>{Be(!0),ye&&ye(),me&&Dt()};return{onEnter:createChainedFunction(Zt,ve==null?void 0:ve.props.onEnter),onExited:createChainedFunction(en,ve==null?void 0:ve.props.onExited)}},rootRef:Ie,portalRef:Ze,isTopModal:Ge,exited:ke,hasTransition:Ne}}var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end$1="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(ne,oe){return ne.concat([oe+"-"+start,oe+"-"+end$1])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(ne,oe){return ne.concat([oe,oe+"-"+start,oe+"-"+end$1])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(ne){return ne?(ne.nodeName||"").toLowerCase():null}function getWindow(ne){if(ne==null)return window;if(ne.toString()!=="[object Window]"){var oe=ne.ownerDocument;return oe&&oe.defaultView||window}return ne}function isElement$3(ne){var oe=getWindow(ne).Element;return ne instanceof oe||ne instanceof Element}function isHTMLElement$2(ne){var oe=getWindow(ne).HTMLElement;return ne instanceof oe||ne instanceof HTMLElement}function isShadowRoot(ne){if(typeof ShadowRoot>"u")return!1;var oe=getWindow(ne).ShadowRoot;return ne instanceof oe||ne instanceof ShadowRoot}function applyStyles(ne){var oe=ne.state;Object.keys(oe.elements).forEach(function(ce){var ue=oe.styles[ce]||{},pe=oe.attributes[ce]||{},me=oe.elements[ce];!isHTMLElement$2(me)||!getNodeName(me)||(Object.assign(me.style,ue),Object.keys(pe).forEach(function(ge){var ye=pe[ge];ye===!1?me.removeAttribute(ge):me.setAttribute(ge,ye===!0?"":ye)}))})}function effect$2(ne){var oe=ne.state,ce={popper:{position:oe.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(oe.elements.popper.style,ce.popper),oe.styles=ce,oe.elements.arrow&&Object.assign(oe.elements.arrow.style,ce.arrow),function(){Object.keys(oe.elements).forEach(function(ue){var pe=oe.elements[ue],me=oe.attributes[ue]||{},ge=Object.keys(oe.styles.hasOwnProperty(ue)?oe.styles[ue]:ce[ue]),ye=ge.reduce(function(ve,xe){return ve[xe]="",ve},{});!isHTMLElement$2(pe)||!getNodeName(pe)||(Object.assign(pe.style,ye),Object.keys(me).forEach(function(ve){pe.removeAttribute(ve)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(ne){return ne.split("-")[0]}var max$6=Math.max,min$2=Math.min,round$3=Math.round;function getUAString(){var ne=navigator.userAgentData;return ne!=null&&ne.brands&&Array.isArray(ne.brands)?ne.brands.map(function(oe){return oe.brand+"/"+oe.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect$1(ne,oe,ce){oe===void 0&&(oe=!1),ce===void 0&&(ce=!1);var ue=ne.getBoundingClientRect(),pe=1,me=1;oe&&isHTMLElement$2(ne)&&(pe=ne.offsetWidth>0&&round$3(ue.width)/ne.offsetWidth||1,me=ne.offsetHeight>0&&round$3(ue.height)/ne.offsetHeight||1);var ge=isElement$3(ne)?getWindow(ne):window,ye=ge.visualViewport,ve=!isLayoutViewport()&&ce,xe=(ue.left+(ve&&ye?ye.offsetLeft:0))/pe,_e=(ue.top+(ve&&ye?ye.offsetTop:0))/me,Se=ue.width/pe,$e=ue.height/me;return{width:Se,height:$e,top:_e,right:xe+Se,bottom:_e+$e,left:xe,x:xe,y:_e}}function getLayoutRect(ne){var oe=getBoundingClientRect$1(ne),ce=ne.offsetWidth,ue=ne.offsetHeight;return Math.abs(oe.width-ce)<=1&&(ce=oe.width),Math.abs(oe.height-ue)<=1&&(ue=oe.height),{x:ne.offsetLeft,y:ne.offsetTop,width:ce,height:ue}}function contains$5(ne,oe){var ce=oe.getRootNode&&oe.getRootNode();if(ne.contains(oe))return!0;if(ce&&isShadowRoot(ce)){var ue=oe;do{if(ue&&ne.isSameNode(ue))return!0;ue=ue.parentNode||ue.host}while(ue)}return!1}function getComputedStyle$1(ne){return getWindow(ne).getComputedStyle(ne)}function isTableElement(ne){return["table","td","th"].indexOf(getNodeName(ne))>=0}function getDocumentElement$1(ne){return((isElement$3(ne)?ne.ownerDocument:ne.document)||window.document).documentElement}function getParentNode(ne){return getNodeName(ne)==="html"?ne:ne.assignedSlot||ne.parentNode||(isShadowRoot(ne)?ne.host:null)||getDocumentElement$1(ne)}function getTrueOffsetParent(ne){return!isHTMLElement$2(ne)||getComputedStyle$1(ne).position==="fixed"?null:ne.offsetParent}function getContainingBlock(ne){var oe=/firefox/i.test(getUAString()),ce=/Trident/i.test(getUAString());if(ce&&isHTMLElement$2(ne)){var ue=getComputedStyle$1(ne);if(ue.position==="fixed")return null}var pe=getParentNode(ne);for(isShadowRoot(pe)&&(pe=pe.host);isHTMLElement$2(pe)&&["html","body"].indexOf(getNodeName(pe))<0;){var me=getComputedStyle$1(pe);if(me.transform!=="none"||me.perspective!=="none"||me.contain==="paint"||["transform","perspective"].indexOf(me.willChange)!==-1||oe&&me.willChange==="filter"||oe&&me.filter&&me.filter!=="none")return pe;pe=pe.parentNode}return null}function getOffsetParent(ne){for(var oe=getWindow(ne),ce=getTrueOffsetParent(ne);ce&&isTableElement(ce)&&getComputedStyle$1(ce).position==="static";)ce=getTrueOffsetParent(ce);return ce&&(getNodeName(ce)==="html"||getNodeName(ce)==="body"&&getComputedStyle$1(ce).position==="static")?oe:ce||getContainingBlock(ne)||oe}function getMainAxisFromPlacement(ne){return["top","bottom"].indexOf(ne)>=0?"x":"y"}function within(ne,oe,ce){return max$6(ne,min$2(oe,ce))}function withinMaxClamp(ne,oe,ce){var ue=within(ne,oe,ce);return ue>ce?ce:ue}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(ne){return Object.assign({},getFreshSideObject(),ne)}function expandToHashMap(ne,oe){return oe.reduce(function(ce,ue){return ce[ue]=ne,ce},{})}var toPaddingObject=function(oe,ce){return oe=typeof oe=="function"?oe(Object.assign({},ce.rects,{placement:ce.placement})):oe,mergePaddingObject(typeof oe!="number"?oe:expandToHashMap(oe,basePlacements))};function arrow(ne){var oe,ce=ne.state,ue=ne.name,pe=ne.options,me=ce.elements.arrow,ge=ce.modifiersData.popperOffsets,ye=getBasePlacement(ce.placement),ve=getMainAxisFromPlacement(ye),xe=[left,right].indexOf(ye)>=0,_e=xe?"height":"width";if(!(!me||!ge)){var Se=toPaddingObject(pe.padding,ce),$e=getLayoutRect(me),Re=ve==="y"?top:left,Ae=ve==="y"?bottom:right,Ie=ce.rects.reference[_e]+ce.rects.reference[ve]-ge[ve]-ce.rects.popper[_e],ke=ge[ve]-ce.rects.reference[ve],Be=getOffsetParent(me),Ne=Be?ve==="y"?Be.clientHeight||0:Be.clientWidth||0:0,Fe=Ie/2-ke/2,Ue=Se[Re],We=Ne-$e[_e]-Se[Ae],qe=Ne/2-$e[_e]/2+Fe,ze=within(Ue,qe,We),Ge=ve;ce.modifiersData[ue]=(oe={},oe[Ge]=ze,oe.centerOffset=ze-qe,oe)}}function effect$1(ne){var oe=ne.state,ce=ne.options,ue=ce.element,pe=ue===void 0?"[data-popper-arrow]":ue;pe!=null&&(typeof pe=="string"&&(pe=oe.elements.popper.querySelector(pe),!pe)||contains$5(oe.elements.popper,pe)&&(oe.elements.arrow=pe))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(ne){return ne.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(ne,oe){var ce=ne.x,ue=ne.y,pe=oe.devicePixelRatio||1;return{x:round$3(ce*pe)/pe||0,y:round$3(ue*pe)/pe||0}}function mapToStyles(ne){var oe,ce=ne.popper,ue=ne.popperRect,pe=ne.placement,me=ne.variation,ge=ne.offsets,ye=ne.position,ve=ne.gpuAcceleration,xe=ne.adaptive,_e=ne.roundOffsets,Se=ne.isFixed,$e=ge.x,Re=$e===void 0?0:$e,Ae=ge.y,Ie=Ae===void 0?0:Ae,ke=typeof _e=="function"?_e({x:Re,y:Ie}):{x:Re,y:Ie};Re=ke.x,Ie=ke.y;var Be=ge.hasOwnProperty("x"),Ne=ge.hasOwnProperty("y"),Fe=left,Ue=top,We=window;if(xe){var qe=getOffsetParent(ce),ze="clientHeight",Ge="clientWidth";if(qe===getWindow(ce)&&(qe=getDocumentElement$1(ce),getComputedStyle$1(qe).position!=="static"&&ye==="absolute"&&(ze="scrollHeight",Ge="scrollWidth")),qe=qe,pe===top||(pe===left||pe===right)&&me===end$1){Ue=bottom;var Ze=Se&&qe===We&&We.visualViewport?We.visualViewport.height:qe[ze];Ie-=Ze-ue.height,Ie*=ve?1:-1}if(pe===left||(pe===top||pe===bottom)&&me===end$1){Fe=right;var Dt=Se&&qe===We&&We.visualViewport?We.visualViewport.width:qe[Ge];Re-=Dt-ue.width,Re*=ve?1:-1}}var Je=Object.assign({position:ye},xe&&unsetSides),Ut=_e===!0?roundOffsetsByDPR({x:Re,y:Ie},getWindow(ce)):{x:Re,y:Ie};if(Re=Ut.x,Ie=Ut.y,ve){var jt;return Object.assign({},Je,(jt={},jt[Ue]=Ne?"0":"",jt[Fe]=Be?"0":"",jt.transform=(We.devicePixelRatio||1)<=1?"translate("+Re+"px, "+Ie+"px)":"translate3d("+Re+"px, "+Ie+"px, 0)",jt))}return Object.assign({},Je,(oe={},oe[Ue]=Ne?Ie+"px":"",oe[Fe]=Be?Re+"px":"",oe.transform="",oe))}function computeStyles(ne){var oe=ne.state,ce=ne.options,ue=ce.gpuAcceleration,pe=ue===void 0?!0:ue,me=ce.adaptive,ge=me===void 0?!0:me,ye=ce.roundOffsets,ve=ye===void 0?!0:ye,xe={placement:getBasePlacement(oe.placement),variation:getVariation(oe.placement),popper:oe.elements.popper,popperRect:oe.rects.popper,gpuAcceleration:pe,isFixed:oe.options.strategy==="fixed"};oe.modifiersData.popperOffsets!=null&&(oe.styles.popper=Object.assign({},oe.styles.popper,mapToStyles(Object.assign({},xe,{offsets:oe.modifiersData.popperOffsets,position:oe.options.strategy,adaptive:ge,roundOffsets:ve})))),oe.modifiersData.arrow!=null&&(oe.styles.arrow=Object.assign({},oe.styles.arrow,mapToStyles(Object.assign({},xe,{offsets:oe.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ve})))),oe.attributes.popper=Object.assign({},oe.attributes.popper,{"data-popper-placement":oe.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(ne){var oe=ne.state,ce=ne.instance,ue=ne.options,pe=ue.scroll,me=pe===void 0?!0:pe,ge=ue.resize,ye=ge===void 0?!0:ge,ve=getWindow(oe.elements.popper),xe=[].concat(oe.scrollParents.reference,oe.scrollParents.popper);return me&&xe.forEach(function(_e){_e.addEventListener("scroll",ce.update,passive)}),ye&&ve.addEventListener("resize",ce.update,passive),function(){me&&xe.forEach(function(_e){_e.removeEventListener("scroll",ce.update,passive)}),ye&&ve.removeEventListener("resize",ce.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$3={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(ne){return ne.replace(/left|right|bottom|top/g,function(oe){return hash$3[oe]})}var hash$2={start:"end",end:"start"};function getOppositeVariationPlacement(ne){return ne.replace(/start|end/g,function(oe){return hash$2[oe]})}function getWindowScroll$2(ne){var oe=getWindow(ne),ce=oe.pageXOffset,ue=oe.pageYOffset;return{scrollLeft:ce,scrollTop:ue}}function getWindowScrollBarX(ne){return getBoundingClientRect$1(getDocumentElement$1(ne)).left+getWindowScroll$2(ne).scrollLeft}function getViewportRect(ne,oe){var ce=getWindow(ne),ue=getDocumentElement$1(ne),pe=ce.visualViewport,me=ue.clientWidth,ge=ue.clientHeight,ye=0,ve=0;if(pe){me=pe.width,ge=pe.height;var xe=isLayoutViewport();(xe||!xe&&oe==="fixed")&&(ye=pe.offsetLeft,ve=pe.offsetTop)}return{width:me,height:ge,x:ye+getWindowScrollBarX(ne),y:ve}}function getDocumentRect(ne){var oe,ce=getDocumentElement$1(ne),ue=getWindowScroll$2(ne),pe=(oe=ne.ownerDocument)==null?void 0:oe.body,me=max$6(ce.scrollWidth,ce.clientWidth,pe?pe.scrollWidth:0,pe?pe.clientWidth:0),ge=max$6(ce.scrollHeight,ce.clientHeight,pe?pe.scrollHeight:0,pe?pe.clientHeight:0),ye=-ue.scrollLeft+getWindowScrollBarX(ne),ve=-ue.scrollTop;return getComputedStyle$1(pe||ce).direction==="rtl"&&(ye+=max$6(ce.clientWidth,pe?pe.clientWidth:0)-me),{width:me,height:ge,x:ye,y:ve}}function isScrollParent(ne){var oe=getComputedStyle$1(ne),ce=oe.overflow,ue=oe.overflowX,pe=oe.overflowY;return/auto|scroll|overlay|hidden/.test(ce+pe+ue)}function getScrollParent(ne){return["html","body","#document"].indexOf(getNodeName(ne))>=0?ne.ownerDocument.body:isHTMLElement$2(ne)&&isScrollParent(ne)?ne:getScrollParent(getParentNode(ne))}function listScrollParents(ne,oe){var ce;oe===void 0&&(oe=[]);var ue=getScrollParent(ne),pe=ue===((ce=ne.ownerDocument)==null?void 0:ce.body),me=getWindow(ue),ge=pe?[me].concat(me.visualViewport||[],isScrollParent(ue)?ue:[]):ue,ye=oe.concat(ge);return pe?ye:ye.concat(listScrollParents(getParentNode(ge)))}function rectToClientRect(ne){return Object.assign({},ne,{left:ne.x,top:ne.y,right:ne.x+ne.width,bottom:ne.y+ne.height})}function getInnerBoundingClientRect(ne,oe){var ce=getBoundingClientRect$1(ne,!1,oe==="fixed");return ce.top=ce.top+ne.clientTop,ce.left=ce.left+ne.clientLeft,ce.bottom=ce.top+ne.clientHeight,ce.right=ce.left+ne.clientWidth,ce.width=ne.clientWidth,ce.height=ne.clientHeight,ce.x=ce.left,ce.y=ce.top,ce}function getClientRectFromMixedType(ne,oe,ce){return oe===viewport?rectToClientRect(getViewportRect(ne,ce)):isElement$3(oe)?getInnerBoundingClientRect(oe,ce):rectToClientRect(getDocumentRect(getDocumentElement$1(ne)))}function getClippingParents(ne){var oe=listScrollParents(getParentNode(ne)),ce=["absolute","fixed"].indexOf(getComputedStyle$1(ne).position)>=0,ue=ce&&isHTMLElement$2(ne)?getOffsetParent(ne):ne;return isElement$3(ue)?oe.filter(function(pe){return isElement$3(pe)&&contains$5(pe,ue)&&getNodeName(pe)!=="body"}):[]}function getClippingRect(ne,oe,ce,ue){var pe=oe==="clippingParents"?getClippingParents(ne):[].concat(oe),me=[].concat(pe,[ce]),ge=me[0],ye=me.reduce(function(ve,xe){var _e=getClientRectFromMixedType(ne,xe,ue);return ve.top=max$6(_e.top,ve.top),ve.right=min$2(_e.right,ve.right),ve.bottom=min$2(_e.bottom,ve.bottom),ve.left=max$6(_e.left,ve.left),ve},getClientRectFromMixedType(ne,ge,ue));return ye.width=ye.right-ye.left,ye.height=ye.bottom-ye.top,ye.x=ye.left,ye.y=ye.top,ye}function computeOffsets(ne){var oe=ne.reference,ce=ne.element,ue=ne.placement,pe=ue?getBasePlacement(ue):null,me=ue?getVariation(ue):null,ge=oe.x+oe.width/2-ce.width/2,ye=oe.y+oe.height/2-ce.height/2,ve;switch(pe){case top:ve={x:ge,y:oe.y-ce.height};break;case bottom:ve={x:ge,y:oe.y+oe.height};break;case right:ve={x:oe.x+oe.width,y:ye};break;case left:ve={x:oe.x-ce.width,y:ye};break;default:ve={x:oe.x,y:oe.y}}var xe=pe?getMainAxisFromPlacement(pe):null;if(xe!=null){var _e=xe==="y"?"height":"width";switch(me){case start:ve[xe]=ve[xe]-(oe[_e]/2-ce[_e]/2);break;case end$1:ve[xe]=ve[xe]+(oe[_e]/2-ce[_e]/2);break}}return ve}function detectOverflow(ne,oe){oe===void 0&&(oe={});var ce=oe,ue=ce.placement,pe=ue===void 0?ne.placement:ue,me=ce.strategy,ge=me===void 0?ne.strategy:me,ye=ce.boundary,ve=ye===void 0?clippingParents:ye,xe=ce.rootBoundary,_e=xe===void 0?viewport:xe,Se=ce.elementContext,$e=Se===void 0?popper:Se,Re=ce.altBoundary,Ae=Re===void 0?!1:Re,Ie=ce.padding,ke=Ie===void 0?0:Ie,Be=mergePaddingObject(typeof ke!="number"?ke:expandToHashMap(ke,basePlacements)),Ne=$e===popper?reference:popper,Fe=ne.rects.popper,Ue=ne.elements[Ae?Ne:$e],We=getClippingRect(isElement$3(Ue)?Ue:Ue.contextElement||getDocumentElement$1(ne.elements.popper),ve,_e,ge),qe=getBoundingClientRect$1(ne.elements.reference),ze=computeOffsets({reference:qe,element:Fe,strategy:"absolute",placement:pe}),Ge=rectToClientRect(Object.assign({},Fe,ze)),Ze=$e===popper?Ge:qe,Dt={top:We.top-Ze.top+Be.top,bottom:Ze.bottom-We.bottom+Be.bottom,left:We.left-Ze.left+Be.left,right:Ze.right-We.right+Be.right},Je=ne.modifiersData.offset;if($e===popper&&Je){var Ut=Je[pe];Object.keys(Dt).forEach(function(jt){var Ke=[right,bottom].indexOf(jt)>=0?1:-1,an=[top,bottom].indexOf(jt)>=0?"y":"x";Dt[jt]+=Ut[an]*Ke})}return Dt}function computeAutoPlacement(ne,oe){oe===void 0&&(oe={});var ce=oe,ue=ce.placement,pe=ce.boundary,me=ce.rootBoundary,ge=ce.padding,ye=ce.flipVariations,ve=ce.allowedAutoPlacements,xe=ve===void 0?placements:ve,_e=getVariation(ue),Se=_e?ye?variationPlacements:variationPlacements.filter(function(Ae){return getVariation(Ae)===_e}):basePlacements,$e=Se.filter(function(Ae){return xe.indexOf(Ae)>=0});$e.length===0&&($e=Se);var Re=$e.reduce(function(Ae,Ie){return Ae[Ie]=detectOverflow(ne,{placement:Ie,boundary:pe,rootBoundary:me,padding:ge})[getBasePlacement(Ie)],Ae},{});return Object.keys(Re).sort(function(Ae,Ie){return Re[Ae]-Re[Ie]})}function getExpandedFallbackPlacements(ne){if(getBasePlacement(ne)===auto)return[];var oe=getOppositePlacement(ne);return[getOppositeVariationPlacement(ne),oe,getOppositeVariationPlacement(oe)]}function flip(ne){var oe=ne.state,ce=ne.options,ue=ne.name;if(!oe.modifiersData[ue]._skip){for(var pe=ce.mainAxis,me=pe===void 0?!0:pe,ge=ce.altAxis,ye=ge===void 0?!0:ge,ve=ce.fallbackPlacements,xe=ce.padding,_e=ce.boundary,Se=ce.rootBoundary,$e=ce.altBoundary,Re=ce.flipVariations,Ae=Re===void 0?!0:Re,Ie=ce.allowedAutoPlacements,ke=oe.options.placement,Be=getBasePlacement(ke),Ne=Be===ke,Fe=ve||(Ne||!Ae?[getOppositePlacement(ke)]:getExpandedFallbackPlacements(ke)),Ue=[ke].concat(Fe).reduce(function(Sn,Cn){return Sn.concat(getBasePlacement(Cn)===auto?computeAutoPlacement(oe,{placement:Cn,boundary:_e,rootBoundary:Se,padding:xe,flipVariations:Ae,allowedAutoPlacements:Ie}):Cn)},[]),We=oe.rects.reference,qe=oe.rects.popper,ze=new Map,Ge=!0,Ze=Ue[0],Dt=0;Dt=0,an=Ke?"width":"height",Zt=detectOverflow(oe,{placement:Je,boundary:_e,rootBoundary:Se,altBoundary:$e,padding:xe}),en=Ke?jt?right:left:jt?bottom:top;We[an]>qe[an]&&(en=getOppositePlacement(en));var Kt=getOppositePlacement(en),Wt=[];if(me&&Wt.push(Zt[Ut]<=0),ye&&Wt.push(Zt[en]<=0,Zt[Kt]<=0),Wt.every(function(Sn){return Sn})){Ze=Je,Ge=!1;break}ze.set(Je,Wt)}if(Ge)for(var un=Ae?3:1,Xt=function(Cn){var Nt=Ue.find(function(Yt){var Jt=ze.get(Yt);if(Jt)return Jt.slice(0,Cn).every(function(hn){return hn})});if(Nt)return Ze=Nt,"break"},nn=un;nn>0;nn--){var vn=Xt(nn);if(vn==="break")break}oe.placement!==Ze&&(oe.modifiersData[ue]._skip=!0,oe.placement=Ze,oe.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(ne,oe,ce){return ce===void 0&&(ce={x:0,y:0}),{top:ne.top-oe.height-ce.y,right:ne.right-oe.width+ce.x,bottom:ne.bottom-oe.height+ce.y,left:ne.left-oe.width-ce.x}}function isAnySideFullyClipped(ne){return[top,right,bottom,left].some(function(oe){return ne[oe]>=0})}function hide(ne){var oe=ne.state,ce=ne.name,ue=oe.rects.reference,pe=oe.rects.popper,me=oe.modifiersData.preventOverflow,ge=detectOverflow(oe,{elementContext:"reference"}),ye=detectOverflow(oe,{altBoundary:!0}),ve=getSideOffsets(ge,ue),xe=getSideOffsets(ye,pe,me),_e=isAnySideFullyClipped(ve),Se=isAnySideFullyClipped(xe);oe.modifiersData[ce]={referenceClippingOffsets:ve,popperEscapeOffsets:xe,isReferenceHidden:_e,hasPopperEscaped:Se},oe.attributes.popper=Object.assign({},oe.attributes.popper,{"data-popper-reference-hidden":_e,"data-popper-escaped":Se})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(ne,oe,ce){var ue=getBasePlacement(ne),pe=[left,top].indexOf(ue)>=0?-1:1,me=typeof ce=="function"?ce(Object.assign({},oe,{placement:ne})):ce,ge=me[0],ye=me[1];return ge=ge||0,ye=(ye||0)*pe,[left,right].indexOf(ue)>=0?{x:ye,y:ge}:{x:ge,y:ye}}function offset$1(ne){var oe=ne.state,ce=ne.options,ue=ne.name,pe=ce.offset,me=pe===void 0?[0,0]:pe,ge=placements.reduce(function(_e,Se){return _e[Se]=distanceAndSkiddingToXY(Se,oe.rects,me),_e},{}),ye=ge[oe.placement],ve=ye.x,xe=ye.y;oe.modifiersData.popperOffsets!=null&&(oe.modifiersData.popperOffsets.x+=ve,oe.modifiersData.popperOffsets.y+=xe),oe.modifiersData[ue]=ge}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(ne){var oe=ne.state,ce=ne.name;oe.modifiersData[ce]=computeOffsets({reference:oe.rects.reference,element:oe.rects.popper,strategy:"absolute",placement:oe.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(ne){return ne==="x"?"y":"x"}function preventOverflow(ne){var oe=ne.state,ce=ne.options,ue=ne.name,pe=ce.mainAxis,me=pe===void 0?!0:pe,ge=ce.altAxis,ye=ge===void 0?!1:ge,ve=ce.boundary,xe=ce.rootBoundary,_e=ce.altBoundary,Se=ce.padding,$e=ce.tether,Re=$e===void 0?!0:$e,Ae=ce.tetherOffset,Ie=Ae===void 0?0:Ae,ke=detectOverflow(oe,{boundary:ve,rootBoundary:xe,padding:Se,altBoundary:_e}),Be=getBasePlacement(oe.placement),Ne=getVariation(oe.placement),Fe=!Ne,Ue=getMainAxisFromPlacement(Be),We=getAltAxis(Ue),qe=oe.modifiersData.popperOffsets,ze=oe.rects.reference,Ge=oe.rects.popper,Ze=typeof Ie=="function"?Ie(Object.assign({},oe.rects,{placement:oe.placement})):Ie,Dt=typeof Ze=="number"?{mainAxis:Ze,altAxis:Ze}:Object.assign({mainAxis:0,altAxis:0},Ze),Je=oe.modifiersData.offset?oe.modifiersData.offset[oe.placement]:null,Ut={x:0,y:0};if(qe){if(me){var jt,Ke=Ue==="y"?top:left,an=Ue==="y"?bottom:right,Zt=Ue==="y"?"height":"width",en=qe[Ue],Kt=en+ke[Ke],Wt=en-ke[an],un=Re?-Ge[Zt]/2:0,Xt=Ne===start?ze[Zt]:Ge[Zt],nn=Ne===start?-Ge[Zt]:-ze[Zt],vn=oe.elements.arrow,Sn=Re&&vn?getLayoutRect(vn):{width:0,height:0},Cn=oe.modifiersData["arrow#persistent"]?oe.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Nt=Cn[Ke],Yt=Cn[an],Jt=within(0,ze[Zt],Sn[Zt]),hn=Fe?ze[Zt]/2-un-Jt-Nt-Dt.mainAxis:Xt-Jt-Nt-Dt.mainAxis,Ye=Fe?-ze[Zt]/2+un+Jt+Yt+Dt.mainAxis:nn+Jt+Yt+Dt.mainAxis,Xe=oe.elements.arrow&&getOffsetParent(oe.elements.arrow),Pt=Xe?Ue==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,sn=(jt=Je==null?void 0:Je[Ue])!=null?jt:0,yn=en+hn-sn-Pt,qt=en+Ye-sn,wn=within(Re?min$2(Kt,yn):Kt,en,Re?max$6(Wt,qt):Wt);qe[Ue]=wn,Ut[Ue]=wn-en}if(ye){var Tn,xn=Ue==="x"?top:left,Nn=Ue==="x"?bottom:right,zn=qe[We],Yn=We==="y"?"height":"width",Kn=zn+ke[xn],Rn=zn-ke[Nn],Mn=[top,left].indexOf(Be)!==-1,Xn=(Tn=Je==null?void 0:Je[We])!=null?Tn:0,Jn=Mn?Kn:zn-ze[Yn]-Ge[Yn]-Xn+Dt.altAxis,pn=Mn?zn+ze[Yn]+Ge[Yn]-Xn-Dt.altAxis:Rn,tn=Re&&Mn?withinMaxClamp(Jn,zn,pn):within(Re?Jn:Kn,zn,Re?pn:Rn);qe[We]=tn,Ut[We]=tn-zn}oe.modifiersData[ue]=Ut}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(ne){return{scrollLeft:ne.scrollLeft,scrollTop:ne.scrollTop}}function getNodeScroll(ne){return ne===getWindow(ne)||!isHTMLElement$2(ne)?getWindowScroll$2(ne):getHTMLElementScroll(ne)}function isElementScaled(ne){var oe=ne.getBoundingClientRect(),ce=round$3(oe.width)/ne.offsetWidth||1,ue=round$3(oe.height)/ne.offsetHeight||1;return ce!==1||ue!==1}function getCompositeRect(ne,oe,ce){ce===void 0&&(ce=!1);var ue=isHTMLElement$2(oe),pe=isHTMLElement$2(oe)&&isElementScaled(oe),me=getDocumentElement$1(oe),ge=getBoundingClientRect$1(ne,pe,ce),ye={scrollLeft:0,scrollTop:0},ve={x:0,y:0};return(ue||!ue&&!ce)&&((getNodeName(oe)!=="body"||isScrollParent(me))&&(ye=getNodeScroll(oe)),isHTMLElement$2(oe)?(ve=getBoundingClientRect$1(oe,!0),ve.x+=oe.clientLeft,ve.y+=oe.clientTop):me&&(ve.x=getWindowScrollBarX(me))),{x:ge.left+ye.scrollLeft-ve.x,y:ge.top+ye.scrollTop-ve.y,width:ge.width,height:ge.height}}function order(ne){var oe=new Map,ce=new Set,ue=[];ne.forEach(function(me){oe.set(me.name,me)});function pe(me){ce.add(me.name);var ge=[].concat(me.requires||[],me.requiresIfExists||[]);ge.forEach(function(ye){if(!ce.has(ye)){var ve=oe.get(ye);ve&&pe(ve)}}),ue.push(me)}return ne.forEach(function(me){ce.has(me.name)||pe(me)}),ue}function orderModifiers(ne){var oe=order(ne);return modifierPhases.reduce(function(ce,ue){return ce.concat(oe.filter(function(pe){return pe.phase===ue}))},[])}function debounce$1(ne){var oe;return function(){return oe||(oe=new Promise(function(ce){Promise.resolve().then(function(){oe=void 0,ce(ne())})})),oe}}function mergeByName(ne){var oe=ne.reduce(function(ce,ue){var pe=ce[ue.name];return ce[ue.name]=pe?Object.assign({},pe,ue,{options:Object.assign({},pe.options,ue.options),data:Object.assign({},pe.data,ue.data)}):ue,ce},{});return Object.keys(oe).map(function(ce){return oe[ce]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var ne=arguments.length,oe=new Array(ne),ce=0;cecomposeClasses$1({root:["root"]},useClassNamesOverride(getPopperUtilityClass)),defaultPopperOptions={},PopperTooltip=reactExports.forwardRef(function(oe,ce){var ue;const{anchorEl:pe,children:me,direction:ge,disablePortal:ye,modifiers:ve,open:xe,placement:_e,popperOptions:Se,popperRef:$e,slotProps:Re={},slots:Ae={},TransitionProps:Ie}=oe,ke=_objectWithoutPropertiesLoose$2(oe,_excluded$X),Be=reactExports.useRef(null),Ne=useForkRef(Be,ce),Fe=reactExports.useRef(null),Ue=useForkRef(Fe,$e),We=reactExports.useRef(Ue);useEnhancedEffect$1(()=>{We.current=Ue},[Ue]),reactExports.useImperativeHandle($e,()=>Fe.current,[]);const qe=flipPlacement(_e,ge),[ze,Ge]=reactExports.useState(qe),[Ze,Dt]=reactExports.useState(resolveAnchorEl$1(pe));reactExports.useEffect(()=>{Fe.current&&Fe.current.forceUpdate()}),reactExports.useEffect(()=>{pe&&Dt(resolveAnchorEl$1(pe))},[pe]),useEnhancedEffect$1(()=>{if(!Ze||!xe)return;const an=Kt=>{Ge(Kt.placement)};let Zt=[{name:"preventOverflow",options:{altBoundary:ye}},{name:"flip",options:{altBoundary:ye}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:Kt})=>{an(Kt)}}];ve!=null&&(Zt=Zt.concat(ve)),Se&&Se.modifiers!=null&&(Zt=Zt.concat(Se.modifiers));const en=createPopper(Ze,Be.current,_extends$2({placement:qe},Se,{modifiers:Zt}));return We.current(en),()=>{en.destroy(),We.current(null)}},[Ze,ye,ve,xe,Se,qe]);const Je={placement:ze};Ie!==null&&(Je.TransitionProps=Ie);const Ut=useUtilityClasses$N(),jt=(ue=Ae.root)!=null?ue:"div",Ke=useSlotProps({elementType:jt,externalSlotProps:Re.root,externalForwardedProps:ke,additionalProps:{role:"tooltip",ref:Ne},ownerState:oe,className:Ut.root});return jsxRuntimeExports.jsx(jt,_extends$2({},Ke,{children:typeof me=="function"?me(Je):me}))}),Popper$2=reactExports.forwardRef(function(oe,ce){const{anchorEl:ue,children:pe,container:me,direction:ge="ltr",disablePortal:ye=!1,keepMounted:ve=!1,modifiers:xe,open:_e,placement:Se="bottom",popperOptions:$e=defaultPopperOptions,popperRef:Re,style:Ae,transition:Ie=!1,slotProps:ke={},slots:Be={}}=oe,Ne=_objectWithoutPropertiesLoose$2(oe,_excluded2$5),[Fe,Ue]=reactExports.useState(!0),We=()=>{Ue(!1)},qe=()=>{Ue(!0)};if(!ve&&!_e&&(!Ie||Fe))return null;let ze;if(me)ze=me;else if(ue){const Dt=resolveAnchorEl$1(ue);ze=Dt&&isHTMLElement$1(Dt)?ownerDocument(Dt).body:ownerDocument(null).body}const Ge=!_e&&ve&&(!Ie||Fe)?"none":void 0,Ze=Ie?{in:_e,onEnter:We,onExited:qe}:void 0;return jsxRuntimeExports.jsx(Portal,{disablePortal:ye,container:ze,children:jsxRuntimeExports.jsx(PopperTooltip,_extends$2({anchorEl:ue,direction:ge,disablePortal:ye,modifiers:xe,ref:ce,open:Ie?!Fe:_e,placement:Se,popperOptions:$e,popperRef:Re,slotProps:ke,slots:Be},Ne,{style:_extends$2({position:"fixed",top:0,left:0,display:Ge},Ae),TransitionProps:Ze,children:pe}))})}),INTENTIONAL_DRAG_COUNT_THRESHOLD=2;function asc(ne,oe){return ne-oe}function findClosest(ne,oe){var ce;const{index:ue}=(ce=ne.reduce((pe,me,ge)=>{const ye=Math.abs(oe-me);return pe===null||ye({left:`${ne}%`}),leap:ne=>({width:`${ne}%`})},"horizontal-reverse":{offset:ne=>({right:`${ne}%`}),leap:ne=>({width:`${ne}%`})},vertical:{offset:ne=>({bottom:`${ne}%`}),leap:ne=>({height:`${ne}%`})}},Identity$1=ne=>ne;let cachedSupportsTouchActionNone;function doesSupportTouchActionNone(){return cachedSupportsTouchActionNone===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?cachedSupportsTouchActionNone=CSS.supports("touch-action","none"):cachedSupportsTouchActionNone=!0),cachedSupportsTouchActionNone}function useSlider(ne){const{"aria-labelledby":oe,defaultValue:ce,disabled:ue=!1,disableSwap:pe=!1,isRtl:me=!1,marks:ge=!1,max:ye=100,min:ve=0,name:xe,onChange:_e,onChangeCommitted:Se,orientation:$e="horizontal",rootRef:Re,scale:Ae=Identity$1,step:Ie=1,shiftStep:ke=10,tabIndex:Be,value:Ne}=ne,Fe=reactExports.useRef(),[Ue,We]=reactExports.useState(-1),[qe,ze]=reactExports.useState(-1),[Ge,Ze]=reactExports.useState(!1),Dt=reactExports.useRef(0),[Je,Ut]=useControlled({controlled:Ne,default:ce??ve,name:"Slider"}),jt=_e&&((tn,Gt,bn)=>{const kn=tn.nativeEvent||tn,jn=new kn.constructor(kn.type,kn);Object.defineProperty(jn,"target",{writable:!0,value:{value:Gt,name:xe}}),_e(jn,Gt,bn)}),Ke=Array.isArray(Je);let an=Ke?Je.slice().sort(asc):[Je];an=an.map(tn=>tn==null?ve:clamp$3(tn,ve,ye));const Zt=ge===!0&&Ie!==null?[...Array(Math.floor((ye-ve)/Ie)+1)].map((tn,Gt)=>({value:ve+Ie*Gt})):ge||[],en=Zt.map(tn=>tn.value),{isFocusVisibleRef:Kt,onBlur:Wt,onFocus:un,ref:Xt}=useIsFocusVisible(),[nn,vn]=reactExports.useState(-1),Sn=reactExports.useRef(),Cn=useForkRef(Xt,Sn),Nt=useForkRef(Re,Cn),Yt=tn=>Gt=>{var bn;const kn=Number(Gt.currentTarget.getAttribute("data-index"));un(Gt),Kt.current===!0&&vn(kn),ze(kn),tn==null||(bn=tn.onFocus)==null||bn.call(tn,Gt)},Jt=tn=>Gt=>{var bn;Wt(Gt),Kt.current===!1&&vn(-1),ze(-1),tn==null||(bn=tn.onBlur)==null||bn.call(tn,Gt)},hn=(tn,Gt)=>{const bn=Number(tn.currentTarget.getAttribute("data-index")),kn=an[bn],jn=en.indexOf(kn);let Wn=Gt;if(Zt&&Ie==null){const dn=en[en.length-1];Wn>dn?Wn=dn:WnGt=>{var bn;if(Ie!==null){const kn=Number(Gt.currentTarget.getAttribute("data-index")),jn=an[kn];let Wn=null;(Gt.key==="ArrowLeft"||Gt.key==="ArrowDown")&&Gt.shiftKey||Gt.key==="PageDown"?Wn=Math.max(jn-ke,ve):((Gt.key==="ArrowRight"||Gt.key==="ArrowUp")&&Gt.shiftKey||Gt.key==="PageUp")&&(Wn=Math.min(jn+ke,ye)),Wn!==null&&(hn(Gt,Wn),Gt.preventDefault())}tn==null||(bn=tn.onKeyDown)==null||bn.call(tn,Gt)};useEnhancedEffect$1(()=>{if(ue&&Sn.current.contains(document.activeElement)){var tn;(tn=document.activeElement)==null||tn.blur()}},[ue]),ue&&Ue!==-1&&We(-1),ue&&nn!==-1&&vn(-1);const Xe=tn=>Gt=>{var bn;(bn=tn.onChange)==null||bn.call(tn,Gt),hn(Gt,Gt.target.valueAsNumber)},Pt=reactExports.useRef();let sn=$e;me&&$e==="horizontal"&&(sn+="-reverse");const yn=({finger:tn,move:Gt=!1})=>{const{current:bn}=Sn,{width:kn,height:jn,bottom:Wn,left:dn}=bn.getBoundingClientRect();let Bn;sn.indexOf("vertical")===0?Bn=(Wn-tn.y)/jn:Bn=(tn.x-dn)/kn,sn.indexOf("-reverse")!==-1&&(Bn=1-Bn);let mn;if(mn=percentToValue(Bn,ve,ye),Ie)mn=roundValueToStep(mn,Ie,ve);else{const ur=findClosest(en,mn);mn=en[ur]}mn=clamp$3(mn,ve,ye);let Pn=0;if(Ke){Gt?Pn=Pt.current:Pn=findClosest(an,mn),pe&&(mn=clamp$3(mn,an[Pn-1]||-1/0,an[Pn+1]||1/0));const ur=mn;mn=setValueIndex({values:an,newValue:mn,index:Pn}),pe&&Gt||(Pn=mn.indexOf(ur),Pt.current=Pn)}return{newValue:mn,activeIndex:Pn}},qt=useEventCallback(tn=>{const Gt=trackFinger(tn,Fe);if(!Gt)return;if(Dt.current+=1,tn.type==="mousemove"&&tn.buttons===0){wn(tn);return}const{newValue:bn,activeIndex:kn}=yn({finger:Gt,move:!0});focusThumb({sliderRef:Sn,activeIndex:kn,setActive:We}),Ut(bn),!Ge&&Dt.current>INTENTIONAL_DRAG_COUNT_THRESHOLD&&Ze(!0),jt&&!areValuesEqual(bn,Je)&&jt(tn,bn,kn)}),wn=useEventCallback(tn=>{const Gt=trackFinger(tn,Fe);if(Ze(!1),!Gt)return;const{newValue:bn}=yn({finger:Gt,move:!0});We(-1),tn.type==="touchend"&&ze(-1),Se&&Se(tn,bn),Fe.current=void 0,xn()}),Tn=useEventCallback(tn=>{if(ue)return;doesSupportTouchActionNone()||tn.preventDefault();const Gt=tn.changedTouches[0];Gt!=null&&(Fe.current=Gt.identifier);const bn=trackFinger(tn,Fe);if(bn!==!1){const{newValue:jn,activeIndex:Wn}=yn({finger:bn});focusThumb({sliderRef:Sn,activeIndex:Wn,setActive:We}),Ut(jn),jt&&!areValuesEqual(jn,Je)&&jt(tn,jn,Wn)}Dt.current=0;const kn=ownerDocument(Sn.current);kn.addEventListener("touchmove",qt,{passive:!0}),kn.addEventListener("touchend",wn,{passive:!0})}),xn=reactExports.useCallback(()=>{const tn=ownerDocument(Sn.current);tn.removeEventListener("mousemove",qt),tn.removeEventListener("mouseup",wn),tn.removeEventListener("touchmove",qt),tn.removeEventListener("touchend",wn)},[wn,qt]);reactExports.useEffect(()=>{const{current:tn}=Sn;return tn.addEventListener("touchstart",Tn,{passive:doesSupportTouchActionNone()}),()=>{tn.removeEventListener("touchstart",Tn),xn()}},[xn,Tn]),reactExports.useEffect(()=>{ue&&xn()},[ue,xn]);const Nn=tn=>Gt=>{var bn;if((bn=tn.onMouseDown)==null||bn.call(tn,Gt),ue||Gt.defaultPrevented||Gt.button!==0)return;Gt.preventDefault();const kn=trackFinger(Gt,Fe);if(kn!==!1){const{newValue:Wn,activeIndex:dn}=yn({finger:kn});focusThumb({sliderRef:Sn,activeIndex:dn,setActive:We}),Ut(Wn),jt&&!areValuesEqual(Wn,Je)&&jt(Gt,Wn,dn)}Dt.current=0;const jn=ownerDocument(Sn.current);jn.addEventListener("mousemove",qt,{passive:!0}),jn.addEventListener("mouseup",wn)},zn=valueToPercent(Ke?an[0]:ve,ve,ye),Yn=valueToPercent(an[an.length-1],ve,ye)-zn,Kn=(tn={})=>{const Gt=extractEventHandlers(tn),bn={onMouseDown:Nn(Gt||{})},kn=_extends$2({},Gt,bn);return _extends$2({},tn,{ref:Nt},kn)},Rn=tn=>Gt=>{var bn;(bn=tn.onMouseOver)==null||bn.call(tn,Gt);const kn=Number(Gt.currentTarget.getAttribute("data-index"));ze(kn)},Mn=tn=>Gt=>{var bn;(bn=tn.onMouseLeave)==null||bn.call(tn,Gt),ze(-1)};return{active:Ue,axis:sn,axisProps,dragging:Ge,focusedThumbIndex:nn,getHiddenInputProps:(tn={})=>{var Gt;const bn=extractEventHandlers(tn),kn={onChange:Xe(bn||{}),onFocus:Yt(bn||{}),onBlur:Jt(bn||{}),onKeyDown:Ye(bn||{})},jn=_extends$2({},bn,kn);return _extends$2({tabIndex:Be,"aria-labelledby":oe,"aria-orientation":$e,"aria-valuemax":Ae(ye),"aria-valuemin":Ae(ve),name:xe,type:"range",min:ne.min,max:ne.max,step:ne.step===null&&ne.marks?"any":(Gt=ne.step)!=null?Gt:void 0,disabled:ue},tn,jn,{style:_extends$2({},visuallyHidden$3,{direction:me?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Kn,getThumbProps:(tn={})=>{const Gt=extractEventHandlers(tn),bn={onMouseOver:Rn(Gt||{}),onMouseLeave:Mn(Gt||{})};return _extends$2({},tn,Gt,bn)},marks:Zt,open:qe,range:Ke,rootRef:Nt,trackLeap:Yn,trackOffset:zn,values:an,getThumbStyle:tn=>({pointerEvents:Ue!==-1&&Ue!==tn?"none":void 0})}}function useSnackbar$1(ne={}){const{autoHideDuration:oe=null,disableWindowBlurListener:ce=!1,onClose:ue,open:pe,resumeHideDuration:me}=ne,ge=useTimeout();reactExports.useEffect(()=>{if(!pe)return;function Be(Ne){Ne.defaultPrevented||(Ne.key==="Escape"||Ne.key==="Esc")&&(ue==null||ue(Ne,"escapeKeyDown"))}return document.addEventListener("keydown",Be),()=>{document.removeEventListener("keydown",Be)}},[pe,ue]);const ye=useEventCallback((Be,Ne)=>{ue==null||ue(Be,Ne)}),ve=useEventCallback(Be=>{!ue||Be==null||ge.start(Be,()=>{ye(null,"timeout")})});reactExports.useEffect(()=>(pe&&ve(oe),ge.clear),[pe,oe,ve,ge]);const xe=Be=>{ue==null||ue(Be,"clickaway")},_e=ge.clear,Se=reactExports.useCallback(()=>{oe!=null&&ve(me??oe*.5)},[oe,me,ve]),$e=Be=>Ne=>{const Fe=Be.onBlur;Fe==null||Fe(Ne),Se()},Re=Be=>Ne=>{const Fe=Be.onFocus;Fe==null||Fe(Ne),_e()},Ae=Be=>Ne=>{const Fe=Be.onMouseEnter;Fe==null||Fe(Ne),_e()},Ie=Be=>Ne=>{const Fe=Be.onMouseLeave;Fe==null||Fe(Ne),Se()};return reactExports.useEffect(()=>{if(!ce&&pe)return window.addEventListener("focus",Se),window.addEventListener("blur",_e),()=>{window.removeEventListener("focus",Se),window.removeEventListener("blur",_e)}},[ce,pe,Se,_e]),{getRootProps:(Be={})=>{const Ne=_extends$2({},extractEventHandlers(ne),extractEventHandlers(Be));return _extends$2({role:"presentation"},Be,Ne,{onBlur:$e(Ne),onFocus:Re(Ne),onMouseEnter:Ae(Ne),onMouseLeave:Ie(Ne)})},onClickAway:xe}}const _excluded$W=["onChange","maxRows","minRows","style","value"];function getStyleValue(ne){return parseInt(ne,10)||0}const styles$5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function isEmpty$3(ne){return ne==null||Object.keys(ne).length===0||ne.outerHeightStyle===0&&!ne.overflowing}const TextareaAutosize=reactExports.forwardRef(function(oe,ce){const{onChange:ue,maxRows:pe,minRows:me=1,style:ge,value:ye}=oe,ve=_objectWithoutPropertiesLoose$2(oe,_excluded$W),{current:xe}=reactExports.useRef(ye!=null),_e=reactExports.useRef(null),Se=useForkRef(ce,_e),$e=reactExports.useRef(null),Re=reactExports.useCallback(()=>{const ke=_e.current,Ne=ownerWindow(ke).getComputedStyle(ke);if(Ne.width==="0px")return{outerHeightStyle:0,overflowing:!1};const Fe=$e.current;Fe.style.width=Ne.width,Fe.value=ke.value||oe.placeholder||"x",Fe.value.slice(-1)===` -`&&(Fe.value+=" ");const Ue=Ne.boxSizing,We=getStyleValue(Ne.paddingBottom)+getStyleValue(Ne.paddingTop),qe=getStyleValue(Ne.borderBottomWidth)+getStyleValue(Ne.borderTopWidth),ze=Fe.scrollHeight;Fe.value="x";const Ge=Fe.scrollHeight;let Ze=ze;me&&(Ze=Math.max(Number(me)*Ge,Ze)),pe&&(Ze=Math.min(Number(pe)*Ge,Ze)),Ze=Math.max(Ze,Ge);const Dt=Ze+(Ue==="border-box"?We+qe:0),Je=Math.abs(Ze-ze)<=1;return{outerHeightStyle:Dt,overflowing:Je}},[pe,me,oe.placeholder]),Ae=reactExports.useCallback(()=>{const ke=Re();if(isEmpty$3(ke))return;const Be=_e.current;Be.style.height=`${ke.outerHeightStyle}px`,Be.style.overflow=ke.overflowing?"hidden":""},[Re]);useEnhancedEffect$1(()=>{const ke=()=>{Ae()};let Be;const Ne=debounce$2(ke),Fe=_e.current,Ue=ownerWindow(Fe);Ue.addEventListener("resize",Ne);let We;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(ke),We.observe(Fe)),()=>{Ne.clear(),cancelAnimationFrame(Be),Ue.removeEventListener("resize",Ne),We&&We.disconnect()}},[Re,Ae]),useEnhancedEffect$1(()=>{Ae()});const Ie=ke=>{xe||Ae(),ue&&ue(ke)};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",_extends$2({value:ye,onChange:Ie,ref:Se,rows:me,style:ge},ve)),jsxRuntimeExports.jsx("textarea",{"aria-hidden":!0,className:oe.className,readOnly:!0,ref:$e,tabIndex:-1,style:_extends$2({},styles$5.shadow,ge,{paddingTop:0,paddingBottom:0})})]})});var useThemeWithoutDefault={};Object.defineProperty(useThemeWithoutDefault,"__esModule",{value:!0});var default_1=useThemeWithoutDefault.default=void 0,React$1=_interopRequireWildcard(reactExports),_styledEngine=require$$1;function _getRequireWildcardCache(ne){if(typeof WeakMap!="function")return null;var oe=new WeakMap,ce=new WeakMap;return(_getRequireWildcardCache=function(ue){return ue?ce:oe})(ne)}function _interopRequireWildcard(ne,oe){if(!oe&&ne&&ne.__esModule)return ne;if(ne===null||typeof ne!="object"&&typeof ne!="function")return{default:ne};var ce=_getRequireWildcardCache(oe);if(ce&&ce.has(ne))return ce.get(ne);var ue={__proto__:null},pe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var me in ne)if(me!=="default"&&Object.prototype.hasOwnProperty.call(ne,me)){var ge=pe?Object.getOwnPropertyDescriptor(ne,me):null;ge&&(ge.get||ge.set)?Object.defineProperty(ue,me,ge):ue[me]=ne[me]}return ue.default=ne,ce&&ce.set(ne,ue),ue}function isObjectEmpty(ne){return Object.keys(ne).length===0}function useTheme(ne=null){const oe=React$1.useContext(_styledEngine.ThemeContext);return!oe||isObjectEmpty(oe)?ne:oe}default_1=useThemeWithoutDefault.default=useTheme;const _excluded$V=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],PopperRoot=styled$1(Popper$2,{name:"MuiPopper",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),Popper=reactExports.forwardRef(function(oe,ce){var ue;const pe=default_1(),me=useThemeProps$3({props:oe,name:"MuiPopper"}),{anchorEl:ge,component:ye,components:ve,componentsProps:xe,container:_e,disablePortal:Se,keepMounted:$e,modifiers:Re,open:Ae,placement:Ie,popperOptions:ke,popperRef:Be,transition:Ne,slots:Fe,slotProps:Ue}=me,We=_objectWithoutPropertiesLoose$2(me,_excluded$V),qe=(ue=Fe==null?void 0:Fe.root)!=null?ue:ve==null?void 0:ve.Root,ze=_extends$2({anchorEl:ge,container:_e,disablePortal:Se,keepMounted:$e,modifiers:Re,open:Ae,placement:Ie,popperOptions:ke,popperRef:Be,transition:Ne},We);return jsxRuntimeExports.jsx(PopperRoot,_extends$2({as:ye,direction:pe==null?void 0:pe.direction,slots:{root:qe},slotProps:Ue??xe},ze,{ref:ce}))}),Popper$1=Popper;function getListSubheaderUtilityClass(ne){return generateUtilityClass$2("MuiListSubheader",ne)}generateUtilityClasses$2("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const _excluded$U=["className","color","component","disableGutters","disableSticky","inset"],useUtilityClasses$M=ne=>{const{classes:oe,color:ce,disableGutters:ue,inset:pe,disableSticky:me}=ne,ge={root:["root",ce!=="default"&&`color${capitalize$1(ce)}`,!ue&&"gutters",pe&&"inset",!me&&"sticky"]};return composeClasses$1(ge,getListSubheaderUtilityClass,oe)},ListSubheaderRoot=styled$1("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`],!ce.disableGutters&&oe.gutters,ce.inset&&oe.inset,!ce.disableSticky&&oe.sticky]}})(({theme:ne,ownerState:oe})=>_extends$2({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(ne.vars||ne).palette.text.secondary,fontFamily:ne.typography.fontFamily,fontWeight:ne.typography.fontWeightMedium,fontSize:ne.typography.pxToRem(14)},oe.color==="primary"&&{color:(ne.vars||ne).palette.primary.main},oe.color==="inherit"&&{color:"inherit"},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},oe.inset&&{paddingLeft:72},!oe.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(ne.vars||ne).palette.background.paper})),ListSubheader=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListSubheader"}),{className:pe,color:me="default",component:ge="li",disableGutters:ye=!1,disableSticky:ve=!1,inset:xe=!1}=ue,_e=_objectWithoutPropertiesLoose$2(ue,_excluded$U),Se=_extends$2({},ue,{color:me,component:ge,disableGutters:ye,disableSticky:ve,inset:xe}),$e=useUtilityClasses$M(Se);return jsxRuntimeExports.jsx(ListSubheaderRoot,_extends$2({as:ge,className:clsx($e.root,pe),ref:ce,ownerState:Se},_e))});ListSubheader.muiSkipListHighlight=!0;const ListSubheader$1=ListSubheader,CancelIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function getChipUtilityClass(ne){return generateUtilityClass$2("MuiChip",ne)}const chipClasses=generateUtilityClasses$2("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),chipClasses$1=chipClasses,_excluded$T=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],useUtilityClasses$L=ne=>{const{classes:oe,disabled:ce,size:ue,color:pe,iconColor:me,onDelete:ge,clickable:ye,variant:ve}=ne,xe={root:["root",ve,ce&&"disabled",`size${capitalize$1(ue)}`,`color${capitalize$1(pe)}`,ye&&"clickable",ye&&`clickableColor${capitalize$1(pe)}`,ge&&"deletable",ge&&`deletableColor${capitalize$1(pe)}`,`${ve}${capitalize$1(pe)}`],label:["label",`label${capitalize$1(ue)}`],avatar:["avatar",`avatar${capitalize$1(ue)}`,`avatarColor${capitalize$1(pe)}`],icon:["icon",`icon${capitalize$1(ue)}`,`iconColor${capitalize$1(me)}`],deleteIcon:["deleteIcon",`deleteIcon${capitalize$1(ue)}`,`deleteIconColor${capitalize$1(pe)}`,`deleteIcon${capitalize$1(ve)}Color${capitalize$1(pe)}`]};return composeClasses$1(xe,getChipUtilityClass,oe)},ChipRoot=styled$1("div",{name:"MuiChip",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne,{color:ue,iconColor:pe,clickable:me,onDelete:ge,size:ye,variant:ve}=ce;return[{[`& .${chipClasses$1.avatar}`]:oe.avatar},{[`& .${chipClasses$1.avatar}`]:oe[`avatar${capitalize$1(ye)}`]},{[`& .${chipClasses$1.avatar}`]:oe[`avatarColor${capitalize$1(ue)}`]},{[`& .${chipClasses$1.icon}`]:oe.icon},{[`& .${chipClasses$1.icon}`]:oe[`icon${capitalize$1(ye)}`]},{[`& .${chipClasses$1.icon}`]:oe[`iconColor${capitalize$1(pe)}`]},{[`& .${chipClasses$1.deleteIcon}`]:oe.deleteIcon},{[`& .${chipClasses$1.deleteIcon}`]:oe[`deleteIcon${capitalize$1(ye)}`]},{[`& .${chipClasses$1.deleteIcon}`]:oe[`deleteIconColor${capitalize$1(ue)}`]},{[`& .${chipClasses$1.deleteIcon}`]:oe[`deleteIcon${capitalize$1(ve)}Color${capitalize$1(ue)}`]},oe.root,oe[`size${capitalize$1(ye)}`],oe[`color${capitalize$1(ue)}`],me&&oe.clickable,me&&ue!=="default"&&oe[`clickableColor${capitalize$1(ue)})`],ge&&oe.deletable,ge&&ue!=="default"&&oe[`deletableColor${capitalize$1(ue)}`],oe[ve],oe[`${ve}${capitalize$1(ue)}`]]}})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light"?ne.palette.grey[700]:ne.palette.grey[300];return _extends$2({maxWidth:"100%",fontFamily:ne.typography.fontFamily,fontSize:ne.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(ne.vars||ne).palette.text.primary,backgroundColor:(ne.vars||ne).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:ne.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${chipClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${chipClasses$1.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:ne.vars?ne.vars.palette.Chip.defaultAvatarColor:ce,fontSize:ne.typography.pxToRem(12)},[`& .${chipClasses$1.avatarColorPrimary}`]:{color:(ne.vars||ne).palette.primary.contrastText,backgroundColor:(ne.vars||ne).palette.primary.dark},[`& .${chipClasses$1.avatarColorSecondary}`]:{color:(ne.vars||ne).palette.secondary.contrastText,backgroundColor:(ne.vars||ne).palette.secondary.dark},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:ne.typography.pxToRem(10)},[`& .${chipClasses$1.icon}`]:_extends$2({marginLeft:5,marginRight:-6},oe.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},oe.iconColor===oe.color&&_extends$2({color:ne.vars?ne.vars.palette.Chip.defaultIconColor:ce},oe.color!=="default"&&{color:"inherit"})),[`& .${chipClasses$1.deleteIcon}`]:_extends$2({WebkitTapHighlightColor:"transparent",color:ne.vars?`rgba(${ne.vars.palette.text.primaryChannel} / 0.26)`:alpha_1(ne.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:ne.vars?`rgba(${ne.vars.palette.text.primaryChannel} / 0.4)`:alpha_1(ne.palette.text.primary,.4)}},oe.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},oe.color!=="default"&&{color:ne.vars?`rgba(${ne.vars.palette[oe.color].contrastTextChannel} / 0.7)`:alpha_1(ne.palette[oe.color].contrastText,.7),"&:hover, &:active":{color:(ne.vars||ne).palette[oe.color].contrastText}})},oe.size==="small"&&{height:24},oe.color!=="default"&&{backgroundColor:(ne.vars||ne).palette[oe.color].main,color:(ne.vars||ne).palette[oe.color].contrastText},oe.onDelete&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.selectedChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.action.selected,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},oe.onDelete&&oe.color!=="default"&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette[oe.color].dark}})},({theme:ne,ownerState:oe})=>_extends$2({},oe.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.selectedChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.action.selected,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.selectedChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.action.selected,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)},"&:active":{boxShadow:(ne.vars||ne).shadows[1]}},oe.clickable&&oe.color!=="default"&&{[`&:hover, &.${chipClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette[oe.color].dark}}),({theme:ne,ownerState:oe})=>_extends$2({},oe.variant==="outlined"&&{backgroundColor:"transparent",border:ne.vars?`1px solid ${ne.vars.palette.Chip.defaultBorder}`:`1px solid ${ne.palette.mode==="light"?ne.palette.grey[400]:ne.palette.grey[700]}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:(ne.vars||ne).palette.action.hover},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`& .${chipClasses$1.avatar}`]:{marginLeft:4},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:2},[`& .${chipClasses$1.icon}`]:{marginLeft:4},[`& .${chipClasses$1.iconSmall}`]:{marginLeft:2},[`& .${chipClasses$1.deleteIcon}`]:{marginRight:5},[`& .${chipClasses$1.deleteIconSmall}`]:{marginRight:3}},oe.variant==="outlined"&&oe.color!=="default"&&{color:(ne.vars||ne).palette[oe.color].main,border:`1px solid ${ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / 0.7)`:alpha_1(ne.palette[oe.color].main,.7)}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.focusOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.focusOpacity)},[`& .${chipClasses$1.deleteIcon}`]:{color:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / 0.7)`:alpha_1(ne.palette[oe.color].main,.7),"&:hover, &:active":{color:(ne.vars||ne).palette[oe.color].main}}})),ChipLabel=styled$1("span",{name:"MuiChip",slot:"Label",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne,{size:ue}=ce;return[oe.label,oe[`label${capitalize$1(ue)}`]]}})(({ownerState:ne})=>_extends$2({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},ne.variant==="outlined"&&{paddingLeft:11,paddingRight:11},ne.size==="small"&&{paddingLeft:8,paddingRight:8},ne.size==="small"&&ne.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function isDeleteKeyboardEvent(ne){return ne.key==="Backspace"||ne.key==="Delete"}const Chip=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiChip"}),{avatar:pe,className:me,clickable:ge,color:ye="default",component:ve,deleteIcon:xe,disabled:_e=!1,icon:Se,label:$e,onClick:Re,onDelete:Ae,onKeyDown:Ie,onKeyUp:ke,size:Be="medium",variant:Ne="filled",tabIndex:Fe,skipFocusWhenDisabled:Ue=!1}=ue,We=_objectWithoutPropertiesLoose$2(ue,_excluded$T),qe=reactExports.useRef(null),ze=useForkRef(qe,ce),Ge=Wt=>{Wt.stopPropagation(),Ae&&Ae(Wt)},Ze=Wt=>{Wt.currentTarget===Wt.target&&isDeleteKeyboardEvent(Wt)&&Wt.preventDefault(),Ie&&Ie(Wt)},Dt=Wt=>{Wt.currentTarget===Wt.target&&(Ae&&isDeleteKeyboardEvent(Wt)?Ae(Wt):Wt.key==="Escape"&&qe.current&&qe.current.blur()),ke&&ke(Wt)},Je=ge!==!1&&Re?!0:ge,Ut=Je||Ae?ButtonBase$1:ve||"div",jt=_extends$2({},ue,{component:Ut,disabled:_e,size:Be,color:ye,iconColor:reactExports.isValidElement(Se)&&Se.props.color||ye,onDelete:!!Ae,clickable:Je,variant:Ne}),Ke=useUtilityClasses$L(jt),an=Ut===ButtonBase$1?_extends$2({component:ve||"div",focusVisibleClassName:Ke.focusVisible},Ae&&{disableRipple:!0}):{};let Zt=null;Ae&&(Zt=xe&&reactExports.isValidElement(xe)?reactExports.cloneElement(xe,{className:clsx(xe.props.className,Ke.deleteIcon),onClick:Ge}):jsxRuntimeExports.jsx(CancelIcon,{className:clsx(Ke.deleteIcon),onClick:Ge}));let en=null;pe&&reactExports.isValidElement(pe)&&(en=reactExports.cloneElement(pe,{className:clsx(Ke.avatar,pe.props.className)}));let Kt=null;return Se&&reactExports.isValidElement(Se)&&(Kt=reactExports.cloneElement(Se,{className:clsx(Ke.icon,Se.props.className)})),jsxRuntimeExports.jsxs(ChipRoot,_extends$2({as:Ut,className:clsx(Ke.root,me),disabled:Je&&_e?!0:void 0,onClick:Re,onKeyDown:Ze,onKeyUp:Dt,ref:ze,tabIndex:Ue&&_e?-1:Fe,ownerState:jt},an,We,{children:[en||Kt,jsxRuntimeExports.jsx(ChipLabel,{className:clsx(Ke.label),ownerState:jt,children:$e}),Zt]}))}),Chip$1=Chip;function formControlState({props:ne,states:oe,muiFormControl:ce}){return oe.reduce((ue,pe)=>(ue[pe]=ne[pe],ce&&typeof ne[pe]>"u"&&(ue[pe]=ce[pe]),ue),{})}const FormControlContext=reactExports.createContext(void 0),FormControlContext$1=FormControlContext;function useFormControl(){return reactExports.useContext(FormControlContext$1)}function GlobalStyles(ne){return jsxRuntimeExports.jsx(GlobalStyles$1,_extends$2({},ne,{defaultTheme:defaultTheme$2,themeId:THEME_ID}))}function hasValue(ne){return ne!=null&&!(Array.isArray(ne)&&ne.length===0)}function isFilled(ne,oe=!1){return ne&&(hasValue(ne.value)&&ne.value!==""||oe&&hasValue(ne.defaultValue)&&ne.defaultValue!=="")}function isAdornedStart(ne){return ne.startAdornment}function getInputBaseUtilityClass(ne){return generateUtilityClass$2("MuiInputBase",ne)}const inputBaseClasses=generateUtilityClasses$2("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),inputBaseClasses$1=inputBaseClasses,_excluded$S=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],rootOverridesResolver=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.formControl&&oe.formControl,ce.startAdornment&&oe.adornedStart,ce.endAdornment&&oe.adornedEnd,ce.error&&oe.error,ce.size==="small"&&oe.sizeSmall,ce.multiline&&oe.multiline,ce.color&&oe[`color${capitalize$1(ce.color)}`],ce.fullWidth&&oe.fullWidth,ce.hiddenLabel&&oe.hiddenLabel]},inputOverridesResolver=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.input,ce.size==="small"&&oe.inputSizeSmall,ce.multiline&&oe.inputMultiline,ce.type==="search"&&oe.inputTypeSearch,ce.startAdornment&&oe.inputAdornedStart,ce.endAdornment&&oe.inputAdornedEnd,ce.hiddenLabel&&oe.inputHiddenLabel]},useUtilityClasses$K=ne=>{const{classes:oe,color:ce,disabled:ue,error:pe,endAdornment:me,focused:ge,formControl:ye,fullWidth:ve,hiddenLabel:xe,multiline:_e,readOnly:Se,size:$e,startAdornment:Re,type:Ae}=ne,Ie={root:["root",`color${capitalize$1(ce)}`,ue&&"disabled",pe&&"error",ve&&"fullWidth",ge&&"focused",ye&&"formControl",$e&&$e!=="medium"&&`size${capitalize$1($e)}`,_e&&"multiline",Re&&"adornedStart",me&&"adornedEnd",xe&&"hiddenLabel",Se&&"readOnly"],input:["input",ue&&"disabled",Ae==="search"&&"inputTypeSearch",_e&&"inputMultiline",$e==="small"&&"inputSizeSmall",xe&&"inputHiddenLabel",Re&&"inputAdornedStart",me&&"inputAdornedEnd",Se&&"readOnly"]};return composeClasses$1(Ie,getInputBaseUtilityClass,oe)},InputBaseRoot=styled$1("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({},ne.typography.body1,{color:(ne.vars||ne).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${inputBaseClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled,cursor:"default"}},oe.multiline&&_extends$2({padding:"4px 0 5px"},oe.size==="small"&&{paddingTop:1}),oe.fullWidth&&{width:"100%"})),InputBaseComponent=styled$1("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light",ue=_extends$2({color:"currentColor"},ne.vars?{opacity:ne.vars.opacity.inputPlaceholder}:{opacity:ce?.42:.5},{transition:ne.transitions.create("opacity",{duration:ne.transitions.duration.shorter})}),pe={opacity:"0 !important"},me=ne.vars?{opacity:ne.vars.opacity.inputPlaceholder}:{opacity:ce?.42:.5};return _extends$2({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":ue,"&::-moz-placeholder":ue,"&:-ms-input-placeholder":ue,"&::-ms-input-placeholder":ue,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${inputBaseClasses$1.formControl} &`]:{"&::-webkit-input-placeholder":pe,"&::-moz-placeholder":pe,"&:-ms-input-placeholder":pe,"&::-ms-input-placeholder":pe,"&:focus::-webkit-input-placeholder":me,"&:focus::-moz-placeholder":me,"&:focus:-ms-input-placeholder":me,"&:focus::-ms-input-placeholder":me},[`&.${inputBaseClasses$1.disabled}`]:{opacity:1,WebkitTextFillColor:(ne.vars||ne).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},oe.size==="small"&&{paddingTop:1},oe.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},oe.type==="search"&&{MozAppearance:"textfield"})}),inputGlobalStyles=jsxRuntimeExports.jsx(GlobalStyles,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),InputBase=reactExports.forwardRef(function(oe,ce){var ue;const pe=useThemeProps$3({props:oe,name:"MuiInputBase"}),{"aria-describedby":me,autoComplete:ge,autoFocus:ye,className:ve,components:xe={},componentsProps:_e={},defaultValue:Se,disabled:$e,disableInjectingGlobalStyles:Re,endAdornment:Ae,fullWidth:Ie=!1,id:ke,inputComponent:Be="input",inputProps:Ne={},inputRef:Fe,maxRows:Ue,minRows:We,multiline:qe=!1,name:ze,onBlur:Ge,onChange:Ze,onClick:Dt,onFocus:Je,onKeyDown:Ut,onKeyUp:jt,placeholder:Ke,readOnly:an,renderSuffix:Zt,rows:en,slotProps:Kt={},slots:Wt={},startAdornment:un,type:Xt="text",value:nn}=pe,vn=_objectWithoutPropertiesLoose$2(pe,_excluded$S),Sn=Ne.value!=null?Ne.value:nn,{current:Cn}=reactExports.useRef(Sn!=null),Nt=reactExports.useRef(),Yt=reactExports.useCallback(tn=>{},[]),Jt=useForkRef(Nt,Fe,Ne.ref,Yt),[hn,Ye]=reactExports.useState(!1),Xe=useFormControl(),Pt=formControlState({props:pe,muiFormControl:Xe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Pt.focused=Xe?Xe.focused:hn,reactExports.useEffect(()=>{!Xe&&$e&&hn&&(Ye(!1),Ge&&Ge())},[Xe,$e,hn,Ge]);const sn=Xe&&Xe.onFilled,yn=Xe&&Xe.onEmpty,qt=reactExports.useCallback(tn=>{isFilled(tn)?sn&&sn():yn&&yn()},[sn,yn]);useEnhancedEffect$1(()=>{Cn&&qt({value:Sn})},[Sn,qt,Cn]);const wn=tn=>{if(Pt.disabled){tn.stopPropagation();return}Je&&Je(tn),Ne.onFocus&&Ne.onFocus(tn),Xe&&Xe.onFocus?Xe.onFocus(tn):Ye(!0)},Tn=tn=>{Ge&&Ge(tn),Ne.onBlur&&Ne.onBlur(tn),Xe&&Xe.onBlur?Xe.onBlur(tn):Ye(!1)},xn=(tn,...Gt)=>{if(!Cn){const bn=tn.target||Nt.current;if(bn==null)throw new Error(formatMuiErrorMessage$1(1));qt({value:bn.value})}Ne.onChange&&Ne.onChange(tn,...Gt),Ze&&Ze(tn,...Gt)};reactExports.useEffect(()=>{qt(Nt.current)},[]);const Nn=tn=>{Nt.current&&tn.currentTarget===tn.target&&Nt.current.focus(),Dt&&Dt(tn)};let zn=Be,Yn=Ne;qe&&zn==="input"&&(en?Yn=_extends$2({type:void 0,minRows:en,maxRows:en},Yn):Yn=_extends$2({type:void 0,maxRows:Ue,minRows:We},Yn),zn=TextareaAutosize);const Kn=tn=>{qt(tn.animationName==="mui-auto-fill-cancel"?Nt.current:{value:"x"})};reactExports.useEffect(()=>{Xe&&Xe.setAdornedStart(!!un)},[Xe,un]);const Rn=_extends$2({},pe,{color:Pt.color||"primary",disabled:Pt.disabled,endAdornment:Ae,error:Pt.error,focused:Pt.focused,formControl:Xe,fullWidth:Ie,hiddenLabel:Pt.hiddenLabel,multiline:qe,size:Pt.size,startAdornment:un,type:Xt}),Mn=useUtilityClasses$K(Rn),Xn=Wt.root||xe.Root||InputBaseRoot,Jn=Kt.root||_e.root||{},pn=Wt.input||xe.Input||InputBaseComponent;return Yn=_extends$2({},Yn,(ue=Kt.input)!=null?ue:_e.input),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!Re&&inputGlobalStyles,jsxRuntimeExports.jsxs(Xn,_extends$2({},Jn,!isHostComponent(Xn)&&{ownerState:_extends$2({},Rn,Jn.ownerState)},{ref:ce,onClick:Nn},vn,{className:clsx(Mn.root,Jn.className,ve,an&&"MuiInputBase-readOnly"),children:[un,jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(pn,_extends$2({ownerState:Rn,"aria-invalid":Pt.error,"aria-describedby":me,autoComplete:ge,autoFocus:ye,defaultValue:Se,disabled:Pt.disabled,id:ke,onAnimationStart:Kn,name:ze,placeholder:Ke,readOnly:an,required:Pt.required,rows:en,value:Sn,onKeyDown:Ut,onKeyUp:jt,type:Xt},Yn,!isHostComponent(pn)&&{as:zn,ownerState:_extends$2({},Rn,Yn.ownerState)},{ref:Jt,className:clsx(Mn.input,Yn.className,an&&"MuiInputBase-readOnly"),onBlur:Tn,onChange:xn,onFocus:wn}))}),Ae,Zt?Zt(_extends$2({},Pt,{startAdornment:un})):null]}))]})}),InputBase$1=InputBase;function getInputUtilityClass(ne){return generateUtilityClass$2("MuiInput",ne)}const inputClasses=_extends$2({},inputBaseClasses$1,generateUtilityClasses$2("MuiInput",["root","underline","input"])),inputClasses$1=inputClasses;function getOutlinedInputUtilityClass(ne){return generateUtilityClass$2("MuiOutlinedInput",ne)}const outlinedInputClasses=_extends$2({},inputBaseClasses$1,generateUtilityClasses$2("MuiOutlinedInput",["root","notchedOutline","input"])),outlinedInputClasses$1=outlinedInputClasses;function getFilledInputUtilityClass(ne){return generateUtilityClass$2("MuiFilledInput",ne)}const filledInputClasses=_extends$2({},inputBaseClasses$1,generateUtilityClasses$2("MuiFilledInput",["root","underline","input"])),filledInputClasses$1=filledInputClasses,ArrowDropDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Person=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function getAvatarUtilityClass(ne){return generateUtilityClass$2("MuiAvatar",ne)}generateUtilityClasses$2("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const _excluded$R=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],useThemeProps$2=createUseThemeProps(),useUtilityClasses$J=ne=>{const{classes:oe,variant:ce,colorDefault:ue}=ne;return composeClasses$1({root:["root",ce,ue&&"colorDefault"],img:["img"],fallback:["fallback"]},getAvatarUtilityClass,oe)},AvatarRoot=styled$1("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],ce.colorDefault&&oe.colorDefault]}})(({theme:ne})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:ne.typography.fontFamily,fontSize:ne.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(ne.vars||ne).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:_extends$2({color:(ne.vars||ne).palette.background.default},ne.vars?{backgroundColor:ne.vars.palette.Avatar.defaultBg}:_extends$2({backgroundColor:ne.palette.grey[400]},ne.applyStyles("dark",{backgroundColor:ne.palette.grey[600]})))}]})),AvatarImg=styled$1("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(ne,oe)=>oe.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),AvatarFallback=styled$1(Person,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(ne,oe)=>oe.fallback})({width:"75%",height:"75%"});function useLoaded({crossOrigin:ne,referrerPolicy:oe,src:ce,srcSet:ue}){const[pe,me]=reactExports.useState(!1);return reactExports.useEffect(()=>{if(!ce&&!ue)return;me(!1);let ge=!0;const ye=new Image;return ye.onload=()=>{ge&&me("loaded")},ye.onerror=()=>{ge&&me("error")},ye.crossOrigin=ne,ye.referrerPolicy=oe,ye.src=ce,ue&&(ye.srcset=ue),()=>{ge=!1}},[ne,oe,ce,ue]),pe}const Avatar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$2({props:oe,name:"MuiAvatar"}),{alt:pe,children:me,className:ge,component:ye="div",slots:ve={},slotProps:xe={},imgProps:_e,sizes:Se,src:$e,srcSet:Re,variant:Ae="circular"}=ue,Ie=_objectWithoutPropertiesLoose$2(ue,_excluded$R);let ke=null;const Be=useLoaded(_extends$2({},_e,{src:$e,srcSet:Re})),Ne=$e||Re,Fe=Ne&&Be!=="error",Ue=_extends$2({},ue,{colorDefault:!Fe,component:ye,variant:Ae}),We=useUtilityClasses$J(Ue),[qe,ze]=useSlot("img",{className:We.img,elementType:AvatarImg,externalForwardedProps:{slots:ve,slotProps:{img:_extends$2({},_e,xe.img)}},additionalProps:{alt:pe,src:$e,srcSet:Re,sizes:Se},ownerState:Ue});return Fe?ke=jsxRuntimeExports.jsx(qe,_extends$2({},ze)):me||me===0?ke=me:Ne&&pe?ke=pe[0]:ke=jsxRuntimeExports.jsx(AvatarFallback,{ownerState:Ue,className:We.fallback}),jsxRuntimeExports.jsx(AvatarRoot,_extends$2({as:ye,ownerState:Ue,className:clsx(We.root,ge),ref:ce},Ie,{children:ke}))}),Avatar$1=Avatar,_excluded$Q=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],styles$4={entering:{opacity:1},entered:{opacity:1}},Fade=reactExports.forwardRef(function(oe,ce){const ue=useTheme$1(),pe={enter:ue.transitions.duration.enteringScreen,exit:ue.transitions.duration.leavingScreen},{addEndListener:me,appear:ge=!0,children:ye,easing:ve,in:xe,onEnter:_e,onEntered:Se,onEntering:$e,onExit:Re,onExited:Ae,onExiting:Ie,style:ke,timeout:Be=pe,TransitionComponent:Ne=Transition$1}=oe,Fe=_objectWithoutPropertiesLoose$2(oe,_excluded$Q),Ue=reactExports.useRef(null),We=useForkRef(Ue,ye.ref,ce),qe=Ke=>an=>{if(Ke){const Zt=Ue.current;an===void 0?Ke(Zt):Ke(Zt,an)}},ze=qe($e),Ge=qe((Ke,an)=>{reflow$1(Ke);const Zt=getTransitionProps$1({style:ke,timeout:Be,easing:ve},{mode:"enter"});Ke.style.webkitTransition=ue.transitions.create("opacity",Zt),Ke.style.transition=ue.transitions.create("opacity",Zt),_e&&_e(Ke,an)}),Ze=qe(Se),Dt=qe(Ie),Je=qe(Ke=>{const an=getTransitionProps$1({style:ke,timeout:Be,easing:ve},{mode:"exit"});Ke.style.webkitTransition=ue.transitions.create("opacity",an),Ke.style.transition=ue.transitions.create("opacity",an),Re&&Re(Ke)}),Ut=qe(Ae),jt=Ke=>{me&&me(Ue.current,Ke)};return jsxRuntimeExports.jsx(Ne,_extends$2({appear:ge,in:xe,nodeRef:Ue,onEnter:Ge,onEntered:Ze,onEntering:ze,onExit:Je,onExited:Ut,onExiting:Dt,addEndListener:jt,timeout:Be},Fe,{children:(Ke,an)=>reactExports.cloneElement(ye,_extends$2({style:_extends$2({opacity:0,visibility:Ke==="exited"&&!xe?"hidden":void 0},styles$4[Ke],ke,ye.props.style),ref:We},an))}))}),Fade$1=Fade;function getBackdropUtilityClass(ne){return generateUtilityClass$2("MuiBackdrop",ne)}generateUtilityClasses$2("MuiBackdrop",["root","invisible"]);const _excluded$P=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],useUtilityClasses$I=ne=>{const{classes:oe,invisible:ce}=ne;return composeClasses$1({root:["root",ce&&"invisible"]},getBackdropUtilityClass,oe)},BackdropRoot=styled$1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.invisible&&oe.invisible]}})(({ownerState:ne})=>_extends$2({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},ne.invisible&&{backgroundColor:"transparent"})),Backdrop=reactExports.forwardRef(function(oe,ce){var ue,pe,me;const ge=useThemeProps$3({props:oe,name:"MuiBackdrop"}),{children:ye,className:ve,component:xe="div",components:_e={},componentsProps:Se={},invisible:$e=!1,open:Re,slotProps:Ae={},slots:Ie={},TransitionComponent:ke=Fade$1,transitionDuration:Be}=ge,Ne=_objectWithoutPropertiesLoose$2(ge,_excluded$P),Fe=_extends$2({},ge,{component:xe,invisible:$e}),Ue=useUtilityClasses$I(Fe),We=(ue=Ae.root)!=null?ue:Se.root;return jsxRuntimeExports.jsx(ke,_extends$2({in:Re,timeout:Be},Ne,{children:jsxRuntimeExports.jsx(BackdropRoot,_extends$2({"aria-hidden":!0},We,{as:(pe=(me=Ie.root)!=null?me:_e.Root)!=null?pe:xe,className:clsx(Ue.root,ve,We==null?void 0:We.className),ownerState:_extends$2({},Fe,We==null?void 0:We.ownerState),classes:Ue,ref:ce,children:ye}))}))}),Backdrop$1=Backdrop,boxClasses=generateUtilityClasses$2("MuiBox",["root"]),boxClasses$1=boxClasses,defaultTheme=createTheme(),Box=createBox$1({themeId:THEME_ID,defaultTheme,defaultClassName:boxClasses$1.root,generateClassName:ClassNameGenerator$3.generate}),Box$1=Box;function getButtonUtilityClass(ne){return generateUtilityClass$2("MuiButton",ne)}const buttonClasses=generateUtilityClasses$2("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),buttonClasses$1=buttonClasses,ButtonGroupContext=reactExports.createContext({}),ButtonGroupContext$1=ButtonGroupContext,ButtonGroupButtonContext=reactExports.createContext(void 0),ButtonGroupButtonContext$1=ButtonGroupButtonContext,_excluded$O=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],useUtilityClasses$H=ne=>{const{color:oe,disableElevation:ce,fullWidth:ue,size:pe,variant:me,classes:ge}=ne,ye={root:["root",me,`${me}${capitalize$1(oe)}`,`size${capitalize$1(pe)}`,`${me}Size${capitalize$1(pe)}`,`color${capitalize$1(oe)}`,ce&&"disableElevation",ue&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${capitalize$1(pe)}`],endIcon:["icon","endIcon",`iconSize${capitalize$1(pe)}`]},ve=composeClasses$1(ye,getButtonUtilityClass,ge);return _extends$2({},ge,ve)},commonIconStyles=ne=>_extends$2({},ne.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},ne.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},ne.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),ButtonRoot=styled$1(ButtonBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiButton",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],oe[`${ce.variant}${capitalize$1(ce.color)}`],oe[`size${capitalize$1(ce.size)}`],oe[`${ce.variant}Size${capitalize$1(ce.size)}`],ce.color==="inherit"&&oe.colorInherit,ce.disableElevation&&oe.disableElevation,ce.fullWidth&&oe.fullWidth]}})(({theme:ne,ownerState:oe})=>{var ce,ue;const pe=ne.palette.mode==="light"?ne.palette.grey[300]:ne.palette.grey[800],me=ne.palette.mode==="light"?ne.palette.grey.A100:ne.palette.grey[700];return _extends$2({},ne.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(ne.vars||ne).shape.borderRadius,transition:ne.transitions.create(["background-color","box-shadow","border-color","color"],{duration:ne.transitions.duration.short}),"&:hover":_extends$2({textDecoration:"none",backgroundColor:ne.vars?`rgba(${ne.vars.palette.text.primaryChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette.text.primary,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},oe.variant==="text"&&oe.color!=="inherit"&&{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},oe.variant==="outlined"&&oe.color!=="inherit"&&{border:`1px solid ${(ne.vars||ne).palette[oe.color].main}`,backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},oe.variant==="contained"&&{backgroundColor:ne.vars?ne.vars.palette.Button.inheritContainedHoverBg:me,boxShadow:(ne.vars||ne).shadows[4],"@media (hover: none)":{boxShadow:(ne.vars||ne).shadows[2],backgroundColor:(ne.vars||ne).palette.grey[300]}},oe.variant==="contained"&&oe.color!=="inherit"&&{backgroundColor:(ne.vars||ne).palette[oe.color].dark,"@media (hover: none)":{backgroundColor:(ne.vars||ne).palette[oe.color].main}}),"&:active":_extends$2({},oe.variant==="contained"&&{boxShadow:(ne.vars||ne).shadows[8]}),[`&.${buttonClasses$1.focusVisible}`]:_extends$2({},oe.variant==="contained"&&{boxShadow:(ne.vars||ne).shadows[6]}),[`&.${buttonClasses$1.disabled}`]:_extends$2({color:(ne.vars||ne).palette.action.disabled},oe.variant==="outlined"&&{border:`1px solid ${(ne.vars||ne).palette.action.disabledBackground}`},oe.variant==="contained"&&{color:(ne.vars||ne).palette.action.disabled,boxShadow:(ne.vars||ne).shadows[0],backgroundColor:(ne.vars||ne).palette.action.disabledBackground})},oe.variant==="text"&&{padding:"6px 8px"},oe.variant==="text"&&oe.color!=="inherit"&&{color:(ne.vars||ne).palette[oe.color].main},oe.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},oe.variant==="outlined"&&oe.color!=="inherit"&&{color:(ne.vars||ne).palette[oe.color].main,border:ne.vars?`1px solid rgba(${ne.vars.palette[oe.color].mainChannel} / 0.5)`:`1px solid ${alpha_1(ne.palette[oe.color].main,.5)}`},oe.variant==="contained"&&{color:ne.vars?ne.vars.palette.text.primary:(ce=(ue=ne.palette).getContrastText)==null?void 0:ce.call(ue,ne.palette.grey[300]),backgroundColor:ne.vars?ne.vars.palette.Button.inheritContainedBg:pe,boxShadow:(ne.vars||ne).shadows[2]},oe.variant==="contained"&&oe.color!=="inherit"&&{color:(ne.vars||ne).palette[oe.color].contrastText,backgroundColor:(ne.vars||ne).palette[oe.color].main},oe.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},oe.size==="small"&&oe.variant==="text"&&{padding:"4px 5px",fontSize:ne.typography.pxToRem(13)},oe.size==="large"&&oe.variant==="text"&&{padding:"8px 11px",fontSize:ne.typography.pxToRem(15)},oe.size==="small"&&oe.variant==="outlined"&&{padding:"3px 9px",fontSize:ne.typography.pxToRem(13)},oe.size==="large"&&oe.variant==="outlined"&&{padding:"7px 21px",fontSize:ne.typography.pxToRem(15)},oe.size==="small"&&oe.variant==="contained"&&{padding:"4px 10px",fontSize:ne.typography.pxToRem(13)},oe.size==="large"&&oe.variant==="contained"&&{padding:"8px 22px",fontSize:ne.typography.pxToRem(15)},oe.fullWidth&&{width:"100%"})},({ownerState:ne})=>ne.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${buttonClasses$1.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${buttonClasses$1.disabled}`]:{boxShadow:"none"}}),ButtonStartIcon=styled$1("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.startIcon,oe[`iconSize${capitalize$1(ce.size)}`]]}})(({ownerState:ne})=>_extends$2({display:"inherit",marginRight:8,marginLeft:-4},ne.size==="small"&&{marginLeft:-2},commonIconStyles(ne))),ButtonEndIcon=styled$1("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.endIcon,oe[`iconSize${capitalize$1(ce.size)}`]]}})(({ownerState:ne})=>_extends$2({display:"inherit",marginRight:-4,marginLeft:8},ne.size==="small"&&{marginRight:-2},commonIconStyles(ne))),Button$1=reactExports.forwardRef(function(oe,ce){const ue=reactExports.useContext(ButtonGroupContext$1),pe=reactExports.useContext(ButtonGroupButtonContext$1),me=resolveProps(ue,oe),ge=useThemeProps$3({props:me,name:"MuiButton"}),{children:ye,color:ve="primary",component:xe="button",className:_e,disabled:Se=!1,disableElevation:$e=!1,disableFocusRipple:Re=!1,endIcon:Ae,focusVisibleClassName:Ie,fullWidth:ke=!1,size:Be="medium",startIcon:Ne,type:Fe,variant:Ue="text"}=ge,We=_objectWithoutPropertiesLoose$2(ge,_excluded$O),qe=_extends$2({},ge,{color:ve,component:xe,disabled:Se,disableElevation:$e,disableFocusRipple:Re,fullWidth:ke,size:Be,type:Fe,variant:Ue}),ze=useUtilityClasses$H(qe),Ge=Ne&&jsxRuntimeExports.jsx(ButtonStartIcon,{className:ze.startIcon,ownerState:qe,children:Ne}),Ze=Ae&&jsxRuntimeExports.jsx(ButtonEndIcon,{className:ze.endIcon,ownerState:qe,children:Ae}),Dt=pe||"";return jsxRuntimeExports.jsxs(ButtonRoot,_extends$2({ownerState:qe,className:clsx(ue.className,ze.root,_e,Dt),component:xe,disabled:Se,focusRipple:!Re,focusVisibleClassName:clsx(ze.focusVisible,Ie),ref:ce,type:Fe},We,{classes:ze,children:[Ge,ye,Ze]}))}),MuiButton=Button$1;function getCardUtilityClass(ne){return generateUtilityClass$2("MuiCard",ne)}generateUtilityClasses$2("MuiCard",["root"]);const _excluded$N=["className","raised"],useUtilityClasses$G=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"]},getCardUtilityClass,oe)},CardRoot=styled$1(Paper$1,{name:"MuiCard",slot:"Root",overridesResolver:(ne,oe)=>oe.root})(()=>({overflow:"hidden"})),Card=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCard"}),{className:pe,raised:me=!1}=ue,ge=_objectWithoutPropertiesLoose$2(ue,_excluded$N),ye=_extends$2({},ue,{raised:me}),ve=useUtilityClasses$G(ye);return jsxRuntimeExports.jsx(CardRoot,_extends$2({className:clsx(ve.root,pe),elevation:me?8:void 0,ref:ce,ownerState:ye},ge))}),Card$1=Card;function getCardHeaderUtilityClass(ne){return generateUtilityClass$2("MuiCardHeader",ne)}const cardHeaderClasses=generateUtilityClasses$2("MuiCardHeader",["root","avatar","action","content","title","subheader"]),cardHeaderClasses$1=cardHeaderClasses,_excluded$M=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],useUtilityClasses$F=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},getCardHeaderUtilityClass,oe)},CardHeaderRoot=styled$1("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(ne,oe)=>_extends$2({[`& .${cardHeaderClasses$1.title}`]:oe.title,[`& .${cardHeaderClasses$1.subheader}`]:oe.subheader},oe.root)})({display:"flex",alignItems:"center",padding:16}),CardHeaderAvatar=styled$1("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(ne,oe)=>oe.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),CardHeaderAction=styled$1("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(ne,oe)=>oe.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),CardHeaderContent=styled$1("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(ne,oe)=>oe.content})({flex:"1 1 auto"}),CardHeader=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCardHeader"}),{action:pe,avatar:me,className:ge,component:ye="div",disableTypography:ve=!1,subheader:xe,subheaderTypographyProps:_e,title:Se,titleTypographyProps:$e}=ue,Re=_objectWithoutPropertiesLoose$2(ue,_excluded$M),Ae=_extends$2({},ue,{component:ye,disableTypography:ve}),Ie=useUtilityClasses$F(Ae);let ke=Se;ke!=null&&ke.type!==Type$2&&!ve&&(ke=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:me?"body2":"h5",className:Ie.title,component:"span",display:"block"},$e,{children:ke})));let Be=xe;return Be!=null&&Be.type!==Type$2&&!ve&&(Be=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:me?"body2":"body1",className:Ie.subheader,color:"text.secondary",component:"span",display:"block"},_e,{children:Be}))),jsxRuntimeExports.jsxs(CardHeaderRoot,_extends$2({className:clsx(Ie.root,ge),as:ye,ref:ce,ownerState:Ae},Re,{children:[me&&jsxRuntimeExports.jsx(CardHeaderAvatar,{className:Ie.avatar,ownerState:Ae,children:me}),jsxRuntimeExports.jsxs(CardHeaderContent,{className:Ie.content,ownerState:Ae,children:[ke,Be]}),pe&&jsxRuntimeExports.jsx(CardHeaderAction,{className:Ie.action,ownerState:Ae,children:pe})]}))}),CardHeader$1=CardHeader;function getSwitchBaseUtilityClass(ne){return generateUtilityClass$2("PrivateSwitchBase",ne)}generateUtilityClasses$2("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const _excluded$L=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],useUtilityClasses$E=ne=>{const{classes:oe,checked:ce,disabled:ue,edge:pe}=ne,me={root:["root",ce&&"checked",ue&&"disabled",pe&&`edge${capitalize$1(pe)}`],input:["input"]};return composeClasses$1(me,getSwitchBaseUtilityClass,oe)},SwitchBaseRoot=styled$1(ButtonBase$1)(({ownerState:ne})=>_extends$2({padding:9,borderRadius:"50%"},ne.edge==="start"&&{marginLeft:ne.size==="small"?-3:-12},ne.edge==="end"&&{marginRight:ne.size==="small"?-3:-12})),SwitchBaseInput=styled$1("input",{shouldForwardProp:rootShouldForwardProp$1})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),SwitchBase=reactExports.forwardRef(function(oe,ce){const{autoFocus:ue,checked:pe,checkedIcon:me,className:ge,defaultChecked:ye,disabled:ve,disableFocusRipple:xe=!1,edge:_e=!1,icon:Se,id:$e,inputProps:Re,inputRef:Ae,name:Ie,onBlur:ke,onChange:Be,onFocus:Ne,readOnly:Fe,required:Ue=!1,tabIndex:We,type:qe,value:ze}=oe,Ge=_objectWithoutPropertiesLoose$2(oe,_excluded$L),[Ze,Dt]=useControlled({controlled:pe,default:!!ye,name:"SwitchBase",state:"checked"}),Je=useFormControl(),Ut=Wt=>{Ne&&Ne(Wt),Je&&Je.onFocus&&Je.onFocus(Wt)},jt=Wt=>{ke&&ke(Wt),Je&&Je.onBlur&&Je.onBlur(Wt)},Ke=Wt=>{if(Wt.nativeEvent.defaultPrevented)return;const un=Wt.target.checked;Dt(un),Be&&Be(Wt,un)};let an=ve;Je&&typeof an>"u"&&(an=Je.disabled);const Zt=qe==="checkbox"||qe==="radio",en=_extends$2({},oe,{checked:Ze,disabled:an,disableFocusRipple:xe,edge:_e}),Kt=useUtilityClasses$E(en);return jsxRuntimeExports.jsxs(SwitchBaseRoot,_extends$2({component:"span",className:clsx(Kt.root,ge),centerRipple:!0,focusRipple:!xe,disabled:an,tabIndex:null,role:void 0,onFocus:Ut,onBlur:jt,ownerState:en,ref:ce},Ge,{children:[jsxRuntimeExports.jsx(SwitchBaseInput,_extends$2({autoFocus:ue,checked:pe,defaultChecked:ye,className:Kt.input,disabled:an,id:Zt?$e:void 0,name:Ie,onChange:Ke,readOnly:Fe,ref:Ae,required:Ue,ownerState:en,tabIndex:We,type:qe},qe==="checkbox"&&ze===void 0?{}:{value:ze},Re)),Ze?me:Se]}))}),SwitchBase$1=SwitchBase,CheckBoxOutlineBlankIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),CheckBoxIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),IndeterminateCheckBoxIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function getCheckboxUtilityClass(ne){return generateUtilityClass$2("MuiCheckbox",ne)}const checkboxClasses=generateUtilityClasses$2("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),checkboxClasses$1=checkboxClasses,_excluded$K=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],useUtilityClasses$D=ne=>{const{classes:oe,indeterminate:ce,color:ue,size:pe}=ne,me={root:["root",ce&&"indeterminate",`color${capitalize$1(ue)}`,`size${capitalize$1(pe)}`]},ge=composeClasses$1(me,getCheckboxUtilityClass,oe);return _extends$2({},oe,ge)},CheckboxRoot=styled$1(SwitchBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.indeterminate&&oe.indeterminate,oe[`size${capitalize$1(ce.size)}`],ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({color:(ne.vars||ne).palette.text.secondary},!oe.disableRipple&&{"&:hover":{backgroundColor:ne.vars?`rgba(${oe.color==="default"?ne.vars.palette.action.activeChannel:ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(oe.color==="default"?ne.palette.action.active:ne.palette[oe.color].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},oe.color!=="default"&&{[`&.${checkboxClasses$1.checked}, &.${checkboxClasses$1.indeterminate}`]:{color:(ne.vars||ne).palette[oe.color].main},[`&.${checkboxClasses$1.disabled}`]:{color:(ne.vars||ne).palette.action.disabled}})),defaultCheckedIcon=jsxRuntimeExports.jsx(CheckBoxIcon,{}),defaultIcon=jsxRuntimeExports.jsx(CheckBoxOutlineBlankIcon,{}),defaultIndeterminateIcon=jsxRuntimeExports.jsx(IndeterminateCheckBoxIcon,{}),Checkbox=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiCheckbox"}),{checkedIcon:ge=defaultCheckedIcon,color:ye="primary",icon:ve=defaultIcon,indeterminate:xe=!1,indeterminateIcon:_e=defaultIndeterminateIcon,inputProps:Se,size:$e="medium",className:Re}=me,Ae=_objectWithoutPropertiesLoose$2(me,_excluded$K),Ie=xe?_e:ve,ke=xe?_e:ge,Be=_extends$2({},me,{color:ye,indeterminate:xe,size:$e}),Ne=useUtilityClasses$D(Be);return jsxRuntimeExports.jsx(CheckboxRoot,_extends$2({type:"checkbox",inputProps:_extends$2({"data-indeterminate":xe},Se),icon:reactExports.cloneElement(Ie,{fontSize:(ue=Ie.props.fontSize)!=null?ue:$e}),checkedIcon:reactExports.cloneElement(ke,{fontSize:(pe=ke.props.fontSize)!=null?pe:$e}),ownerState:Be,ref:ce,className:clsx(Ne.root,Re)},Ae,{classes:Ne}))}),Checkbox$1=Checkbox;function getCircularProgressUtilityClass(ne){return generateUtilityClass$2("MuiCircularProgress",ne)}generateUtilityClasses$2("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const _excluded$J=["className","color","disableShrink","size","style","thickness","value","variant"];let _$9=ne=>ne,_t$3,_t2$2,_t3$2,_t4$2;const SIZE=44,circularRotateKeyframe=keyframes(_t$3||(_t$3=_$9` +`),touchRippleClasses$1.rippleVisible,enterKeyframe,DURATION,({theme:ne})=>ne.transitions.easing.easeInOut,touchRippleClasses$1.ripplePulsate,({theme:ne})=>ne.transitions.duration.shorter,touchRippleClasses$1.child,touchRippleClasses$1.childLeaving,exitKeyframe,DURATION,({theme:ne})=>ne.transitions.easing.easeInOut,touchRippleClasses$1.childPulsate,pulsateKeyframe,({theme:ne})=>ne.transitions.easing.easeInOut),TouchRipple=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTouchRipple"}),{center:pe=!1,classes:me={},className:ge}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$11),[ve,xe]=reactExports.useState([]),_e=reactExports.useRef(0),Se=reactExports.useRef(null);reactExports.useEffect(()=>{Se.current&&(Se.current(),Se.current=null)},[ve]);const $e=reactExports.useRef(!1),Re=useTimeout(),Ae=reactExports.useRef(null),Ie=reactExports.useRef(null),ke=reactExports.useCallback(Ue=>{const{pulsate:We,rippleX:qe,rippleY:ze,rippleSize:Ge,cb:Ze}=Ue;xe(Dt=>[...Dt,jsxRuntimeExports.jsx(TouchRippleRipple,{classes:{ripple:clsx(me.ripple,touchRippleClasses$1.ripple),rippleVisible:clsx(me.rippleVisible,touchRippleClasses$1.rippleVisible),ripplePulsate:clsx(me.ripplePulsate,touchRippleClasses$1.ripplePulsate),child:clsx(me.child,touchRippleClasses$1.child),childLeaving:clsx(me.childLeaving,touchRippleClasses$1.childLeaving),childPulsate:clsx(me.childPulsate,touchRippleClasses$1.childPulsate)},timeout:DURATION,pulsate:We,rippleX:qe,rippleY:ze,rippleSize:Ge},_e.current)]),_e.current+=1,Se.current=Ze},[me]),Be=reactExports.useCallback((Ue={},We={},qe=()=>{})=>{const{pulsate:ze=!1,center:Ge=pe||We.pulsate,fakeElement:Ze=!1}=We;if((Ue==null?void 0:Ue.type)==="mousedown"&&$e.current){$e.current=!1;return}(Ue==null?void 0:Ue.type)==="touchstart"&&($e.current=!0);const Dt=Ze?null:Ie.current,Je=Dt?Dt.getBoundingClientRect():{width:0,height:0,left:0,top:0};let Ut,jt,Ke;if(Ge||Ue===void 0||Ue.clientX===0&&Ue.clientY===0||!Ue.clientX&&!Ue.touches)Ut=Math.round(Je.width/2),jt=Math.round(Je.height/2);else{const{clientX:an,clientY:Zt}=Ue.touches&&Ue.touches.length>0?Ue.touches[0]:Ue;Ut=Math.round(an-Je.left),jt=Math.round(Zt-Je.top)}if(Ge)Ke=Math.sqrt((2*Je.width**2+Je.height**2)/3),Ke%2===0&&(Ke+=1);else{const an=Math.max(Math.abs((Dt?Dt.clientWidth:0)-Ut),Ut)*2+2,Zt=Math.max(Math.abs((Dt?Dt.clientHeight:0)-jt),jt)*2+2;Ke=Math.sqrt(an**2+Zt**2)}Ue!=null&&Ue.touches?Ae.current===null&&(Ae.current=()=>{ke({pulsate:ze,rippleX:Ut,rippleY:jt,rippleSize:Ke,cb:qe})},Re.start(DELAY_RIPPLE,()=>{Ae.current&&(Ae.current(),Ae.current=null)})):ke({pulsate:ze,rippleX:Ut,rippleY:jt,rippleSize:Ke,cb:qe})},[pe,ke,Re]),Ne=reactExports.useCallback(()=>{Be({},{pulsate:!0})},[Be]),Fe=reactExports.useCallback((Ue,We)=>{if(Re.clear(),(Ue==null?void 0:Ue.type)==="touchend"&&Ae.current){Ae.current(),Ae.current=null,Re.start(0,()=>{Fe(Ue,We)});return}Ae.current=null,xe(qe=>qe.length>0?qe.slice(1):qe),Se.current=We},[Re]);return reactExports.useImperativeHandle(ce,()=>({pulsate:Ne,start:Be,stop:Fe}),[Ne,Be,Fe]),jsxRuntimeExports.jsx(TouchRippleRoot,_extends$2({className:clsx(touchRippleClasses$1.root,me.root,ge),ref:Ie},ye,{children:jsxRuntimeExports.jsx(TransitionGroup$1,{component:null,exit:!0,children:ve})}))}),TouchRipple$1=TouchRipple;function getButtonBaseUtilityClass(ne){return generateUtilityClass$2("MuiButtonBase",ne)}const buttonBaseClasses=generateUtilityClasses$2("MuiButtonBase",["root","disabled","focusVisible"]),buttonBaseClasses$1=buttonBaseClasses,_excluded$10=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],useUtilityClasses$S=ne=>{const{disabled:oe,focusVisible:ce,focusVisibleClassName:ue,classes:pe}=ne,ge=composeClasses$1({root:["root",oe&&"disabled",ce&&"focusVisible"]},getButtonBaseUtilityClass,pe);return ce&&ue&&(ge.root+=` ${ue}`),ge},ButtonBaseRoot=styled$1("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${buttonBaseClasses$1.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ButtonBase=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiButtonBase"}),{action:pe,centerRipple:me=!1,children:ge,className:ye,component:ve="button",disabled:xe=!1,disableRipple:_e=!1,disableTouchRipple:Se=!1,focusRipple:$e=!1,LinkComponent:Re="a",onBlur:Ae,onClick:Ie,onContextMenu:ke,onDragLeave:Be,onFocus:Ne,onFocusVisible:Fe,onKeyDown:Ue,onKeyUp:We,onMouseDown:qe,onMouseLeave:ze,onMouseUp:Ge,onTouchEnd:Ze,onTouchMove:Dt,onTouchStart:Je,tabIndex:Ut=0,TouchRippleProps:jt,touchRippleRef:Ke,type:an}=ue,Zt=_objectWithoutPropertiesLoose$2(ue,_excluded$10),en=reactExports.useRef(null),Kt=reactExports.useRef(null),Wt=useForkRef(Kt,Ke),{isFocusVisibleRef:un,onFocus:Xt,onBlur:nn,ref:vn}=useIsFocusVisible(),[Sn,Cn]=reactExports.useState(!1);xe&&Sn&&Cn(!1),reactExports.useImperativeHandle(pe,()=>({focusVisible:()=>{Cn(!0),en.current.focus()}}),[]);const[Nt,Yt]=reactExports.useState(!1);reactExports.useEffect(()=>{Yt(!0)},[]);const Jt=Nt&&!_e&&!xe;reactExports.useEffect(()=>{Sn&&$e&&!_e&&Nt&&Kt.current.pulsate()},[_e,$e,Sn,Nt]);function hn(Gt,bn,kn=Se){return useEventCallback(jn=>(bn&&bn(jn),!kn&&Kt.current&&Kt.current[Gt](jn),!0))}const Ye=hn("start",qe),Xe=hn("stop",ke),Pt=hn("stop",Be),sn=hn("stop",Ge),yn=hn("stop",Gt=>{Sn&&Gt.preventDefault(),ze&&ze(Gt)}),qt=hn("start",Je),wn=hn("stop",Ze),Tn=hn("stop",Dt),xn=hn("stop",Gt=>{nn(Gt),un.current===!1&&Cn(!1),Ae&&Ae(Gt)},!1),Nn=useEventCallback(Gt=>{en.current||(en.current=Gt.currentTarget),Xt(Gt),un.current===!0&&(Cn(!0),Fe&&Fe(Gt)),Ne&&Ne(Gt)}),zn=()=>{const Gt=en.current;return ve&&ve!=="button"&&!(Gt.tagName==="A"&&Gt.href)},Yn=reactExports.useRef(!1),Kn=useEventCallback(Gt=>{$e&&!Yn.current&&Sn&&Kt.current&&Gt.key===" "&&(Yn.current=!0,Kt.current.stop(Gt,()=>{Kt.current.start(Gt)})),Gt.target===Gt.currentTarget&&zn()&&Gt.key===" "&&Gt.preventDefault(),Ue&&Ue(Gt),Gt.target===Gt.currentTarget&&zn()&&Gt.key==="Enter"&&!xe&&(Gt.preventDefault(),Ie&&Ie(Gt))}),Rn=useEventCallback(Gt=>{$e&&Gt.key===" "&&Kt.current&&Sn&&!Gt.defaultPrevented&&(Yn.current=!1,Kt.current.stop(Gt,()=>{Kt.current.pulsate(Gt)})),We&&We(Gt),Ie&&Gt.target===Gt.currentTarget&&zn()&&Gt.key===" "&&!Gt.defaultPrevented&&Ie(Gt)});let Mn=ve;Mn==="button"&&(Zt.href||Zt.to)&&(Mn=Re);const Xn={};Mn==="button"?(Xn.type=an===void 0?"button":an,Xn.disabled=xe):(!Zt.href&&!Zt.to&&(Xn.role="button"),xe&&(Xn["aria-disabled"]=xe));const Jn=useForkRef(ce,vn,en),pn=_extends$2({},ue,{centerRipple:me,component:ve,disabled:xe,disableRipple:_e,disableTouchRipple:Se,focusRipple:$e,tabIndex:Ut,focusVisible:Sn}),tn=useUtilityClasses$S(pn);return jsxRuntimeExports.jsxs(ButtonBaseRoot,_extends$2({as:Mn,className:clsx(tn.root,ye),ownerState:pn,onBlur:xn,onClick:Ie,onContextMenu:Xe,onFocus:Nn,onKeyDown:Kn,onKeyUp:Rn,onMouseDown:Ye,onMouseLeave:yn,onMouseUp:sn,onDragLeave:Pt,onTouchEnd:wn,onTouchMove:Tn,onTouchStart:qt,ref:Jn,tabIndex:xe?-1:Ut,type:an},Xn,Zt,{children:[ge,Jt?jsxRuntimeExports.jsx(TouchRipple$1,_extends$2({ref:Wt,center:me},jt)):null]}))}),ButtonBase$1=ButtonBase;function getIconButtonUtilityClass(ne){return generateUtilityClass$2("MuiIconButton",ne)}const iconButtonClasses=generateUtilityClasses$2("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),iconButtonClasses$1=iconButtonClasses,_excluded$$=["edge","children","className","color","disabled","disableFocusRipple","size"],useUtilityClasses$R=ne=>{const{classes:oe,disabled:ce,color:ue,edge:pe,size:me}=ne,ge={root:["root",ce&&"disabled",ue!=="default"&&`color${capitalize$1(ue)}`,pe&&`edge${capitalize$1(pe)}`,`size${capitalize$1(me)}`]};return composeClasses$1(ge,getIconButtonUtilityClass,oe)},IconButtonRoot=styled$1(ButtonBase$1,{name:"MuiIconButton",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`],ce.edge&&oe[`edge${capitalize$1(ce.edge)}`],oe[`size${capitalize$1(ce.size)}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({textAlign:"center",flex:"0 0 auto",fontSize:ne.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(ne.vars||ne).palette.action.active,transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shortest})},!oe.disableRipple&&{"&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.activeChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette.action.active,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},oe.edge==="start"&&{marginLeft:oe.size==="small"?-3:-12},oe.edge==="end"&&{marginRight:oe.size==="small"?-3:-12}),({theme:ne,ownerState:oe})=>{var ce;const ue=(ce=(ne.vars||ne).palette)==null?void 0:ce[oe.color];return _extends$2({},oe.color==="inherit"&&{color:"inherit"},oe.color!=="inherit"&&oe.color!=="default"&&_extends$2({color:ue==null?void 0:ue.main},!oe.disableRipple&&{"&:hover":_extends$2({},ue&&{backgroundColor:ne.vars?`rgba(${ue.mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ue.main,ne.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),oe.size==="small"&&{padding:5,fontSize:ne.typography.pxToRem(18)},oe.size==="large"&&{padding:12,fontSize:ne.typography.pxToRem(28)},{[`&.${iconButtonClasses$1.disabled}`]:{backgroundColor:"transparent",color:(ne.vars||ne).palette.action.disabled}})}),IconButton=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiIconButton"}),{edge:pe=!1,children:me,className:ge,color:ye="default",disabled:ve=!1,disableFocusRipple:xe=!1,size:_e="medium"}=ue,Se=_objectWithoutPropertiesLoose$2(ue,_excluded$$),$e=_extends$2({},ue,{edge:pe,color:ye,disabled:ve,disableFocusRipple:xe,size:_e}),Re=useUtilityClasses$R($e);return jsxRuntimeExports.jsx(IconButtonRoot,_extends$2({className:clsx(Re.root,ge),centerRipple:!0,focusRipple:!xe,disabled:ve,ref:ce},Se,{ownerState:$e,children:me}))}),IconButton$1=IconButton;function getTypographyUtilityClass(ne){return generateUtilityClass$2("MuiTypography",ne)}generateUtilityClasses$2("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _excluded$_=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],useUtilityClasses$Q=ne=>{const{align:oe,gutterBottom:ce,noWrap:ue,paragraph:pe,variant:me,classes:ge}=ne,ye={root:["root",me,ne.align!=="inherit"&&`align${capitalize$1(oe)}`,ce&&"gutterBottom",ue&&"noWrap",pe&&"paragraph"]};return composeClasses$1(ye,getTypographyUtilityClass,ge)},TypographyRoot=styled$1("span",{name:"MuiTypography",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.variant&&oe[ce.variant],ce.align!=="inherit"&&oe[`align${capitalize$1(ce.align)}`],ce.noWrap&&oe.noWrap,ce.gutterBottom&&oe.gutterBottom,ce.paragraph&&oe.paragraph]}})(({theme:ne,ownerState:oe})=>_extends$2({margin:0},oe.variant==="inherit"&&{font:"inherit"},oe.variant!=="inherit"&&ne.typography[oe.variant],oe.align!=="inherit"&&{textAlign:oe.align},oe.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},oe.gutterBottom&&{marginBottom:"0.35em"},oe.paragraph&&{marginBottom:16})),defaultVariantMapping={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},colorTransformations$1={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},transformDeprecatedColors$1=ne=>colorTransformations$1[ne]||ne,Typography=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTypography"}),pe=transformDeprecatedColors$1(ue.color),me=extendSxProp(_extends$2({},ue,{color:pe})),{align:ge="inherit",className:ye,component:ve,gutterBottom:xe=!1,noWrap:_e=!1,paragraph:Se=!1,variant:$e="body1",variantMapping:Re=defaultVariantMapping}=me,Ae=_objectWithoutPropertiesLoose$2(me,_excluded$_),Ie=_extends$2({},me,{align:ge,color:pe,className:ye,component:ve,gutterBottom:xe,noWrap:_e,paragraph:Se,variant:$e,variantMapping:Re}),ke=ve||(Se?"p":Re[$e]||defaultVariantMapping[$e])||"span",Be=useUtilityClasses$Q(Ie);return jsxRuntimeExports.jsx(TypographyRoot,_extends$2({as:ke,ref:ce,ownerState:Ie,className:clsx(Be.root,ye)},Ae))}),Type$2=Typography;function getAppBarUtilityClass(ne){return generateUtilityClass$2("MuiAppBar",ne)}generateUtilityClasses$2("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const _excluded$Z=["className","color","enableColorOnDark","position"],useUtilityClasses$P=ne=>{const{color:oe,position:ce,classes:ue}=ne,pe={root:["root",`color${capitalize$1(oe)}`,`position${capitalize$1(ce)}`]};return composeClasses$1(pe,getAppBarUtilityClass,ue)},joinVars=(ne,oe)=>ne?`${ne==null?void 0:ne.replace(")","")}, ${oe})`:oe,AppBarRoot=styled$1(Paper$1,{name:"MuiAppBar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`position${capitalize$1(ce.position)}`],oe[`color${capitalize$1(ce.color)}`]]}})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light"?ne.palette.grey[100]:ne.palette.grey[900];return _extends$2({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},oe.position==="fixed"&&{position:"fixed",zIndex:(ne.vars||ne).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},oe.position==="absolute"&&{position:"absolute",zIndex:(ne.vars||ne).zIndex.appBar,top:0,left:"auto",right:0},oe.position==="sticky"&&{position:"sticky",zIndex:(ne.vars||ne).zIndex.appBar,top:0,left:"auto",right:0},oe.position==="static"&&{position:"static"},oe.position==="relative"&&{position:"relative"},!ne.vars&&_extends$2({},oe.color==="default"&&{backgroundColor:ce,color:ne.palette.getContrastText(ce)},oe.color&&oe.color!=="default"&&oe.color!=="inherit"&&oe.color!=="transparent"&&{backgroundColor:ne.palette[oe.color].main,color:ne.palette[oe.color].contrastText},oe.color==="inherit"&&{color:"inherit"},ne.palette.mode==="dark"&&!oe.enableColorOnDark&&{backgroundColor:null,color:null},oe.color==="transparent"&&_extends$2({backgroundColor:"transparent",color:"inherit"},ne.palette.mode==="dark"&&{backgroundImage:"none"})),ne.vars&&_extends$2({},oe.color==="default"&&{"--AppBar-background":oe.enableColorOnDark?ne.vars.palette.AppBar.defaultBg:joinVars(ne.vars.palette.AppBar.darkBg,ne.vars.palette.AppBar.defaultBg),"--AppBar-color":oe.enableColorOnDark?ne.vars.palette.text.primary:joinVars(ne.vars.palette.AppBar.darkColor,ne.vars.palette.text.primary)},oe.color&&!oe.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":oe.enableColorOnDark?ne.vars.palette[oe.color].main:joinVars(ne.vars.palette.AppBar.darkBg,ne.vars.palette[oe.color].main),"--AppBar-color":oe.enableColorOnDark?ne.vars.palette[oe.color].contrastText:joinVars(ne.vars.palette.AppBar.darkColor,ne.vars.palette[oe.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:oe.color==="inherit"?"inherit":"var(--AppBar-color)"},oe.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),AppBar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiAppBar"}),{className:pe,color:me="primary",enableColorOnDark:ge=!1,position:ye="fixed"}=ue,ve=_objectWithoutPropertiesLoose$2(ue,_excluded$Z),xe=_extends$2({},ue,{color:me,position:ye,enableColorOnDark:ge}),_e=useUtilityClasses$P(xe);return jsxRuntimeExports.jsx(AppBarRoot,_extends$2({square:!0,component:"header",ownerState:xe,elevation:4,className:clsx(_e.root,pe,ye==="fixed"&&"mui-fixed"),ref:ce},ve))}),AppBar$1=AppBar,GLOBAL_CLASS_PREFIX="base";function buildStateClass(ne){return`${GLOBAL_CLASS_PREFIX}--${ne}`}function buildSlotClass(ne,oe){return`${GLOBAL_CLASS_PREFIX}-${ne}-${oe}`}function generateUtilityClass$1(ne,oe){const ce=globalStateClasses$1[oe];return ce?buildStateClass(ce):buildSlotClass(ne,oe)}function generateUtilityClasses$1(ne,oe){const ce={};return oe.forEach(ue=>{ce[ue]=generateUtilityClass$1(ne,ue)}),ce}function mapEventPropToEvent(ne){return ne.substring(2).toLowerCase()}function clickedRootScrollbar(ne,oe){return oe.documentElement.clientWidth(setTimeout(()=>{ve.current=!0},0),()=>{ve.current=!1}),[]);const _e=useForkRef(oe.ref,ye),Se=useEventCallback(Ae=>{const Ie=xe.current;xe.current=!1;const ke=ownerDocument(ye.current);if(!ve.current||!ye.current||"clientX"in Ae&&clickedRootScrollbar(Ae,ke))return;if(ge.current){ge.current=!1;return}let Be;Ae.composedPath?Be=Ae.composedPath().indexOf(ye.current)>-1:Be=!ke.documentElement.contains(Ae.target)||ye.current.contains(Ae.target),!Be&&(ce||!Ie)&&pe(Ae)}),$e=Ae=>Ie=>{xe.current=!0;const ke=oe.props[Ae];ke&&ke(Ie)},Re={ref:_e};return me!==!1&&(Re[me]=$e(me)),reactExports.useEffect(()=>{if(me!==!1){const Ae=mapEventPropToEvent(me),Ie=ownerDocument(ye.current),ke=()=>{ge.current=!0};return Ie.addEventListener(Ae,Se),Ie.addEventListener("touchmove",ke),()=>{Ie.removeEventListener(Ae,Se),Ie.removeEventListener("touchmove",ke)}}},[Se,me]),ue!==!1&&(Re[ue]=$e(ue)),reactExports.useEffect(()=>{if(ue!==!1){const Ae=mapEventPropToEvent(ue),Ie=ownerDocument(ye.current);return Ie.addEventListener(Ae,Se),()=>{Ie.removeEventListener(Ae,Se)}}},[Se,ue]),jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(oe,Re)})}const candidatesSelector=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(ne){const oe=parseInt(ne.getAttribute("tabindex")||"",10);return Number.isNaN(oe)?ne.contentEditable==="true"||(ne.nodeName==="AUDIO"||ne.nodeName==="VIDEO"||ne.nodeName==="DETAILS")&&ne.getAttribute("tabindex")===null?0:ne.tabIndex:oe}function isNonTabbableRadio(ne){if(ne.tagName!=="INPUT"||ne.type!=="radio"||!ne.name)return!1;const oe=ue=>ne.ownerDocument.querySelector(`input[type="radio"]${ue}`);let ce=oe(`[name="${ne.name}"]:checked`);return ce||(ce=oe(`[name="${ne.name}"]`)),ce!==ne}function isNodeMatchingSelectorFocusable(ne){return!(ne.disabled||ne.tagName==="INPUT"&&ne.type==="hidden"||isNonTabbableRadio(ne))}function defaultGetTabbable(ne){const oe=[],ce=[];return Array.from(ne.querySelectorAll(candidatesSelector)).forEach((ue,pe)=>{const me=getTabIndex(ue);me===-1||!isNodeMatchingSelectorFocusable(ue)||(me===0?oe.push(ue):ce.push({documentOrder:pe,tabIndex:me,node:ue}))}),ce.sort((ue,pe)=>ue.tabIndex===pe.tabIndex?ue.documentOrder-pe.documentOrder:ue.tabIndex-pe.tabIndex).map(ue=>ue.node).concat(oe)}function defaultIsEnabled(){return!0}function FocusTrap(ne){const{children:oe,disableAutoFocus:ce=!1,disableEnforceFocus:ue=!1,disableRestoreFocus:pe=!1,getTabbable:me=defaultGetTabbable,isEnabled:ge=defaultIsEnabled,open:ye}=ne,ve=reactExports.useRef(!1),xe=reactExports.useRef(null),_e=reactExports.useRef(null),Se=reactExports.useRef(null),$e=reactExports.useRef(null),Re=reactExports.useRef(!1),Ae=reactExports.useRef(null),Ie=useForkRef(oe.ref,Ae),ke=reactExports.useRef(null);reactExports.useEffect(()=>{!ye||!Ae.current||(Re.current=!ce)},[ce,ye]),reactExports.useEffect(()=>{if(!ye||!Ae.current)return;const Fe=ownerDocument(Ae.current);return Ae.current.contains(Fe.activeElement)||(Ae.current.hasAttribute("tabIndex")||Ae.current.setAttribute("tabIndex","-1"),Re.current&&Ae.current.focus()),()=>{pe||(Se.current&&Se.current.focus&&(ve.current=!0,Se.current.focus()),Se.current=null)}},[ye]),reactExports.useEffect(()=>{if(!ye||!Ae.current)return;const Fe=ownerDocument(Ae.current),Ue=ze=>{ke.current=ze,!(ue||!ge()||ze.key!=="Tab")&&Fe.activeElement===Ae.current&&ze.shiftKey&&(ve.current=!0,_e.current&&_e.current.focus())},We=()=>{const ze=Ae.current;if(ze===null)return;if(!Fe.hasFocus()||!ge()||ve.current){ve.current=!1;return}if(ze.contains(Fe.activeElement)||ue&&Fe.activeElement!==xe.current&&Fe.activeElement!==_e.current)return;if(Fe.activeElement!==$e.current)$e.current=null;else if($e.current!==null)return;if(!Re.current)return;let Ge=[];if((Fe.activeElement===xe.current||Fe.activeElement===_e.current)&&(Ge=me(Ae.current)),Ge.length>0){var Ze,Dt;const Je=!!((Ze=ke.current)!=null&&Ze.shiftKey&&((Dt=ke.current)==null?void 0:Dt.key)==="Tab"),Ut=Ge[0],jt=Ge[Ge.length-1];typeof Ut!="string"&&typeof jt!="string"&&(Je?jt.focus():Ut.focus())}else ze.focus()};Fe.addEventListener("focusin",We),Fe.addEventListener("keydown",Ue,!0);const qe=setInterval(()=>{Fe.activeElement&&Fe.activeElement.tagName==="BODY"&&We()},50);return()=>{clearInterval(qe),Fe.removeEventListener("focusin",We),Fe.removeEventListener("keydown",Ue,!0)}},[ce,ue,pe,ge,ye,me]);const Be=Fe=>{Se.current===null&&(Se.current=Fe.relatedTarget),Re.current=!0,$e.current=Fe.target;const Ue=oe.props.onFocus;Ue&&Ue(Fe)},Ne=Fe=>{Se.current===null&&(Se.current=Fe.relatedTarget),Re.current=!0};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{tabIndex:ye?0:-1,onFocus:Ne,ref:xe,"data-testid":"sentinelStart"}),reactExports.cloneElement(oe,{ref:Ie,onFocus:Be}),jsxRuntimeExports.jsx("div",{tabIndex:ye?0:-1,onFocus:Ne,ref:_e,"data-testid":"sentinelEnd"})]})}function getContainer$1(ne){return typeof ne=="function"?ne():ne}const Portal=reactExports.forwardRef(function(oe,ce){const{children:ue,container:pe,disablePortal:me=!1}=oe,[ge,ye]=reactExports.useState(null),ve=useForkRef(reactExports.isValidElement(ue)?ue.ref:null,ce);if(useEnhancedEffect$1(()=>{me||ye(getContainer$1(pe)||document.body)},[pe,me]),useEnhancedEffect$1(()=>{if(ge&&!me)return setRef$1(ce,ge),()=>{setRef$1(ce,null)}},[ce,ge,me]),me){if(reactExports.isValidElement(ue)){const xe={ref:ve};return reactExports.cloneElement(ue,xe)}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:ue})}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:ge&&reactDomExports.createPortal(ue,ge)})});function isOverflowing(ne){const oe=ownerDocument(ne);return oe.body===ne?ownerWindow(ne).innerWidth>oe.documentElement.clientWidth:ne.scrollHeight>ne.clientHeight}function ariaHidden(ne,oe){oe?ne.setAttribute("aria-hidden","true"):ne.removeAttribute("aria-hidden")}function getPaddingRight(ne){return parseInt(ownerWindow(ne).getComputedStyle(ne).paddingRight,10)||0}function isAriaHiddenForbiddenOnElement(ne){const ce=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(ne.tagName)!==-1,ue=ne.tagName==="INPUT"&&ne.getAttribute("type")==="hidden";return ce||ue}function ariaHiddenSiblings(ne,oe,ce,ue,pe){const me=[oe,ce,...ue];[].forEach.call(ne.children,ge=>{const ye=me.indexOf(ge)===-1,ve=!isAriaHiddenForbiddenOnElement(ge);ye&&ve&&ariaHidden(ge,pe)})}function findIndexOf(ne,oe){let ce=-1;return ne.some((ue,pe)=>oe(ue)?(ce=pe,!0):!1),ce}function handleContainer(ne,oe){const ce=[],ue=ne.container;if(!oe.disableScrollLock){if(isOverflowing(ue)){const ge=getScrollbarSize(ownerDocument(ue));ce.push({value:ue.style.paddingRight,property:"padding-right",el:ue}),ue.style.paddingRight=`${getPaddingRight(ue)+ge}px`;const ye=ownerDocument(ue).querySelectorAll(".mui-fixed");[].forEach.call(ye,ve=>{ce.push({value:ve.style.paddingRight,property:"padding-right",el:ve}),ve.style.paddingRight=`${getPaddingRight(ve)+ge}px`})}let me;if(ue.parentNode instanceof DocumentFragment)me=ownerDocument(ue).body;else{const ge=ue.parentElement,ye=ownerWindow(ue);me=(ge==null?void 0:ge.nodeName)==="HTML"&&ye.getComputedStyle(ge).overflowY==="scroll"?ge:ue}ce.push({value:me.style.overflow,property:"overflow",el:me},{value:me.style.overflowX,property:"overflow-x",el:me},{value:me.style.overflowY,property:"overflow-y",el:me}),me.style.overflow="hidden"}return()=>{ce.forEach(({value:me,el:ge,property:ye})=>{me?ge.style.setProperty(ye,me):ge.style.removeProperty(ye)})}}function getHiddenSiblings(ne){const oe=[];return[].forEach.call(ne.children,ce=>{ce.getAttribute("aria-hidden")==="true"&&oe.push(ce)}),oe}class ModalManager{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(oe,ce){let ue=this.modals.indexOf(oe);if(ue!==-1)return ue;ue=this.modals.length,this.modals.push(oe),oe.modalRef&&ariaHidden(oe.modalRef,!1);const pe=getHiddenSiblings(ce);ariaHiddenSiblings(ce,oe.mount,oe.modalRef,pe,!0);const me=findIndexOf(this.containers,ge=>ge.container===ce);return me!==-1?(this.containers[me].modals.push(oe),ue):(this.containers.push({modals:[oe],container:ce,restore:null,hiddenSiblings:pe}),ue)}mount(oe,ce){const ue=findIndexOf(this.containers,me=>me.modals.indexOf(oe)!==-1),pe=this.containers[ue];pe.restore||(pe.restore=handleContainer(pe,ce))}remove(oe,ce=!0){const ue=this.modals.indexOf(oe);if(ue===-1)return ue;const pe=findIndexOf(this.containers,ge=>ge.modals.indexOf(oe)!==-1),me=this.containers[pe];if(me.modals.splice(me.modals.indexOf(oe),1),this.modals.splice(ue,1),me.modals.length===0)me.restore&&me.restore(),oe.modalRef&&ariaHidden(oe.modalRef,ce),ariaHiddenSiblings(me.container,oe.mount,oe.modalRef,me.hiddenSiblings,!1),this.containers.splice(pe,1);else{const ge=me.modals[me.modals.length-1];ge.modalRef&&ariaHidden(ge.modalRef,!1)}return ue}isTopModal(oe){return this.modals.length>0&&this.modals[this.modals.length-1]===oe}}function getContainer(ne){return typeof ne=="function"?ne():ne}function getHasTransition(ne){return ne?ne.props.hasOwnProperty("in"):!1}const defaultManager=new ModalManager;function useModal(ne){const{container:oe,disableEscapeKeyDown:ce=!1,disableScrollLock:ue=!1,manager:pe=defaultManager,closeAfterTransition:me=!1,onTransitionEnter:ge,onTransitionExited:ye,children:ve,onClose:xe,open:_e,rootRef:Se}=ne,$e=reactExports.useRef({}),Re=reactExports.useRef(null),Ae=reactExports.useRef(null),Ie=useForkRef(Ae,Se),[ke,Be]=reactExports.useState(!_e),Ne=getHasTransition(ve);let Fe=!0;(ne["aria-hidden"]==="false"||ne["aria-hidden"]===!1)&&(Fe=!1);const Ue=()=>ownerDocument(Re.current),We=()=>($e.current.modalRef=Ae.current,$e.current.mount=Re.current,$e.current),qe=()=>{pe.mount(We(),{disableScrollLock:ue}),Ae.current&&(Ae.current.scrollTop=0)},ze=useEventCallback(()=>{const Zt=getContainer(oe)||Ue().body;pe.add(We(),Zt),Ae.current&&qe()}),Ge=reactExports.useCallback(()=>pe.isTopModal(We()),[pe]),Ze=useEventCallback(Zt=>{Re.current=Zt,Zt&&(_e&&Ge()?qe():Ae.current&&ariaHidden(Ae.current,Fe))}),Dt=reactExports.useCallback(()=>{pe.remove(We(),Fe)},[Fe,pe]);reactExports.useEffect(()=>()=>{Dt()},[Dt]),reactExports.useEffect(()=>{_e?ze():(!Ne||!me)&&Dt()},[_e,Dt,Ne,me,ze]);const Je=Zt=>en=>{var Kt;(Kt=Zt.onKeyDown)==null||Kt.call(Zt,en),!(en.key!=="Escape"||en.which===229||!Ge())&&(ce||(en.stopPropagation(),xe&&xe(en,"escapeKeyDown")))},Ut=Zt=>en=>{var Kt;(Kt=Zt.onClick)==null||Kt.call(Zt,en),en.target===en.currentTarget&&xe&&xe(en,"backdropClick")};return{getRootProps:(Zt={})=>{const en=extractEventHandlers(ne);delete en.onTransitionEnter,delete en.onTransitionExited;const Kt=_extends$2({},en,Zt);return _extends$2({role:"presentation"},Kt,{onKeyDown:Je(Kt),ref:Ie})},getBackdropProps:(Zt={})=>{const en=Zt;return _extends$2({"aria-hidden":!0},en,{onClick:Ut(en),open:_e})},getTransitionProps:()=>{const Zt=()=>{Be(!1),ge&&ge()},en=()=>{Be(!0),ye&&ye(),me&&Dt()};return{onEnter:createChainedFunction(Zt,ve==null?void 0:ve.props.onEnter),onExited:createChainedFunction(en,ve==null?void 0:ve.props.onExited)}},rootRef:Ie,portalRef:Ze,isTopModal:Ge,exited:ke,hasTransition:Ne}}var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end$1="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(ne,oe){return ne.concat([oe+"-"+start,oe+"-"+end$1])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(ne,oe){return ne.concat([oe,oe+"-"+start,oe+"-"+end$1])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(ne){return ne?(ne.nodeName||"").toLowerCase():null}function getWindow(ne){if(ne==null)return window;if(ne.toString()!=="[object Window]"){var oe=ne.ownerDocument;return oe&&oe.defaultView||window}return ne}function isElement$3(ne){var oe=getWindow(ne).Element;return ne instanceof oe||ne instanceof Element}function isHTMLElement$2(ne){var oe=getWindow(ne).HTMLElement;return ne instanceof oe||ne instanceof HTMLElement}function isShadowRoot(ne){if(typeof ShadowRoot>"u")return!1;var oe=getWindow(ne).ShadowRoot;return ne instanceof oe||ne instanceof ShadowRoot}function applyStyles(ne){var oe=ne.state;Object.keys(oe.elements).forEach(function(ce){var ue=oe.styles[ce]||{},pe=oe.attributes[ce]||{},me=oe.elements[ce];!isHTMLElement$2(me)||!getNodeName(me)||(Object.assign(me.style,ue),Object.keys(pe).forEach(function(ge){var ye=pe[ge];ye===!1?me.removeAttribute(ge):me.setAttribute(ge,ye===!0?"":ye)}))})}function effect$2(ne){var oe=ne.state,ce={popper:{position:oe.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(oe.elements.popper.style,ce.popper),oe.styles=ce,oe.elements.arrow&&Object.assign(oe.elements.arrow.style,ce.arrow),function(){Object.keys(oe.elements).forEach(function(ue){var pe=oe.elements[ue],me=oe.attributes[ue]||{},ge=Object.keys(oe.styles.hasOwnProperty(ue)?oe.styles[ue]:ce[ue]),ye=ge.reduce(function(ve,xe){return ve[xe]="",ve},{});!isHTMLElement$2(pe)||!getNodeName(pe)||(Object.assign(pe.style,ye),Object.keys(me).forEach(function(ve){pe.removeAttribute(ve)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(ne){return ne.split("-")[0]}var max$6=Math.max,min$2=Math.min,round$3=Math.round;function getUAString(){var ne=navigator.userAgentData;return ne!=null&&ne.brands&&Array.isArray(ne.brands)?ne.brands.map(function(oe){return oe.brand+"/"+oe.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect$1(ne,oe,ce){oe===void 0&&(oe=!1),ce===void 0&&(ce=!1);var ue=ne.getBoundingClientRect(),pe=1,me=1;oe&&isHTMLElement$2(ne)&&(pe=ne.offsetWidth>0&&round$3(ue.width)/ne.offsetWidth||1,me=ne.offsetHeight>0&&round$3(ue.height)/ne.offsetHeight||1);var ge=isElement$3(ne)?getWindow(ne):window,ye=ge.visualViewport,ve=!isLayoutViewport()&&ce,xe=(ue.left+(ve&&ye?ye.offsetLeft:0))/pe,_e=(ue.top+(ve&&ye?ye.offsetTop:0))/me,Se=ue.width/pe,$e=ue.height/me;return{width:Se,height:$e,top:_e,right:xe+Se,bottom:_e+$e,left:xe,x:xe,y:_e}}function getLayoutRect(ne){var oe=getBoundingClientRect$1(ne),ce=ne.offsetWidth,ue=ne.offsetHeight;return Math.abs(oe.width-ce)<=1&&(ce=oe.width),Math.abs(oe.height-ue)<=1&&(ue=oe.height),{x:ne.offsetLeft,y:ne.offsetTop,width:ce,height:ue}}function contains$5(ne,oe){var ce=oe.getRootNode&&oe.getRootNode();if(ne.contains(oe))return!0;if(ce&&isShadowRoot(ce)){var ue=oe;do{if(ue&&ne.isSameNode(ue))return!0;ue=ue.parentNode||ue.host}while(ue)}return!1}function getComputedStyle$1(ne){return getWindow(ne).getComputedStyle(ne)}function isTableElement(ne){return["table","td","th"].indexOf(getNodeName(ne))>=0}function getDocumentElement$1(ne){return((isElement$3(ne)?ne.ownerDocument:ne.document)||window.document).documentElement}function getParentNode(ne){return getNodeName(ne)==="html"?ne:ne.assignedSlot||ne.parentNode||(isShadowRoot(ne)?ne.host:null)||getDocumentElement$1(ne)}function getTrueOffsetParent(ne){return!isHTMLElement$2(ne)||getComputedStyle$1(ne).position==="fixed"?null:ne.offsetParent}function getContainingBlock(ne){var oe=/firefox/i.test(getUAString()),ce=/Trident/i.test(getUAString());if(ce&&isHTMLElement$2(ne)){var ue=getComputedStyle$1(ne);if(ue.position==="fixed")return null}var pe=getParentNode(ne);for(isShadowRoot(pe)&&(pe=pe.host);isHTMLElement$2(pe)&&["html","body"].indexOf(getNodeName(pe))<0;){var me=getComputedStyle$1(pe);if(me.transform!=="none"||me.perspective!=="none"||me.contain==="paint"||["transform","perspective"].indexOf(me.willChange)!==-1||oe&&me.willChange==="filter"||oe&&me.filter&&me.filter!=="none")return pe;pe=pe.parentNode}return null}function getOffsetParent(ne){for(var oe=getWindow(ne),ce=getTrueOffsetParent(ne);ce&&isTableElement(ce)&&getComputedStyle$1(ce).position==="static";)ce=getTrueOffsetParent(ce);return ce&&(getNodeName(ce)==="html"||getNodeName(ce)==="body"&&getComputedStyle$1(ce).position==="static")?oe:ce||getContainingBlock(ne)||oe}function getMainAxisFromPlacement(ne){return["top","bottom"].indexOf(ne)>=0?"x":"y"}function within(ne,oe,ce){return max$6(ne,min$2(oe,ce))}function withinMaxClamp(ne,oe,ce){var ue=within(ne,oe,ce);return ue>ce?ce:ue}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(ne){return Object.assign({},getFreshSideObject(),ne)}function expandToHashMap(ne,oe){return oe.reduce(function(ce,ue){return ce[ue]=ne,ce},{})}var toPaddingObject=function(oe,ce){return oe=typeof oe=="function"?oe(Object.assign({},ce.rects,{placement:ce.placement})):oe,mergePaddingObject(typeof oe!="number"?oe:expandToHashMap(oe,basePlacements))};function arrow(ne){var oe,ce=ne.state,ue=ne.name,pe=ne.options,me=ce.elements.arrow,ge=ce.modifiersData.popperOffsets,ye=getBasePlacement(ce.placement),ve=getMainAxisFromPlacement(ye),xe=[left,right].indexOf(ye)>=0,_e=xe?"height":"width";if(!(!me||!ge)){var Se=toPaddingObject(pe.padding,ce),$e=getLayoutRect(me),Re=ve==="y"?top:left,Ae=ve==="y"?bottom:right,Ie=ce.rects.reference[_e]+ce.rects.reference[ve]-ge[ve]-ce.rects.popper[_e],ke=ge[ve]-ce.rects.reference[ve],Be=getOffsetParent(me),Ne=Be?ve==="y"?Be.clientHeight||0:Be.clientWidth||0:0,Fe=Ie/2-ke/2,Ue=Se[Re],We=Ne-$e[_e]-Se[Ae],qe=Ne/2-$e[_e]/2+Fe,ze=within(Ue,qe,We),Ge=ve;ce.modifiersData[ue]=(oe={},oe[Ge]=ze,oe.centerOffset=ze-qe,oe)}}function effect$1(ne){var oe=ne.state,ce=ne.options,ue=ce.element,pe=ue===void 0?"[data-popper-arrow]":ue;pe!=null&&(typeof pe=="string"&&(pe=oe.elements.popper.querySelector(pe),!pe)||contains$5(oe.elements.popper,pe)&&(oe.elements.arrow=pe))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(ne){return ne.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(ne,oe){var ce=ne.x,ue=ne.y,pe=oe.devicePixelRatio||1;return{x:round$3(ce*pe)/pe||0,y:round$3(ue*pe)/pe||0}}function mapToStyles(ne){var oe,ce=ne.popper,ue=ne.popperRect,pe=ne.placement,me=ne.variation,ge=ne.offsets,ye=ne.position,ve=ne.gpuAcceleration,xe=ne.adaptive,_e=ne.roundOffsets,Se=ne.isFixed,$e=ge.x,Re=$e===void 0?0:$e,Ae=ge.y,Ie=Ae===void 0?0:Ae,ke=typeof _e=="function"?_e({x:Re,y:Ie}):{x:Re,y:Ie};Re=ke.x,Ie=ke.y;var Be=ge.hasOwnProperty("x"),Ne=ge.hasOwnProperty("y"),Fe=left,Ue=top,We=window;if(xe){var qe=getOffsetParent(ce),ze="clientHeight",Ge="clientWidth";if(qe===getWindow(ce)&&(qe=getDocumentElement$1(ce),getComputedStyle$1(qe).position!=="static"&&ye==="absolute"&&(ze="scrollHeight",Ge="scrollWidth")),qe=qe,pe===top||(pe===left||pe===right)&&me===end$1){Ue=bottom;var Ze=Se&&qe===We&&We.visualViewport?We.visualViewport.height:qe[ze];Ie-=Ze-ue.height,Ie*=ve?1:-1}if(pe===left||(pe===top||pe===bottom)&&me===end$1){Fe=right;var Dt=Se&&qe===We&&We.visualViewport?We.visualViewport.width:qe[Ge];Re-=Dt-ue.width,Re*=ve?1:-1}}var Je=Object.assign({position:ye},xe&&unsetSides),Ut=_e===!0?roundOffsetsByDPR({x:Re,y:Ie},getWindow(ce)):{x:Re,y:Ie};if(Re=Ut.x,Ie=Ut.y,ve){var jt;return Object.assign({},Je,(jt={},jt[Ue]=Ne?"0":"",jt[Fe]=Be?"0":"",jt.transform=(We.devicePixelRatio||1)<=1?"translate("+Re+"px, "+Ie+"px)":"translate3d("+Re+"px, "+Ie+"px, 0)",jt))}return Object.assign({},Je,(oe={},oe[Ue]=Ne?Ie+"px":"",oe[Fe]=Be?Re+"px":"",oe.transform="",oe))}function computeStyles(ne){var oe=ne.state,ce=ne.options,ue=ce.gpuAcceleration,pe=ue===void 0?!0:ue,me=ce.adaptive,ge=me===void 0?!0:me,ye=ce.roundOffsets,ve=ye===void 0?!0:ye,xe={placement:getBasePlacement(oe.placement),variation:getVariation(oe.placement),popper:oe.elements.popper,popperRect:oe.rects.popper,gpuAcceleration:pe,isFixed:oe.options.strategy==="fixed"};oe.modifiersData.popperOffsets!=null&&(oe.styles.popper=Object.assign({},oe.styles.popper,mapToStyles(Object.assign({},xe,{offsets:oe.modifiersData.popperOffsets,position:oe.options.strategy,adaptive:ge,roundOffsets:ve})))),oe.modifiersData.arrow!=null&&(oe.styles.arrow=Object.assign({},oe.styles.arrow,mapToStyles(Object.assign({},xe,{offsets:oe.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ve})))),oe.attributes.popper=Object.assign({},oe.attributes.popper,{"data-popper-placement":oe.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(ne){var oe=ne.state,ce=ne.instance,ue=ne.options,pe=ue.scroll,me=pe===void 0?!0:pe,ge=ue.resize,ye=ge===void 0?!0:ge,ve=getWindow(oe.elements.popper),xe=[].concat(oe.scrollParents.reference,oe.scrollParents.popper);return me&&xe.forEach(function(_e){_e.addEventListener("scroll",ce.update,passive)}),ye&&ve.addEventListener("resize",ce.update,passive),function(){me&&xe.forEach(function(_e){_e.removeEventListener("scroll",ce.update,passive)}),ye&&ve.removeEventListener("resize",ce.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$3={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(ne){return ne.replace(/left|right|bottom|top/g,function(oe){return hash$3[oe]})}var hash$2={start:"end",end:"start"};function getOppositeVariationPlacement(ne){return ne.replace(/start|end/g,function(oe){return hash$2[oe]})}function getWindowScroll$2(ne){var oe=getWindow(ne),ce=oe.pageXOffset,ue=oe.pageYOffset;return{scrollLeft:ce,scrollTop:ue}}function getWindowScrollBarX(ne){return getBoundingClientRect$1(getDocumentElement$1(ne)).left+getWindowScroll$2(ne).scrollLeft}function getViewportRect(ne,oe){var ce=getWindow(ne),ue=getDocumentElement$1(ne),pe=ce.visualViewport,me=ue.clientWidth,ge=ue.clientHeight,ye=0,ve=0;if(pe){me=pe.width,ge=pe.height;var xe=isLayoutViewport();(xe||!xe&&oe==="fixed")&&(ye=pe.offsetLeft,ve=pe.offsetTop)}return{width:me,height:ge,x:ye+getWindowScrollBarX(ne),y:ve}}function getDocumentRect(ne){var oe,ce=getDocumentElement$1(ne),ue=getWindowScroll$2(ne),pe=(oe=ne.ownerDocument)==null?void 0:oe.body,me=max$6(ce.scrollWidth,ce.clientWidth,pe?pe.scrollWidth:0,pe?pe.clientWidth:0),ge=max$6(ce.scrollHeight,ce.clientHeight,pe?pe.scrollHeight:0,pe?pe.clientHeight:0),ye=-ue.scrollLeft+getWindowScrollBarX(ne),ve=-ue.scrollTop;return getComputedStyle$1(pe||ce).direction==="rtl"&&(ye+=max$6(ce.clientWidth,pe?pe.clientWidth:0)-me),{width:me,height:ge,x:ye,y:ve}}function isScrollParent(ne){var oe=getComputedStyle$1(ne),ce=oe.overflow,ue=oe.overflowX,pe=oe.overflowY;return/auto|scroll|overlay|hidden/.test(ce+pe+ue)}function getScrollParent(ne){return["html","body","#document"].indexOf(getNodeName(ne))>=0?ne.ownerDocument.body:isHTMLElement$2(ne)&&isScrollParent(ne)?ne:getScrollParent(getParentNode(ne))}function listScrollParents(ne,oe){var ce;oe===void 0&&(oe=[]);var ue=getScrollParent(ne),pe=ue===((ce=ne.ownerDocument)==null?void 0:ce.body),me=getWindow(ue),ge=pe?[me].concat(me.visualViewport||[],isScrollParent(ue)?ue:[]):ue,ye=oe.concat(ge);return pe?ye:ye.concat(listScrollParents(getParentNode(ge)))}function rectToClientRect(ne){return Object.assign({},ne,{left:ne.x,top:ne.y,right:ne.x+ne.width,bottom:ne.y+ne.height})}function getInnerBoundingClientRect(ne,oe){var ce=getBoundingClientRect$1(ne,!1,oe==="fixed");return ce.top=ce.top+ne.clientTop,ce.left=ce.left+ne.clientLeft,ce.bottom=ce.top+ne.clientHeight,ce.right=ce.left+ne.clientWidth,ce.width=ne.clientWidth,ce.height=ne.clientHeight,ce.x=ce.left,ce.y=ce.top,ce}function getClientRectFromMixedType(ne,oe,ce){return oe===viewport?rectToClientRect(getViewportRect(ne,ce)):isElement$3(oe)?getInnerBoundingClientRect(oe,ce):rectToClientRect(getDocumentRect(getDocumentElement$1(ne)))}function getClippingParents(ne){var oe=listScrollParents(getParentNode(ne)),ce=["absolute","fixed"].indexOf(getComputedStyle$1(ne).position)>=0,ue=ce&&isHTMLElement$2(ne)?getOffsetParent(ne):ne;return isElement$3(ue)?oe.filter(function(pe){return isElement$3(pe)&&contains$5(pe,ue)&&getNodeName(pe)!=="body"}):[]}function getClippingRect(ne,oe,ce,ue){var pe=oe==="clippingParents"?getClippingParents(ne):[].concat(oe),me=[].concat(pe,[ce]),ge=me[0],ye=me.reduce(function(ve,xe){var _e=getClientRectFromMixedType(ne,xe,ue);return ve.top=max$6(_e.top,ve.top),ve.right=min$2(_e.right,ve.right),ve.bottom=min$2(_e.bottom,ve.bottom),ve.left=max$6(_e.left,ve.left),ve},getClientRectFromMixedType(ne,ge,ue));return ye.width=ye.right-ye.left,ye.height=ye.bottom-ye.top,ye.x=ye.left,ye.y=ye.top,ye}function computeOffsets(ne){var oe=ne.reference,ce=ne.element,ue=ne.placement,pe=ue?getBasePlacement(ue):null,me=ue?getVariation(ue):null,ge=oe.x+oe.width/2-ce.width/2,ye=oe.y+oe.height/2-ce.height/2,ve;switch(pe){case top:ve={x:ge,y:oe.y-ce.height};break;case bottom:ve={x:ge,y:oe.y+oe.height};break;case right:ve={x:oe.x+oe.width,y:ye};break;case left:ve={x:oe.x-ce.width,y:ye};break;default:ve={x:oe.x,y:oe.y}}var xe=pe?getMainAxisFromPlacement(pe):null;if(xe!=null){var _e=xe==="y"?"height":"width";switch(me){case start:ve[xe]=ve[xe]-(oe[_e]/2-ce[_e]/2);break;case end$1:ve[xe]=ve[xe]+(oe[_e]/2-ce[_e]/2);break}}return ve}function detectOverflow(ne,oe){oe===void 0&&(oe={});var ce=oe,ue=ce.placement,pe=ue===void 0?ne.placement:ue,me=ce.strategy,ge=me===void 0?ne.strategy:me,ye=ce.boundary,ve=ye===void 0?clippingParents:ye,xe=ce.rootBoundary,_e=xe===void 0?viewport:xe,Se=ce.elementContext,$e=Se===void 0?popper:Se,Re=ce.altBoundary,Ae=Re===void 0?!1:Re,Ie=ce.padding,ke=Ie===void 0?0:Ie,Be=mergePaddingObject(typeof ke!="number"?ke:expandToHashMap(ke,basePlacements)),Ne=$e===popper?reference:popper,Fe=ne.rects.popper,Ue=ne.elements[Ae?Ne:$e],We=getClippingRect(isElement$3(Ue)?Ue:Ue.contextElement||getDocumentElement$1(ne.elements.popper),ve,_e,ge),qe=getBoundingClientRect$1(ne.elements.reference),ze=computeOffsets({reference:qe,element:Fe,strategy:"absolute",placement:pe}),Ge=rectToClientRect(Object.assign({},Fe,ze)),Ze=$e===popper?Ge:qe,Dt={top:We.top-Ze.top+Be.top,bottom:Ze.bottom-We.bottom+Be.bottom,left:We.left-Ze.left+Be.left,right:Ze.right-We.right+Be.right},Je=ne.modifiersData.offset;if($e===popper&&Je){var Ut=Je[pe];Object.keys(Dt).forEach(function(jt){var Ke=[right,bottom].indexOf(jt)>=0?1:-1,an=[top,bottom].indexOf(jt)>=0?"y":"x";Dt[jt]+=Ut[an]*Ke})}return Dt}function computeAutoPlacement(ne,oe){oe===void 0&&(oe={});var ce=oe,ue=ce.placement,pe=ce.boundary,me=ce.rootBoundary,ge=ce.padding,ye=ce.flipVariations,ve=ce.allowedAutoPlacements,xe=ve===void 0?placements:ve,_e=getVariation(ue),Se=_e?ye?variationPlacements:variationPlacements.filter(function(Ae){return getVariation(Ae)===_e}):basePlacements,$e=Se.filter(function(Ae){return xe.indexOf(Ae)>=0});$e.length===0&&($e=Se);var Re=$e.reduce(function(Ae,Ie){return Ae[Ie]=detectOverflow(ne,{placement:Ie,boundary:pe,rootBoundary:me,padding:ge})[getBasePlacement(Ie)],Ae},{});return Object.keys(Re).sort(function(Ae,Ie){return Re[Ae]-Re[Ie]})}function getExpandedFallbackPlacements(ne){if(getBasePlacement(ne)===auto)return[];var oe=getOppositePlacement(ne);return[getOppositeVariationPlacement(ne),oe,getOppositeVariationPlacement(oe)]}function flip(ne){var oe=ne.state,ce=ne.options,ue=ne.name;if(!oe.modifiersData[ue]._skip){for(var pe=ce.mainAxis,me=pe===void 0?!0:pe,ge=ce.altAxis,ye=ge===void 0?!0:ge,ve=ce.fallbackPlacements,xe=ce.padding,_e=ce.boundary,Se=ce.rootBoundary,$e=ce.altBoundary,Re=ce.flipVariations,Ae=Re===void 0?!0:Re,Ie=ce.allowedAutoPlacements,ke=oe.options.placement,Be=getBasePlacement(ke),Ne=Be===ke,Fe=ve||(Ne||!Ae?[getOppositePlacement(ke)]:getExpandedFallbackPlacements(ke)),Ue=[ke].concat(Fe).reduce(function(Sn,Cn){return Sn.concat(getBasePlacement(Cn)===auto?computeAutoPlacement(oe,{placement:Cn,boundary:_e,rootBoundary:Se,padding:xe,flipVariations:Ae,allowedAutoPlacements:Ie}):Cn)},[]),We=oe.rects.reference,qe=oe.rects.popper,ze=new Map,Ge=!0,Ze=Ue[0],Dt=0;Dt=0,an=Ke?"width":"height",Zt=detectOverflow(oe,{placement:Je,boundary:_e,rootBoundary:Se,altBoundary:$e,padding:xe}),en=Ke?jt?right:left:jt?bottom:top;We[an]>qe[an]&&(en=getOppositePlacement(en));var Kt=getOppositePlacement(en),Wt=[];if(me&&Wt.push(Zt[Ut]<=0),ye&&Wt.push(Zt[en]<=0,Zt[Kt]<=0),Wt.every(function(Sn){return Sn})){Ze=Je,Ge=!1;break}ze.set(Je,Wt)}if(Ge)for(var un=Ae?3:1,Xt=function(Cn){var Nt=Ue.find(function(Yt){var Jt=ze.get(Yt);if(Jt)return Jt.slice(0,Cn).every(function(hn){return hn})});if(Nt)return Ze=Nt,"break"},nn=un;nn>0;nn--){var vn=Xt(nn);if(vn==="break")break}oe.placement!==Ze&&(oe.modifiersData[ue]._skip=!0,oe.placement=Ze,oe.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(ne,oe,ce){return ce===void 0&&(ce={x:0,y:0}),{top:ne.top-oe.height-ce.y,right:ne.right-oe.width+ce.x,bottom:ne.bottom-oe.height+ce.y,left:ne.left-oe.width-ce.x}}function isAnySideFullyClipped(ne){return[top,right,bottom,left].some(function(oe){return ne[oe]>=0})}function hide(ne){var oe=ne.state,ce=ne.name,ue=oe.rects.reference,pe=oe.rects.popper,me=oe.modifiersData.preventOverflow,ge=detectOverflow(oe,{elementContext:"reference"}),ye=detectOverflow(oe,{altBoundary:!0}),ve=getSideOffsets(ge,ue),xe=getSideOffsets(ye,pe,me),_e=isAnySideFullyClipped(ve),Se=isAnySideFullyClipped(xe);oe.modifiersData[ce]={referenceClippingOffsets:ve,popperEscapeOffsets:xe,isReferenceHidden:_e,hasPopperEscaped:Se},oe.attributes.popper=Object.assign({},oe.attributes.popper,{"data-popper-reference-hidden":_e,"data-popper-escaped":Se})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(ne,oe,ce){var ue=getBasePlacement(ne),pe=[left,top].indexOf(ue)>=0?-1:1,me=typeof ce=="function"?ce(Object.assign({},oe,{placement:ne})):ce,ge=me[0],ye=me[1];return ge=ge||0,ye=(ye||0)*pe,[left,right].indexOf(ue)>=0?{x:ye,y:ge}:{x:ge,y:ye}}function offset$1(ne){var oe=ne.state,ce=ne.options,ue=ne.name,pe=ce.offset,me=pe===void 0?[0,0]:pe,ge=placements.reduce(function(_e,Se){return _e[Se]=distanceAndSkiddingToXY(Se,oe.rects,me),_e},{}),ye=ge[oe.placement],ve=ye.x,xe=ye.y;oe.modifiersData.popperOffsets!=null&&(oe.modifiersData.popperOffsets.x+=ve,oe.modifiersData.popperOffsets.y+=xe),oe.modifiersData[ue]=ge}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(ne){var oe=ne.state,ce=ne.name;oe.modifiersData[ce]=computeOffsets({reference:oe.rects.reference,element:oe.rects.popper,strategy:"absolute",placement:oe.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(ne){return ne==="x"?"y":"x"}function preventOverflow(ne){var oe=ne.state,ce=ne.options,ue=ne.name,pe=ce.mainAxis,me=pe===void 0?!0:pe,ge=ce.altAxis,ye=ge===void 0?!1:ge,ve=ce.boundary,xe=ce.rootBoundary,_e=ce.altBoundary,Se=ce.padding,$e=ce.tether,Re=$e===void 0?!0:$e,Ae=ce.tetherOffset,Ie=Ae===void 0?0:Ae,ke=detectOverflow(oe,{boundary:ve,rootBoundary:xe,padding:Se,altBoundary:_e}),Be=getBasePlacement(oe.placement),Ne=getVariation(oe.placement),Fe=!Ne,Ue=getMainAxisFromPlacement(Be),We=getAltAxis(Ue),qe=oe.modifiersData.popperOffsets,ze=oe.rects.reference,Ge=oe.rects.popper,Ze=typeof Ie=="function"?Ie(Object.assign({},oe.rects,{placement:oe.placement})):Ie,Dt=typeof Ze=="number"?{mainAxis:Ze,altAxis:Ze}:Object.assign({mainAxis:0,altAxis:0},Ze),Je=oe.modifiersData.offset?oe.modifiersData.offset[oe.placement]:null,Ut={x:0,y:0};if(qe){if(me){var jt,Ke=Ue==="y"?top:left,an=Ue==="y"?bottom:right,Zt=Ue==="y"?"height":"width",en=qe[Ue],Kt=en+ke[Ke],Wt=en-ke[an],un=Re?-Ge[Zt]/2:0,Xt=Ne===start?ze[Zt]:Ge[Zt],nn=Ne===start?-Ge[Zt]:-ze[Zt],vn=oe.elements.arrow,Sn=Re&&vn?getLayoutRect(vn):{width:0,height:0},Cn=oe.modifiersData["arrow#persistent"]?oe.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Nt=Cn[Ke],Yt=Cn[an],Jt=within(0,ze[Zt],Sn[Zt]),hn=Fe?ze[Zt]/2-un-Jt-Nt-Dt.mainAxis:Xt-Jt-Nt-Dt.mainAxis,Ye=Fe?-ze[Zt]/2+un+Jt+Yt+Dt.mainAxis:nn+Jt+Yt+Dt.mainAxis,Xe=oe.elements.arrow&&getOffsetParent(oe.elements.arrow),Pt=Xe?Ue==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,sn=(jt=Je==null?void 0:Je[Ue])!=null?jt:0,yn=en+hn-sn-Pt,qt=en+Ye-sn,wn=within(Re?min$2(Kt,yn):Kt,en,Re?max$6(Wt,qt):Wt);qe[Ue]=wn,Ut[Ue]=wn-en}if(ye){var Tn,xn=Ue==="x"?top:left,Nn=Ue==="x"?bottom:right,zn=qe[We],Yn=We==="y"?"height":"width",Kn=zn+ke[xn],Rn=zn-ke[Nn],Mn=[top,left].indexOf(Be)!==-1,Xn=(Tn=Je==null?void 0:Je[We])!=null?Tn:0,Jn=Mn?Kn:zn-ze[Yn]-Ge[Yn]-Xn+Dt.altAxis,pn=Mn?zn+ze[Yn]+Ge[Yn]-Xn-Dt.altAxis:Rn,tn=Re&&Mn?withinMaxClamp(Jn,zn,pn):within(Re?Jn:Kn,zn,Re?pn:Rn);qe[We]=tn,Ut[We]=tn-zn}oe.modifiersData[ue]=Ut}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(ne){return{scrollLeft:ne.scrollLeft,scrollTop:ne.scrollTop}}function getNodeScroll(ne){return ne===getWindow(ne)||!isHTMLElement$2(ne)?getWindowScroll$2(ne):getHTMLElementScroll(ne)}function isElementScaled(ne){var oe=ne.getBoundingClientRect(),ce=round$3(oe.width)/ne.offsetWidth||1,ue=round$3(oe.height)/ne.offsetHeight||1;return ce!==1||ue!==1}function getCompositeRect(ne,oe,ce){ce===void 0&&(ce=!1);var ue=isHTMLElement$2(oe),pe=isHTMLElement$2(oe)&&isElementScaled(oe),me=getDocumentElement$1(oe),ge=getBoundingClientRect$1(ne,pe,ce),ye={scrollLeft:0,scrollTop:0},ve={x:0,y:0};return(ue||!ue&&!ce)&&((getNodeName(oe)!=="body"||isScrollParent(me))&&(ye=getNodeScroll(oe)),isHTMLElement$2(oe)?(ve=getBoundingClientRect$1(oe,!0),ve.x+=oe.clientLeft,ve.y+=oe.clientTop):me&&(ve.x=getWindowScrollBarX(me))),{x:ge.left+ye.scrollLeft-ve.x,y:ge.top+ye.scrollTop-ve.y,width:ge.width,height:ge.height}}function order(ne){var oe=new Map,ce=new Set,ue=[];ne.forEach(function(me){oe.set(me.name,me)});function pe(me){ce.add(me.name);var ge=[].concat(me.requires||[],me.requiresIfExists||[]);ge.forEach(function(ye){if(!ce.has(ye)){var ve=oe.get(ye);ve&&pe(ve)}}),ue.push(me)}return ne.forEach(function(me){ce.has(me.name)||pe(me)}),ue}function orderModifiers(ne){var oe=order(ne);return modifierPhases.reduce(function(ce,ue){return ce.concat(oe.filter(function(pe){return pe.phase===ue}))},[])}function debounce$1(ne){var oe;return function(){return oe||(oe=new Promise(function(ce){Promise.resolve().then(function(){oe=void 0,ce(ne())})})),oe}}function mergeByName(ne){var oe=ne.reduce(function(ce,ue){var pe=ce[ue.name];return ce[ue.name]=pe?Object.assign({},pe,ue,{options:Object.assign({},pe.options,ue.options),data:Object.assign({},pe.data,ue.data)}):ue,ce},{});return Object.keys(oe).map(function(ce){return oe[ce]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var ne=arguments.length,oe=new Array(ne),ce=0;cecomposeClasses$1({root:["root"]},useClassNamesOverride(getPopperUtilityClass)),defaultPopperOptions={},PopperTooltip=reactExports.forwardRef(function(oe,ce){var ue;const{anchorEl:pe,children:me,direction:ge,disablePortal:ye,modifiers:ve,open:xe,placement:_e,popperOptions:Se,popperRef:$e,slotProps:Re={},slots:Ae={},TransitionProps:Ie}=oe,ke=_objectWithoutPropertiesLoose$2(oe,_excluded$Y),Be=reactExports.useRef(null),Ne=useForkRef(Be,ce),Fe=reactExports.useRef(null),Ue=useForkRef(Fe,$e),We=reactExports.useRef(Ue);useEnhancedEffect$1(()=>{We.current=Ue},[Ue]),reactExports.useImperativeHandle($e,()=>Fe.current,[]);const qe=flipPlacement(_e,ge),[ze,Ge]=reactExports.useState(qe),[Ze,Dt]=reactExports.useState(resolveAnchorEl$1(pe));reactExports.useEffect(()=>{Fe.current&&Fe.current.forceUpdate()}),reactExports.useEffect(()=>{pe&&Dt(resolveAnchorEl$1(pe))},[pe]),useEnhancedEffect$1(()=>{if(!Ze||!xe)return;const an=Kt=>{Ge(Kt.placement)};let Zt=[{name:"preventOverflow",options:{altBoundary:ye}},{name:"flip",options:{altBoundary:ye}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:Kt})=>{an(Kt)}}];ve!=null&&(Zt=Zt.concat(ve)),Se&&Se.modifiers!=null&&(Zt=Zt.concat(Se.modifiers));const en=createPopper(Ze,Be.current,_extends$2({placement:qe},Se,{modifiers:Zt}));return We.current(en),()=>{en.destroy(),We.current(null)}},[Ze,ye,ve,xe,Se,qe]);const Je={placement:ze};Ie!==null&&(Je.TransitionProps=Ie);const Ut=useUtilityClasses$O(),jt=(ue=Ae.root)!=null?ue:"div",Ke=useSlotProps({elementType:jt,externalSlotProps:Re.root,externalForwardedProps:ke,additionalProps:{role:"tooltip",ref:Ne},ownerState:oe,className:Ut.root});return jsxRuntimeExports.jsx(jt,_extends$2({},Ke,{children:typeof me=="function"?me(Je):me}))}),Popper$2=reactExports.forwardRef(function(oe,ce){const{anchorEl:ue,children:pe,container:me,direction:ge="ltr",disablePortal:ye=!1,keepMounted:ve=!1,modifiers:xe,open:_e,placement:Se="bottom",popperOptions:$e=defaultPopperOptions,popperRef:Re,style:Ae,transition:Ie=!1,slotProps:ke={},slots:Be={}}=oe,Ne=_objectWithoutPropertiesLoose$2(oe,_excluded2$5),[Fe,Ue]=reactExports.useState(!0),We=()=>{Ue(!1)},qe=()=>{Ue(!0)};if(!ve&&!_e&&(!Ie||Fe))return null;let ze;if(me)ze=me;else if(ue){const Dt=resolveAnchorEl$1(ue);ze=Dt&&isHTMLElement$1(Dt)?ownerDocument(Dt).body:ownerDocument(null).body}const Ge=!_e&&ve&&(!Ie||Fe)?"none":void 0,Ze=Ie?{in:_e,onEnter:We,onExited:qe}:void 0;return jsxRuntimeExports.jsx(Portal,{disablePortal:ye,container:ze,children:jsxRuntimeExports.jsx(PopperTooltip,_extends$2({anchorEl:ue,direction:ge,disablePortal:ye,modifiers:xe,ref:ce,open:Ie?!Fe:_e,placement:Se,popperOptions:$e,popperRef:Re,slotProps:ke,slots:Be},Ne,{style:_extends$2({position:"fixed",top:0,left:0,display:Ge},Ae),TransitionProps:Ze,children:pe}))})}),INTENTIONAL_DRAG_COUNT_THRESHOLD=2;function asc(ne,oe){return ne-oe}function findClosest(ne,oe){var ce;const{index:ue}=(ce=ne.reduce((pe,me,ge)=>{const ye=Math.abs(oe-me);return pe===null||ye({left:`${ne}%`}),leap:ne=>({width:`${ne}%`})},"horizontal-reverse":{offset:ne=>({right:`${ne}%`}),leap:ne=>({width:`${ne}%`})},vertical:{offset:ne=>({bottom:`${ne}%`}),leap:ne=>({height:`${ne}%`})}},Identity$1=ne=>ne;let cachedSupportsTouchActionNone;function doesSupportTouchActionNone(){return cachedSupportsTouchActionNone===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?cachedSupportsTouchActionNone=CSS.supports("touch-action","none"):cachedSupportsTouchActionNone=!0),cachedSupportsTouchActionNone}function useSlider(ne){const{"aria-labelledby":oe,defaultValue:ce,disabled:ue=!1,disableSwap:pe=!1,isRtl:me=!1,marks:ge=!1,max:ye=100,min:ve=0,name:xe,onChange:_e,onChangeCommitted:Se,orientation:$e="horizontal",rootRef:Re,scale:Ae=Identity$1,step:Ie=1,shiftStep:ke=10,tabIndex:Be,value:Ne}=ne,Fe=reactExports.useRef(),[Ue,We]=reactExports.useState(-1),[qe,ze]=reactExports.useState(-1),[Ge,Ze]=reactExports.useState(!1),Dt=reactExports.useRef(0),[Je,Ut]=useControlled({controlled:Ne,default:ce??ve,name:"Slider"}),jt=_e&&((tn,Gt,bn)=>{const kn=tn.nativeEvent||tn,jn=new kn.constructor(kn.type,kn);Object.defineProperty(jn,"target",{writable:!0,value:{value:Gt,name:xe}}),_e(jn,Gt,bn)}),Ke=Array.isArray(Je);let an=Ke?Je.slice().sort(asc):[Je];an=an.map(tn=>tn==null?ve:clamp$3(tn,ve,ye));const Zt=ge===!0&&Ie!==null?[...Array(Math.floor((ye-ve)/Ie)+1)].map((tn,Gt)=>({value:ve+Ie*Gt})):ge||[],en=Zt.map(tn=>tn.value),{isFocusVisibleRef:Kt,onBlur:Wt,onFocus:un,ref:Xt}=useIsFocusVisible(),[nn,vn]=reactExports.useState(-1),Sn=reactExports.useRef(),Cn=useForkRef(Xt,Sn),Nt=useForkRef(Re,Cn),Yt=tn=>Gt=>{var bn;const kn=Number(Gt.currentTarget.getAttribute("data-index"));un(Gt),Kt.current===!0&&vn(kn),ze(kn),tn==null||(bn=tn.onFocus)==null||bn.call(tn,Gt)},Jt=tn=>Gt=>{var bn;Wt(Gt),Kt.current===!1&&vn(-1),ze(-1),tn==null||(bn=tn.onBlur)==null||bn.call(tn,Gt)},hn=(tn,Gt)=>{const bn=Number(tn.currentTarget.getAttribute("data-index")),kn=an[bn],jn=en.indexOf(kn);let Wn=Gt;if(Zt&&Ie==null){const dn=en[en.length-1];Wn>dn?Wn=dn:WnGt=>{var bn;if(Ie!==null){const kn=Number(Gt.currentTarget.getAttribute("data-index")),jn=an[kn];let Wn=null;(Gt.key==="ArrowLeft"||Gt.key==="ArrowDown")&&Gt.shiftKey||Gt.key==="PageDown"?Wn=Math.max(jn-ke,ve):((Gt.key==="ArrowRight"||Gt.key==="ArrowUp")&&Gt.shiftKey||Gt.key==="PageUp")&&(Wn=Math.min(jn+ke,ye)),Wn!==null&&(hn(Gt,Wn),Gt.preventDefault())}tn==null||(bn=tn.onKeyDown)==null||bn.call(tn,Gt)};useEnhancedEffect$1(()=>{if(ue&&Sn.current.contains(document.activeElement)){var tn;(tn=document.activeElement)==null||tn.blur()}},[ue]),ue&&Ue!==-1&&We(-1),ue&&nn!==-1&&vn(-1);const Xe=tn=>Gt=>{var bn;(bn=tn.onChange)==null||bn.call(tn,Gt),hn(Gt,Gt.target.valueAsNumber)},Pt=reactExports.useRef();let sn=$e;me&&$e==="horizontal"&&(sn+="-reverse");const yn=({finger:tn,move:Gt=!1})=>{const{current:bn}=Sn,{width:kn,height:jn,bottom:Wn,left:dn}=bn.getBoundingClientRect();let Bn;sn.indexOf("vertical")===0?Bn=(Wn-tn.y)/jn:Bn=(tn.x-dn)/kn,sn.indexOf("-reverse")!==-1&&(Bn=1-Bn);let mn;if(mn=percentToValue(Bn,ve,ye),Ie)mn=roundValueToStep(mn,Ie,ve);else{const ur=findClosest(en,mn);mn=en[ur]}mn=clamp$3(mn,ve,ye);let Pn=0;if(Ke){Gt?Pn=Pt.current:Pn=findClosest(an,mn),pe&&(mn=clamp$3(mn,an[Pn-1]||-1/0,an[Pn+1]||1/0));const ur=mn;mn=setValueIndex({values:an,newValue:mn,index:Pn}),pe&&Gt||(Pn=mn.indexOf(ur),Pt.current=Pn)}return{newValue:mn,activeIndex:Pn}},qt=useEventCallback(tn=>{const Gt=trackFinger(tn,Fe);if(!Gt)return;if(Dt.current+=1,tn.type==="mousemove"&&tn.buttons===0){wn(tn);return}const{newValue:bn,activeIndex:kn}=yn({finger:Gt,move:!0});focusThumb({sliderRef:Sn,activeIndex:kn,setActive:We}),Ut(bn),!Ge&&Dt.current>INTENTIONAL_DRAG_COUNT_THRESHOLD&&Ze(!0),jt&&!areValuesEqual(bn,Je)&&jt(tn,bn,kn)}),wn=useEventCallback(tn=>{const Gt=trackFinger(tn,Fe);if(Ze(!1),!Gt)return;const{newValue:bn}=yn({finger:Gt,move:!0});We(-1),tn.type==="touchend"&&ze(-1),Se&&Se(tn,bn),Fe.current=void 0,xn()}),Tn=useEventCallback(tn=>{if(ue)return;doesSupportTouchActionNone()||tn.preventDefault();const Gt=tn.changedTouches[0];Gt!=null&&(Fe.current=Gt.identifier);const bn=trackFinger(tn,Fe);if(bn!==!1){const{newValue:jn,activeIndex:Wn}=yn({finger:bn});focusThumb({sliderRef:Sn,activeIndex:Wn,setActive:We}),Ut(jn),jt&&!areValuesEqual(jn,Je)&&jt(tn,jn,Wn)}Dt.current=0;const kn=ownerDocument(Sn.current);kn.addEventListener("touchmove",qt,{passive:!0}),kn.addEventListener("touchend",wn,{passive:!0})}),xn=reactExports.useCallback(()=>{const tn=ownerDocument(Sn.current);tn.removeEventListener("mousemove",qt),tn.removeEventListener("mouseup",wn),tn.removeEventListener("touchmove",qt),tn.removeEventListener("touchend",wn)},[wn,qt]);reactExports.useEffect(()=>{const{current:tn}=Sn;return tn.addEventListener("touchstart",Tn,{passive:doesSupportTouchActionNone()}),()=>{tn.removeEventListener("touchstart",Tn),xn()}},[xn,Tn]),reactExports.useEffect(()=>{ue&&xn()},[ue,xn]);const Nn=tn=>Gt=>{var bn;if((bn=tn.onMouseDown)==null||bn.call(tn,Gt),ue||Gt.defaultPrevented||Gt.button!==0)return;Gt.preventDefault();const kn=trackFinger(Gt,Fe);if(kn!==!1){const{newValue:Wn,activeIndex:dn}=yn({finger:kn});focusThumb({sliderRef:Sn,activeIndex:dn,setActive:We}),Ut(Wn),jt&&!areValuesEqual(Wn,Je)&&jt(Gt,Wn,dn)}Dt.current=0;const jn=ownerDocument(Sn.current);jn.addEventListener("mousemove",qt,{passive:!0}),jn.addEventListener("mouseup",wn)},zn=valueToPercent(Ke?an[0]:ve,ve,ye),Yn=valueToPercent(an[an.length-1],ve,ye)-zn,Kn=(tn={})=>{const Gt=extractEventHandlers(tn),bn={onMouseDown:Nn(Gt||{})},kn=_extends$2({},Gt,bn);return _extends$2({},tn,{ref:Nt},kn)},Rn=tn=>Gt=>{var bn;(bn=tn.onMouseOver)==null||bn.call(tn,Gt);const kn=Number(Gt.currentTarget.getAttribute("data-index"));ze(kn)},Mn=tn=>Gt=>{var bn;(bn=tn.onMouseLeave)==null||bn.call(tn,Gt),ze(-1)};return{active:Ue,axis:sn,axisProps,dragging:Ge,focusedThumbIndex:nn,getHiddenInputProps:(tn={})=>{var Gt;const bn=extractEventHandlers(tn),kn={onChange:Xe(bn||{}),onFocus:Yt(bn||{}),onBlur:Jt(bn||{}),onKeyDown:Ye(bn||{})},jn=_extends$2({},bn,kn);return _extends$2({tabIndex:Be,"aria-labelledby":oe,"aria-orientation":$e,"aria-valuemax":Ae(ye),"aria-valuemin":Ae(ve),name:xe,type:"range",min:ne.min,max:ne.max,step:ne.step===null&&ne.marks?"any":(Gt=ne.step)!=null?Gt:void 0,disabled:ue},tn,jn,{style:_extends$2({},visuallyHidden$3,{direction:me?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Kn,getThumbProps:(tn={})=>{const Gt=extractEventHandlers(tn),bn={onMouseOver:Rn(Gt||{}),onMouseLeave:Mn(Gt||{})};return _extends$2({},tn,Gt,bn)},marks:Zt,open:qe,range:Ke,rootRef:Nt,trackLeap:Yn,trackOffset:zn,values:an,getThumbStyle:tn=>({pointerEvents:Ue!==-1&&Ue!==tn?"none":void 0})}}function useSnackbar$1(ne={}){const{autoHideDuration:oe=null,disableWindowBlurListener:ce=!1,onClose:ue,open:pe,resumeHideDuration:me}=ne,ge=useTimeout();reactExports.useEffect(()=>{if(!pe)return;function Be(Ne){Ne.defaultPrevented||(Ne.key==="Escape"||Ne.key==="Esc")&&(ue==null||ue(Ne,"escapeKeyDown"))}return document.addEventListener("keydown",Be),()=>{document.removeEventListener("keydown",Be)}},[pe,ue]);const ye=useEventCallback((Be,Ne)=>{ue==null||ue(Be,Ne)}),ve=useEventCallback(Be=>{!ue||Be==null||ge.start(Be,()=>{ye(null,"timeout")})});reactExports.useEffect(()=>(pe&&ve(oe),ge.clear),[pe,oe,ve,ge]);const xe=Be=>{ue==null||ue(Be,"clickaway")},_e=ge.clear,Se=reactExports.useCallback(()=>{oe!=null&&ve(me??oe*.5)},[oe,me,ve]),$e=Be=>Ne=>{const Fe=Be.onBlur;Fe==null||Fe(Ne),Se()},Re=Be=>Ne=>{const Fe=Be.onFocus;Fe==null||Fe(Ne),_e()},Ae=Be=>Ne=>{const Fe=Be.onMouseEnter;Fe==null||Fe(Ne),_e()},Ie=Be=>Ne=>{const Fe=Be.onMouseLeave;Fe==null||Fe(Ne),Se()};return reactExports.useEffect(()=>{if(!ce&&pe)return window.addEventListener("focus",Se),window.addEventListener("blur",_e),()=>{window.removeEventListener("focus",Se),window.removeEventListener("blur",_e)}},[ce,pe,Se,_e]),{getRootProps:(Be={})=>{const Ne=_extends$2({},extractEventHandlers(ne),extractEventHandlers(Be));return _extends$2({role:"presentation"},Be,Ne,{onBlur:$e(Ne),onFocus:Re(Ne),onMouseEnter:Ae(Ne),onMouseLeave:Ie(Ne)})},onClickAway:xe}}const _excluded$X=["onChange","maxRows","minRows","style","value"];function getStyleValue(ne){return parseInt(ne,10)||0}const styles$5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function isEmpty$3(ne){return ne==null||Object.keys(ne).length===0||ne.outerHeightStyle===0&&!ne.overflowing}const TextareaAutosize=reactExports.forwardRef(function(oe,ce){const{onChange:ue,maxRows:pe,minRows:me=1,style:ge,value:ye}=oe,ve=_objectWithoutPropertiesLoose$2(oe,_excluded$X),{current:xe}=reactExports.useRef(ye!=null),_e=reactExports.useRef(null),Se=useForkRef(ce,_e),$e=reactExports.useRef(null),Re=reactExports.useCallback(()=>{const ke=_e.current,Ne=ownerWindow(ke).getComputedStyle(ke);if(Ne.width==="0px")return{outerHeightStyle:0,overflowing:!1};const Fe=$e.current;Fe.style.width=Ne.width,Fe.value=ke.value||oe.placeholder||"x",Fe.value.slice(-1)===` +`&&(Fe.value+=" ");const Ue=Ne.boxSizing,We=getStyleValue(Ne.paddingBottom)+getStyleValue(Ne.paddingTop),qe=getStyleValue(Ne.borderBottomWidth)+getStyleValue(Ne.borderTopWidth),ze=Fe.scrollHeight;Fe.value="x";const Ge=Fe.scrollHeight;let Ze=ze;me&&(Ze=Math.max(Number(me)*Ge,Ze)),pe&&(Ze=Math.min(Number(pe)*Ge,Ze)),Ze=Math.max(Ze,Ge);const Dt=Ze+(Ue==="border-box"?We+qe:0),Je=Math.abs(Ze-ze)<=1;return{outerHeightStyle:Dt,overflowing:Je}},[pe,me,oe.placeholder]),Ae=reactExports.useCallback(()=>{const ke=Re();if(isEmpty$3(ke))return;const Be=_e.current;Be.style.height=`${ke.outerHeightStyle}px`,Be.style.overflow=ke.overflowing?"hidden":""},[Re]);useEnhancedEffect$1(()=>{const ke=()=>{Ae()};let Be;const Ne=debounce$2(ke),Fe=_e.current,Ue=ownerWindow(Fe);Ue.addEventListener("resize",Ne);let We;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(ke),We.observe(Fe)),()=>{Ne.clear(),cancelAnimationFrame(Be),Ue.removeEventListener("resize",Ne),We&&We.disconnect()}},[Re,Ae]),useEnhancedEffect$1(()=>{Ae()});const Ie=ke=>{xe||Ae(),ue&&ue(ke)};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",_extends$2({value:ye,onChange:Ie,ref:Se,rows:me,style:ge},ve)),jsxRuntimeExports.jsx("textarea",{"aria-hidden":!0,className:oe.className,readOnly:!0,ref:$e,tabIndex:-1,style:_extends$2({},styles$5.shadow,ge,{paddingTop:0,paddingBottom:0})})]})});var useThemeWithoutDefault={};Object.defineProperty(useThemeWithoutDefault,"__esModule",{value:!0});var default_1=useThemeWithoutDefault.default=void 0,React$1=_interopRequireWildcard(reactExports),_styledEngine=require$$1;function _getRequireWildcardCache(ne){if(typeof WeakMap!="function")return null;var oe=new WeakMap,ce=new WeakMap;return(_getRequireWildcardCache=function(ue){return ue?ce:oe})(ne)}function _interopRequireWildcard(ne,oe){if(!oe&&ne&&ne.__esModule)return ne;if(ne===null||typeof ne!="object"&&typeof ne!="function")return{default:ne};var ce=_getRequireWildcardCache(oe);if(ce&&ce.has(ne))return ce.get(ne);var ue={__proto__:null},pe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var me in ne)if(me!=="default"&&Object.prototype.hasOwnProperty.call(ne,me)){var ge=pe?Object.getOwnPropertyDescriptor(ne,me):null;ge&&(ge.get||ge.set)?Object.defineProperty(ue,me,ge):ue[me]=ne[me]}return ue.default=ne,ce&&ce.set(ne,ue),ue}function isObjectEmpty(ne){return Object.keys(ne).length===0}function useTheme(ne=null){const oe=React$1.useContext(_styledEngine.ThemeContext);return!oe||isObjectEmpty(oe)?ne:oe}default_1=useThemeWithoutDefault.default=useTheme;const _excluded$W=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],PopperRoot=styled$1(Popper$2,{name:"MuiPopper",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),Popper=reactExports.forwardRef(function(oe,ce){var ue;const pe=default_1(),me=useThemeProps$3({props:oe,name:"MuiPopper"}),{anchorEl:ge,component:ye,components:ve,componentsProps:xe,container:_e,disablePortal:Se,keepMounted:$e,modifiers:Re,open:Ae,placement:Ie,popperOptions:ke,popperRef:Be,transition:Ne,slots:Fe,slotProps:Ue}=me,We=_objectWithoutPropertiesLoose$2(me,_excluded$W),qe=(ue=Fe==null?void 0:Fe.root)!=null?ue:ve==null?void 0:ve.Root,ze=_extends$2({anchorEl:ge,container:_e,disablePortal:Se,keepMounted:$e,modifiers:Re,open:Ae,placement:Ie,popperOptions:ke,popperRef:Be,transition:Ne},We);return jsxRuntimeExports.jsx(PopperRoot,_extends$2({as:ye,direction:pe==null?void 0:pe.direction,slots:{root:qe},slotProps:Ue??xe},ze,{ref:ce}))}),Popper$1=Popper;function getListSubheaderUtilityClass(ne){return generateUtilityClass$2("MuiListSubheader",ne)}generateUtilityClasses$2("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const _excluded$V=["className","color","component","disableGutters","disableSticky","inset"],useUtilityClasses$N=ne=>{const{classes:oe,color:ce,disableGutters:ue,inset:pe,disableSticky:me}=ne,ge={root:["root",ce!=="default"&&`color${capitalize$1(ce)}`,!ue&&"gutters",pe&&"inset",!me&&"sticky"]};return composeClasses$1(ge,getListSubheaderUtilityClass,oe)},ListSubheaderRoot=styled$1("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`],!ce.disableGutters&&oe.gutters,ce.inset&&oe.inset,!ce.disableSticky&&oe.sticky]}})(({theme:ne,ownerState:oe})=>_extends$2({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(ne.vars||ne).palette.text.secondary,fontFamily:ne.typography.fontFamily,fontWeight:ne.typography.fontWeightMedium,fontSize:ne.typography.pxToRem(14)},oe.color==="primary"&&{color:(ne.vars||ne).palette.primary.main},oe.color==="inherit"&&{color:"inherit"},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},oe.inset&&{paddingLeft:72},!oe.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(ne.vars||ne).palette.background.paper})),ListSubheader=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListSubheader"}),{className:pe,color:me="default",component:ge="li",disableGutters:ye=!1,disableSticky:ve=!1,inset:xe=!1}=ue,_e=_objectWithoutPropertiesLoose$2(ue,_excluded$V),Se=_extends$2({},ue,{color:me,component:ge,disableGutters:ye,disableSticky:ve,inset:xe}),$e=useUtilityClasses$N(Se);return jsxRuntimeExports.jsx(ListSubheaderRoot,_extends$2({as:ge,className:clsx($e.root,pe),ref:ce,ownerState:Se},_e))});ListSubheader.muiSkipListHighlight=!0;const ListSubheader$1=ListSubheader,CancelIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function getChipUtilityClass(ne){return generateUtilityClass$2("MuiChip",ne)}const chipClasses=generateUtilityClasses$2("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),chipClasses$1=chipClasses,_excluded$U=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],useUtilityClasses$M=ne=>{const{classes:oe,disabled:ce,size:ue,color:pe,iconColor:me,onDelete:ge,clickable:ye,variant:ve}=ne,xe={root:["root",ve,ce&&"disabled",`size${capitalize$1(ue)}`,`color${capitalize$1(pe)}`,ye&&"clickable",ye&&`clickableColor${capitalize$1(pe)}`,ge&&"deletable",ge&&`deletableColor${capitalize$1(pe)}`,`${ve}${capitalize$1(pe)}`],label:["label",`label${capitalize$1(ue)}`],avatar:["avatar",`avatar${capitalize$1(ue)}`,`avatarColor${capitalize$1(pe)}`],icon:["icon",`icon${capitalize$1(ue)}`,`iconColor${capitalize$1(me)}`],deleteIcon:["deleteIcon",`deleteIcon${capitalize$1(ue)}`,`deleteIconColor${capitalize$1(pe)}`,`deleteIcon${capitalize$1(ve)}Color${capitalize$1(pe)}`]};return composeClasses$1(xe,getChipUtilityClass,oe)},ChipRoot=styled$1("div",{name:"MuiChip",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne,{color:ue,iconColor:pe,clickable:me,onDelete:ge,size:ye,variant:ve}=ce;return[{[`& .${chipClasses$1.avatar}`]:oe.avatar},{[`& .${chipClasses$1.avatar}`]:oe[`avatar${capitalize$1(ye)}`]},{[`& .${chipClasses$1.avatar}`]:oe[`avatarColor${capitalize$1(ue)}`]},{[`& .${chipClasses$1.icon}`]:oe.icon},{[`& .${chipClasses$1.icon}`]:oe[`icon${capitalize$1(ye)}`]},{[`& .${chipClasses$1.icon}`]:oe[`iconColor${capitalize$1(pe)}`]},{[`& .${chipClasses$1.deleteIcon}`]:oe.deleteIcon},{[`& .${chipClasses$1.deleteIcon}`]:oe[`deleteIcon${capitalize$1(ye)}`]},{[`& .${chipClasses$1.deleteIcon}`]:oe[`deleteIconColor${capitalize$1(ue)}`]},{[`& .${chipClasses$1.deleteIcon}`]:oe[`deleteIcon${capitalize$1(ve)}Color${capitalize$1(ue)}`]},oe.root,oe[`size${capitalize$1(ye)}`],oe[`color${capitalize$1(ue)}`],me&&oe.clickable,me&&ue!=="default"&&oe[`clickableColor${capitalize$1(ue)})`],ge&&oe.deletable,ge&&ue!=="default"&&oe[`deletableColor${capitalize$1(ue)}`],oe[ve],oe[`${ve}${capitalize$1(ue)}`]]}})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light"?ne.palette.grey[700]:ne.palette.grey[300];return _extends$2({maxWidth:"100%",fontFamily:ne.typography.fontFamily,fontSize:ne.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(ne.vars||ne).palette.text.primary,backgroundColor:(ne.vars||ne).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:ne.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${chipClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${chipClasses$1.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:ne.vars?ne.vars.palette.Chip.defaultAvatarColor:ce,fontSize:ne.typography.pxToRem(12)},[`& .${chipClasses$1.avatarColorPrimary}`]:{color:(ne.vars||ne).palette.primary.contrastText,backgroundColor:(ne.vars||ne).palette.primary.dark},[`& .${chipClasses$1.avatarColorSecondary}`]:{color:(ne.vars||ne).palette.secondary.contrastText,backgroundColor:(ne.vars||ne).palette.secondary.dark},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:ne.typography.pxToRem(10)},[`& .${chipClasses$1.icon}`]:_extends$2({marginLeft:5,marginRight:-6},oe.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},oe.iconColor===oe.color&&_extends$2({color:ne.vars?ne.vars.palette.Chip.defaultIconColor:ce},oe.color!=="default"&&{color:"inherit"})),[`& .${chipClasses$1.deleteIcon}`]:_extends$2({WebkitTapHighlightColor:"transparent",color:ne.vars?`rgba(${ne.vars.palette.text.primaryChannel} / 0.26)`:alpha_1(ne.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:ne.vars?`rgba(${ne.vars.palette.text.primaryChannel} / 0.4)`:alpha_1(ne.palette.text.primary,.4)}},oe.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},oe.color!=="default"&&{color:ne.vars?`rgba(${ne.vars.palette[oe.color].contrastTextChannel} / 0.7)`:alpha_1(ne.palette[oe.color].contrastText,.7),"&:hover, &:active":{color:(ne.vars||ne).palette[oe.color].contrastText}})},oe.size==="small"&&{height:24},oe.color!=="default"&&{backgroundColor:(ne.vars||ne).palette[oe.color].main,color:(ne.vars||ne).palette[oe.color].contrastText},oe.onDelete&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.selectedChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.action.selected,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},oe.onDelete&&oe.color!=="default"&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette[oe.color].dark}})},({theme:ne,ownerState:oe})=>_extends$2({},oe.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.selectedChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.action.selected,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.selectedChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.action.selected,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)},"&:active":{boxShadow:(ne.vars||ne).shadows[1]}},oe.clickable&&oe.color!=="default"&&{[`&:hover, &.${chipClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette[oe.color].dark}}),({theme:ne,ownerState:oe})=>_extends$2({},oe.variant==="outlined"&&{backgroundColor:"transparent",border:ne.vars?`1px solid ${ne.vars.palette.Chip.defaultBorder}`:`1px solid ${ne.palette.mode==="light"?ne.palette.grey[400]:ne.palette.grey[700]}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:(ne.vars||ne).palette.action.hover},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`& .${chipClasses$1.avatar}`]:{marginLeft:4},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:2},[`& .${chipClasses$1.icon}`]:{marginLeft:4},[`& .${chipClasses$1.iconSmall}`]:{marginLeft:2},[`& .${chipClasses$1.deleteIcon}`]:{marginRight:5},[`& .${chipClasses$1.deleteIconSmall}`]:{marginRight:3}},oe.variant==="outlined"&&oe.color!=="default"&&{color:(ne.vars||ne).palette[oe.color].main,border:`1px solid ${ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / 0.7)`:alpha_1(ne.palette[oe.color].main,.7)}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.focusOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.focusOpacity)},[`& .${chipClasses$1.deleteIcon}`]:{color:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / 0.7)`:alpha_1(ne.palette[oe.color].main,.7),"&:hover, &:active":{color:(ne.vars||ne).palette[oe.color].main}}})),ChipLabel=styled$1("span",{name:"MuiChip",slot:"Label",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne,{size:ue}=ce;return[oe.label,oe[`label${capitalize$1(ue)}`]]}})(({ownerState:ne})=>_extends$2({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},ne.variant==="outlined"&&{paddingLeft:11,paddingRight:11},ne.size==="small"&&{paddingLeft:8,paddingRight:8},ne.size==="small"&&ne.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function isDeleteKeyboardEvent(ne){return ne.key==="Backspace"||ne.key==="Delete"}const Chip=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiChip"}),{avatar:pe,className:me,clickable:ge,color:ye="default",component:ve,deleteIcon:xe,disabled:_e=!1,icon:Se,label:$e,onClick:Re,onDelete:Ae,onKeyDown:Ie,onKeyUp:ke,size:Be="medium",variant:Ne="filled",tabIndex:Fe,skipFocusWhenDisabled:Ue=!1}=ue,We=_objectWithoutPropertiesLoose$2(ue,_excluded$U),qe=reactExports.useRef(null),ze=useForkRef(qe,ce),Ge=Wt=>{Wt.stopPropagation(),Ae&&Ae(Wt)},Ze=Wt=>{Wt.currentTarget===Wt.target&&isDeleteKeyboardEvent(Wt)&&Wt.preventDefault(),Ie&&Ie(Wt)},Dt=Wt=>{Wt.currentTarget===Wt.target&&(Ae&&isDeleteKeyboardEvent(Wt)?Ae(Wt):Wt.key==="Escape"&&qe.current&&qe.current.blur()),ke&&ke(Wt)},Je=ge!==!1&&Re?!0:ge,Ut=Je||Ae?ButtonBase$1:ve||"div",jt=_extends$2({},ue,{component:Ut,disabled:_e,size:Be,color:ye,iconColor:reactExports.isValidElement(Se)&&Se.props.color||ye,onDelete:!!Ae,clickable:Je,variant:Ne}),Ke=useUtilityClasses$M(jt),an=Ut===ButtonBase$1?_extends$2({component:ve||"div",focusVisibleClassName:Ke.focusVisible},Ae&&{disableRipple:!0}):{};let Zt=null;Ae&&(Zt=xe&&reactExports.isValidElement(xe)?reactExports.cloneElement(xe,{className:clsx(xe.props.className,Ke.deleteIcon),onClick:Ge}):jsxRuntimeExports.jsx(CancelIcon,{className:clsx(Ke.deleteIcon),onClick:Ge}));let en=null;pe&&reactExports.isValidElement(pe)&&(en=reactExports.cloneElement(pe,{className:clsx(Ke.avatar,pe.props.className)}));let Kt=null;return Se&&reactExports.isValidElement(Se)&&(Kt=reactExports.cloneElement(Se,{className:clsx(Ke.icon,Se.props.className)})),jsxRuntimeExports.jsxs(ChipRoot,_extends$2({as:Ut,className:clsx(Ke.root,me),disabled:Je&&_e?!0:void 0,onClick:Re,onKeyDown:Ze,onKeyUp:Dt,ref:ze,tabIndex:Ue&&_e?-1:Fe,ownerState:jt},an,We,{children:[en||Kt,jsxRuntimeExports.jsx(ChipLabel,{className:clsx(Ke.label),ownerState:jt,children:$e}),Zt]}))}),Chip$1=Chip;function formControlState({props:ne,states:oe,muiFormControl:ce}){return oe.reduce((ue,pe)=>(ue[pe]=ne[pe],ce&&typeof ne[pe]>"u"&&(ue[pe]=ce[pe]),ue),{})}const FormControlContext=reactExports.createContext(void 0),FormControlContext$1=FormControlContext;function useFormControl(){return reactExports.useContext(FormControlContext$1)}function GlobalStyles(ne){return jsxRuntimeExports.jsx(GlobalStyles$1,_extends$2({},ne,{defaultTheme:defaultTheme$2,themeId:THEME_ID}))}function hasValue(ne){return ne!=null&&!(Array.isArray(ne)&&ne.length===0)}function isFilled(ne,oe=!1){return ne&&(hasValue(ne.value)&&ne.value!==""||oe&&hasValue(ne.defaultValue)&&ne.defaultValue!=="")}function isAdornedStart(ne){return ne.startAdornment}function getInputBaseUtilityClass(ne){return generateUtilityClass$2("MuiInputBase",ne)}const inputBaseClasses=generateUtilityClasses$2("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),inputBaseClasses$1=inputBaseClasses,_excluded$T=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],rootOverridesResolver=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.formControl&&oe.formControl,ce.startAdornment&&oe.adornedStart,ce.endAdornment&&oe.adornedEnd,ce.error&&oe.error,ce.size==="small"&&oe.sizeSmall,ce.multiline&&oe.multiline,ce.color&&oe[`color${capitalize$1(ce.color)}`],ce.fullWidth&&oe.fullWidth,ce.hiddenLabel&&oe.hiddenLabel]},inputOverridesResolver=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.input,ce.size==="small"&&oe.inputSizeSmall,ce.multiline&&oe.inputMultiline,ce.type==="search"&&oe.inputTypeSearch,ce.startAdornment&&oe.inputAdornedStart,ce.endAdornment&&oe.inputAdornedEnd,ce.hiddenLabel&&oe.inputHiddenLabel]},useUtilityClasses$L=ne=>{const{classes:oe,color:ce,disabled:ue,error:pe,endAdornment:me,focused:ge,formControl:ye,fullWidth:ve,hiddenLabel:xe,multiline:_e,readOnly:Se,size:$e,startAdornment:Re,type:Ae}=ne,Ie={root:["root",`color${capitalize$1(ce)}`,ue&&"disabled",pe&&"error",ve&&"fullWidth",ge&&"focused",ye&&"formControl",$e&&$e!=="medium"&&`size${capitalize$1($e)}`,_e&&"multiline",Re&&"adornedStart",me&&"adornedEnd",xe&&"hiddenLabel",Se&&"readOnly"],input:["input",ue&&"disabled",Ae==="search"&&"inputTypeSearch",_e&&"inputMultiline",$e==="small"&&"inputSizeSmall",xe&&"inputHiddenLabel",Re&&"inputAdornedStart",me&&"inputAdornedEnd",Se&&"readOnly"]};return composeClasses$1(Ie,getInputBaseUtilityClass,oe)},InputBaseRoot=styled$1("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({},ne.typography.body1,{color:(ne.vars||ne).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${inputBaseClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled,cursor:"default"}},oe.multiline&&_extends$2({padding:"4px 0 5px"},oe.size==="small"&&{paddingTop:1}),oe.fullWidth&&{width:"100%"})),InputBaseComponent=styled$1("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light",ue=_extends$2({color:"currentColor"},ne.vars?{opacity:ne.vars.opacity.inputPlaceholder}:{opacity:ce?.42:.5},{transition:ne.transitions.create("opacity",{duration:ne.transitions.duration.shorter})}),pe={opacity:"0 !important"},me=ne.vars?{opacity:ne.vars.opacity.inputPlaceholder}:{opacity:ce?.42:.5};return _extends$2({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":ue,"&::-moz-placeholder":ue,"&:-ms-input-placeholder":ue,"&::-ms-input-placeholder":ue,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${inputBaseClasses$1.formControl} &`]:{"&::-webkit-input-placeholder":pe,"&::-moz-placeholder":pe,"&:-ms-input-placeholder":pe,"&::-ms-input-placeholder":pe,"&:focus::-webkit-input-placeholder":me,"&:focus::-moz-placeholder":me,"&:focus:-ms-input-placeholder":me,"&:focus::-ms-input-placeholder":me},[`&.${inputBaseClasses$1.disabled}`]:{opacity:1,WebkitTextFillColor:(ne.vars||ne).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},oe.size==="small"&&{paddingTop:1},oe.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},oe.type==="search"&&{MozAppearance:"textfield"})}),inputGlobalStyles=jsxRuntimeExports.jsx(GlobalStyles,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),InputBase=reactExports.forwardRef(function(oe,ce){var ue;const pe=useThemeProps$3({props:oe,name:"MuiInputBase"}),{"aria-describedby":me,autoComplete:ge,autoFocus:ye,className:ve,components:xe={},componentsProps:_e={},defaultValue:Se,disabled:$e,disableInjectingGlobalStyles:Re,endAdornment:Ae,fullWidth:Ie=!1,id:ke,inputComponent:Be="input",inputProps:Ne={},inputRef:Fe,maxRows:Ue,minRows:We,multiline:qe=!1,name:ze,onBlur:Ge,onChange:Ze,onClick:Dt,onFocus:Je,onKeyDown:Ut,onKeyUp:jt,placeholder:Ke,readOnly:an,renderSuffix:Zt,rows:en,slotProps:Kt={},slots:Wt={},startAdornment:un,type:Xt="text",value:nn}=pe,vn=_objectWithoutPropertiesLoose$2(pe,_excluded$T),Sn=Ne.value!=null?Ne.value:nn,{current:Cn}=reactExports.useRef(Sn!=null),Nt=reactExports.useRef(),Yt=reactExports.useCallback(tn=>{},[]),Jt=useForkRef(Nt,Fe,Ne.ref,Yt),[hn,Ye]=reactExports.useState(!1),Xe=useFormControl(),Pt=formControlState({props:pe,muiFormControl:Xe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Pt.focused=Xe?Xe.focused:hn,reactExports.useEffect(()=>{!Xe&&$e&&hn&&(Ye(!1),Ge&&Ge())},[Xe,$e,hn,Ge]);const sn=Xe&&Xe.onFilled,yn=Xe&&Xe.onEmpty,qt=reactExports.useCallback(tn=>{isFilled(tn)?sn&&sn():yn&&yn()},[sn,yn]);useEnhancedEffect$1(()=>{Cn&&qt({value:Sn})},[Sn,qt,Cn]);const wn=tn=>{if(Pt.disabled){tn.stopPropagation();return}Je&&Je(tn),Ne.onFocus&&Ne.onFocus(tn),Xe&&Xe.onFocus?Xe.onFocus(tn):Ye(!0)},Tn=tn=>{Ge&&Ge(tn),Ne.onBlur&&Ne.onBlur(tn),Xe&&Xe.onBlur?Xe.onBlur(tn):Ye(!1)},xn=(tn,...Gt)=>{if(!Cn){const bn=tn.target||Nt.current;if(bn==null)throw new Error(formatMuiErrorMessage$1(1));qt({value:bn.value})}Ne.onChange&&Ne.onChange(tn,...Gt),Ze&&Ze(tn,...Gt)};reactExports.useEffect(()=>{qt(Nt.current)},[]);const Nn=tn=>{Nt.current&&tn.currentTarget===tn.target&&Nt.current.focus(),Dt&&Dt(tn)};let zn=Be,Yn=Ne;qe&&zn==="input"&&(en?Yn=_extends$2({type:void 0,minRows:en,maxRows:en},Yn):Yn=_extends$2({type:void 0,maxRows:Ue,minRows:We},Yn),zn=TextareaAutosize);const Kn=tn=>{qt(tn.animationName==="mui-auto-fill-cancel"?Nt.current:{value:"x"})};reactExports.useEffect(()=>{Xe&&Xe.setAdornedStart(!!un)},[Xe,un]);const Rn=_extends$2({},pe,{color:Pt.color||"primary",disabled:Pt.disabled,endAdornment:Ae,error:Pt.error,focused:Pt.focused,formControl:Xe,fullWidth:Ie,hiddenLabel:Pt.hiddenLabel,multiline:qe,size:Pt.size,startAdornment:un,type:Xt}),Mn=useUtilityClasses$L(Rn),Xn=Wt.root||xe.Root||InputBaseRoot,Jn=Kt.root||_e.root||{},pn=Wt.input||xe.Input||InputBaseComponent;return Yn=_extends$2({},Yn,(ue=Kt.input)!=null?ue:_e.input),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!Re&&inputGlobalStyles,jsxRuntimeExports.jsxs(Xn,_extends$2({},Jn,!isHostComponent(Xn)&&{ownerState:_extends$2({},Rn,Jn.ownerState)},{ref:ce,onClick:Nn},vn,{className:clsx(Mn.root,Jn.className,ve,an&&"MuiInputBase-readOnly"),children:[un,jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(pn,_extends$2({ownerState:Rn,"aria-invalid":Pt.error,"aria-describedby":me,autoComplete:ge,autoFocus:ye,defaultValue:Se,disabled:Pt.disabled,id:ke,onAnimationStart:Kn,name:ze,placeholder:Ke,readOnly:an,required:Pt.required,rows:en,value:Sn,onKeyDown:Ut,onKeyUp:jt,type:Xt},Yn,!isHostComponent(pn)&&{as:zn,ownerState:_extends$2({},Rn,Yn.ownerState)},{ref:Jt,className:clsx(Mn.input,Yn.className,an&&"MuiInputBase-readOnly"),onBlur:Tn,onChange:xn,onFocus:wn}))}),Ae,Zt?Zt(_extends$2({},Pt,{startAdornment:un})):null]}))]})}),InputBase$1=InputBase;function getInputUtilityClass(ne){return generateUtilityClass$2("MuiInput",ne)}const inputClasses=_extends$2({},inputBaseClasses$1,generateUtilityClasses$2("MuiInput",["root","underline","input"])),inputClasses$1=inputClasses;function getOutlinedInputUtilityClass(ne){return generateUtilityClass$2("MuiOutlinedInput",ne)}const outlinedInputClasses=_extends$2({},inputBaseClasses$1,generateUtilityClasses$2("MuiOutlinedInput",["root","notchedOutline","input"])),outlinedInputClasses$1=outlinedInputClasses;function getFilledInputUtilityClass(ne){return generateUtilityClass$2("MuiFilledInput",ne)}const filledInputClasses=_extends$2({},inputBaseClasses$1,generateUtilityClasses$2("MuiFilledInput",["root","underline","input"])),filledInputClasses$1=filledInputClasses,ArrowDropDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Person=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function getAvatarUtilityClass(ne){return generateUtilityClass$2("MuiAvatar",ne)}generateUtilityClasses$2("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const _excluded$S=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],useThemeProps$2=createUseThemeProps(),useUtilityClasses$K=ne=>{const{classes:oe,variant:ce,colorDefault:ue}=ne;return composeClasses$1({root:["root",ce,ue&&"colorDefault"],img:["img"],fallback:["fallback"]},getAvatarUtilityClass,oe)},AvatarRoot=styled$1("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],ce.colorDefault&&oe.colorDefault]}})(({theme:ne})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:ne.typography.fontFamily,fontSize:ne.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(ne.vars||ne).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:_extends$2({color:(ne.vars||ne).palette.background.default},ne.vars?{backgroundColor:ne.vars.palette.Avatar.defaultBg}:_extends$2({backgroundColor:ne.palette.grey[400]},ne.applyStyles("dark",{backgroundColor:ne.palette.grey[600]})))}]})),AvatarImg=styled$1("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(ne,oe)=>oe.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),AvatarFallback=styled$1(Person,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(ne,oe)=>oe.fallback})({width:"75%",height:"75%"});function useLoaded({crossOrigin:ne,referrerPolicy:oe,src:ce,srcSet:ue}){const[pe,me]=reactExports.useState(!1);return reactExports.useEffect(()=>{if(!ce&&!ue)return;me(!1);let ge=!0;const ye=new Image;return ye.onload=()=>{ge&&me("loaded")},ye.onerror=()=>{ge&&me("error")},ye.crossOrigin=ne,ye.referrerPolicy=oe,ye.src=ce,ue&&(ye.srcset=ue),()=>{ge=!1}},[ne,oe,ce,ue]),pe}const Avatar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$2({props:oe,name:"MuiAvatar"}),{alt:pe,children:me,className:ge,component:ye="div",slots:ve={},slotProps:xe={},imgProps:_e,sizes:Se,src:$e,srcSet:Re,variant:Ae="circular"}=ue,Ie=_objectWithoutPropertiesLoose$2(ue,_excluded$S);let ke=null;const Be=useLoaded(_extends$2({},_e,{src:$e,srcSet:Re})),Ne=$e||Re,Fe=Ne&&Be!=="error",Ue=_extends$2({},ue,{colorDefault:!Fe,component:ye,variant:Ae}),We=useUtilityClasses$K(Ue),[qe,ze]=useSlot("img",{className:We.img,elementType:AvatarImg,externalForwardedProps:{slots:ve,slotProps:{img:_extends$2({},_e,xe.img)}},additionalProps:{alt:pe,src:$e,srcSet:Re,sizes:Se},ownerState:Ue});return Fe?ke=jsxRuntimeExports.jsx(qe,_extends$2({},ze)):me||me===0?ke=me:Ne&&pe?ke=pe[0]:ke=jsxRuntimeExports.jsx(AvatarFallback,{ownerState:Ue,className:We.fallback}),jsxRuntimeExports.jsx(AvatarRoot,_extends$2({as:ye,ownerState:Ue,className:clsx(We.root,ge),ref:ce},Ie,{children:ke}))}),Avatar$1=Avatar,_excluded$R=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],styles$4={entering:{opacity:1},entered:{opacity:1}},Fade=reactExports.forwardRef(function(oe,ce){const ue=useTheme$1(),pe={enter:ue.transitions.duration.enteringScreen,exit:ue.transitions.duration.leavingScreen},{addEndListener:me,appear:ge=!0,children:ye,easing:ve,in:xe,onEnter:_e,onEntered:Se,onEntering:$e,onExit:Re,onExited:Ae,onExiting:Ie,style:ke,timeout:Be=pe,TransitionComponent:Ne=Transition$1}=oe,Fe=_objectWithoutPropertiesLoose$2(oe,_excluded$R),Ue=reactExports.useRef(null),We=useForkRef(Ue,ye.ref,ce),qe=Ke=>an=>{if(Ke){const Zt=Ue.current;an===void 0?Ke(Zt):Ke(Zt,an)}},ze=qe($e),Ge=qe((Ke,an)=>{reflow$1(Ke);const Zt=getTransitionProps$1({style:ke,timeout:Be,easing:ve},{mode:"enter"});Ke.style.webkitTransition=ue.transitions.create("opacity",Zt),Ke.style.transition=ue.transitions.create("opacity",Zt),_e&&_e(Ke,an)}),Ze=qe(Se),Dt=qe(Ie),Je=qe(Ke=>{const an=getTransitionProps$1({style:ke,timeout:Be,easing:ve},{mode:"exit"});Ke.style.webkitTransition=ue.transitions.create("opacity",an),Ke.style.transition=ue.transitions.create("opacity",an),Re&&Re(Ke)}),Ut=qe(Ae),jt=Ke=>{me&&me(Ue.current,Ke)};return jsxRuntimeExports.jsx(Ne,_extends$2({appear:ge,in:xe,nodeRef:Ue,onEnter:Ge,onEntered:Ze,onEntering:ze,onExit:Je,onExited:Ut,onExiting:Dt,addEndListener:jt,timeout:Be},Fe,{children:(Ke,an)=>reactExports.cloneElement(ye,_extends$2({style:_extends$2({opacity:0,visibility:Ke==="exited"&&!xe?"hidden":void 0},styles$4[Ke],ke,ye.props.style),ref:We},an))}))}),Fade$1=Fade;function getBackdropUtilityClass(ne){return generateUtilityClass$2("MuiBackdrop",ne)}generateUtilityClasses$2("MuiBackdrop",["root","invisible"]);const _excluded$Q=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],useUtilityClasses$J=ne=>{const{classes:oe,invisible:ce}=ne;return composeClasses$1({root:["root",ce&&"invisible"]},getBackdropUtilityClass,oe)},BackdropRoot=styled$1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.invisible&&oe.invisible]}})(({ownerState:ne})=>_extends$2({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},ne.invisible&&{backgroundColor:"transparent"})),Backdrop=reactExports.forwardRef(function(oe,ce){var ue,pe,me;const ge=useThemeProps$3({props:oe,name:"MuiBackdrop"}),{children:ye,className:ve,component:xe="div",components:_e={},componentsProps:Se={},invisible:$e=!1,open:Re,slotProps:Ae={},slots:Ie={},TransitionComponent:ke=Fade$1,transitionDuration:Be}=ge,Ne=_objectWithoutPropertiesLoose$2(ge,_excluded$Q),Fe=_extends$2({},ge,{component:xe,invisible:$e}),Ue=useUtilityClasses$J(Fe),We=(ue=Ae.root)!=null?ue:Se.root;return jsxRuntimeExports.jsx(ke,_extends$2({in:Re,timeout:Be},Ne,{children:jsxRuntimeExports.jsx(BackdropRoot,_extends$2({"aria-hidden":!0},We,{as:(pe=(me=Ie.root)!=null?me:_e.Root)!=null?pe:xe,className:clsx(Ue.root,ve,We==null?void 0:We.className),ownerState:_extends$2({},Fe,We==null?void 0:We.ownerState),classes:Ue,ref:ce,children:ye}))}))}),Backdrop$1=Backdrop,boxClasses=generateUtilityClasses$2("MuiBox",["root"]),boxClasses$1=boxClasses,defaultTheme=createTheme(),Box=createBox$1({themeId:THEME_ID,defaultTheme,defaultClassName:boxClasses$1.root,generateClassName:ClassNameGenerator$3.generate}),Box$1=Box;function getButtonUtilityClass(ne){return generateUtilityClass$2("MuiButton",ne)}const buttonClasses=generateUtilityClasses$2("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),buttonClasses$1=buttonClasses,ButtonGroupContext=reactExports.createContext({}),ButtonGroupContext$1=ButtonGroupContext,ButtonGroupButtonContext=reactExports.createContext(void 0),ButtonGroupButtonContext$1=ButtonGroupButtonContext,_excluded$P=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],useUtilityClasses$I=ne=>{const{color:oe,disableElevation:ce,fullWidth:ue,size:pe,variant:me,classes:ge}=ne,ye={root:["root",me,`${me}${capitalize$1(oe)}`,`size${capitalize$1(pe)}`,`${me}Size${capitalize$1(pe)}`,`color${capitalize$1(oe)}`,ce&&"disableElevation",ue&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${capitalize$1(pe)}`],endIcon:["icon","endIcon",`iconSize${capitalize$1(pe)}`]},ve=composeClasses$1(ye,getButtonUtilityClass,ge);return _extends$2({},ge,ve)},commonIconStyles=ne=>_extends$2({},ne.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},ne.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},ne.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),ButtonRoot=styled$1(ButtonBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiButton",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],oe[`${ce.variant}${capitalize$1(ce.color)}`],oe[`size${capitalize$1(ce.size)}`],oe[`${ce.variant}Size${capitalize$1(ce.size)}`],ce.color==="inherit"&&oe.colorInherit,ce.disableElevation&&oe.disableElevation,ce.fullWidth&&oe.fullWidth]}})(({theme:ne,ownerState:oe})=>{var ce,ue;const pe=ne.palette.mode==="light"?ne.palette.grey[300]:ne.palette.grey[800],me=ne.palette.mode==="light"?ne.palette.grey.A100:ne.palette.grey[700];return _extends$2({},ne.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(ne.vars||ne).shape.borderRadius,transition:ne.transitions.create(["background-color","box-shadow","border-color","color"],{duration:ne.transitions.duration.short}),"&:hover":_extends$2({textDecoration:"none",backgroundColor:ne.vars?`rgba(${ne.vars.palette.text.primaryChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette.text.primary,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},oe.variant==="text"&&oe.color!=="inherit"&&{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},oe.variant==="outlined"&&oe.color!=="inherit"&&{border:`1px solid ${(ne.vars||ne).palette[oe.color].main}`,backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe.color].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},oe.variant==="contained"&&{backgroundColor:ne.vars?ne.vars.palette.Button.inheritContainedHoverBg:me,boxShadow:(ne.vars||ne).shadows[4],"@media (hover: none)":{boxShadow:(ne.vars||ne).shadows[2],backgroundColor:(ne.vars||ne).palette.grey[300]}},oe.variant==="contained"&&oe.color!=="inherit"&&{backgroundColor:(ne.vars||ne).palette[oe.color].dark,"@media (hover: none)":{backgroundColor:(ne.vars||ne).palette[oe.color].main}}),"&:active":_extends$2({},oe.variant==="contained"&&{boxShadow:(ne.vars||ne).shadows[8]}),[`&.${buttonClasses$1.focusVisible}`]:_extends$2({},oe.variant==="contained"&&{boxShadow:(ne.vars||ne).shadows[6]}),[`&.${buttonClasses$1.disabled}`]:_extends$2({color:(ne.vars||ne).palette.action.disabled},oe.variant==="outlined"&&{border:`1px solid ${(ne.vars||ne).palette.action.disabledBackground}`},oe.variant==="contained"&&{color:(ne.vars||ne).palette.action.disabled,boxShadow:(ne.vars||ne).shadows[0],backgroundColor:(ne.vars||ne).palette.action.disabledBackground})},oe.variant==="text"&&{padding:"6px 8px"},oe.variant==="text"&&oe.color!=="inherit"&&{color:(ne.vars||ne).palette[oe.color].main},oe.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},oe.variant==="outlined"&&oe.color!=="inherit"&&{color:(ne.vars||ne).palette[oe.color].main,border:ne.vars?`1px solid rgba(${ne.vars.palette[oe.color].mainChannel} / 0.5)`:`1px solid ${alpha_1(ne.palette[oe.color].main,.5)}`},oe.variant==="contained"&&{color:ne.vars?ne.vars.palette.text.primary:(ce=(ue=ne.palette).getContrastText)==null?void 0:ce.call(ue,ne.palette.grey[300]),backgroundColor:ne.vars?ne.vars.palette.Button.inheritContainedBg:pe,boxShadow:(ne.vars||ne).shadows[2]},oe.variant==="contained"&&oe.color!=="inherit"&&{color:(ne.vars||ne).palette[oe.color].contrastText,backgroundColor:(ne.vars||ne).palette[oe.color].main},oe.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},oe.size==="small"&&oe.variant==="text"&&{padding:"4px 5px",fontSize:ne.typography.pxToRem(13)},oe.size==="large"&&oe.variant==="text"&&{padding:"8px 11px",fontSize:ne.typography.pxToRem(15)},oe.size==="small"&&oe.variant==="outlined"&&{padding:"3px 9px",fontSize:ne.typography.pxToRem(13)},oe.size==="large"&&oe.variant==="outlined"&&{padding:"7px 21px",fontSize:ne.typography.pxToRem(15)},oe.size==="small"&&oe.variant==="contained"&&{padding:"4px 10px",fontSize:ne.typography.pxToRem(13)},oe.size==="large"&&oe.variant==="contained"&&{padding:"8px 22px",fontSize:ne.typography.pxToRem(15)},oe.fullWidth&&{width:"100%"})},({ownerState:ne})=>ne.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${buttonClasses$1.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${buttonClasses$1.disabled}`]:{boxShadow:"none"}}),ButtonStartIcon=styled$1("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.startIcon,oe[`iconSize${capitalize$1(ce.size)}`]]}})(({ownerState:ne})=>_extends$2({display:"inherit",marginRight:8,marginLeft:-4},ne.size==="small"&&{marginLeft:-2},commonIconStyles(ne))),ButtonEndIcon=styled$1("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.endIcon,oe[`iconSize${capitalize$1(ce.size)}`]]}})(({ownerState:ne})=>_extends$2({display:"inherit",marginRight:-4,marginLeft:8},ne.size==="small"&&{marginRight:-2},commonIconStyles(ne))),Button$1=reactExports.forwardRef(function(oe,ce){const ue=reactExports.useContext(ButtonGroupContext$1),pe=reactExports.useContext(ButtonGroupButtonContext$1),me=resolveProps(ue,oe),ge=useThemeProps$3({props:me,name:"MuiButton"}),{children:ye,color:ve="primary",component:xe="button",className:_e,disabled:Se=!1,disableElevation:$e=!1,disableFocusRipple:Re=!1,endIcon:Ae,focusVisibleClassName:Ie,fullWidth:ke=!1,size:Be="medium",startIcon:Ne,type:Fe,variant:Ue="text"}=ge,We=_objectWithoutPropertiesLoose$2(ge,_excluded$P),qe=_extends$2({},ge,{color:ve,component:xe,disabled:Se,disableElevation:$e,disableFocusRipple:Re,fullWidth:ke,size:Be,type:Fe,variant:Ue}),ze=useUtilityClasses$I(qe),Ge=Ne&&jsxRuntimeExports.jsx(ButtonStartIcon,{className:ze.startIcon,ownerState:qe,children:Ne}),Ze=Ae&&jsxRuntimeExports.jsx(ButtonEndIcon,{className:ze.endIcon,ownerState:qe,children:Ae}),Dt=pe||"";return jsxRuntimeExports.jsxs(ButtonRoot,_extends$2({ownerState:qe,className:clsx(ue.className,ze.root,_e,Dt),component:xe,disabled:Se,focusRipple:!Re,focusVisibleClassName:clsx(ze.focusVisible,Ie),ref:ce,type:Fe},We,{classes:ze,children:[Ge,ye,Ze]}))}),Button$2=Button$1;function getCardUtilityClass(ne){return generateUtilityClass$2("MuiCard",ne)}generateUtilityClasses$2("MuiCard",["root"]);const _excluded$O=["className","raised"],useUtilityClasses$H=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"]},getCardUtilityClass,oe)},CardRoot=styled$1(Paper$1,{name:"MuiCard",slot:"Root",overridesResolver:(ne,oe)=>oe.root})(()=>({overflow:"hidden"})),Card=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCard"}),{className:pe,raised:me=!1}=ue,ge=_objectWithoutPropertiesLoose$2(ue,_excluded$O),ye=_extends$2({},ue,{raised:me}),ve=useUtilityClasses$H(ye);return jsxRuntimeExports.jsx(CardRoot,_extends$2({className:clsx(ve.root,pe),elevation:me?8:void 0,ref:ce,ownerState:ye},ge))}),Card$1=Card;function getCardHeaderUtilityClass(ne){return generateUtilityClass$2("MuiCardHeader",ne)}const cardHeaderClasses=generateUtilityClasses$2("MuiCardHeader",["root","avatar","action","content","title","subheader"]),cardHeaderClasses$1=cardHeaderClasses,_excluded$N=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],useUtilityClasses$G=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},getCardHeaderUtilityClass,oe)},CardHeaderRoot=styled$1("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(ne,oe)=>_extends$2({[`& .${cardHeaderClasses$1.title}`]:oe.title,[`& .${cardHeaderClasses$1.subheader}`]:oe.subheader},oe.root)})({display:"flex",alignItems:"center",padding:16}),CardHeaderAvatar=styled$1("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(ne,oe)=>oe.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),CardHeaderAction=styled$1("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(ne,oe)=>oe.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),CardHeaderContent=styled$1("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(ne,oe)=>oe.content})({flex:"1 1 auto"}),CardHeader=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCardHeader"}),{action:pe,avatar:me,className:ge,component:ye="div",disableTypography:ve=!1,subheader:xe,subheaderTypographyProps:_e,title:Se,titleTypographyProps:$e}=ue,Re=_objectWithoutPropertiesLoose$2(ue,_excluded$N),Ae=_extends$2({},ue,{component:ye,disableTypography:ve}),Ie=useUtilityClasses$G(Ae);let ke=Se;ke!=null&&ke.type!==Type$2&&!ve&&(ke=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:me?"body2":"h5",className:Ie.title,component:"span",display:"block"},$e,{children:ke})));let Be=xe;return Be!=null&&Be.type!==Type$2&&!ve&&(Be=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:me?"body2":"body1",className:Ie.subheader,color:"text.secondary",component:"span",display:"block"},_e,{children:Be}))),jsxRuntimeExports.jsxs(CardHeaderRoot,_extends$2({className:clsx(Ie.root,ge),as:ye,ref:ce,ownerState:Ae},Re,{children:[me&&jsxRuntimeExports.jsx(CardHeaderAvatar,{className:Ie.avatar,ownerState:Ae,children:me}),jsxRuntimeExports.jsxs(CardHeaderContent,{className:Ie.content,ownerState:Ae,children:[ke,Be]}),pe&&jsxRuntimeExports.jsx(CardHeaderAction,{className:Ie.action,ownerState:Ae,children:pe})]}))}),CardHeader$1=CardHeader;function getSwitchBaseUtilityClass(ne){return generateUtilityClass$2("PrivateSwitchBase",ne)}generateUtilityClasses$2("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const _excluded$M=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],useUtilityClasses$F=ne=>{const{classes:oe,checked:ce,disabled:ue,edge:pe}=ne,me={root:["root",ce&&"checked",ue&&"disabled",pe&&`edge${capitalize$1(pe)}`],input:["input"]};return composeClasses$1(me,getSwitchBaseUtilityClass,oe)},SwitchBaseRoot=styled$1(ButtonBase$1)(({ownerState:ne})=>_extends$2({padding:9,borderRadius:"50%"},ne.edge==="start"&&{marginLeft:ne.size==="small"?-3:-12},ne.edge==="end"&&{marginRight:ne.size==="small"?-3:-12})),SwitchBaseInput=styled$1("input",{shouldForwardProp:rootShouldForwardProp$1})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),SwitchBase=reactExports.forwardRef(function(oe,ce){const{autoFocus:ue,checked:pe,checkedIcon:me,className:ge,defaultChecked:ye,disabled:ve,disableFocusRipple:xe=!1,edge:_e=!1,icon:Se,id:$e,inputProps:Re,inputRef:Ae,name:Ie,onBlur:ke,onChange:Be,onFocus:Ne,readOnly:Fe,required:Ue=!1,tabIndex:We,type:qe,value:ze}=oe,Ge=_objectWithoutPropertiesLoose$2(oe,_excluded$M),[Ze,Dt]=useControlled({controlled:pe,default:!!ye,name:"SwitchBase",state:"checked"}),Je=useFormControl(),Ut=Wt=>{Ne&&Ne(Wt),Je&&Je.onFocus&&Je.onFocus(Wt)},jt=Wt=>{ke&&ke(Wt),Je&&Je.onBlur&&Je.onBlur(Wt)},Ke=Wt=>{if(Wt.nativeEvent.defaultPrevented)return;const un=Wt.target.checked;Dt(un),Be&&Be(Wt,un)};let an=ve;Je&&typeof an>"u"&&(an=Je.disabled);const Zt=qe==="checkbox"||qe==="radio",en=_extends$2({},oe,{checked:Ze,disabled:an,disableFocusRipple:xe,edge:_e}),Kt=useUtilityClasses$F(en);return jsxRuntimeExports.jsxs(SwitchBaseRoot,_extends$2({component:"span",className:clsx(Kt.root,ge),centerRipple:!0,focusRipple:!xe,disabled:an,tabIndex:null,role:void 0,onFocus:Ut,onBlur:jt,ownerState:en,ref:ce},Ge,{children:[jsxRuntimeExports.jsx(SwitchBaseInput,_extends$2({autoFocus:ue,checked:pe,defaultChecked:ye,className:Kt.input,disabled:an,id:Zt?$e:void 0,name:Ie,onChange:Ke,readOnly:Fe,ref:Ae,required:Ue,ownerState:en,tabIndex:We,type:qe},qe==="checkbox"&&ze===void 0?{}:{value:ze},Re)),Ze?me:Se]}))}),SwitchBase$1=SwitchBase,CheckBoxOutlineBlankIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),CheckBoxIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),IndeterminateCheckBoxIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function getCheckboxUtilityClass(ne){return generateUtilityClass$2("MuiCheckbox",ne)}const checkboxClasses=generateUtilityClasses$2("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),checkboxClasses$1=checkboxClasses,_excluded$L=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],useUtilityClasses$E=ne=>{const{classes:oe,indeterminate:ce,color:ue,size:pe}=ne,me={root:["root",ce&&"indeterminate",`color${capitalize$1(ue)}`,`size${capitalize$1(pe)}`]},ge=composeClasses$1(me,getCheckboxUtilityClass,oe);return _extends$2({},oe,ge)},CheckboxRoot=styled$1(SwitchBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.indeterminate&&oe.indeterminate,oe[`size${capitalize$1(ce.size)}`],ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({color:(ne.vars||ne).palette.text.secondary},!oe.disableRipple&&{"&:hover":{backgroundColor:ne.vars?`rgba(${oe.color==="default"?ne.vars.palette.action.activeChannel:ne.vars.palette[oe.color].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(oe.color==="default"?ne.palette.action.active:ne.palette[oe.color].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},oe.color!=="default"&&{[`&.${checkboxClasses$1.checked}, &.${checkboxClasses$1.indeterminate}`]:{color:(ne.vars||ne).palette[oe.color].main},[`&.${checkboxClasses$1.disabled}`]:{color:(ne.vars||ne).palette.action.disabled}})),defaultCheckedIcon=jsxRuntimeExports.jsx(CheckBoxIcon,{}),defaultIcon=jsxRuntimeExports.jsx(CheckBoxOutlineBlankIcon,{}),defaultIndeterminateIcon=jsxRuntimeExports.jsx(IndeterminateCheckBoxIcon,{}),Checkbox=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiCheckbox"}),{checkedIcon:ge=defaultCheckedIcon,color:ye="primary",icon:ve=defaultIcon,indeterminate:xe=!1,indeterminateIcon:_e=defaultIndeterminateIcon,inputProps:Se,size:$e="medium",className:Re}=me,Ae=_objectWithoutPropertiesLoose$2(me,_excluded$L),Ie=xe?_e:ve,ke=xe?_e:ge,Be=_extends$2({},me,{color:ye,indeterminate:xe,size:$e}),Ne=useUtilityClasses$E(Be);return jsxRuntimeExports.jsx(CheckboxRoot,_extends$2({type:"checkbox",inputProps:_extends$2({"data-indeterminate":xe},Se),icon:reactExports.cloneElement(Ie,{fontSize:(ue=Ie.props.fontSize)!=null?ue:$e}),checkedIcon:reactExports.cloneElement(ke,{fontSize:(pe=ke.props.fontSize)!=null?pe:$e}),ownerState:Be,ref:ce,className:clsx(Ne.root,Re)},Ae,{classes:Ne}))}),Checkbox$1=Checkbox;function getCircularProgressUtilityClass(ne){return generateUtilityClass$2("MuiCircularProgress",ne)}generateUtilityClasses$2("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const _excluded$K=["className","color","disableShrink","size","style","thickness","value","variant"];let _$9=ne=>ne,_t$3,_t2$2,_t3$2,_t4$2;const SIZE=44,circularRotateKeyframe=keyframes(_t$3||(_t$3=_$9` 0% { transform: rotate(0deg); } @@ -140,11 +140,11 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`)),useUtilityClasses$C=ne=>{const{classes:oe,variant:ce,color:ue,disableShrink:pe}=ne,me={root:["root",ce,`color${capitalize$1(ue)}`],svg:["svg"],circle:["circle",`circle${capitalize$1(ce)}`,pe&&"circleDisableShrink"]};return composeClasses$1(me,getCircularProgressUtilityClass,oe)},CircularProgressRoot=styled$1("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],oe[`color${capitalize$1(ce.color)}`]]}})(({ownerState:ne,theme:oe})=>_extends$2({display:"inline-block"},ne.variant==="determinate"&&{transition:oe.transitions.create("transform")},ne.color!=="inherit"&&{color:(oe.vars||oe).palette[ne.color].main}),({ownerState:ne})=>ne.variant==="indeterminate"&&css(_t3$2||(_t3$2=_$9` +`)),useUtilityClasses$D=ne=>{const{classes:oe,variant:ce,color:ue,disableShrink:pe}=ne,me={root:["root",ce,`color${capitalize$1(ue)}`],svg:["svg"],circle:["circle",`circle${capitalize$1(ce)}`,pe&&"circleDisableShrink"]};return composeClasses$1(me,getCircularProgressUtilityClass,oe)},CircularProgressRoot=styled$1("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[ce.variant],oe[`color${capitalize$1(ce.color)}`]]}})(({ownerState:ne,theme:oe})=>_extends$2({display:"inline-block"},ne.variant==="determinate"&&{transition:oe.transitions.create("transform")},ne.color!=="inherit"&&{color:(oe.vars||oe).palette[ne.color].main}),({ownerState:ne})=>ne.variant==="indeterminate"&&css(_t3$2||(_t3$2=_$9` animation: ${0} 1.4s linear infinite; `),circularRotateKeyframe)),CircularProgressSVG=styled$1("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(ne,oe)=>oe.svg})({display:"block"}),CircularProgressCircle=styled$1("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.circle,oe[`circle${capitalize$1(ce.variant)}`],ce.disableShrink&&oe.circleDisableShrink]}})(({ownerState:ne,theme:oe})=>_extends$2({stroke:"currentColor"},ne.variant==="determinate"&&{transition:oe.transitions.create("stroke-dashoffset")},ne.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:ne})=>ne.variant==="indeterminate"&&!ne.disableShrink&&css(_t4$2||(_t4$2=_$9` animation: ${0} 1.4s ease-in-out infinite; - `),circularDashKeyframe)),CircularProgress=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCircularProgress"}),{className:pe,color:me="primary",disableShrink:ge=!1,size:ye=40,style:ve,thickness:xe=3.6,value:_e=0,variant:Se="indeterminate"}=ue,$e=_objectWithoutPropertiesLoose$2(ue,_excluded$J),Re=_extends$2({},ue,{color:me,disableShrink:ge,size:ye,thickness:xe,value:_e,variant:Se}),Ae=useUtilityClasses$C(Re),Ie={},ke={},Be={};if(Se==="determinate"){const Ne=2*Math.PI*((SIZE-xe)/2);Ie.strokeDasharray=Ne.toFixed(3),Be["aria-valuenow"]=Math.round(_e),Ie.strokeDashoffset=`${((100-_e)/100*Ne).toFixed(3)}px`,ke.transform="rotate(-90deg)"}return jsxRuntimeExports.jsx(CircularProgressRoot,_extends$2({className:clsx(Ae.root,pe),style:_extends$2({width:ye,height:ye},ke,ve),ownerState:Re,ref:ce,role:"progressbar"},Be,$e,{children:jsxRuntimeExports.jsx(CircularProgressSVG,{className:Ae.svg,ownerState:Re,viewBox:`${SIZE/2} ${SIZE/2} ${SIZE} ${SIZE}`,children:jsxRuntimeExports.jsx(CircularProgressCircle,{className:Ae.circle,style:Ie,ownerState:Re,cx:SIZE,cy:SIZE,r:(SIZE-xe)/2,fill:"none",strokeWidth:xe})})}))}),CircularProgress$1=CircularProgress,html=(ne,oe)=>_extends$2({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},oe&&!ne.vars&&{colorScheme:ne.palette.mode}),body=ne=>_extends$2({color:(ne.vars||ne).palette.text.primary},ne.typography.body1,{backgroundColor:(ne.vars||ne).palette.background.default,"@media print":{backgroundColor:(ne.vars||ne).palette.common.white}}),styles$3=(ne,oe=!1)=>{var ce;const ue={};oe&&ne.colorSchemes&&Object.entries(ne.colorSchemes).forEach(([ge,ye])=>{var ve;ue[ne.getColorSchemeSelector(ge).replace(/\s*&/,"")]={colorScheme:(ve=ye.palette)==null?void 0:ve.mode}});let pe=_extends$2({html:html(ne,oe),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:ne.typography.fontWeightBold},body:_extends$2({margin:0},body(ne),{"&::backdrop":{backgroundColor:(ne.vars||ne).palette.background.default}})},ue);const me=(ce=ne.components)==null||(ce=ce.MuiCssBaseline)==null?void 0:ce.styleOverrides;return me&&(pe=[pe,me]),pe};function CssBaseline(ne){const oe=useThemeProps$3({props:ne,name:"MuiCssBaseline"}),{children:ce,enableColorScheme:ue=!1}=oe;return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(GlobalStyles,{styles:pe=>styles$3(pe,ue)}),ce]})}function getModalUtilityClass(ne){return generateUtilityClass$2("MuiModal",ne)}generateUtilityClasses$2("MuiModal",["root","hidden","backdrop"]);const _excluded$I=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],useUtilityClasses$B=ne=>{const{open:oe,exited:ce,classes:ue}=ne;return composeClasses$1({root:["root",!oe&&ce&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,ue)},ModalRoot=styled$1("div",{name:"MuiModal",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,!ce.open&&ce.exited&&oe.hidden]}})(({theme:ne,ownerState:oe})=>_extends$2({position:"fixed",zIndex:(ne.vars||ne).zIndex.modal,right:0,bottom:0,top:0,left:0},!oe.open&&oe.exited&&{visibility:"hidden"})),ModalBackdrop=styled$1(Backdrop$1,{name:"MuiModal",slot:"Backdrop",overridesResolver:(ne,oe)=>oe.backdrop})({zIndex:-1}),Modal$1=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye,ve;const xe=useThemeProps$3({name:"MuiModal",props:oe}),{BackdropComponent:_e=ModalBackdrop,BackdropProps:Se,className:$e,closeAfterTransition:Re=!1,children:Ae,container:Ie,component:ke,components:Be={},componentsProps:Ne={},disableAutoFocus:Fe=!1,disableEnforceFocus:Ue=!1,disableEscapeKeyDown:We=!1,disablePortal:qe=!1,disableRestoreFocus:ze=!1,disableScrollLock:Ge=!1,hideBackdrop:Ze=!1,keepMounted:Dt=!1,onBackdropClick:Je,open:Ut,slotProps:jt,slots:Ke}=xe,an=_objectWithoutPropertiesLoose$2(xe,_excluded$I),Zt=_extends$2({},xe,{closeAfterTransition:Re,disableAutoFocus:Fe,disableEnforceFocus:Ue,disableEscapeKeyDown:We,disablePortal:qe,disableRestoreFocus:ze,disableScrollLock:Ge,hideBackdrop:Ze,keepMounted:Dt}),{getRootProps:en,getBackdropProps:Kt,getTransitionProps:Wt,portalRef:un,isTopModal:Xt,exited:nn,hasTransition:vn}=useModal(_extends$2({},Zt,{rootRef:ce})),Sn=_extends$2({},Zt,{exited:nn}),Cn=useUtilityClasses$B(Sn),Nt={};if(Ae.props.tabIndex===void 0&&(Nt.tabIndex="-1"),vn){const{onEnter:sn,onExited:yn}=Wt();Nt.onEnter=sn,Nt.onExited=yn}const Yt=(ue=(pe=Ke==null?void 0:Ke.root)!=null?pe:Be.Root)!=null?ue:ModalRoot,Jt=(me=(ge=Ke==null?void 0:Ke.backdrop)!=null?ge:Be.Backdrop)!=null?me:_e,hn=(ye=jt==null?void 0:jt.root)!=null?ye:Ne.root,Ye=(ve=jt==null?void 0:jt.backdrop)!=null?ve:Ne.backdrop,Xe=useSlotProps({elementType:Yt,externalSlotProps:hn,externalForwardedProps:an,getSlotProps:en,additionalProps:{ref:ce,as:ke},ownerState:Sn,className:clsx($e,hn==null?void 0:hn.className,Cn==null?void 0:Cn.root,!Sn.open&&Sn.exited&&(Cn==null?void 0:Cn.hidden))}),Pt=useSlotProps({elementType:Jt,externalSlotProps:Ye,additionalProps:Se,getSlotProps:sn=>Kt(_extends$2({},sn,{onClick:yn=>{Je&&Je(yn),sn!=null&&sn.onClick&&sn.onClick(yn)}})),className:clsx(Ye==null?void 0:Ye.className,Se==null?void 0:Se.className,Cn==null?void 0:Cn.backdrop),ownerState:Sn});return!Dt&&!Ut&&(!vn||nn)?null:jsxRuntimeExports.jsx(Portal,{ref:un,container:Ie,disablePortal:qe,children:jsxRuntimeExports.jsxs(Yt,_extends$2({},Xe,{children:[!Ze&&_e?jsxRuntimeExports.jsx(Jt,_extends$2({},Pt)):null,jsxRuntimeExports.jsx(FocusTrap,{disableEnforceFocus:Ue,disableAutoFocus:Fe,disableRestoreFocus:ze,isEnabled:Xt,open:Ut,children:reactExports.cloneElement(Ae,Nt)})]}))})}),Modal$2=Modal$1;function getDialogUtilityClass(ne){return generateUtilityClass$2("MuiDialog",ne)}const dialogClasses=generateUtilityClasses$2("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),dialogClasses$1=dialogClasses,DialogContext=reactExports.createContext({}),DialogContext$1=DialogContext,_excluded$H=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],DialogBackdrop=styled$1(Backdrop$1,{name:"MuiDialog",slot:"Backdrop",overrides:(ne,oe)=>oe.backdrop})({zIndex:-1}),useUtilityClasses$A=ne=>{const{classes:oe,scroll:ce,maxWidth:ue,fullWidth:pe,fullScreen:me}=ne,ge={root:["root"],container:["container",`scroll${capitalize$1(ce)}`],paper:["paper",`paperScroll${capitalize$1(ce)}`,`paperWidth${capitalize$1(String(ue))}`,pe&&"paperFullWidth",me&&"paperFullScreen"]};return composeClasses$1(ge,getDialogUtilityClass,oe)},DialogRoot=styled$1(Modal$2,{name:"MuiDialog",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({"@media print":{position:"absolute !important"}}),DialogContainer=styled$1("div",{name:"MuiDialog",slot:"Container",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.container,oe[`scroll${capitalize$1(ce.scroll)}`]]}})(({ownerState:ne})=>_extends$2({height:"100%","@media print":{height:"auto"},outline:0},ne.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},ne.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),DialogPaper=styled$1(Paper$1,{name:"MuiDialog",slot:"Paper",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.paper,oe[`scrollPaper${capitalize$1(ce.scroll)}`],oe[`paperWidth${capitalize$1(String(ce.maxWidth))}`],ce.fullWidth&&oe.paperFullWidth,ce.fullScreen&&oe.paperFullScreen]}})(({theme:ne,ownerState:oe})=>_extends$2({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},oe.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},oe.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!oe.maxWidth&&{maxWidth:"calc(100% - 64px)"},oe.maxWidth==="xs"&&{maxWidth:ne.breakpoints.unit==="px"?Math.max(ne.breakpoints.values.xs,444):`max(${ne.breakpoints.values.xs}${ne.breakpoints.unit}, 444px)`,[`&.${dialogClasses$1.paperScrollBody}`]:{[ne.breakpoints.down(Math.max(ne.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},oe.maxWidth&&oe.maxWidth!=="xs"&&{maxWidth:`${ne.breakpoints.values[oe.maxWidth]}${ne.breakpoints.unit}`,[`&.${dialogClasses$1.paperScrollBody}`]:{[ne.breakpoints.down(ne.breakpoints.values[oe.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},oe.fullWidth&&{width:"calc(100% - 64px)"},oe.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${dialogClasses$1.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Dialog=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiDialog"}),pe=useTheme$1(),me={enter:pe.transitions.duration.enteringScreen,exit:pe.transitions.duration.leavingScreen},{"aria-describedby":ge,"aria-labelledby":ye,BackdropComponent:ve,BackdropProps:xe,children:_e,className:Se,disableEscapeKeyDown:$e=!1,fullScreen:Re=!1,fullWidth:Ae=!1,maxWidth:Ie="sm",onBackdropClick:ke,onClick:Be,onClose:Ne,open:Fe,PaperComponent:Ue=Paper$1,PaperProps:We={},scroll:qe="paper",TransitionComponent:ze=Fade$1,transitionDuration:Ge=me,TransitionProps:Ze}=ue,Dt=_objectWithoutPropertiesLoose$2(ue,_excluded$H),Je=_extends$2({},ue,{disableEscapeKeyDown:$e,fullScreen:Re,fullWidth:Ae,maxWidth:Ie,scroll:qe}),Ut=useUtilityClasses$A(Je),jt=reactExports.useRef(),Ke=Kt=>{jt.current=Kt.target===Kt.currentTarget},an=Kt=>{Be&&Be(Kt),jt.current&&(jt.current=null,ke&&ke(Kt),Ne&&Ne(Kt,"backdropClick"))},Zt=useId(ye),en=reactExports.useMemo(()=>({titleId:Zt}),[Zt]);return jsxRuntimeExports.jsx(DialogRoot,_extends$2({className:clsx(Ut.root,Se),closeAfterTransition:!0,components:{Backdrop:DialogBackdrop},componentsProps:{backdrop:_extends$2({transitionDuration:Ge,as:ve},xe)},disableEscapeKeyDown:$e,onClose:Ne,open:Fe,ref:ce,onClick:an,ownerState:Je},Dt,{children:jsxRuntimeExports.jsx(ze,_extends$2({appear:!0,in:Fe,timeout:Ge,role:"presentation"},Ze,{children:jsxRuntimeExports.jsx(DialogContainer,{className:clsx(Ut.container),onMouseDown:Ke,ownerState:Je,children:jsxRuntimeExports.jsx(DialogPaper,_extends$2({as:Ue,elevation:24,role:"dialog","aria-describedby":ge,"aria-labelledby":Zt},We,{className:clsx(Ut.paper,We.className),ownerState:Je,children:jsxRuntimeExports.jsx(DialogContext$1.Provider,{value:en,children:_e})}))})}))}))}),Dialog$1=Dialog;function getDividerUtilityClass(ne){return generateUtilityClass$2("MuiDivider",ne)}const dividerClasses=generateUtilityClasses$2("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),dividerClasses$1=dividerClasses,_excluded$G=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],useUtilityClasses$z=ne=>{const{absolute:oe,children:ce,classes:ue,flexItem:pe,light:me,orientation:ge,textAlign:ye,variant:ve}=ne;return composeClasses$1({root:["root",oe&&"absolute",ve,me&&"light",ge==="vertical"&&"vertical",pe&&"flexItem",ce&&"withChildren",ce&&ge==="vertical"&&"withChildrenVertical",ye==="right"&&ge!=="vertical"&&"textAlignRight",ye==="left"&&ge!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",ge==="vertical"&&"wrapperVertical"]},getDividerUtilityClass,ue)},DividerRoot=styled$1("div",{name:"MuiDivider",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.absolute&&oe.absolute,oe[ce.variant],ce.light&&oe.light,ce.orientation==="vertical"&&oe.vertical,ce.flexItem&&oe.flexItem,ce.children&&oe.withChildren,ce.children&&ce.orientation==="vertical"&&oe.withChildrenVertical,ce.textAlign==="right"&&ce.orientation!=="vertical"&&oe.textAlignRight,ce.textAlign==="left"&&ce.orientation!=="vertical"&&oe.textAlignLeft]}})(({theme:ne,ownerState:oe})=>_extends$2({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(ne.vars||ne).palette.divider,borderBottomWidth:"thin"},oe.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},oe.light&&{borderColor:ne.vars?`rgba(${ne.vars.palette.dividerChannel} / 0.08)`:alpha_1(ne.palette.divider,.08)},oe.variant==="inset"&&{marginLeft:72},oe.variant==="middle"&&oe.orientation==="horizontal"&&{marginLeft:ne.spacing(2),marginRight:ne.spacing(2)},oe.variant==="middle"&&oe.orientation==="vertical"&&{marginTop:ne.spacing(1),marginBottom:ne.spacing(1)},oe.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},oe.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:ne})=>_extends$2({},ne.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:ne,ownerState:oe})=>_extends$2({},oe.children&&oe.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(ne.vars||ne).palette.divider}`}}),({theme:ne,ownerState:oe})=>_extends$2({},oe.children&&oe.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(ne.vars||ne).palette.divider}`}}),({ownerState:ne})=>_extends$2({},ne.textAlign==="right"&&ne.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},ne.textAlign==="left"&&ne.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),DividerWrapper=styled$1("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.wrapper,ce.orientation==="vertical"&&oe.wrapperVertical]}})(({theme:ne,ownerState:oe})=>_extends$2({display:"inline-block",paddingLeft:`calc(${ne.spacing(1)} * 1.2)`,paddingRight:`calc(${ne.spacing(1)} * 1.2)`},oe.orientation==="vertical"&&{paddingTop:`calc(${ne.spacing(1)} * 1.2)`,paddingBottom:`calc(${ne.spacing(1)} * 1.2)`})),Divider=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiDivider"}),{absolute:pe=!1,children:me,className:ge,component:ye=me?"div":"hr",flexItem:ve=!1,light:xe=!1,orientation:_e="horizontal",role:Se=ye!=="hr"?"separator":void 0,textAlign:$e="center",variant:Re="fullWidth"}=ue,Ae=_objectWithoutPropertiesLoose$2(ue,_excluded$G),Ie=_extends$2({},ue,{absolute:pe,component:ye,flexItem:ve,light:xe,orientation:_e,role:Se,textAlign:$e,variant:Re}),ke=useUtilityClasses$z(Ie);return jsxRuntimeExports.jsx(DividerRoot,_extends$2({as:ye,className:clsx(ke.root,ge),role:Se,ref:ce,ownerState:Ie},Ae,{children:me?jsxRuntimeExports.jsx(DividerWrapper,{className:ke.wrapper,ownerState:Ie,children:me}):null}))});Divider.muiSkipListHighlight=!0;const Divider$1=Divider,_excluded$F=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$y=ne=>{const{classes:oe,disableUnderline:ce}=ne,pe=composeClasses$1({root:["root",!ce&&"underline"],input:["input"]},getFilledInputUtilityClass,oe);return _extends$2({},oe,pe)},FilledInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[...rootOverridesResolver(ne,oe),!ce.disableUnderline&&oe.underline]}})(({theme:ne,ownerState:oe})=>{var ce;const ue=ne.palette.mode==="light",pe=ue?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",me=ue?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",ge=ue?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",ye=ue?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return _extends$2({position:"relative",backgroundColor:ne.vars?ne.vars.palette.FilledInput.bg:me,borderTopLeftRadius:(ne.vars||ne).shape.borderRadius,borderTopRightRadius:(ne.vars||ne).shape.borderRadius,transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut}),"&:hover":{backgroundColor:ne.vars?ne.vars.palette.FilledInput.hoverBg:ge,"@media (hover: none)":{backgroundColor:ne.vars?ne.vars.palette.FilledInput.bg:me}},[`&.${filledInputClasses$1.focused}`]:{backgroundColor:ne.vars?ne.vars.palette.FilledInput.bg:me},[`&.${filledInputClasses$1.disabled}`]:{backgroundColor:ne.vars?ne.vars.palette.FilledInput.disabledBg:ye}},!oe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(ce=(ne.vars||ne).palette[oe.color||"primary"])==null?void 0:ce.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:ne.transitions.create("transform",{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${filledInputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${filledInputClasses$1.error}`]:{"&::before, &::after":{borderBottomColor:(ne.vars||ne).palette.error.main}},"&::before":{borderBottom:`1px solid ${ne.vars?`rgba(${ne.vars.palette.common.onBackgroundChannel} / ${ne.vars.opacity.inputUnderline})`:pe}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:ne.transitions.create("border-bottom-color",{duration:ne.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${filledInputClasses$1.disabled}, .${filledInputClasses$1.error}):before`]:{borderBottom:`1px solid ${(ne.vars||ne).palette.text.primary}`},[`&.${filledInputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}},oe.startAdornment&&{paddingLeft:12},oe.endAdornment&&{paddingRight:12},oe.multiline&&_extends$2({padding:"25px 12px 8px"},oe.size==="small"&&{paddingTop:21,paddingBottom:4},oe.hiddenLabel&&{paddingTop:16,paddingBottom:17},oe.hiddenLabel&&oe.size==="small"&&{paddingTop:8,paddingBottom:9}))}),FilledInputInput=styled$1(InputBaseComponent,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!ne.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:ne.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:ne.palette.mode==="light"?null:"#fff",caretColor:ne.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},ne.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[ne.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},oe.size==="small"&&{paddingTop:21,paddingBottom:4},oe.hiddenLabel&&{paddingTop:16,paddingBottom:17},oe.startAdornment&&{paddingLeft:0},oe.endAdornment&&{paddingRight:0},oe.hiddenLabel&&oe.size==="small"&&{paddingTop:8,paddingBottom:9},oe.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),FilledInput=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge;const ye=useThemeProps$3({props:oe,name:"MuiFilledInput"}),{components:ve={},componentsProps:xe,fullWidth:_e=!1,inputComponent:Se="input",multiline:$e=!1,slotProps:Re,slots:Ae={},type:Ie="text"}=ye,ke=_objectWithoutPropertiesLoose$2(ye,_excluded$F),Be=_extends$2({},ye,{fullWidth:_e,inputComponent:Se,multiline:$e,type:Ie}),Ne=useUtilityClasses$y(ye),Fe={root:{ownerState:Be},input:{ownerState:Be}},Ue=Re??xe?deepmerge$1(Fe,Re??xe):Fe,We=(ue=(pe=Ae.root)!=null?pe:ve.Root)!=null?ue:FilledInputRoot,qe=(me=(ge=Ae.input)!=null?ge:ve.Input)!=null?me:FilledInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$2({slots:{root:We,input:qe},componentsProps:Ue,fullWidth:_e,inputComponent:Se,multiline:$e,ref:ce,type:Ie},ke,{classes:Ne}))});FilledInput.muiName="Input";const FilledInput$1=FilledInput;function getFormControlUtilityClasses(ne){return generateUtilityClass$2("MuiFormControl",ne)}generateUtilityClasses$2("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const _excluded$E=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],useUtilityClasses$x=ne=>{const{classes:oe,margin:ce,fullWidth:ue}=ne,pe={root:["root",ce!=="none"&&`margin${capitalize$1(ce)}`,ue&&"fullWidth"]};return composeClasses$1(pe,getFormControlUtilityClasses,oe)},FormControlRoot=styled$1("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:ne},oe)=>_extends$2({},oe.root,oe[`margin${capitalize$1(ne.margin)}`],ne.fullWidth&&oe.fullWidth)})(({ownerState:ne})=>_extends$2({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},ne.margin==="normal"&&{marginTop:16,marginBottom:8},ne.margin==="dense"&&{marginTop:8,marginBottom:4},ne.fullWidth&&{width:"100%"})),FormControl=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiFormControl"}),{children:pe,className:me,color:ge="primary",component:ye="div",disabled:ve=!1,error:xe=!1,focused:_e,fullWidth:Se=!1,hiddenLabel:$e=!1,margin:Re="none",required:Ae=!1,size:Ie="medium",variant:ke="outlined"}=ue,Be=_objectWithoutPropertiesLoose$2(ue,_excluded$E),Ne=_extends$2({},ue,{color:ge,component:ye,disabled:ve,error:xe,fullWidth:Se,hiddenLabel:$e,margin:Re,required:Ae,size:Ie,variant:ke}),Fe=useUtilityClasses$x(Ne),[Ue,We]=reactExports.useState(()=>{let jt=!1;return pe&&reactExports.Children.forEach(pe,Ke=>{if(!isMuiElement(Ke,["Input","Select"]))return;const an=isMuiElement(Ke,["Select"])?Ke.props.input:Ke;an&&isAdornedStart(an.props)&&(jt=!0)}),jt}),[qe,ze]=reactExports.useState(()=>{let jt=!1;return pe&&reactExports.Children.forEach(pe,Ke=>{isMuiElement(Ke,["Input","Select"])&&(isFilled(Ke.props,!0)||isFilled(Ke.props.inputProps,!0))&&(jt=!0)}),jt}),[Ge,Ze]=reactExports.useState(!1);ve&&Ge&&Ze(!1);const Dt=_e!==void 0&&!ve?_e:Ge;let Je;const Ut=reactExports.useMemo(()=>({adornedStart:Ue,setAdornedStart:We,color:ge,disabled:ve,error:xe,filled:qe,focused:Dt,fullWidth:Se,hiddenLabel:$e,size:Ie,onBlur:()=>{Ze(!1)},onEmpty:()=>{ze(!1)},onFilled:()=>{ze(!0)},onFocus:()=>{Ze(!0)},registerEffect:Je,required:Ae,variant:ke}),[Ue,ge,ve,xe,qe,Dt,Se,$e,Je,Ae,Ie,ke]);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:Ut,children:jsxRuntimeExports.jsx(FormControlRoot,_extends$2({as:ye,ownerState:Ne,className:clsx(Fe.root,me),ref:ce},Be,{children:pe}))})}),FormControl$1=FormControl,Stack=createStack({createStyledComponent:styled$1("div",{name:"MuiStack",slot:"Root",overridesResolver:(ne,oe)=>oe.root}),useThemeProps:ne=>useThemeProps$3({props:ne,name:"MuiStack"})}),Stack$1=Stack;function getFormControlLabelUtilityClasses(ne){return generateUtilityClass$2("MuiFormControlLabel",ne)}const formControlLabelClasses=generateUtilityClasses$2("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),formControlLabelClasses$1=formControlLabelClasses,_excluded$D=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],useUtilityClasses$w=ne=>{const{classes:oe,disabled:ce,labelPlacement:ue,error:pe,required:me}=ne,ge={root:["root",ce&&"disabled",`labelPlacement${capitalize$1(ue)}`,pe&&"error",me&&"required"],label:["label",ce&&"disabled"],asterisk:["asterisk",pe&&"error"]};return composeClasses$1(ge,getFormControlLabelUtilityClasses,oe)},FormControlLabelRoot=styled$1("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${formControlLabelClasses$1.label}`]:oe.label},oe.root,oe[`labelPlacement${capitalize$1(ce.labelPlacement)}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${formControlLabelClasses$1.disabled}`]:{cursor:"default"}},oe.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},oe.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},oe.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${formControlLabelClasses$1.label}`]:{[`&.${formControlLabelClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled}}})),AsteriskComponent$1=styled$1("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(ne,oe)=>oe.asterisk})(({theme:ne})=>({[`&.${formControlLabelClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}})),FormControlLabel=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiFormControlLabel"}),{className:ge,componentsProps:ye={},control:ve,disabled:xe,disableTypography:_e,label:Se,labelPlacement:$e="end",required:Re,slotProps:Ae={}}=me,Ie=_objectWithoutPropertiesLoose$2(me,_excluded$D),ke=useFormControl(),Be=(ue=xe??ve.props.disabled)!=null?ue:ke==null?void 0:ke.disabled,Ne=Re??ve.props.required,Fe={disabled:Be,required:Ne};["checked","name","onChange","value","inputRef"].forEach(Ze=>{typeof ve.props[Ze]>"u"&&typeof me[Ze]<"u"&&(Fe[Ze]=me[Ze])});const Ue=formControlState({props:me,muiFormControl:ke,states:["error"]}),We=_extends$2({},me,{disabled:Be,labelPlacement:$e,required:Ne,error:Ue.error}),qe=useUtilityClasses$w(We),ze=(pe=Ae.typography)!=null?pe:ye.typography;let Ge=Se;return Ge!=null&&Ge.type!==Type$2&&!_e&&(Ge=jsxRuntimeExports.jsx(Type$2,_extends$2({component:"span"},ze,{className:clsx(qe.label,ze==null?void 0:ze.className),children:Ge}))),jsxRuntimeExports.jsxs(FormControlLabelRoot,_extends$2({className:clsx(qe.root,ge),ownerState:We,ref:ce},Ie,{children:[reactExports.cloneElement(ve,Fe),Ne?jsxRuntimeExports.jsxs(Stack$1,{display:"block",children:[Ge,jsxRuntimeExports.jsxs(AsteriskComponent$1,{ownerState:We,"aria-hidden":!0,className:qe.asterisk,children:[" ","*"]})]}):Ge]}))}),FormControlLabel$1=FormControlLabel;function getFormHelperTextUtilityClasses(ne){return generateUtilityClass$2("MuiFormHelperText",ne)}const formHelperTextClasses=generateUtilityClasses$2("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),formHelperTextClasses$1=formHelperTextClasses;var _span$3;const _excluded$C=["children","className","component","disabled","error","filled","focused","margin","required","variant"],useUtilityClasses$v=ne=>{const{classes:oe,contained:ce,size:ue,disabled:pe,error:me,filled:ge,focused:ye,required:ve}=ne,xe={root:["root",pe&&"disabled",me&&"error",ue&&`size${capitalize$1(ue)}`,ce&&"contained",ye&&"focused",ge&&"filled",ve&&"required"]};return composeClasses$1(xe,getFormHelperTextUtilityClasses,oe)},FormHelperTextRoot=styled$1("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.size&&oe[`size${capitalize$1(ce.size)}`],ce.contained&&oe.contained,ce.filled&&oe.filled]}})(({theme:ne,ownerState:oe})=>_extends$2({color:(ne.vars||ne).palette.text.secondary},ne.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${formHelperTextClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled},[`&.${formHelperTextClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}},oe.size==="small"&&{marginTop:4},oe.contained&&{marginLeft:14,marginRight:14})),FormHelperText=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiFormHelperText"}),{children:pe,className:me,component:ge="p"}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$C),ve=useFormControl(),xe=formControlState({props:ue,muiFormControl:ve,states:["variant","size","disabled","error","filled","focused","required"]}),_e=_extends$2({},ue,{component:ge,contained:xe.variant==="filled"||xe.variant==="outlined",variant:xe.variant,size:xe.size,disabled:xe.disabled,error:xe.error,filled:xe.filled,focused:xe.focused,required:xe.required}),Se=useUtilityClasses$v(_e);return jsxRuntimeExports.jsx(FormHelperTextRoot,_extends$2({as:ge,ownerState:_e,className:clsx(Se.root,me),ref:ce},ye,{children:pe===" "?_span$3||(_span$3=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):pe}))}),FormHelperText$1=FormHelperText;function getFormLabelUtilityClasses(ne){return generateUtilityClass$2("MuiFormLabel",ne)}const formLabelClasses=generateUtilityClasses$2("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),formLabelClasses$1=formLabelClasses,_excluded$B=["children","className","color","component","disabled","error","filled","focused","required"],useUtilityClasses$u=ne=>{const{classes:oe,color:ce,focused:ue,disabled:pe,error:me,filled:ge,required:ye}=ne,ve={root:["root",`color${capitalize$1(ce)}`,pe&&"disabled",me&&"error",ge&&"filled",ue&&"focused",ye&&"required"],asterisk:["asterisk",me&&"error"]};return composeClasses$1(ve,getFormLabelUtilityClasses,oe)},FormLabelRoot=styled$1("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:ne},oe)=>_extends$2({},oe.root,ne.color==="secondary"&&oe.colorSecondary,ne.filled&&oe.filled)})(({theme:ne,ownerState:oe})=>_extends$2({color:(ne.vars||ne).palette.text.secondary},ne.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${formLabelClasses$1.focused}`]:{color:(ne.vars||ne).palette[oe.color].main},[`&.${formLabelClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled},[`&.${formLabelClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}})),AsteriskComponent=styled$1("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(ne,oe)=>oe.asterisk})(({theme:ne})=>({[`&.${formLabelClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}})),FormLabel=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiFormLabel"}),{children:pe,className:me,component:ge="label"}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$B),ve=useFormControl(),xe=formControlState({props:ue,muiFormControl:ve,states:["color","required","focused","disabled","error","filled"]}),_e=_extends$2({},ue,{color:xe.color||"primary",component:ge,disabled:xe.disabled,error:xe.error,filled:xe.filled,focused:xe.focused,required:xe.required}),Se=useUtilityClasses$u(_e);return jsxRuntimeExports.jsxs(FormLabelRoot,_extends$2({as:ge,ownerState:_e,className:clsx(Se.root,me),ref:ce},ye,{children:[pe,xe.required&&jsxRuntimeExports.jsxs(AsteriskComponent,{ownerState:_e,"aria-hidden":!0,className:Se.asterisk,children:[" ","*"]})]}))}),FormLabel$1=FormLabel,_excluded$A=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(ne){return`scale(${ne}, ${ne**2})`}const styles$2={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},isWebKit154=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Grow=reactExports.forwardRef(function(oe,ce){const{addEndListener:ue,appear:pe=!0,children:me,easing:ge,in:ye,onEnter:ve,onEntered:xe,onEntering:_e,onExit:Se,onExited:$e,onExiting:Re,style:Ae,timeout:Ie="auto",TransitionComponent:ke=Transition$1}=oe,Be=_objectWithoutPropertiesLoose$2(oe,_excluded$A),Ne=useTimeout(),Fe=reactExports.useRef(),Ue=useTheme$1(),We=reactExports.useRef(null),qe=useForkRef(We,me.ref,ce),ze=an=>Zt=>{if(an){const en=We.current;Zt===void 0?an(en):an(en,Zt)}},Ge=ze(_e),Ze=ze((an,Zt)=>{reflow$1(an);const{duration:en,delay:Kt,easing:Wt}=getTransitionProps$1({style:Ae,timeout:Ie,easing:ge},{mode:"enter"});let un;Ie==="auto"?(un=Ue.transitions.getAutoHeightDuration(an.clientHeight),Fe.current=un):un=en,an.style.transition=[Ue.transitions.create("opacity",{duration:un,delay:Kt}),Ue.transitions.create("transform",{duration:isWebKit154?un:un*.666,delay:Kt,easing:Wt})].join(","),ve&&ve(an,Zt)}),Dt=ze(xe),Je=ze(Re),Ut=ze(an=>{const{duration:Zt,delay:en,easing:Kt}=getTransitionProps$1({style:Ae,timeout:Ie,easing:ge},{mode:"exit"});let Wt;Ie==="auto"?(Wt=Ue.transitions.getAutoHeightDuration(an.clientHeight),Fe.current=Wt):Wt=Zt,an.style.transition=[Ue.transitions.create("opacity",{duration:Wt,delay:en}),Ue.transitions.create("transform",{duration:isWebKit154?Wt:Wt*.666,delay:isWebKit154?en:en||Wt*.333,easing:Kt})].join(","),an.style.opacity=0,an.style.transform=getScale(.75),Se&&Se(an)}),jt=ze($e),Ke=an=>{Ie==="auto"&&Ne.start(Fe.current||0,an),ue&&ue(We.current,an)};return jsxRuntimeExports.jsx(ke,_extends$2({appear:pe,in:ye,nodeRef:We,onEnter:Ze,onEntered:Dt,onEntering:Ge,onExit:Ut,onExited:jt,onExiting:Je,addEndListener:Ke,timeout:Ie==="auto"?null:Ie},Be,{children:(an,Zt)=>reactExports.cloneElement(me,_extends$2({style:_extends$2({opacity:0,transform:getScale(.75),visibility:an==="exited"&&!ye?"hidden":void 0},styles$2[an],Ae,me.props.style),ref:qe},Zt))}))});Grow.muiSupportAuto=!0;const Grow$1=Grow,_excluded$z=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$t=ne=>{const{classes:oe,disableUnderline:ce}=ne,pe=composeClasses$1({root:["root",!ce&&"underline"],input:["input"]},getInputUtilityClass,oe);return _extends$2({},oe,pe)},InputRoot=styled$1(InputBaseRoot,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiInput",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[...rootOverridesResolver(ne,oe),!ce.disableUnderline&&oe.underline]}})(({theme:ne,ownerState:oe})=>{let ue=ne.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return ne.vars&&(ue=`rgba(${ne.vars.palette.common.onBackgroundChannel} / ${ne.vars.opacity.inputUnderline})`),_extends$2({position:"relative"},oe.formControl&&{"label + &":{marginTop:16}},!oe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(ne.vars||ne).palette[oe.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:ne.transitions.create("transform",{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${inputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${inputClasses$1.error}`]:{"&::before, &::after":{borderBottomColor:(ne.vars||ne).palette.error.main}},"&::before":{borderBottom:`1px solid ${ue}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:ne.transitions.create("border-bottom-color",{duration:ne.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${inputClasses$1.disabled}, .${inputClasses$1.error}):before`]:{borderBottom:`2px solid ${(ne.vars||ne).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${ue}`}},[`&.${inputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}})}),InputInput=styled$1(InputBaseComponent,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),Input=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge;const ye=useThemeProps$3({props:oe,name:"MuiInput"}),{disableUnderline:ve,components:xe={},componentsProps:_e,fullWidth:Se=!1,inputComponent:$e="input",multiline:Re=!1,slotProps:Ae,slots:Ie={},type:ke="text"}=ye,Be=_objectWithoutPropertiesLoose$2(ye,_excluded$z),Ne=useUtilityClasses$t(ye),Ue={root:{ownerState:{disableUnderline:ve}}},We=Ae??_e?deepmerge$1(Ae??_e,Ue):Ue,qe=(ue=(pe=Ie.root)!=null?pe:xe.Root)!=null?ue:InputRoot,ze=(me=(ge=Ie.input)!=null?ge:xe.Input)!=null?me:InputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$2({slots:{root:qe,input:ze},slotProps:We,fullWidth:Se,inputComponent:$e,multiline:Re,ref:ce,type:ke},Be,{classes:Ne}))});Input.muiName="Input";const Input$1=Input;function getInputAdornmentUtilityClass(ne){return generateUtilityClass$2("MuiInputAdornment",ne)}const inputAdornmentClasses=generateUtilityClasses$2("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),inputAdornmentClasses$1=inputAdornmentClasses;var _span$2;const _excluded$y=["children","className","component","disablePointerEvents","disableTypography","position","variant"],overridesResolver$3=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`position${capitalize$1(ce.position)}`],ce.disablePointerEvents===!0&&oe.disablePointerEvents,oe[ce.variant]]},useUtilityClasses$s=ne=>{const{classes:oe,disablePointerEvents:ce,hiddenLabel:ue,position:pe,size:me,variant:ge}=ne,ye={root:["root",ce&&"disablePointerEvents",pe&&`position${capitalize$1(pe)}`,ge,ue&&"hiddenLabel",me&&`size${capitalize$1(me)}`]};return composeClasses$1(ye,getInputAdornmentUtilityClass,oe)},InputAdornmentRoot=styled$1("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:overridesResolver$3})(({theme:ne,ownerState:oe})=>_extends$2({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(ne.vars||ne).palette.action.active},oe.variant==="filled"&&{[`&.${inputAdornmentClasses$1.positionStart}&:not(.${inputAdornmentClasses$1.hiddenLabel})`]:{marginTop:16}},oe.position==="start"&&{marginRight:8},oe.position==="end"&&{marginLeft:8},oe.disablePointerEvents===!0&&{pointerEvents:"none"})),InputAdornment=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiInputAdornment"}),{children:pe,className:me,component:ge="div",disablePointerEvents:ye=!1,disableTypography:ve=!1,position:xe,variant:_e}=ue,Se=_objectWithoutPropertiesLoose$2(ue,_excluded$y),$e=useFormControl()||{};let Re=_e;_e&&$e.variant,$e&&!Re&&(Re=$e.variant);const Ae=_extends$2({},ue,{hiddenLabel:$e.hiddenLabel,size:$e.size,disablePointerEvents:ye,position:xe,variant:Re}),Ie=useUtilityClasses$s(Ae);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(InputAdornmentRoot,_extends$2({as:ge,ownerState:Ae,className:clsx(Ie.root,me),ref:ce},Se,{children:typeof pe=="string"&&!ve?jsxRuntimeExports.jsx(Type$2,{color:"text.secondary",children:pe}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[xe==="start"?_span$2||(_span$2=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):null,pe]})}))})}),InputAdornment$1=InputAdornment;function getInputLabelUtilityClasses(ne){return generateUtilityClass$2("MuiInputLabel",ne)}generateUtilityClasses$2("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _excluded$x=["disableAnimation","margin","shrink","variant","className"],useUtilityClasses$r=ne=>{const{classes:oe,formControl:ce,size:ue,shrink:pe,disableAnimation:me,variant:ge,required:ye}=ne,ve={root:["root",ce&&"formControl",!me&&"animated",pe&&"shrink",ue&&ue!=="normal"&&`size${capitalize$1(ue)}`,ge],asterisk:[ye&&"asterisk"]},xe=composeClasses$1(ve,getInputLabelUtilityClasses,oe);return _extends$2({},oe,xe)},InputLabelRoot=styled$1(FormLabel$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${formLabelClasses$1.asterisk}`]:oe.asterisk},oe.root,ce.formControl&&oe.formControl,ce.size==="small"&&oe.sizeSmall,ce.shrink&&oe.shrink,!ce.disableAnimation&&oe.animated,ce.focused&&oe.focused,oe[ce.variant]]}})(({theme:ne,ownerState:oe})=>_extends$2({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},oe.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},oe.size==="small"&&{transform:"translate(0, 17px) scale(1)"},oe.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!oe.disableAnimation&&{transition:ne.transitions.create(["color","transform","max-width"],{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut})},oe.variant==="filled"&&_extends$2({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},oe.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},oe.shrink&&_extends$2({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},oe.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),oe.variant==="outlined"&&_extends$2({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},oe.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},oe.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),InputLabel=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({name:"MuiInputLabel",props:oe}),{disableAnimation:pe=!1,shrink:me,className:ge}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$x),ve=useFormControl();let xe=me;typeof xe>"u"&&ve&&(xe=ve.filled||ve.focused||ve.adornedStart);const _e=formControlState({props:ue,muiFormControl:ve,states:["size","variant","required","focused"]}),Se=_extends$2({},ue,{disableAnimation:pe,formControl:ve,shrink:xe,size:_e.size,variant:_e.variant,required:_e.required,focused:_e.focused}),$e=useUtilityClasses$r(Se);return jsxRuntimeExports.jsx(InputLabelRoot,_extends$2({"data-shrink":xe,ownerState:Se,ref:ce,className:clsx($e.root,ge)},ye,{classes:$e}))}),InputLabel$1=InputLabel;function getLinearProgressUtilityClass(ne){return generateUtilityClass$2("MuiLinearProgress",ne)}generateUtilityClasses$2("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const _excluded$w=["className","color","value","valueBuffer","variant"];let _$8=ne=>ne,_t$2,_t2$1,_t3$1,_t4$1,_t5,_t6;const TRANSITION_DURATION=4,indeterminate1Keyframe=keyframes(_t$2||(_t$2=_$8` + `),circularDashKeyframe)),CircularProgress=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiCircularProgress"}),{className:pe,color:me="primary",disableShrink:ge=!1,size:ye=40,style:ve,thickness:xe=3.6,value:_e=0,variant:Se="indeterminate"}=ue,$e=_objectWithoutPropertiesLoose$2(ue,_excluded$K),Re=_extends$2({},ue,{color:me,disableShrink:ge,size:ye,thickness:xe,value:_e,variant:Se}),Ae=useUtilityClasses$D(Re),Ie={},ke={},Be={};if(Se==="determinate"){const Ne=2*Math.PI*((SIZE-xe)/2);Ie.strokeDasharray=Ne.toFixed(3),Be["aria-valuenow"]=Math.round(_e),Ie.strokeDashoffset=`${((100-_e)/100*Ne).toFixed(3)}px`,ke.transform="rotate(-90deg)"}return jsxRuntimeExports.jsx(CircularProgressRoot,_extends$2({className:clsx(Ae.root,pe),style:_extends$2({width:ye,height:ye},ke,ve),ownerState:Re,ref:ce,role:"progressbar"},Be,$e,{children:jsxRuntimeExports.jsx(CircularProgressSVG,{className:Ae.svg,ownerState:Re,viewBox:`${SIZE/2} ${SIZE/2} ${SIZE} ${SIZE}`,children:jsxRuntimeExports.jsx(CircularProgressCircle,{className:Ae.circle,style:Ie,ownerState:Re,cx:SIZE,cy:SIZE,r:(SIZE-xe)/2,fill:"none",strokeWidth:xe})})}))}),CircularProgress$1=CircularProgress,html=(ne,oe)=>_extends$2({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},oe&&!ne.vars&&{colorScheme:ne.palette.mode}),body=ne=>_extends$2({color:(ne.vars||ne).palette.text.primary},ne.typography.body1,{backgroundColor:(ne.vars||ne).palette.background.default,"@media print":{backgroundColor:(ne.vars||ne).palette.common.white}}),styles$3=(ne,oe=!1)=>{var ce;const ue={};oe&&ne.colorSchemes&&Object.entries(ne.colorSchemes).forEach(([ge,ye])=>{var ve;ue[ne.getColorSchemeSelector(ge).replace(/\s*&/,"")]={colorScheme:(ve=ye.palette)==null?void 0:ve.mode}});let pe=_extends$2({html:html(ne,oe),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:ne.typography.fontWeightBold},body:_extends$2({margin:0},body(ne),{"&::backdrop":{backgroundColor:(ne.vars||ne).palette.background.default}})},ue);const me=(ce=ne.components)==null||(ce=ce.MuiCssBaseline)==null?void 0:ce.styleOverrides;return me&&(pe=[pe,me]),pe};function CssBaseline(ne){const oe=useThemeProps$3({props:ne,name:"MuiCssBaseline"}),{children:ce,enableColorScheme:ue=!1}=oe;return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(GlobalStyles,{styles:pe=>styles$3(pe,ue)}),ce]})}function getModalUtilityClass(ne){return generateUtilityClass$2("MuiModal",ne)}generateUtilityClasses$2("MuiModal",["root","hidden","backdrop"]);const _excluded$J=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],useUtilityClasses$C=ne=>{const{open:oe,exited:ce,classes:ue}=ne;return composeClasses$1({root:["root",!oe&&ce&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,ue)},ModalRoot=styled$1("div",{name:"MuiModal",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,!ce.open&&ce.exited&&oe.hidden]}})(({theme:ne,ownerState:oe})=>_extends$2({position:"fixed",zIndex:(ne.vars||ne).zIndex.modal,right:0,bottom:0,top:0,left:0},!oe.open&&oe.exited&&{visibility:"hidden"})),ModalBackdrop=styled$1(Backdrop$1,{name:"MuiModal",slot:"Backdrop",overridesResolver:(ne,oe)=>oe.backdrop})({zIndex:-1}),Modal$1=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye,ve;const xe=useThemeProps$3({name:"MuiModal",props:oe}),{BackdropComponent:_e=ModalBackdrop,BackdropProps:Se,className:$e,closeAfterTransition:Re=!1,children:Ae,container:Ie,component:ke,components:Be={},componentsProps:Ne={},disableAutoFocus:Fe=!1,disableEnforceFocus:Ue=!1,disableEscapeKeyDown:We=!1,disablePortal:qe=!1,disableRestoreFocus:ze=!1,disableScrollLock:Ge=!1,hideBackdrop:Ze=!1,keepMounted:Dt=!1,onBackdropClick:Je,open:Ut,slotProps:jt,slots:Ke}=xe,an=_objectWithoutPropertiesLoose$2(xe,_excluded$J),Zt=_extends$2({},xe,{closeAfterTransition:Re,disableAutoFocus:Fe,disableEnforceFocus:Ue,disableEscapeKeyDown:We,disablePortal:qe,disableRestoreFocus:ze,disableScrollLock:Ge,hideBackdrop:Ze,keepMounted:Dt}),{getRootProps:en,getBackdropProps:Kt,getTransitionProps:Wt,portalRef:un,isTopModal:Xt,exited:nn,hasTransition:vn}=useModal(_extends$2({},Zt,{rootRef:ce})),Sn=_extends$2({},Zt,{exited:nn}),Cn=useUtilityClasses$C(Sn),Nt={};if(Ae.props.tabIndex===void 0&&(Nt.tabIndex="-1"),vn){const{onEnter:sn,onExited:yn}=Wt();Nt.onEnter=sn,Nt.onExited=yn}const Yt=(ue=(pe=Ke==null?void 0:Ke.root)!=null?pe:Be.Root)!=null?ue:ModalRoot,Jt=(me=(ge=Ke==null?void 0:Ke.backdrop)!=null?ge:Be.Backdrop)!=null?me:_e,hn=(ye=jt==null?void 0:jt.root)!=null?ye:Ne.root,Ye=(ve=jt==null?void 0:jt.backdrop)!=null?ve:Ne.backdrop,Xe=useSlotProps({elementType:Yt,externalSlotProps:hn,externalForwardedProps:an,getSlotProps:en,additionalProps:{ref:ce,as:ke},ownerState:Sn,className:clsx($e,hn==null?void 0:hn.className,Cn==null?void 0:Cn.root,!Sn.open&&Sn.exited&&(Cn==null?void 0:Cn.hidden))}),Pt=useSlotProps({elementType:Jt,externalSlotProps:Ye,additionalProps:Se,getSlotProps:sn=>Kt(_extends$2({},sn,{onClick:yn=>{Je&&Je(yn),sn!=null&&sn.onClick&&sn.onClick(yn)}})),className:clsx(Ye==null?void 0:Ye.className,Se==null?void 0:Se.className,Cn==null?void 0:Cn.backdrop),ownerState:Sn});return!Dt&&!Ut&&(!vn||nn)?null:jsxRuntimeExports.jsx(Portal,{ref:un,container:Ie,disablePortal:qe,children:jsxRuntimeExports.jsxs(Yt,_extends$2({},Xe,{children:[!Ze&&_e?jsxRuntimeExports.jsx(Jt,_extends$2({},Pt)):null,jsxRuntimeExports.jsx(FocusTrap,{disableEnforceFocus:Ue,disableAutoFocus:Fe,disableRestoreFocus:ze,isEnabled:Xt,open:Ut,children:reactExports.cloneElement(Ae,Nt)})]}))})}),Modal$2=Modal$1;function getDialogUtilityClass(ne){return generateUtilityClass$2("MuiDialog",ne)}const dialogClasses=generateUtilityClasses$2("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),dialogClasses$1=dialogClasses,DialogContext=reactExports.createContext({}),DialogContext$1=DialogContext,_excluded$I=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],DialogBackdrop=styled$1(Backdrop$1,{name:"MuiDialog",slot:"Backdrop",overrides:(ne,oe)=>oe.backdrop})({zIndex:-1}),useUtilityClasses$B=ne=>{const{classes:oe,scroll:ce,maxWidth:ue,fullWidth:pe,fullScreen:me}=ne,ge={root:["root"],container:["container",`scroll${capitalize$1(ce)}`],paper:["paper",`paperScroll${capitalize$1(ce)}`,`paperWidth${capitalize$1(String(ue))}`,pe&&"paperFullWidth",me&&"paperFullScreen"]};return composeClasses$1(ge,getDialogUtilityClass,oe)},DialogRoot=styled$1(Modal$2,{name:"MuiDialog",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({"@media print":{position:"absolute !important"}}),DialogContainer=styled$1("div",{name:"MuiDialog",slot:"Container",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.container,oe[`scroll${capitalize$1(ce.scroll)}`]]}})(({ownerState:ne})=>_extends$2({height:"100%","@media print":{height:"auto"},outline:0},ne.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},ne.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),DialogPaper=styled$1(Paper$1,{name:"MuiDialog",slot:"Paper",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.paper,oe[`scrollPaper${capitalize$1(ce.scroll)}`],oe[`paperWidth${capitalize$1(String(ce.maxWidth))}`],ce.fullWidth&&oe.paperFullWidth,ce.fullScreen&&oe.paperFullScreen]}})(({theme:ne,ownerState:oe})=>_extends$2({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},oe.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},oe.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!oe.maxWidth&&{maxWidth:"calc(100% - 64px)"},oe.maxWidth==="xs"&&{maxWidth:ne.breakpoints.unit==="px"?Math.max(ne.breakpoints.values.xs,444):`max(${ne.breakpoints.values.xs}${ne.breakpoints.unit}, 444px)`,[`&.${dialogClasses$1.paperScrollBody}`]:{[ne.breakpoints.down(Math.max(ne.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},oe.maxWidth&&oe.maxWidth!=="xs"&&{maxWidth:`${ne.breakpoints.values[oe.maxWidth]}${ne.breakpoints.unit}`,[`&.${dialogClasses$1.paperScrollBody}`]:{[ne.breakpoints.down(ne.breakpoints.values[oe.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},oe.fullWidth&&{width:"calc(100% - 64px)"},oe.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${dialogClasses$1.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Dialog=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiDialog"}),pe=useTheme$1(),me={enter:pe.transitions.duration.enteringScreen,exit:pe.transitions.duration.leavingScreen},{"aria-describedby":ge,"aria-labelledby":ye,BackdropComponent:ve,BackdropProps:xe,children:_e,className:Se,disableEscapeKeyDown:$e=!1,fullScreen:Re=!1,fullWidth:Ae=!1,maxWidth:Ie="sm",onBackdropClick:ke,onClick:Be,onClose:Ne,open:Fe,PaperComponent:Ue=Paper$1,PaperProps:We={},scroll:qe="paper",TransitionComponent:ze=Fade$1,transitionDuration:Ge=me,TransitionProps:Ze}=ue,Dt=_objectWithoutPropertiesLoose$2(ue,_excluded$I),Je=_extends$2({},ue,{disableEscapeKeyDown:$e,fullScreen:Re,fullWidth:Ae,maxWidth:Ie,scroll:qe}),Ut=useUtilityClasses$B(Je),jt=reactExports.useRef(),Ke=Kt=>{jt.current=Kt.target===Kt.currentTarget},an=Kt=>{Be&&Be(Kt),jt.current&&(jt.current=null,ke&&ke(Kt),Ne&&Ne(Kt,"backdropClick"))},Zt=useId(ye),en=reactExports.useMemo(()=>({titleId:Zt}),[Zt]);return jsxRuntimeExports.jsx(DialogRoot,_extends$2({className:clsx(Ut.root,Se),closeAfterTransition:!0,components:{Backdrop:DialogBackdrop},componentsProps:{backdrop:_extends$2({transitionDuration:Ge,as:ve},xe)},disableEscapeKeyDown:$e,onClose:Ne,open:Fe,ref:ce,onClick:an,ownerState:Je},Dt,{children:jsxRuntimeExports.jsx(ze,_extends$2({appear:!0,in:Fe,timeout:Ge,role:"presentation"},Ze,{children:jsxRuntimeExports.jsx(DialogContainer,{className:clsx(Ut.container),onMouseDown:Ke,ownerState:Je,children:jsxRuntimeExports.jsx(DialogPaper,_extends$2({as:Ue,elevation:24,role:"dialog","aria-describedby":ge,"aria-labelledby":Zt},We,{className:clsx(Ut.paper,We.className),ownerState:Je,children:jsxRuntimeExports.jsx(DialogContext$1.Provider,{value:en,children:_e})}))})}))}))}),Dialog$1=Dialog;function getDividerUtilityClass(ne){return generateUtilityClass$2("MuiDivider",ne)}const dividerClasses=generateUtilityClasses$2("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),dividerClasses$1=dividerClasses,_excluded$H=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],useUtilityClasses$A=ne=>{const{absolute:oe,children:ce,classes:ue,flexItem:pe,light:me,orientation:ge,textAlign:ye,variant:ve}=ne;return composeClasses$1({root:["root",oe&&"absolute",ve,me&&"light",ge==="vertical"&&"vertical",pe&&"flexItem",ce&&"withChildren",ce&&ge==="vertical"&&"withChildrenVertical",ye==="right"&&ge!=="vertical"&&"textAlignRight",ye==="left"&&ge!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",ge==="vertical"&&"wrapperVertical"]},getDividerUtilityClass,ue)},DividerRoot=styled$1("div",{name:"MuiDivider",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.absolute&&oe.absolute,oe[ce.variant],ce.light&&oe.light,ce.orientation==="vertical"&&oe.vertical,ce.flexItem&&oe.flexItem,ce.children&&oe.withChildren,ce.children&&ce.orientation==="vertical"&&oe.withChildrenVertical,ce.textAlign==="right"&&ce.orientation!=="vertical"&&oe.textAlignRight,ce.textAlign==="left"&&ce.orientation!=="vertical"&&oe.textAlignLeft]}})(({theme:ne,ownerState:oe})=>_extends$2({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(ne.vars||ne).palette.divider,borderBottomWidth:"thin"},oe.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},oe.light&&{borderColor:ne.vars?`rgba(${ne.vars.palette.dividerChannel} / 0.08)`:alpha_1(ne.palette.divider,.08)},oe.variant==="inset"&&{marginLeft:72},oe.variant==="middle"&&oe.orientation==="horizontal"&&{marginLeft:ne.spacing(2),marginRight:ne.spacing(2)},oe.variant==="middle"&&oe.orientation==="vertical"&&{marginTop:ne.spacing(1),marginBottom:ne.spacing(1)},oe.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},oe.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:ne})=>_extends$2({},ne.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:ne,ownerState:oe})=>_extends$2({},oe.children&&oe.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(ne.vars||ne).palette.divider}`}}),({theme:ne,ownerState:oe})=>_extends$2({},oe.children&&oe.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(ne.vars||ne).palette.divider}`}}),({ownerState:ne})=>_extends$2({},ne.textAlign==="right"&&ne.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},ne.textAlign==="left"&&ne.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),DividerWrapper=styled$1("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.wrapper,ce.orientation==="vertical"&&oe.wrapperVertical]}})(({theme:ne,ownerState:oe})=>_extends$2({display:"inline-block",paddingLeft:`calc(${ne.spacing(1)} * 1.2)`,paddingRight:`calc(${ne.spacing(1)} * 1.2)`},oe.orientation==="vertical"&&{paddingTop:`calc(${ne.spacing(1)} * 1.2)`,paddingBottom:`calc(${ne.spacing(1)} * 1.2)`})),Divider=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiDivider"}),{absolute:pe=!1,children:me,className:ge,component:ye=me?"div":"hr",flexItem:ve=!1,light:xe=!1,orientation:_e="horizontal",role:Se=ye!=="hr"?"separator":void 0,textAlign:$e="center",variant:Re="fullWidth"}=ue,Ae=_objectWithoutPropertiesLoose$2(ue,_excluded$H),Ie=_extends$2({},ue,{absolute:pe,component:ye,flexItem:ve,light:xe,orientation:_e,role:Se,textAlign:$e,variant:Re}),ke=useUtilityClasses$A(Ie);return jsxRuntimeExports.jsx(DividerRoot,_extends$2({as:ye,className:clsx(ke.root,ge),role:Se,ref:ce,ownerState:Ie},Ae,{children:me?jsxRuntimeExports.jsx(DividerWrapper,{className:ke.wrapper,ownerState:Ie,children:me}):null}))});Divider.muiSkipListHighlight=!0;const Divider$1=Divider,_excluded$G=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$z=ne=>{const{classes:oe,disableUnderline:ce}=ne,pe=composeClasses$1({root:["root",!ce&&"underline"],input:["input"]},getFilledInputUtilityClass,oe);return _extends$2({},oe,pe)},FilledInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[...rootOverridesResolver(ne,oe),!ce.disableUnderline&&oe.underline]}})(({theme:ne,ownerState:oe})=>{var ce;const ue=ne.palette.mode==="light",pe=ue?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",me=ue?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",ge=ue?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",ye=ue?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return _extends$2({position:"relative",backgroundColor:ne.vars?ne.vars.palette.FilledInput.bg:me,borderTopLeftRadius:(ne.vars||ne).shape.borderRadius,borderTopRightRadius:(ne.vars||ne).shape.borderRadius,transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut}),"&:hover":{backgroundColor:ne.vars?ne.vars.palette.FilledInput.hoverBg:ge,"@media (hover: none)":{backgroundColor:ne.vars?ne.vars.palette.FilledInput.bg:me}},[`&.${filledInputClasses$1.focused}`]:{backgroundColor:ne.vars?ne.vars.palette.FilledInput.bg:me},[`&.${filledInputClasses$1.disabled}`]:{backgroundColor:ne.vars?ne.vars.palette.FilledInput.disabledBg:ye}},!oe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(ce=(ne.vars||ne).palette[oe.color||"primary"])==null?void 0:ce.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:ne.transitions.create("transform",{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${filledInputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${filledInputClasses$1.error}`]:{"&::before, &::after":{borderBottomColor:(ne.vars||ne).palette.error.main}},"&::before":{borderBottom:`1px solid ${ne.vars?`rgba(${ne.vars.palette.common.onBackgroundChannel} / ${ne.vars.opacity.inputUnderline})`:pe}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:ne.transitions.create("border-bottom-color",{duration:ne.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${filledInputClasses$1.disabled}, .${filledInputClasses$1.error}):before`]:{borderBottom:`1px solid ${(ne.vars||ne).palette.text.primary}`},[`&.${filledInputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}},oe.startAdornment&&{paddingLeft:12},oe.endAdornment&&{paddingRight:12},oe.multiline&&_extends$2({padding:"25px 12px 8px"},oe.size==="small"&&{paddingTop:21,paddingBottom:4},oe.hiddenLabel&&{paddingTop:16,paddingBottom:17},oe.hiddenLabel&&oe.size==="small"&&{paddingTop:8,paddingBottom:9}))}),FilledInputInput=styled$1(InputBaseComponent,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!ne.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:ne.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:ne.palette.mode==="light"?null:"#fff",caretColor:ne.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},ne.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[ne.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},oe.size==="small"&&{paddingTop:21,paddingBottom:4},oe.hiddenLabel&&{paddingTop:16,paddingBottom:17},oe.startAdornment&&{paddingLeft:0},oe.endAdornment&&{paddingRight:0},oe.hiddenLabel&&oe.size==="small"&&{paddingTop:8,paddingBottom:9},oe.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),FilledInput=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge;const ye=useThemeProps$3({props:oe,name:"MuiFilledInput"}),{components:ve={},componentsProps:xe,fullWidth:_e=!1,inputComponent:Se="input",multiline:$e=!1,slotProps:Re,slots:Ae={},type:Ie="text"}=ye,ke=_objectWithoutPropertiesLoose$2(ye,_excluded$G),Be=_extends$2({},ye,{fullWidth:_e,inputComponent:Se,multiline:$e,type:Ie}),Ne=useUtilityClasses$z(ye),Fe={root:{ownerState:Be},input:{ownerState:Be}},Ue=Re??xe?deepmerge$1(Fe,Re??xe):Fe,We=(ue=(pe=Ae.root)!=null?pe:ve.Root)!=null?ue:FilledInputRoot,qe=(me=(ge=Ae.input)!=null?ge:ve.Input)!=null?me:FilledInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$2({slots:{root:We,input:qe},componentsProps:Ue,fullWidth:_e,inputComponent:Se,multiline:$e,ref:ce,type:Ie},ke,{classes:Ne}))});FilledInput.muiName="Input";const FilledInput$1=FilledInput;function getFormControlUtilityClasses(ne){return generateUtilityClass$2("MuiFormControl",ne)}generateUtilityClasses$2("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const _excluded$F=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],useUtilityClasses$y=ne=>{const{classes:oe,margin:ce,fullWidth:ue}=ne,pe={root:["root",ce!=="none"&&`margin${capitalize$1(ce)}`,ue&&"fullWidth"]};return composeClasses$1(pe,getFormControlUtilityClasses,oe)},FormControlRoot=styled$1("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:ne},oe)=>_extends$2({},oe.root,oe[`margin${capitalize$1(ne.margin)}`],ne.fullWidth&&oe.fullWidth)})(({ownerState:ne})=>_extends$2({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},ne.margin==="normal"&&{marginTop:16,marginBottom:8},ne.margin==="dense"&&{marginTop:8,marginBottom:4},ne.fullWidth&&{width:"100%"})),FormControl=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiFormControl"}),{children:pe,className:me,color:ge="primary",component:ye="div",disabled:ve=!1,error:xe=!1,focused:_e,fullWidth:Se=!1,hiddenLabel:$e=!1,margin:Re="none",required:Ae=!1,size:Ie="medium",variant:ke="outlined"}=ue,Be=_objectWithoutPropertiesLoose$2(ue,_excluded$F),Ne=_extends$2({},ue,{color:ge,component:ye,disabled:ve,error:xe,fullWidth:Se,hiddenLabel:$e,margin:Re,required:Ae,size:Ie,variant:ke}),Fe=useUtilityClasses$y(Ne),[Ue,We]=reactExports.useState(()=>{let jt=!1;return pe&&reactExports.Children.forEach(pe,Ke=>{if(!isMuiElement(Ke,["Input","Select"]))return;const an=isMuiElement(Ke,["Select"])?Ke.props.input:Ke;an&&isAdornedStart(an.props)&&(jt=!0)}),jt}),[qe,ze]=reactExports.useState(()=>{let jt=!1;return pe&&reactExports.Children.forEach(pe,Ke=>{isMuiElement(Ke,["Input","Select"])&&(isFilled(Ke.props,!0)||isFilled(Ke.props.inputProps,!0))&&(jt=!0)}),jt}),[Ge,Ze]=reactExports.useState(!1);ve&&Ge&&Ze(!1);const Dt=_e!==void 0&&!ve?_e:Ge;let Je;const Ut=reactExports.useMemo(()=>({adornedStart:Ue,setAdornedStart:We,color:ge,disabled:ve,error:xe,filled:qe,focused:Dt,fullWidth:Se,hiddenLabel:$e,size:Ie,onBlur:()=>{Ze(!1)},onEmpty:()=>{ze(!1)},onFilled:()=>{ze(!0)},onFocus:()=>{Ze(!0)},registerEffect:Je,required:Ae,variant:ke}),[Ue,ge,ve,xe,qe,Dt,Se,$e,Je,Ae,Ie,ke]);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:Ut,children:jsxRuntimeExports.jsx(FormControlRoot,_extends$2({as:ye,ownerState:Ne,className:clsx(Fe.root,me),ref:ce},Be,{children:pe}))})}),FormControl$1=FormControl,Stack=createStack({createStyledComponent:styled$1("div",{name:"MuiStack",slot:"Root",overridesResolver:(ne,oe)=>oe.root}),useThemeProps:ne=>useThemeProps$3({props:ne,name:"MuiStack"})}),Stack$1=Stack;function getFormControlLabelUtilityClasses(ne){return generateUtilityClass$2("MuiFormControlLabel",ne)}const formControlLabelClasses=generateUtilityClasses$2("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),formControlLabelClasses$1=formControlLabelClasses,_excluded$E=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],useUtilityClasses$x=ne=>{const{classes:oe,disabled:ce,labelPlacement:ue,error:pe,required:me}=ne,ge={root:["root",ce&&"disabled",`labelPlacement${capitalize$1(ue)}`,pe&&"error",me&&"required"],label:["label",ce&&"disabled"],asterisk:["asterisk",pe&&"error"]};return composeClasses$1(ge,getFormControlLabelUtilityClasses,oe)},FormControlLabelRoot=styled$1("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${formControlLabelClasses$1.label}`]:oe.label},oe.root,oe[`labelPlacement${capitalize$1(ce.labelPlacement)}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${formControlLabelClasses$1.disabled}`]:{cursor:"default"}},oe.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},oe.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},oe.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${formControlLabelClasses$1.label}`]:{[`&.${formControlLabelClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled}}})),AsteriskComponent$1=styled$1("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(ne,oe)=>oe.asterisk})(({theme:ne})=>({[`&.${formControlLabelClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}})),FormControlLabel=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiFormControlLabel"}),{className:ge,componentsProps:ye={},control:ve,disabled:xe,disableTypography:_e,label:Se,labelPlacement:$e="end",required:Re,slotProps:Ae={}}=me,Ie=_objectWithoutPropertiesLoose$2(me,_excluded$E),ke=useFormControl(),Be=(ue=xe??ve.props.disabled)!=null?ue:ke==null?void 0:ke.disabled,Ne=Re??ve.props.required,Fe={disabled:Be,required:Ne};["checked","name","onChange","value","inputRef"].forEach(Ze=>{typeof ve.props[Ze]>"u"&&typeof me[Ze]<"u"&&(Fe[Ze]=me[Ze])});const Ue=formControlState({props:me,muiFormControl:ke,states:["error"]}),We=_extends$2({},me,{disabled:Be,labelPlacement:$e,required:Ne,error:Ue.error}),qe=useUtilityClasses$x(We),ze=(pe=Ae.typography)!=null?pe:ye.typography;let Ge=Se;return Ge!=null&&Ge.type!==Type$2&&!_e&&(Ge=jsxRuntimeExports.jsx(Type$2,_extends$2({component:"span"},ze,{className:clsx(qe.label,ze==null?void 0:ze.className),children:Ge}))),jsxRuntimeExports.jsxs(FormControlLabelRoot,_extends$2({className:clsx(qe.root,ge),ownerState:We,ref:ce},Ie,{children:[reactExports.cloneElement(ve,Fe),Ne?jsxRuntimeExports.jsxs(Stack$1,{display:"block",children:[Ge,jsxRuntimeExports.jsxs(AsteriskComponent$1,{ownerState:We,"aria-hidden":!0,className:qe.asterisk,children:[" ","*"]})]}):Ge]}))}),FormControlLabel$1=FormControlLabel;function getFormHelperTextUtilityClasses(ne){return generateUtilityClass$2("MuiFormHelperText",ne)}const formHelperTextClasses=generateUtilityClasses$2("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),formHelperTextClasses$1=formHelperTextClasses;var _span$3;const _excluded$D=["children","className","component","disabled","error","filled","focused","margin","required","variant"],useUtilityClasses$w=ne=>{const{classes:oe,contained:ce,size:ue,disabled:pe,error:me,filled:ge,focused:ye,required:ve}=ne,xe={root:["root",pe&&"disabled",me&&"error",ue&&`size${capitalize$1(ue)}`,ce&&"contained",ye&&"focused",ge&&"filled",ve&&"required"]};return composeClasses$1(xe,getFormHelperTextUtilityClasses,oe)},FormHelperTextRoot=styled$1("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.size&&oe[`size${capitalize$1(ce.size)}`],ce.contained&&oe.contained,ce.filled&&oe.filled]}})(({theme:ne,ownerState:oe})=>_extends$2({color:(ne.vars||ne).palette.text.secondary},ne.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${formHelperTextClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled},[`&.${formHelperTextClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}},oe.size==="small"&&{marginTop:4},oe.contained&&{marginLeft:14,marginRight:14})),FormHelperText=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiFormHelperText"}),{children:pe,className:me,component:ge="p"}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$D),ve=useFormControl(),xe=formControlState({props:ue,muiFormControl:ve,states:["variant","size","disabled","error","filled","focused","required"]}),_e=_extends$2({},ue,{component:ge,contained:xe.variant==="filled"||xe.variant==="outlined",variant:xe.variant,size:xe.size,disabled:xe.disabled,error:xe.error,filled:xe.filled,focused:xe.focused,required:xe.required}),Se=useUtilityClasses$w(_e);return jsxRuntimeExports.jsx(FormHelperTextRoot,_extends$2({as:ge,ownerState:_e,className:clsx(Se.root,me),ref:ce},ye,{children:pe===" "?_span$3||(_span$3=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):pe}))}),FormHelperText$1=FormHelperText;function getFormLabelUtilityClasses(ne){return generateUtilityClass$2("MuiFormLabel",ne)}const formLabelClasses=generateUtilityClasses$2("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),formLabelClasses$1=formLabelClasses,_excluded$C=["children","className","color","component","disabled","error","filled","focused","required"],useUtilityClasses$v=ne=>{const{classes:oe,color:ce,focused:ue,disabled:pe,error:me,filled:ge,required:ye}=ne,ve={root:["root",`color${capitalize$1(ce)}`,pe&&"disabled",me&&"error",ge&&"filled",ue&&"focused",ye&&"required"],asterisk:["asterisk",me&&"error"]};return composeClasses$1(ve,getFormLabelUtilityClasses,oe)},FormLabelRoot=styled$1("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:ne},oe)=>_extends$2({},oe.root,ne.color==="secondary"&&oe.colorSecondary,ne.filled&&oe.filled)})(({theme:ne,ownerState:oe})=>_extends$2({color:(ne.vars||ne).palette.text.secondary},ne.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${formLabelClasses$1.focused}`]:{color:(ne.vars||ne).palette[oe.color].main},[`&.${formLabelClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled},[`&.${formLabelClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}})),AsteriskComponent=styled$1("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(ne,oe)=>oe.asterisk})(({theme:ne})=>({[`&.${formLabelClasses$1.error}`]:{color:(ne.vars||ne).palette.error.main}})),FormLabel=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiFormLabel"}),{children:pe,className:me,component:ge="label"}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$C),ve=useFormControl(),xe=formControlState({props:ue,muiFormControl:ve,states:["color","required","focused","disabled","error","filled"]}),_e=_extends$2({},ue,{color:xe.color||"primary",component:ge,disabled:xe.disabled,error:xe.error,filled:xe.filled,focused:xe.focused,required:xe.required}),Se=useUtilityClasses$v(_e);return jsxRuntimeExports.jsxs(FormLabelRoot,_extends$2({as:ge,ownerState:_e,className:clsx(Se.root,me),ref:ce},ye,{children:[pe,xe.required&&jsxRuntimeExports.jsxs(AsteriskComponent,{ownerState:_e,"aria-hidden":!0,className:Se.asterisk,children:[" ","*"]})]}))}),FormLabel$1=FormLabel,_excluded$B=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(ne){return`scale(${ne}, ${ne**2})`}const styles$2={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},isWebKit154=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Grow=reactExports.forwardRef(function(oe,ce){const{addEndListener:ue,appear:pe=!0,children:me,easing:ge,in:ye,onEnter:ve,onEntered:xe,onEntering:_e,onExit:Se,onExited:$e,onExiting:Re,style:Ae,timeout:Ie="auto",TransitionComponent:ke=Transition$1}=oe,Be=_objectWithoutPropertiesLoose$2(oe,_excluded$B),Ne=useTimeout(),Fe=reactExports.useRef(),Ue=useTheme$1(),We=reactExports.useRef(null),qe=useForkRef(We,me.ref,ce),ze=an=>Zt=>{if(an){const en=We.current;Zt===void 0?an(en):an(en,Zt)}},Ge=ze(_e),Ze=ze((an,Zt)=>{reflow$1(an);const{duration:en,delay:Kt,easing:Wt}=getTransitionProps$1({style:Ae,timeout:Ie,easing:ge},{mode:"enter"});let un;Ie==="auto"?(un=Ue.transitions.getAutoHeightDuration(an.clientHeight),Fe.current=un):un=en,an.style.transition=[Ue.transitions.create("opacity",{duration:un,delay:Kt}),Ue.transitions.create("transform",{duration:isWebKit154?un:un*.666,delay:Kt,easing:Wt})].join(","),ve&&ve(an,Zt)}),Dt=ze(xe),Je=ze(Re),Ut=ze(an=>{const{duration:Zt,delay:en,easing:Kt}=getTransitionProps$1({style:Ae,timeout:Ie,easing:ge},{mode:"exit"});let Wt;Ie==="auto"?(Wt=Ue.transitions.getAutoHeightDuration(an.clientHeight),Fe.current=Wt):Wt=Zt,an.style.transition=[Ue.transitions.create("opacity",{duration:Wt,delay:en}),Ue.transitions.create("transform",{duration:isWebKit154?Wt:Wt*.666,delay:isWebKit154?en:en||Wt*.333,easing:Kt})].join(","),an.style.opacity=0,an.style.transform=getScale(.75),Se&&Se(an)}),jt=ze($e),Ke=an=>{Ie==="auto"&&Ne.start(Fe.current||0,an),ue&&ue(We.current,an)};return jsxRuntimeExports.jsx(ke,_extends$2({appear:pe,in:ye,nodeRef:We,onEnter:Ze,onEntered:Dt,onEntering:Ge,onExit:Ut,onExited:jt,onExiting:Je,addEndListener:Ke,timeout:Ie==="auto"?null:Ie},Be,{children:(an,Zt)=>reactExports.cloneElement(me,_extends$2({style:_extends$2({opacity:0,transform:getScale(.75),visibility:an==="exited"&&!ye?"hidden":void 0},styles$2[an],Ae,me.props.style),ref:qe},Zt))}))});Grow.muiSupportAuto=!0;const Grow$1=Grow,_excluded$A=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$u=ne=>{const{classes:oe,disableUnderline:ce}=ne,pe=composeClasses$1({root:["root",!ce&&"underline"],input:["input"]},getInputUtilityClass,oe);return _extends$2({},oe,pe)},InputRoot=styled$1(InputBaseRoot,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiInput",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[...rootOverridesResolver(ne,oe),!ce.disableUnderline&&oe.underline]}})(({theme:ne,ownerState:oe})=>{let ue=ne.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return ne.vars&&(ue=`rgba(${ne.vars.palette.common.onBackgroundChannel} / ${ne.vars.opacity.inputUnderline})`),_extends$2({position:"relative"},oe.formControl&&{"label + &":{marginTop:16}},!oe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(ne.vars||ne).palette[oe.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:ne.transitions.create("transform",{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${inputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${inputClasses$1.error}`]:{"&::before, &::after":{borderBottomColor:(ne.vars||ne).palette.error.main}},"&::before":{borderBottom:`1px solid ${ue}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:ne.transitions.create("border-bottom-color",{duration:ne.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${inputClasses$1.disabled}, .${inputClasses$1.error}):before`]:{borderBottom:`2px solid ${(ne.vars||ne).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${ue}`}},[`&.${inputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}})}),InputInput=styled$1(InputBaseComponent,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),Input=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge;const ye=useThemeProps$3({props:oe,name:"MuiInput"}),{disableUnderline:ve,components:xe={},componentsProps:_e,fullWidth:Se=!1,inputComponent:$e="input",multiline:Re=!1,slotProps:Ae,slots:Ie={},type:ke="text"}=ye,Be=_objectWithoutPropertiesLoose$2(ye,_excluded$A),Ne=useUtilityClasses$u(ye),Ue={root:{ownerState:{disableUnderline:ve}}},We=Ae??_e?deepmerge$1(Ae??_e,Ue):Ue,qe=(ue=(pe=Ie.root)!=null?pe:xe.Root)!=null?ue:InputRoot,ze=(me=(ge=Ie.input)!=null?ge:xe.Input)!=null?me:InputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$2({slots:{root:qe,input:ze},slotProps:We,fullWidth:Se,inputComponent:$e,multiline:Re,ref:ce,type:ke},Be,{classes:Ne}))});Input.muiName="Input";const Input$1=Input;function getInputAdornmentUtilityClass(ne){return generateUtilityClass$2("MuiInputAdornment",ne)}const inputAdornmentClasses=generateUtilityClasses$2("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),inputAdornmentClasses$1=inputAdornmentClasses;var _span$2;const _excluded$z=["children","className","component","disablePointerEvents","disableTypography","position","variant"],overridesResolver$3=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`position${capitalize$1(ce.position)}`],ce.disablePointerEvents===!0&&oe.disablePointerEvents,oe[ce.variant]]},useUtilityClasses$t=ne=>{const{classes:oe,disablePointerEvents:ce,hiddenLabel:ue,position:pe,size:me,variant:ge}=ne,ye={root:["root",ce&&"disablePointerEvents",pe&&`position${capitalize$1(pe)}`,ge,ue&&"hiddenLabel",me&&`size${capitalize$1(me)}`]};return composeClasses$1(ye,getInputAdornmentUtilityClass,oe)},InputAdornmentRoot=styled$1("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:overridesResolver$3})(({theme:ne,ownerState:oe})=>_extends$2({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(ne.vars||ne).palette.action.active},oe.variant==="filled"&&{[`&.${inputAdornmentClasses$1.positionStart}&:not(.${inputAdornmentClasses$1.hiddenLabel})`]:{marginTop:16}},oe.position==="start"&&{marginRight:8},oe.position==="end"&&{marginLeft:8},oe.disablePointerEvents===!0&&{pointerEvents:"none"})),InputAdornment=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiInputAdornment"}),{children:pe,className:me,component:ge="div",disablePointerEvents:ye=!1,disableTypography:ve=!1,position:xe,variant:_e}=ue,Se=_objectWithoutPropertiesLoose$2(ue,_excluded$z),$e=useFormControl()||{};let Re=_e;_e&&$e.variant,$e&&!Re&&(Re=$e.variant);const Ae=_extends$2({},ue,{hiddenLabel:$e.hiddenLabel,size:$e.size,disablePointerEvents:ye,position:xe,variant:Re}),Ie=useUtilityClasses$t(Ae);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(InputAdornmentRoot,_extends$2({as:ge,ownerState:Ae,className:clsx(Ie.root,me),ref:ce},Se,{children:typeof pe=="string"&&!ve?jsxRuntimeExports.jsx(Type$2,{color:"text.secondary",children:pe}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[xe==="start"?_span$2||(_span$2=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):null,pe]})}))})}),InputAdornment$1=InputAdornment;function getInputLabelUtilityClasses(ne){return generateUtilityClass$2("MuiInputLabel",ne)}generateUtilityClasses$2("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _excluded$y=["disableAnimation","margin","shrink","variant","className"],useUtilityClasses$s=ne=>{const{classes:oe,formControl:ce,size:ue,shrink:pe,disableAnimation:me,variant:ge,required:ye}=ne,ve={root:["root",ce&&"formControl",!me&&"animated",pe&&"shrink",ue&&ue!=="normal"&&`size${capitalize$1(ue)}`,ge],asterisk:[ye&&"asterisk"]},xe=composeClasses$1(ve,getInputLabelUtilityClasses,oe);return _extends$2({},oe,xe)},InputLabelRoot=styled$1(FormLabel$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${formLabelClasses$1.asterisk}`]:oe.asterisk},oe.root,ce.formControl&&oe.formControl,ce.size==="small"&&oe.sizeSmall,ce.shrink&&oe.shrink,!ce.disableAnimation&&oe.animated,ce.focused&&oe.focused,oe[ce.variant]]}})(({theme:ne,ownerState:oe})=>_extends$2({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},oe.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},oe.size==="small"&&{transform:"translate(0, 17px) scale(1)"},oe.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!oe.disableAnimation&&{transition:ne.transitions.create(["color","transform","max-width"],{duration:ne.transitions.duration.shorter,easing:ne.transitions.easing.easeOut})},oe.variant==="filled"&&_extends$2({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},oe.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},oe.shrink&&_extends$2({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},oe.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),oe.variant==="outlined"&&_extends$2({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},oe.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},oe.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),InputLabel=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({name:"MuiInputLabel",props:oe}),{disableAnimation:pe=!1,shrink:me,className:ge}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$y),ve=useFormControl();let xe=me;typeof xe>"u"&&ve&&(xe=ve.filled||ve.focused||ve.adornedStart);const _e=formControlState({props:ue,muiFormControl:ve,states:["size","variant","required","focused"]}),Se=_extends$2({},ue,{disableAnimation:pe,formControl:ve,shrink:xe,size:_e.size,variant:_e.variant,required:_e.required,focused:_e.focused}),$e=useUtilityClasses$s(Se);return jsxRuntimeExports.jsx(InputLabelRoot,_extends$2({"data-shrink":xe,ownerState:Se,ref:ce,className:clsx($e.root,ge)},ye,{classes:$e}))}),InputLabel$1=InputLabel;function getLinearProgressUtilityClass(ne){return generateUtilityClass$2("MuiLinearProgress",ne)}generateUtilityClasses$2("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const _excluded$x=["className","color","value","valueBuffer","variant"];let _$8=ne=>ne,_t$2,_t2$1,_t3$1,_t4$1,_t5,_t6;const TRANSITION_DURATION=4,indeterminate1Keyframe=keyframes(_t$2||(_t$2=_$8` 0% { left: -35%; right: 100%; @@ -189,7 +189,7 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 opacity: 1; background-position: -200px -23px; } -`)),useUtilityClasses$q=ne=>{const{classes:oe,variant:ce,color:ue}=ne,pe={root:["root",`color${capitalize$1(ue)}`,ce],dashed:["dashed",`dashedColor${capitalize$1(ue)}`],bar1:["bar",`barColor${capitalize$1(ue)}`,(ce==="indeterminate"||ce==="query")&&"bar1Indeterminate",ce==="determinate"&&"bar1Determinate",ce==="buffer"&&"bar1Buffer"],bar2:["bar",ce!=="buffer"&&`barColor${capitalize$1(ue)}`,ce==="buffer"&&`color${capitalize$1(ue)}`,(ce==="indeterminate"||ce==="query")&&"bar2Indeterminate",ce==="buffer"&&"bar2Buffer"]};return composeClasses$1(pe,getLinearProgressUtilityClass,oe)},getColorShade=(ne,oe)=>oe==="inherit"?"currentColor":ne.vars?ne.vars.palette.LinearProgress[`${oe}Bg`]:ne.palette.mode==="light"?lighten_1(ne.palette[oe].main,.62):darken_1(ne.palette[oe].main,.5),LinearProgressRoot=styled$1("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`color${capitalize$1(ce.color)}`],oe[ce.variant]]}})(({ownerState:ne,theme:oe})=>_extends$2({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:getColorShade(oe,ne.color)},ne.color==="inherit"&&ne.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},ne.variant==="buffer"&&{backgroundColor:"transparent"},ne.variant==="query"&&{transform:"rotate(180deg)"})),LinearProgressDashed=styled$1("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.dashed,oe[`dashedColor${capitalize$1(ce.color)}`]]}})(({ownerState:ne,theme:oe})=>{const ce=getColorShade(oe,ne.color);return _extends$2({position:"absolute",marginTop:0,height:"100%",width:"100%"},ne.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${ce} 0%, ${ce} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},css(_t4$1||(_t4$1=_$8` +`)),useUtilityClasses$r=ne=>{const{classes:oe,variant:ce,color:ue}=ne,pe={root:["root",`color${capitalize$1(ue)}`,ce],dashed:["dashed",`dashedColor${capitalize$1(ue)}`],bar1:["bar",`barColor${capitalize$1(ue)}`,(ce==="indeterminate"||ce==="query")&&"bar1Indeterminate",ce==="determinate"&&"bar1Determinate",ce==="buffer"&&"bar1Buffer"],bar2:["bar",ce!=="buffer"&&`barColor${capitalize$1(ue)}`,ce==="buffer"&&`color${capitalize$1(ue)}`,(ce==="indeterminate"||ce==="query")&&"bar2Indeterminate",ce==="buffer"&&"bar2Buffer"]};return composeClasses$1(pe,getLinearProgressUtilityClass,oe)},getColorShade=(ne,oe)=>oe==="inherit"?"currentColor":ne.vars?ne.vars.palette.LinearProgress[`${oe}Bg`]:ne.palette.mode==="light"?lighten_1(ne.palette[oe].main,.62):darken_1(ne.palette[oe].main,.5),LinearProgressRoot=styled$1("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`color${capitalize$1(ce.color)}`],oe[ce.variant]]}})(({ownerState:ne,theme:oe})=>_extends$2({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:getColorShade(oe,ne.color)},ne.color==="inherit"&&ne.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},ne.variant==="buffer"&&{backgroundColor:"transparent"},ne.variant==="query"&&{transform:"rotate(180deg)"})),LinearProgressDashed=styled$1("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.dashed,oe[`dashedColor${capitalize$1(ce.color)}`]]}})(({ownerState:ne,theme:oe})=>{const ce=getColorShade(oe,ne.color);return _extends$2({position:"absolute",marginTop:0,height:"100%",width:"100%"},ne.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${ce} 0%, ${ce} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},css(_t4$1||(_t4$1=_$8` animation: ${0} 3s infinite linear; `),bufferKeyframe)),LinearProgressBar1=styled$1("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.bar,oe[`barColor${capitalize$1(ce.color)}`],(ce.variant==="indeterminate"||ce.variant==="query")&&oe.bar1Indeterminate,ce.variant==="determinate"&&oe.bar1Determinate,ce.variant==="buffer"&&oe.bar1Buffer]}})(({ownerState:ne,theme:oe})=>_extends$2({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:ne.color==="inherit"?"currentColor":(oe.vars||oe).palette[ne.color].main},ne.variant==="determinate"&&{transition:`transform .${TRANSITION_DURATION}s linear`},ne.variant==="buffer"&&{zIndex:1,transition:`transform .${TRANSITION_DURATION}s linear`}),({ownerState:ne})=>(ne.variant==="indeterminate"||ne.variant==="query")&&css(_t5||(_t5=_$8` width: auto; @@ -197,7 +197,7 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 `),indeterminate1Keyframe)),LinearProgressBar2=styled$1("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.bar,oe[`barColor${capitalize$1(ce.color)}`],(ce.variant==="indeterminate"||ce.variant==="query")&&oe.bar2Indeterminate,ce.variant==="buffer"&&oe.bar2Buffer]}})(({ownerState:ne,theme:oe})=>_extends$2({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},ne.variant!=="buffer"&&{backgroundColor:ne.color==="inherit"?"currentColor":(oe.vars||oe).palette[ne.color].main},ne.color==="inherit"&&{opacity:.3},ne.variant==="buffer"&&{backgroundColor:getColorShade(oe,ne.color),transition:`transform .${TRANSITION_DURATION}s linear`}),({ownerState:ne})=>(ne.variant==="indeterminate"||ne.variant==="query")&&css(_t6||(_t6=_$8` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `),indeterminate2Keyframe)),LinearProgress=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiLinearProgress"}),{className:pe,color:me="primary",value:ge,valueBuffer:ye,variant:ve="indeterminate"}=ue,xe=_objectWithoutPropertiesLoose$2(ue,_excluded$w),_e=_extends$2({},ue,{color:me,variant:ve}),Se=useUtilityClasses$q(_e),$e=useRtl(),Re={},Ae={bar1:{},bar2:{}};if((ve==="determinate"||ve==="buffer")&&ge!==void 0){Re["aria-valuenow"]=Math.round(ge),Re["aria-valuemin"]=0,Re["aria-valuemax"]=100;let Ie=ge-100;$e&&(Ie=-Ie),Ae.bar1.transform=`translateX(${Ie}%)`}if(ve==="buffer"&&ye!==void 0){let Ie=(ye||0)-100;$e&&(Ie=-Ie),Ae.bar2.transform=`translateX(${Ie}%)`}return jsxRuntimeExports.jsxs(LinearProgressRoot,_extends$2({className:clsx(Se.root,pe),ownerState:_e,role:"progressbar"},Re,{ref:ce},xe,{children:[ve==="buffer"?jsxRuntimeExports.jsx(LinearProgressDashed,{className:Se.dashed,ownerState:_e}):null,jsxRuntimeExports.jsx(LinearProgressBar1,{className:Se.bar1,ownerState:_e,style:Ae.bar1}),ve==="determinate"?null:jsxRuntimeExports.jsx(LinearProgressBar2,{className:Se.bar2,ownerState:_e,style:Ae.bar2})]}))}),LinearProgress$1=LinearProgress,ListContext=reactExports.createContext({}),ListContext$1=ListContext;function getListUtilityClass(ne){return generateUtilityClass$2("MuiList",ne)}generateUtilityClasses$2("MuiList",["root","padding","dense","subheader"]);const _excluded$v=["children","className","component","dense","disablePadding","subheader"],useUtilityClasses$p=ne=>{const{classes:oe,disablePadding:ce,dense:ue,subheader:pe}=ne;return composeClasses$1({root:["root",!ce&&"padding",ue&&"dense",pe&&"subheader"]},getListUtilityClass,oe)},ListRoot$1=styled$1("ul",{name:"MuiList",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,!ce.disablePadding&&oe.padding,ce.dense&&oe.dense,ce.subheader&&oe.subheader]}})(({ownerState:ne})=>_extends$2({listStyle:"none",margin:0,padding:0,position:"relative"},!ne.disablePadding&&{paddingTop:8,paddingBottom:8},ne.subheader&&{paddingTop:0})),List$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiList"}),{children:pe,className:me,component:ge="ul",dense:ye=!1,disablePadding:ve=!1,subheader:xe}=ue,_e=_objectWithoutPropertiesLoose$2(ue,_excluded$v),Se=reactExports.useMemo(()=>({dense:ye}),[ye]),$e=_extends$2({},ue,{component:ge,dense:ye,disablePadding:ve}),Re=useUtilityClasses$p($e);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Se,children:jsxRuntimeExports.jsxs(ListRoot$1,_extends$2({as:ge,className:clsx(Re.root,me),ref:ce,ownerState:$e},_e,{children:[xe,pe]}))})}),List$2=List$1;function getListItemUtilityClass(ne){return generateUtilityClass$2("MuiListItem",ne)}const listItemClasses=generateUtilityClasses$2("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),listItemClasses$1=listItemClasses;function getListItemButtonUtilityClass(ne){return generateUtilityClass$2("MuiListItemButton",ne)}const listItemButtonClasses=generateUtilityClasses$2("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),listItemButtonClasses$1=listItemButtonClasses,_excluded$u=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],overridesResolver$2=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.dense&&oe.dense,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart,ce.divider&&oe.divider,!ce.disableGutters&&oe.gutters]},useUtilityClasses$o=ne=>{const{alignItems:oe,classes:ce,dense:ue,disabled:pe,disableGutters:me,divider:ge,selected:ye}=ne,xe=composeClasses$1({root:["root",ue&&"dense",!me&&"gutters",ge&&"divider",pe&&"disabled",oe==="flex-start"&&"alignItemsFlexStart",ye&&"selected"]},getListItemButtonUtilityClass,ce);return _extends$2({},ce,xe)},ListItemButtonRoot=styled$1(ButtonBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:overridesResolver$2})(({theme:ne,ownerState:oe})=>_extends$2({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(ne.vars||ne).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${listItemButtonClasses$1.selected}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity),[`&.${listItemButtonClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},[`&.${listItemButtonClasses$1.selected}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity)}},[`&.${listItemButtonClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`&.${listItemButtonClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity}},oe.divider&&{borderBottom:`1px solid ${(ne.vars||ne).palette.divider}`,backgroundClip:"padding-box"},oe.alignItems==="flex-start"&&{alignItems:"flex-start"},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},oe.dense&&{paddingTop:4,paddingBottom:4})),ListItemButton=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemButton"}),{alignItems:pe="center",autoFocus:me=!1,component:ge="div",children:ye,dense:ve=!1,disableGutters:xe=!1,divider:_e=!1,focusVisibleClassName:Se,selected:$e=!1,className:Re}=ue,Ae=_objectWithoutPropertiesLoose$2(ue,_excluded$u),Ie=reactExports.useContext(ListContext$1),ke=reactExports.useMemo(()=>({dense:ve||Ie.dense||!1,alignItems:pe,disableGutters:xe}),[pe,Ie.dense,ve,xe]),Be=reactExports.useRef(null);useEnhancedEffect$1(()=>{me&&Be.current&&Be.current.focus()},[me]);const Ne=_extends$2({},ue,{alignItems:pe,dense:ke.dense,disableGutters:xe,divider:_e,selected:$e}),Fe=useUtilityClasses$o(Ne),Ue=useForkRef(Be,ce);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:ke,children:jsxRuntimeExports.jsx(ListItemButtonRoot,_extends$2({ref:Ue,href:Ae.href||Ae.to,component:(Ae.href||Ae.to)&&ge==="div"?"button":ge,focusVisibleClassName:clsx(Fe.focusVisible,Se),ownerState:Ne,className:clsx(Fe.root,Re)},Ae,{classes:Fe,children:ye}))})}),ListItemButton$1=ListItemButton;function getListItemSecondaryActionClassesUtilityClass(ne){return generateUtilityClass$2("MuiListItemSecondaryAction",ne)}generateUtilityClasses$2("MuiListItemSecondaryAction",["root","disableGutters"]);const _excluded$t=["className"],useUtilityClasses$n=ne=>{const{disableGutters:oe,classes:ce}=ne;return composeClasses$1({root:["root",oe&&"disableGutters"]},getListItemSecondaryActionClassesUtilityClass,ce)},ListItemSecondaryActionRoot=styled$1("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.disableGutters&&oe.disableGutters]}})(({ownerState:ne})=>_extends$2({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},ne.disableGutters&&{right:0})),ListItemSecondaryAction=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemSecondaryAction"}),{className:pe}=ue,me=_objectWithoutPropertiesLoose$2(ue,_excluded$t),ge=reactExports.useContext(ListContext$1),ye=_extends$2({},ue,{disableGutters:ge.disableGutters}),ve=useUtilityClasses$n(ye);return jsxRuntimeExports.jsx(ListItemSecondaryActionRoot,_extends$2({className:clsx(ve.root,pe),ownerState:ye,ref:ce},me))});ListItemSecondaryAction.muiName="ListItemSecondaryAction";const ListItemSecondaryAction$1=ListItemSecondaryAction,_excluded$s=["className"],_excluded2$4=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],overridesResolver$1=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.dense&&oe.dense,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart,ce.divider&&oe.divider,!ce.disableGutters&&oe.gutters,!ce.disablePadding&&oe.padding,ce.button&&oe.button,ce.hasSecondaryAction&&oe.secondaryAction]},useUtilityClasses$m=ne=>{const{alignItems:oe,button:ce,classes:ue,dense:pe,disabled:me,disableGutters:ge,disablePadding:ye,divider:ve,hasSecondaryAction:xe,selected:_e}=ne;return composeClasses$1({root:["root",pe&&"dense",!ge&&"gutters",!ye&&"padding",ve&&"divider",me&&"disabled",ce&&"button",oe==="flex-start"&&"alignItemsFlexStart",xe&&"secondaryAction",_e&&"selected"],container:["container"]},getListItemUtilityClass,ue)},ListItemRoot=styled$1("div",{name:"MuiListItem",slot:"Root",overridesResolver:overridesResolver$1})(({theme:ne,ownerState:oe})=>_extends$2({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!oe.disablePadding&&_extends$2({paddingTop:8,paddingBottom:8},oe.dense&&{paddingTop:4,paddingBottom:4},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},!!oe.secondaryAction&&{paddingRight:48}),!!oe.secondaryAction&&{[`& > .${listItemButtonClasses$1.root}`]:{paddingRight:48}},{[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`&.${listItemClasses$1.selected}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity),[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},[`&.${listItemClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity}},oe.alignItems==="flex-start"&&{alignItems:"flex-start"},oe.divider&&{borderBottom:`1px solid ${(ne.vars||ne).palette.divider}`,backgroundClip:"padding-box"},oe.button&&{transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(ne.vars||ne).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${listItemClasses$1.selected}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity)}}},oe.hasSecondaryAction&&{paddingRight:48})),ListItemContainer=styled$1("li",{name:"MuiListItem",slot:"Container",overridesResolver:(ne,oe)=>oe.container})({position:"relative"}),ListItem=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItem"}),{alignItems:pe="center",autoFocus:me=!1,button:ge=!1,children:ye,className:ve,component:xe,components:_e={},componentsProps:Se={},ContainerComponent:$e="li",ContainerProps:{className:Re}={},dense:Ae=!1,disabled:Ie=!1,disableGutters:ke=!1,disablePadding:Be=!1,divider:Ne=!1,focusVisibleClassName:Fe,secondaryAction:Ue,selected:We=!1,slotProps:qe={},slots:ze={}}=ue,Ge=_objectWithoutPropertiesLoose$2(ue.ContainerProps,_excluded$s),Ze=_objectWithoutPropertiesLoose$2(ue,_excluded2$4),Dt=reactExports.useContext(ListContext$1),Je=reactExports.useMemo(()=>({dense:Ae||Dt.dense||!1,alignItems:pe,disableGutters:ke}),[pe,Dt.dense,Ae,ke]),Ut=reactExports.useRef(null);useEnhancedEffect$1(()=>{me&&Ut.current&&Ut.current.focus()},[me]);const jt=reactExports.Children.toArray(ye),Ke=jt.length&&isMuiElement(jt[jt.length-1],["ListItemSecondaryAction"]),an=_extends$2({},ue,{alignItems:pe,autoFocus:me,button:ge,dense:Je.dense,disabled:Ie,disableGutters:ke,disablePadding:Be,divider:Ne,hasSecondaryAction:Ke,selected:We}),Zt=useUtilityClasses$m(an),en=useForkRef(Ut,ce),Kt=ze.root||_e.Root||ListItemRoot,Wt=qe.root||Se.root||{},un=_extends$2({className:clsx(Zt.root,Wt.className,ve),disabled:Ie},Ze);let Xt=xe||"li";return ge&&(un.component=xe||"div",un.focusVisibleClassName=clsx(listItemClasses$1.focusVisible,Fe),Xt=ButtonBase$1),Ke?(Xt=!un.component&&!xe?"div":Xt,$e==="li"&&(Xt==="li"?Xt="div":un.component==="li"&&(un.component="div")),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Je,children:jsxRuntimeExports.jsxs(ListItemContainer,_extends$2({as:$e,className:clsx(Zt.container,Re),ref:en,ownerState:an},Ge,{children:[jsxRuntimeExports.jsx(Kt,_extends$2({},Wt,!isHostComponent(Kt)&&{as:Xt,ownerState:_extends$2({},an,Wt.ownerState)},un,{children:jt})),jt.pop()]}))})):jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Je,children:jsxRuntimeExports.jsxs(Kt,_extends$2({},Wt,{as:Xt,ref:en},!isHostComponent(Kt)&&{ownerState:_extends$2({},an,Wt.ownerState)},un,{children:[jt,Ue&&jsxRuntimeExports.jsx(ListItemSecondaryAction$1,{children:Ue})]}))})}),ListItem$1=ListItem;function getListItemAvatarUtilityClass(ne){return generateUtilityClass$2("MuiListItemAvatar",ne)}generateUtilityClasses$2("MuiListItemAvatar",["root","alignItemsFlexStart"]);const _excluded$r=["className"],useUtilityClasses$l=ne=>{const{alignItems:oe,classes:ce}=ne;return composeClasses$1({root:["root",oe==="flex-start"&&"alignItemsFlexStart"]},getListItemAvatarUtilityClass,ce)},ListItemAvatarRoot=styled$1("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart]}})(({ownerState:ne})=>_extends$2({minWidth:56,flexShrink:0},ne.alignItems==="flex-start"&&{marginTop:8})),ListItemAvatar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemAvatar"}),{className:pe}=ue,me=_objectWithoutPropertiesLoose$2(ue,_excluded$r),ge=reactExports.useContext(ListContext$1),ye=_extends$2({},ue,{alignItems:ge.alignItems}),ve=useUtilityClasses$l(ye);return jsxRuntimeExports.jsx(ListItemAvatarRoot,_extends$2({className:clsx(ve.root,pe),ownerState:ye,ref:ce},me))}),ListItemAvatar$1=ListItemAvatar;function getListItemIconUtilityClass(ne){return generateUtilityClass$2("MuiListItemIcon",ne)}const listItemIconClasses=generateUtilityClasses$2("MuiListItemIcon",["root","alignItemsFlexStart"]),listItemIconClasses$1=listItemIconClasses,_excluded$q=["className"],useUtilityClasses$k=ne=>{const{alignItems:oe,classes:ce}=ne;return composeClasses$1({root:["root",oe==="flex-start"&&"alignItemsFlexStart"]},getListItemIconUtilityClass,ce)},ListItemIconRoot=styled$1("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart]}})(({theme:ne,ownerState:oe})=>_extends$2({minWidth:56,color:(ne.vars||ne).palette.action.active,flexShrink:0,display:"inline-flex"},oe.alignItems==="flex-start"&&{marginTop:8})),ListItemIcon=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemIcon"}),{className:pe}=ue,me=_objectWithoutPropertiesLoose$2(ue,_excluded$q),ge=reactExports.useContext(ListContext$1),ye=_extends$2({},ue,{alignItems:ge.alignItems}),ve=useUtilityClasses$k(ye);return jsxRuntimeExports.jsx(ListItemIconRoot,_extends$2({className:clsx(ve.root,pe),ownerState:ye,ref:ce},me))}),ListItemIcon$1=ListItemIcon;function getListItemTextUtilityClass(ne){return generateUtilityClass$2("MuiListItemText",ne)}const listItemTextClasses=generateUtilityClasses$2("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),listItemTextClasses$1=listItemTextClasses,_excluded$p=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],useUtilityClasses$j=ne=>{const{classes:oe,inset:ce,primary:ue,secondary:pe,dense:me}=ne;return composeClasses$1({root:["root",ce&&"inset",me&&"dense",ue&&pe&&"multiline"],primary:["primary"],secondary:["secondary"]},getListItemTextUtilityClass,oe)},ListItemTextRoot=styled$1("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${listItemTextClasses$1.primary}`]:oe.primary},{[`& .${listItemTextClasses$1.secondary}`]:oe.secondary},oe.root,ce.inset&&oe.inset,ce.primary&&ce.secondary&&oe.multiline,ce.dense&&oe.dense]}})(({ownerState:ne})=>_extends$2({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},ne.primary&&ne.secondary&&{marginTop:6,marginBottom:6},ne.inset&&{paddingLeft:56})),ListItemText=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemText"}),{children:pe,className:me,disableTypography:ge=!1,inset:ye=!1,primary:ve,primaryTypographyProps:xe,secondary:_e,secondaryTypographyProps:Se}=ue,$e=_objectWithoutPropertiesLoose$2(ue,_excluded$p),{dense:Re}=reactExports.useContext(ListContext$1);let Ae=ve??pe,Ie=_e;const ke=_extends$2({},ue,{disableTypography:ge,inset:ye,primary:!!Ae,secondary:!!Ie,dense:Re}),Be=useUtilityClasses$j(ke);return Ae!=null&&Ae.type!==Type$2&&!ge&&(Ae=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:Re?"body2":"body1",className:Be.primary,component:xe!=null&&xe.variant?void 0:"span",display:"block"},xe,{children:Ae}))),Ie!=null&&Ie.type!==Type$2&&!ge&&(Ie=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:"body2",className:Be.secondary,color:"text.secondary",display:"block"},Se,{children:Ie}))),jsxRuntimeExports.jsxs(ListItemTextRoot,_extends$2({className:clsx(Be.root,me),ownerState:ke,ref:ce},$e,{children:[Ae,Ie]}))}),ListItemText$1=ListItemText,_excluded$o=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem$1(ne,oe,ce){return ne===oe?ne.firstChild:oe&&oe.nextElementSibling?oe.nextElementSibling:ce?null:ne.firstChild}function previousItem$1(ne,oe,ce){return ne===oe?ce?ne.firstChild:ne.lastChild:oe&&oe.previousElementSibling?oe.previousElementSibling:ce?null:ne.lastChild}function textCriteriaMatches(ne,oe){if(oe===void 0)return!0;let ce=ne.innerText;return ce===void 0&&(ce=ne.textContent),ce=ce.trim().toLowerCase(),ce.length===0?!1:oe.repeating?ce[0]===oe.keys[0]:ce.indexOf(oe.keys.join(""))===0}function moveFocus$1(ne,oe,ce,ue,pe,me){let ge=!1,ye=pe(ne,oe,oe?ce:!1);for(;ye;){if(ye===ne.firstChild){if(ge)return!1;ge=!0}const ve=ue?!1:ye.disabled||ye.getAttribute("aria-disabled")==="true";if(!ye.hasAttribute("tabindex")||!textCriteriaMatches(ye,me)||ve)ye=pe(ne,ye,ce);else return ye.focus(),!0}return!1}const MenuList=reactExports.forwardRef(function(oe,ce){const{actions:ue,autoFocus:pe=!1,autoFocusItem:me=!1,children:ge,className:ye,disabledItemsFocusable:ve=!1,disableListWrap:xe=!1,onKeyDown:_e,variant:Se="selectedMenu"}=oe,$e=_objectWithoutPropertiesLoose$2(oe,_excluded$o),Re=reactExports.useRef(null),Ae=reactExports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect$1(()=>{pe&&Re.current.focus()},[pe]),reactExports.useImperativeHandle(ue,()=>({adjustStyleForScrollbar:(Fe,{direction:Ue})=>{const We=!Re.current.style.width;if(Fe.clientHeight{const Ue=Re.current,We=Fe.key,qe=ownerDocument(Ue).activeElement;if(We==="ArrowDown")Fe.preventDefault(),moveFocus$1(Ue,qe,xe,ve,nextItem$1);else if(We==="ArrowUp")Fe.preventDefault(),moveFocus$1(Ue,qe,xe,ve,previousItem$1);else if(We==="Home")Fe.preventDefault(),moveFocus$1(Ue,null,xe,ve,nextItem$1);else if(We==="End")Fe.preventDefault(),moveFocus$1(Ue,null,xe,ve,previousItem$1);else if(We.length===1){const ze=Ae.current,Ge=We.toLowerCase(),Ze=performance.now();ze.keys.length>0&&(Ze-ze.lastTime>500?(ze.keys=[],ze.repeating=!0,ze.previousKeyMatched=!0):ze.repeating&&Ge!==ze.keys[0]&&(ze.repeating=!1)),ze.lastTime=Ze,ze.keys.push(Ge);const Dt=qe&&!ze.repeating&&textCriteriaMatches(qe,ze);ze.previousKeyMatched&&(Dt||moveFocus$1(Ue,qe,!1,ve,nextItem$1,ze))?Fe.preventDefault():ze.previousKeyMatched=!1}_e&&_e(Fe)},ke=useForkRef(Re,ce);let Be=-1;reactExports.Children.forEach(ge,(Fe,Ue)=>{if(!reactExports.isValidElement(Fe)){Be===Ue&&(Be+=1,Be>=ge.length&&(Be=-1));return}Fe.props.disabled||(Se==="selectedMenu"&&Fe.props.selected||Be===-1)&&(Be=Ue),Be===Ue&&(Fe.props.disabled||Fe.props.muiSkipListHighlight||Fe.type.muiSkipListHighlight)&&(Be+=1,Be>=ge.length&&(Be=-1))});const Ne=reactExports.Children.map(ge,(Fe,Ue)=>{if(Ue===Be){const We={};return me&&(We.autoFocus=!0),Fe.props.tabIndex===void 0&&Se==="selectedMenu"&&(We.tabIndex=0),reactExports.cloneElement(Fe,We)}return Fe});return jsxRuntimeExports.jsx(List$2,_extends$2({role:"menu",ref:ke,className:ye,onKeyDown:Ie,tabIndex:pe?0:-1},$e,{children:Ne}))}),MenuList$1=MenuList;function getPopoverUtilityClass(ne){return generateUtilityClass$2("MuiPopover",ne)}generateUtilityClasses$2("MuiPopover",["root","paper"]);const _excluded$n=["onEntering"],_excluded2$3=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_excluded3=["slotProps"];function getOffsetTop(ne,oe){let ce=0;return typeof oe=="number"?ce=oe:oe==="center"?ce=ne.height/2:oe==="bottom"&&(ce=ne.height),ce}function getOffsetLeft(ne,oe){let ce=0;return typeof oe=="number"?ce=oe:oe==="center"?ce=ne.width/2:oe==="right"&&(ce=ne.width),ce}function getTransformOriginValue(ne){return[ne.horizontal,ne.vertical].map(oe=>typeof oe=="number"?`${oe}px`:oe).join(" ")}function resolveAnchorEl(ne){return typeof ne=="function"?ne():ne}const useUtilityClasses$i=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],paper:["paper"]},getPopoverUtilityClass,oe)},PopoverRoot=styled$1(Modal$2,{name:"MuiPopover",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),PopoverPaper=styled$1(Paper$1,{name:"MuiPopover",slot:"Paper",overridesResolver:(ne,oe)=>oe.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Popover=reactExports.forwardRef(function(oe,ce){var ue,pe,me;const ge=useThemeProps$3({props:oe,name:"MuiPopover"}),{action:ye,anchorEl:ve,anchorOrigin:xe={vertical:"top",horizontal:"left"},anchorPosition:_e,anchorReference:Se="anchorEl",children:$e,className:Re,container:Ae,elevation:Ie=8,marginThreshold:ke=16,open:Be,PaperProps:Ne={},slots:Fe,slotProps:Ue,transformOrigin:We={vertical:"top",horizontal:"left"},TransitionComponent:qe=Grow$1,transitionDuration:ze="auto",TransitionProps:{onEntering:Ge}={},disableScrollLock:Ze=!1}=ge,Dt=_objectWithoutPropertiesLoose$2(ge.TransitionProps,_excluded$n),Je=_objectWithoutPropertiesLoose$2(ge,_excluded2$3),Ut=(ue=Ue==null?void 0:Ue.paper)!=null?ue:Ne,jt=reactExports.useRef(),Ke=useForkRef(jt,Ut.ref),an=_extends$2({},ge,{anchorOrigin:xe,anchorReference:Se,elevation:Ie,marginThreshold:ke,externalPaperSlotProps:Ut,transformOrigin:We,TransitionComponent:qe,transitionDuration:ze,TransitionProps:Dt}),Zt=useUtilityClasses$i(an),en=reactExports.useCallback(()=>{if(Se==="anchorPosition")return _e;const sn=resolveAnchorEl(ve),qt=(sn&&sn.nodeType===1?sn:ownerDocument(jt.current).body).getBoundingClientRect();return{top:qt.top+getOffsetTop(qt,xe.vertical),left:qt.left+getOffsetLeft(qt,xe.horizontal)}},[ve,xe.horizontal,xe.vertical,_e,Se]),Kt=reactExports.useCallback(sn=>({vertical:getOffsetTop(sn,We.vertical),horizontal:getOffsetLeft(sn,We.horizontal)}),[We.horizontal,We.vertical]),Wt=reactExports.useCallback(sn=>{const yn={width:sn.offsetWidth,height:sn.offsetHeight},qt=Kt(yn);if(Se==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue(qt)};const wn=en();let Tn=wn.top-qt.vertical,xn=wn.left-qt.horizontal;const Nn=Tn+yn.height,zn=xn+yn.width,Yn=ownerWindow(resolveAnchorEl(ve)),Kn=Yn.innerHeight-ke,Rn=Yn.innerWidth-ke;if(ke!==null&&TnKn){const Mn=Nn-Kn;Tn-=Mn,qt.vertical+=Mn}if(ke!==null&&xnRn){const Mn=zn-Rn;xn-=Mn,qt.horizontal+=Mn}return{top:`${Math.round(Tn)}px`,left:`${Math.round(xn)}px`,transformOrigin:getTransformOriginValue(qt)}},[ve,Se,en,Kt,ke]),[un,Xt]=reactExports.useState(Be),nn=reactExports.useCallback(()=>{const sn=jt.current;if(!sn)return;const yn=Wt(sn);yn.top!==null&&(sn.style.top=yn.top),yn.left!==null&&(sn.style.left=yn.left),sn.style.transformOrigin=yn.transformOrigin,Xt(!0)},[Wt]);reactExports.useEffect(()=>(Ze&&window.addEventListener("scroll",nn),()=>window.removeEventListener("scroll",nn)),[ve,Ze,nn]);const vn=(sn,yn)=>{Ge&&Ge(sn,yn),nn()},Sn=()=>{Xt(!1)};reactExports.useEffect(()=>{Be&&nn()}),reactExports.useImperativeHandle(ye,()=>Be?{updatePosition:()=>{nn()}}:null,[Be,nn]),reactExports.useEffect(()=>{if(!Be)return;const sn=debounce$2(()=>{nn()}),yn=ownerWindow(ve);return yn.addEventListener("resize",sn),()=>{sn.clear(),yn.removeEventListener("resize",sn)}},[ve,Be,nn]);let Cn=ze;ze==="auto"&&!qe.muiSupportAuto&&(Cn=void 0);const Nt=Ae||(ve?ownerDocument(resolveAnchorEl(ve)).body:void 0),Yt=(pe=Fe==null?void 0:Fe.root)!=null?pe:PopoverRoot,Jt=(me=Fe==null?void 0:Fe.paper)!=null?me:PopoverPaper,hn=useSlotProps({elementType:Jt,externalSlotProps:_extends$2({},Ut,{style:un?Ut.style:_extends$2({},Ut.style,{opacity:0})}),additionalProps:{elevation:Ie,ref:Ke},ownerState:an,className:clsx(Zt.paper,Ut==null?void 0:Ut.className)}),Ye=useSlotProps({elementType:Yt,externalSlotProps:(Ue==null?void 0:Ue.root)||{},externalForwardedProps:Je,additionalProps:{ref:ce,slotProps:{backdrop:{invisible:!0}},container:Nt,open:Be},ownerState:an,className:clsx(Zt.root,Re)}),{slotProps:Xe}=Ye,Pt=_objectWithoutPropertiesLoose$2(Ye,_excluded3);return jsxRuntimeExports.jsx(Yt,_extends$2({},Pt,!isHostComponent(Yt)&&{slotProps:Xe,disableScrollLock:Ze},{children:jsxRuntimeExports.jsx(qe,_extends$2({appear:!0,in:Be,onEntering:vn,onExited:Sn,timeout:Cn},Dt,{children:jsxRuntimeExports.jsx(Jt,_extends$2({},hn,{children:$e}))}))}))}),Popover$1=Popover;function getMenuUtilityClass(ne){return generateUtilityClass$2("MuiMenu",ne)}generateUtilityClasses$2("MuiMenu",["root","paper","list"]);const _excluded$m=["onEntering"],_excluded2$2=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},useUtilityClasses$h=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,oe)},MenuRoot=styled$1(Popover$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),MenuPaper=styled$1(PopoverPaper,{name:"MuiMenu",slot:"Paper",overridesResolver:(ne,oe)=>oe.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),MenuMenuList=styled$1(MenuList$1,{name:"MuiMenu",slot:"List",overridesResolver:(ne,oe)=>oe.list})({outline:0}),Menu=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiMenu"}),{autoFocus:ge=!0,children:ye,className:ve,disableAutoFocusItem:xe=!1,MenuListProps:_e={},onClose:Se,open:$e,PaperProps:Re={},PopoverClasses:Ae,transitionDuration:Ie="auto",TransitionProps:{onEntering:ke}={},variant:Be="selectedMenu",slots:Ne={},slotProps:Fe={}}=me,Ue=_objectWithoutPropertiesLoose$2(me.TransitionProps,_excluded$m),We=_objectWithoutPropertiesLoose$2(me,_excluded2$2),qe=useRtl(),ze=_extends$2({},me,{autoFocus:ge,disableAutoFocusItem:xe,MenuListProps:_e,onEntering:ke,PaperProps:Re,transitionDuration:Ie,TransitionProps:Ue,variant:Be}),Ge=useUtilityClasses$h(ze),Ze=ge&&!xe&&$e,Dt=reactExports.useRef(null),Je=(Kt,Wt)=>{Dt.current&&Dt.current.adjustStyleForScrollbar(Kt,{direction:qe?"rtl":"ltr"}),ke&&ke(Kt,Wt)},Ut=Kt=>{Kt.key==="Tab"&&(Kt.preventDefault(),Se&&Se(Kt,"tabKeyDown"))};let jt=-1;reactExports.Children.map(ye,(Kt,Wt)=>{reactExports.isValidElement(Kt)&&(Kt.props.disabled||(Be==="selectedMenu"&&Kt.props.selected||jt===-1)&&(jt=Wt))});const Ke=(ue=Ne.paper)!=null?ue:MenuPaper,an=(pe=Fe.paper)!=null?pe:Re,Zt=useSlotProps({elementType:Ne.root,externalSlotProps:Fe.root,ownerState:ze,className:[Ge.root,ve]}),en=useSlotProps({elementType:Ke,externalSlotProps:an,ownerState:ze,className:Ge.paper});return jsxRuntimeExports.jsx(MenuRoot,_extends$2({onClose:Se,anchorOrigin:{vertical:"bottom",horizontal:qe?"right":"left"},transformOrigin:qe?RTL_ORIGIN:LTR_ORIGIN,slots:{paper:Ke,root:Ne.root},slotProps:{root:Zt,paper:en},open:$e,ref:ce,transitionDuration:Ie,TransitionProps:_extends$2({onEntering:Je},Ue),ownerState:ze},We,{classes:Ae,children:jsxRuntimeExports.jsx(MenuMenuList,_extends$2({onKeyDown:Ut,actions:Dt,autoFocus:ge&&(jt===-1||xe),autoFocusItem:Ze,variant:Be},_e,{className:clsx(Ge.list,_e.className),children:ye}))}))}),Menu$1=Menu;function getMenuItemUtilityClass(ne){return generateUtilityClass$2("MuiMenuItem",ne)}const menuItemClasses=generateUtilityClasses$2("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),menuItemClasses$1=menuItemClasses,_excluded$l=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],overridesResolver=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.dense&&oe.dense,ce.divider&&oe.divider,!ce.disableGutters&&oe.gutters]},useUtilityClasses$g=ne=>{const{disabled:oe,dense:ce,divider:ue,disableGutters:pe,selected:me,classes:ge}=ne,ve=composeClasses$1({root:["root",ce&&"dense",oe&&"disabled",!pe&&"gutters",ue&&"divider",me&&"selected"]},getMenuItemUtilityClass,ge);return _extends$2({},ge,ve)},MenuItemRoot=styled$1(ButtonBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({},ne.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},oe.divider&&{borderBottom:`1px solid ${(ne.vars||ne).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(ne.vars||ne).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${menuItemClasses$1.selected}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity),[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},[`&.${menuItemClasses$1.selected}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity)}},[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`&.${menuItemClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity},[`& + .${dividerClasses$1.root}`]:{marginTop:ne.spacing(1),marginBottom:ne.spacing(1)},[`& + .${dividerClasses$1.inset}`]:{marginLeft:52},[`& .${listItemTextClasses$1.root}`]:{marginTop:0,marginBottom:0},[`& .${listItemTextClasses$1.inset}`]:{paddingLeft:36},[`& .${listItemIconClasses$1.root}`]:{minWidth:36}},!oe.dense&&{[ne.breakpoints.up("sm")]:{minHeight:"auto"}},oe.dense&&_extends$2({minHeight:32,paddingTop:4,paddingBottom:4},ne.typography.body2,{[`& .${listItemIconClasses$1.root} svg`]:{fontSize:"1.25rem"}}))),MenuItem=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiMenuItem"}),{autoFocus:pe=!1,component:me="li",dense:ge=!1,divider:ye=!1,disableGutters:ve=!1,focusVisibleClassName:xe,role:_e="menuitem",tabIndex:Se,className:$e}=ue,Re=_objectWithoutPropertiesLoose$2(ue,_excluded$l),Ae=reactExports.useContext(ListContext$1),Ie=reactExports.useMemo(()=>({dense:ge||Ae.dense||!1,disableGutters:ve}),[Ae.dense,ge,ve]),ke=reactExports.useRef(null);useEnhancedEffect$1(()=>{pe&&ke.current&&ke.current.focus()},[pe]);const Be=_extends$2({},ue,{dense:Ie.dense,divider:ye,disableGutters:ve}),Ne=useUtilityClasses$g(ue),Fe=useForkRef(ke,ce);let Ue;return ue.disabled||(Ue=Se!==void 0?Se:-1),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Ie,children:jsxRuntimeExports.jsx(MenuItemRoot,_extends$2({ref:Fe,role:_e,tabIndex:Ue,component:me,focusVisibleClassName:clsx(Ne.focusVisible,xe),className:clsx(Ne.root,$e)},Re,{ownerState:Be,classes:Ne}))})}),MenuItem$1=MenuItem;function getNativeSelectUtilityClasses(ne){return generateUtilityClass$2("MuiNativeSelect",ne)}const nativeSelectClasses=generateUtilityClasses$2("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),nativeSelectClasses$1=nativeSelectClasses,_excluded$k=["className","disabled","error","IconComponent","inputRef","variant"],useUtilityClasses$f=ne=>{const{classes:oe,variant:ce,disabled:ue,multiple:pe,open:me,error:ge}=ne,ye={select:["select",ce,ue&&"disabled",pe&&"multiple",ge&&"error"],icon:["icon",`icon${capitalize$1(ce)}`,me&&"iconOpen",ue&&"disabled"]};return composeClasses$1(ye,getNativeSelectUtilityClasses,oe)},nativeSelectSelectStyles=({ownerState:ne,theme:oe})=>_extends$2({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":_extends$2({},oe.vars?{backgroundColor:`rgba(${oe.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:oe.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${nativeSelectClasses$1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(oe.vars||oe).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},ne.variant==="filled"&&{"&&&":{paddingRight:32}},ne.variant==="outlined"&&{borderRadius:(oe.vars||oe).shape.borderRadius,"&:focus":{borderRadius:(oe.vars||oe).shape.borderRadius},"&&&":{paddingRight:32}}),NativeSelectSelect=styled$1("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp$1,overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.select,oe[ce.variant],ce.error&&oe.error,{[`&.${nativeSelectClasses$1.multiple}`]:oe.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:ne,theme:oe})=>_extends$2({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(oe.vars||oe).palette.action.active,[`&.${nativeSelectClasses$1.disabled}`]:{color:(oe.vars||oe).palette.action.disabled}},ne.open&&{transform:"rotate(180deg)"},ne.variant==="filled"&&{right:7},ne.variant==="outlined"&&{right:7}),NativeSelectIcon=styled$1("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.icon,ce.variant&&oe[`icon${capitalize$1(ce.variant)}`],ce.open&&oe.iconOpen]}})(nativeSelectIconStyles),NativeSelectInput=reactExports.forwardRef(function(oe,ce){const{className:ue,disabled:pe,error:me,IconComponent:ge,inputRef:ye,variant:ve="standard"}=oe,xe=_objectWithoutPropertiesLoose$2(oe,_excluded$k),_e=_extends$2({},oe,{disabled:pe,variant:ve,error:me}),Se=useUtilityClasses$f(_e);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(NativeSelectSelect,_extends$2({ownerState:_e,className:clsx(Se.select,ue),disabled:pe,ref:ye||ce},xe)),oe.multiple?null:jsxRuntimeExports.jsx(NativeSelectIcon,{as:ge,ownerState:_e,className:Se.icon})]})}),NativeSelectInput$1=NativeSelectInput;var _span$1;const _excluded$j=["children","classes","className","label","notched"],NotchedOutlineRoot$1=styled$1("fieldset",{shouldForwardProp:rootShouldForwardProp$1})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),NotchedOutlineLegend=styled$1("legend",{shouldForwardProp:rootShouldForwardProp$1})(({ownerState:ne,theme:oe})=>_extends$2({float:"unset",width:"auto",overflow:"hidden"},!ne.withLabel&&{padding:0,lineHeight:"11px",transition:oe.transitions.create("width",{duration:150,easing:oe.transitions.easing.easeOut})},ne.withLabel&&_extends$2({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:oe.transitions.create("max-width",{duration:50,easing:oe.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},ne.notched&&{maxWidth:"100%",transition:oe.transitions.create("max-width",{duration:100,easing:oe.transitions.easing.easeOut,delay:50})})));function NotchedOutline(ne){const{className:oe,label:ce,notched:ue}=ne,pe=_objectWithoutPropertiesLoose$2(ne,_excluded$j),me=ce!=null&&ce!=="",ge=_extends$2({},ne,{notched:ue,withLabel:me});return jsxRuntimeExports.jsx(NotchedOutlineRoot$1,_extends$2({"aria-hidden":!0,className:oe,ownerState:ge},pe,{children:jsxRuntimeExports.jsx(NotchedOutlineLegend,{ownerState:ge,children:me?jsxRuntimeExports.jsx("span",{children:ce}):_span$1||(_span$1=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"}))})}))}const _excluded$i=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],useUtilityClasses$e=ne=>{const{classes:oe}=ne,ue=composeClasses$1({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,oe);return _extends$2({},oe,ue)},OutlinedInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return _extends$2({position:"relative",borderRadius:(ne.vars||ne).shape.borderRadius,[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette.text.primary},"@media (hover: none)":{[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:ne.vars?`rgba(${ne.vars.palette.common.onBackgroundChannel} / 0.23)`:ce}},[`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette[oe.color].main,borderWidth:2},[`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette.error.main},[`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette.action.disabled}},oe.startAdornment&&{paddingLeft:14},oe.endAdornment&&{paddingRight:14},oe.multiline&&_extends$2({padding:"16.5px 14px"},oe.size==="small"&&{padding:"8.5px 14px"}))}),NotchedOutlineRoot=styled$1(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(ne,oe)=>oe.notchedOutline})(({theme:ne})=>{const oe=ne.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:ne.vars?`rgba(${ne.vars.palette.common.onBackgroundChannel} / 0.23)`:oe}}),OutlinedInputInput=styled$1(InputBaseComponent,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({padding:"16.5px 14px"},!ne.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:ne.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:ne.palette.mode==="light"?null:"#fff",caretColor:ne.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},ne.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[ne.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},oe.size==="small"&&{padding:"8.5px 14px"},oe.multiline&&{padding:0},oe.startAdornment&&{paddingLeft:0},oe.endAdornment&&{paddingRight:0})),OutlinedInput=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye;const ve=useThemeProps$3({props:oe,name:"MuiOutlinedInput"}),{components:xe={},fullWidth:_e=!1,inputComponent:Se="input",label:$e,multiline:Re=!1,notched:Ae,slots:Ie={},type:ke="text"}=ve,Be=_objectWithoutPropertiesLoose$2(ve,_excluded$i),Ne=useUtilityClasses$e(ve),Fe=useFormControl(),Ue=formControlState({props:ve,muiFormControl:Fe,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),We=_extends$2({},ve,{color:Ue.color||"primary",disabled:Ue.disabled,error:Ue.error,focused:Ue.focused,formControl:Fe,fullWidth:_e,hiddenLabel:Ue.hiddenLabel,multiline:Re,size:Ue.size,type:ke}),qe=(ue=(pe=Ie.root)!=null?pe:xe.Root)!=null?ue:OutlinedInputRoot,ze=(me=(ge=Ie.input)!=null?ge:xe.Input)!=null?me:OutlinedInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$2({slots:{root:qe,input:ze},renderSuffix:Ge=>jsxRuntimeExports.jsx(NotchedOutlineRoot,{ownerState:We,className:Ne.notchedOutline,label:$e!=null&&$e!==""&&Ue.required?ye||(ye=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[$e," ","*"]})):$e,notched:typeof Ae<"u"?Ae:!!(Ge.startAdornment||Ge.filled||Ge.focused)}),fullWidth:_e,inputComponent:Se,multiline:Re,ref:ce,type:ke},Be,{classes:_extends$2({},Ne,{notchedOutline:null})}))});OutlinedInput.muiName="Input";const OutlinedInput$1=OutlinedInput;function getSelectUtilityClasses(ne){return generateUtilityClass$2("MuiSelect",ne)}const selectClasses=generateUtilityClasses$2("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),selectClasses$1=selectClasses;var _span;const _excluded$h=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],SelectSelect=styled$1("div",{name:"MuiSelect",slot:"Select",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`&.${selectClasses$1.select}`]:oe.select},{[`&.${selectClasses$1.select}`]:oe[ce.variant]},{[`&.${selectClasses$1.error}`]:oe.error},{[`&.${selectClasses$1.multiple}`]:oe.multiple}]}})(nativeSelectSelectStyles,{[`&.${selectClasses$1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SelectIcon=styled$1("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.icon,ce.variant&&oe[`icon${capitalize$1(ce.variant)}`],ce.open&&oe.iconOpen]}})(nativeSelectIconStyles),SelectNativeInput=styled$1("input",{shouldForwardProp:ne=>slotShouldForwardProp(ne)&&ne!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(ne,oe)=>oe.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function areEqualValues(ne,oe){return typeof oe=="object"&&oe!==null?ne===oe:String(ne)===String(oe)}function isEmpty$2(ne){return ne==null||typeof ne=="string"&&!ne.trim()}const useUtilityClasses$d=ne=>{const{classes:oe,variant:ce,disabled:ue,multiple:pe,open:me,error:ge}=ne,ye={select:["select",ce,ue&&"disabled",pe&&"multiple",ge&&"error"],icon:["icon",`icon${capitalize$1(ce)}`,me&&"iconOpen",ue&&"disabled"],nativeInput:["nativeInput"]};return composeClasses$1(ye,getSelectUtilityClasses,oe)},SelectInput=reactExports.forwardRef(function(oe,ce){var ue;const{"aria-describedby":pe,"aria-label":me,autoFocus:ge,autoWidth:ye,children:ve,className:xe,defaultOpen:_e,defaultValue:Se,disabled:$e,displayEmpty:Re,error:Ae=!1,IconComponent:Ie,inputRef:ke,labelId:Be,MenuProps:Ne={},multiple:Fe,name:Ue,onBlur:We,onChange:qe,onClose:ze,onFocus:Ge,onOpen:Ze,open:Dt,readOnly:Je,renderValue:Ut,SelectDisplayProps:jt={},tabIndex:Ke,value:an,variant:Zt="standard"}=oe,en=_objectWithoutPropertiesLoose$2(oe,_excluded$h),[Kt,Wt]=useControlled({controlled:an,default:Se,name:"Select"}),[un,Xt]=useControlled({controlled:Dt,default:_e,name:"Select"}),nn=reactExports.useRef(null),vn=reactExports.useRef(null),[Sn,Cn]=reactExports.useState(null),{current:Nt}=reactExports.useRef(Dt!=null),[Yt,Jt]=reactExports.useState(),hn=useForkRef(ce,ke),Ye=reactExports.useCallback(Wn=>{vn.current=Wn,Wn&&Cn(Wn)},[]),Xe=Sn==null?void 0:Sn.parentNode;reactExports.useImperativeHandle(hn,()=>({focus:()=>{vn.current.focus()},node:nn.current,value:Kt}),[Kt]),reactExports.useEffect(()=>{_e&&un&&Sn&&!Nt&&(Jt(ye?null:Xe.clientWidth),vn.current.focus())},[Sn,ye]),reactExports.useEffect(()=>{ge&&vn.current.focus()},[ge]),reactExports.useEffect(()=>{if(!Be)return;const Wn=ownerDocument(vn.current).getElementById(Be);if(Wn){const dn=()=>{getSelection().isCollapsed&&vn.current.focus()};return Wn.addEventListener("click",dn),()=>{Wn.removeEventListener("click",dn)}}},[Be]);const Pt=(Wn,dn)=>{Wn?Ze&&Ze(dn):ze&&ze(dn),Nt||(Jt(ye?null:Xe.clientWidth),Xt(Wn))},sn=Wn=>{Wn.button===0&&(Wn.preventDefault(),vn.current.focus(),Pt(!0,Wn))},yn=Wn=>{Pt(!1,Wn)},qt=reactExports.Children.toArray(ve),wn=Wn=>{const dn=qt.find(Bn=>Bn.props.value===Wn.target.value);dn!==void 0&&(Wt(dn.props.value),qe&&qe(Wn,dn))},Tn=Wn=>dn=>{let Bn;if(dn.currentTarget.hasAttribute("tabindex")){if(Fe){Bn=Array.isArray(Kt)?Kt.slice():[];const mn=Kt.indexOf(Wn.props.value);mn===-1?Bn.push(Wn.props.value):Bn.splice(mn,1)}else Bn=Wn.props.value;if(Wn.props.onClick&&Wn.props.onClick(dn),Kt!==Bn&&(Wt(Bn),qe)){const mn=dn.nativeEvent||dn,Pn=new mn.constructor(mn.type,mn);Object.defineProperty(Pn,"target",{writable:!0,value:{value:Bn,name:Ue}}),qe(Pn,Wn)}Fe||Pt(!1,dn)}},xn=Wn=>{Je||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Wn.key)!==-1&&(Wn.preventDefault(),Pt(!0,Wn))},Nn=Sn!==null&&un,zn=Wn=>{!Nn&&We&&(Object.defineProperty(Wn,"target",{writable:!0,value:{value:Kt,name:Ue}}),We(Wn))};delete en["aria-invalid"];let Yn,Kn;const Rn=[];let Mn=!1;(isFilled({value:Kt})||Re)&&(Ut?Yn=Ut(Kt):Mn=!0);const Xn=qt.map(Wn=>{if(!reactExports.isValidElement(Wn))return null;let dn;if(Fe){if(!Array.isArray(Kt))throw new Error(formatMuiErrorMessage$1(2));dn=Kt.some(Bn=>areEqualValues(Bn,Wn.props.value)),dn&&Mn&&Rn.push(Wn.props.children)}else dn=areEqualValues(Kt,Wn.props.value),dn&&Mn&&(Kn=Wn.props.children);return reactExports.cloneElement(Wn,{"aria-selected":dn?"true":"false",onClick:Tn(Wn),onKeyUp:Bn=>{Bn.key===" "&&Bn.preventDefault(),Wn.props.onKeyUp&&Wn.props.onKeyUp(Bn)},role:"option",selected:dn,value:void 0,"data-value":Wn.props.value})});Mn&&(Fe?Rn.length===0?Yn=null:Yn=Rn.reduce((Wn,dn,Bn)=>(Wn.push(dn),Bn{const{classes:oe}=ne;return oe},styledRootConfig={name:"MuiSelect",overridesResolver:(ne,oe)=>oe.root,shouldForwardProp:ne=>rootShouldForwardProp$1(ne)&&ne!=="variant",slot:"Root"},StyledInput=styled$1(Input$1,styledRootConfig)(""),StyledOutlinedInput=styled$1(OutlinedInput$1,styledRootConfig)(""),StyledFilledInput=styled$1(FilledInput$1,styledRootConfig)(""),Select$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({name:"MuiSelect",props:oe}),{autoWidth:pe=!1,children:me,classes:ge={},className:ye,defaultOpen:ve=!1,displayEmpty:xe=!1,IconComponent:_e=ArrowDropDownIcon,id:Se,input:$e,inputProps:Re,label:Ae,labelId:Ie,MenuProps:ke,multiple:Be=!1,native:Ne=!1,onClose:Fe,onOpen:Ue,open:We,renderValue:qe,SelectDisplayProps:ze,variant:Ge="outlined"}=ue,Ze=_objectWithoutPropertiesLoose$2(ue,_excluded$g),Dt=Ne?NativeSelectInput$1:SelectInput$1,Je=useFormControl(),Ut=formControlState({props:ue,muiFormControl:Je,states:["variant","error"]}),jt=Ut.variant||Ge,Ke=_extends$2({},ue,{variant:jt,classes:ge}),an=useUtilityClasses$c(Ke),Zt=_objectWithoutPropertiesLoose$2(an,_excluded2$1),en=$e||{standard:jsxRuntimeExports.jsx(StyledInput,{ownerState:Ke}),outlined:jsxRuntimeExports.jsx(StyledOutlinedInput,{label:Ae,ownerState:Ke}),filled:jsxRuntimeExports.jsx(StyledFilledInput,{ownerState:Ke})}[jt],Kt=useForkRef(ce,en.ref);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(en,_extends$2({inputComponent:Dt,inputProps:_extends$2({children:me,error:Ut.error,IconComponent:_e,variant:jt,type:void 0,multiple:Be},Ne?{id:Se}:{autoWidth:pe,defaultOpen:ve,displayEmpty:xe,labelId:Ie,MenuProps:ke,onClose:Fe,onOpen:Ue,open:We,renderValue:qe,SelectDisplayProps:_extends$2({id:Se},ze)},Re,{classes:Re?deepmerge$1(Zt,Re.classes):Zt},$e?$e.props.inputProps:{})},(Be&&Ne||xe)&&jt==="outlined"?{notched:!0}:{},{ref:Kt,className:clsx(en.props.className,ye,an.root)},!$e&&{variant:jt},Ze))})});Select$1.muiName="Select";const Select$2=Select$1;function getSkeletonUtilityClass(ne){return generateUtilityClass$2("MuiSkeleton",ne)}generateUtilityClasses$2("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const _excluded$f=["animation","className","component","height","style","variant","width"];let _$7=ne=>ne,_t$1,_t2,_t3,_t4;const useUtilityClasses$b=ne=>{const{classes:oe,variant:ce,animation:ue,hasChildren:pe,width:me,height:ge}=ne;return composeClasses$1({root:["root",ce,ue,pe&&"withChildren",pe&&!me&&"fitContent",pe&&!ge&&"heightAuto"]},getSkeletonUtilityClass,oe)},pulseKeyframe=keyframes(_t$1||(_t$1=_$7` + `),indeterminate2Keyframe)),LinearProgress=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiLinearProgress"}),{className:pe,color:me="primary",value:ge,valueBuffer:ye,variant:ve="indeterminate"}=ue,xe=_objectWithoutPropertiesLoose$2(ue,_excluded$x),_e=_extends$2({},ue,{color:me,variant:ve}),Se=useUtilityClasses$r(_e),$e=useRtl(),Re={},Ae={bar1:{},bar2:{}};if((ve==="determinate"||ve==="buffer")&&ge!==void 0){Re["aria-valuenow"]=Math.round(ge),Re["aria-valuemin"]=0,Re["aria-valuemax"]=100;let Ie=ge-100;$e&&(Ie=-Ie),Ae.bar1.transform=`translateX(${Ie}%)`}if(ve==="buffer"&&ye!==void 0){let Ie=(ye||0)-100;$e&&(Ie=-Ie),Ae.bar2.transform=`translateX(${Ie}%)`}return jsxRuntimeExports.jsxs(LinearProgressRoot,_extends$2({className:clsx(Se.root,pe),ownerState:_e,role:"progressbar"},Re,{ref:ce},xe,{children:[ve==="buffer"?jsxRuntimeExports.jsx(LinearProgressDashed,{className:Se.dashed,ownerState:_e}):null,jsxRuntimeExports.jsx(LinearProgressBar1,{className:Se.bar1,ownerState:_e,style:Ae.bar1}),ve==="determinate"?null:jsxRuntimeExports.jsx(LinearProgressBar2,{className:Se.bar2,ownerState:_e,style:Ae.bar2})]}))}),LinearProgress$1=LinearProgress;function getLinkUtilityClass(ne){return generateUtilityClass$2("MuiLink",ne)}const linkClasses=generateUtilityClasses$2("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),linkClasses$1=linkClasses,colorTransformations={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},transformDeprecatedColors=ne=>colorTransformations[ne]||ne,getTextDecoration=({theme:ne,ownerState:oe})=>{const ce=transformDeprecatedColors(oe.color),ue=getPath(ne,`palette.${ce}`,!1)||oe.color,pe=getPath(ne,`palette.${ce}Channel`);return"vars"in ne&&pe?`rgba(${pe} / 0.4)`:alpha_1(ue,.4)},getTextDecoration$1=getTextDecoration,_excluded$w=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],useUtilityClasses$q=ne=>{const{classes:oe,component:ce,focusVisible:ue,underline:pe}=ne,me={root:["root",`underline${capitalize$1(pe)}`,ce==="button"&&"button",ue&&"focusVisible"]};return composeClasses$1(me,getLinkUtilityClass,oe)},LinkRoot=styled$1(Type$2,{name:"MuiLink",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`underline${capitalize$1(ce.underline)}`],ce.component==="button"&&oe.button]}})(({theme:ne,ownerState:oe})=>_extends$2({},oe.underline==="none"&&{textDecoration:"none"},oe.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},oe.underline==="always"&&_extends$2({textDecoration:"underline"},oe.color!=="inherit"&&{textDecorationColor:getTextDecoration$1({theme:ne,ownerState:oe})},{"&:hover":{textDecorationColor:"inherit"}}),oe.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${linkClasses$1.focusVisible}`]:{outline:"auto"}})),Link=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiLink"}),{className:pe,color:me="primary",component:ge="a",onBlur:ye,onFocus:ve,TypographyClasses:xe,underline:_e="always",variant:Se="inherit",sx:$e}=ue,Re=_objectWithoutPropertiesLoose$2(ue,_excluded$w),{isFocusVisibleRef:Ae,onBlur:Ie,onFocus:ke,ref:Be}=useIsFocusVisible(),[Ne,Fe]=reactExports.useState(!1),Ue=useForkRef(ce,Be),We=Ze=>{Ie(Ze),Ae.current===!1&&Fe(!1),ye&&ye(Ze)},qe=Ze=>{ke(Ze),Ae.current===!0&&Fe(!0),ve&&ve(Ze)},ze=_extends$2({},ue,{color:me,component:ge,focusVisible:Ne,underline:_e,variant:Se}),Ge=useUtilityClasses$q(ze);return jsxRuntimeExports.jsx(LinkRoot,_extends$2({color:me,className:clsx(Ge.root,pe),classes:xe,component:ge,onBlur:We,onFocus:qe,ref:Ue,ownerState:ze,variant:Se,sx:[...Object.keys(colorTransformations).includes(me)?[]:[{color:me}],...Array.isArray($e)?$e:[$e]]},Re))}),Link$1=Link,ListContext=reactExports.createContext({}),ListContext$1=ListContext;function getListUtilityClass(ne){return generateUtilityClass$2("MuiList",ne)}generateUtilityClasses$2("MuiList",["root","padding","dense","subheader"]);const _excluded$v=["children","className","component","dense","disablePadding","subheader"],useUtilityClasses$p=ne=>{const{classes:oe,disablePadding:ce,dense:ue,subheader:pe}=ne;return composeClasses$1({root:["root",!ce&&"padding",ue&&"dense",pe&&"subheader"]},getListUtilityClass,oe)},ListRoot$1=styled$1("ul",{name:"MuiList",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,!ce.disablePadding&&oe.padding,ce.dense&&oe.dense,ce.subheader&&oe.subheader]}})(({ownerState:ne})=>_extends$2({listStyle:"none",margin:0,padding:0,position:"relative"},!ne.disablePadding&&{paddingTop:8,paddingBottom:8},ne.subheader&&{paddingTop:0})),List$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiList"}),{children:pe,className:me,component:ge="ul",dense:ye=!1,disablePadding:ve=!1,subheader:xe}=ue,_e=_objectWithoutPropertiesLoose$2(ue,_excluded$v),Se=reactExports.useMemo(()=>({dense:ye}),[ye]),$e=_extends$2({},ue,{component:ge,dense:ye,disablePadding:ve}),Re=useUtilityClasses$p($e);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Se,children:jsxRuntimeExports.jsxs(ListRoot$1,_extends$2({as:ge,className:clsx(Re.root,me),ref:ce,ownerState:$e},_e,{children:[xe,pe]}))})}),List$2=List$1;function getListItemUtilityClass(ne){return generateUtilityClass$2("MuiListItem",ne)}const listItemClasses=generateUtilityClasses$2("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),listItemClasses$1=listItemClasses;function getListItemButtonUtilityClass(ne){return generateUtilityClass$2("MuiListItemButton",ne)}const listItemButtonClasses=generateUtilityClasses$2("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),listItemButtonClasses$1=listItemButtonClasses,_excluded$u=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],overridesResolver$2=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.dense&&oe.dense,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart,ce.divider&&oe.divider,!ce.disableGutters&&oe.gutters]},useUtilityClasses$o=ne=>{const{alignItems:oe,classes:ce,dense:ue,disabled:pe,disableGutters:me,divider:ge,selected:ye}=ne,xe=composeClasses$1({root:["root",ue&&"dense",!me&&"gutters",ge&&"divider",pe&&"disabled",oe==="flex-start"&&"alignItemsFlexStart",ye&&"selected"]},getListItemButtonUtilityClass,ce);return _extends$2({},ce,xe)},ListItemButtonRoot=styled$1(ButtonBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:overridesResolver$2})(({theme:ne,ownerState:oe})=>_extends$2({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(ne.vars||ne).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${listItemButtonClasses$1.selected}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity),[`&.${listItemButtonClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},[`&.${listItemButtonClasses$1.selected}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity)}},[`&.${listItemButtonClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`&.${listItemButtonClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity}},oe.divider&&{borderBottom:`1px solid ${(ne.vars||ne).palette.divider}`,backgroundClip:"padding-box"},oe.alignItems==="flex-start"&&{alignItems:"flex-start"},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},oe.dense&&{paddingTop:4,paddingBottom:4})),ListItemButton=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemButton"}),{alignItems:pe="center",autoFocus:me=!1,component:ge="div",children:ye,dense:ve=!1,disableGutters:xe=!1,divider:_e=!1,focusVisibleClassName:Se,selected:$e=!1,className:Re}=ue,Ae=_objectWithoutPropertiesLoose$2(ue,_excluded$u),Ie=reactExports.useContext(ListContext$1),ke=reactExports.useMemo(()=>({dense:ve||Ie.dense||!1,alignItems:pe,disableGutters:xe}),[pe,Ie.dense,ve,xe]),Be=reactExports.useRef(null);useEnhancedEffect$1(()=>{me&&Be.current&&Be.current.focus()},[me]);const Ne=_extends$2({},ue,{alignItems:pe,dense:ke.dense,disableGutters:xe,divider:_e,selected:$e}),Fe=useUtilityClasses$o(Ne),Ue=useForkRef(Be,ce);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:ke,children:jsxRuntimeExports.jsx(ListItemButtonRoot,_extends$2({ref:Ue,href:Ae.href||Ae.to,component:(Ae.href||Ae.to)&&ge==="div"?"button":ge,focusVisibleClassName:clsx(Fe.focusVisible,Se),ownerState:Ne,className:clsx(Fe.root,Re)},Ae,{classes:Fe,children:ye}))})}),ListItemButton$1=ListItemButton;function getListItemSecondaryActionClassesUtilityClass(ne){return generateUtilityClass$2("MuiListItemSecondaryAction",ne)}generateUtilityClasses$2("MuiListItemSecondaryAction",["root","disableGutters"]);const _excluded$t=["className"],useUtilityClasses$n=ne=>{const{disableGutters:oe,classes:ce}=ne;return composeClasses$1({root:["root",oe&&"disableGutters"]},getListItemSecondaryActionClassesUtilityClass,ce)},ListItemSecondaryActionRoot=styled$1("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.disableGutters&&oe.disableGutters]}})(({ownerState:ne})=>_extends$2({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},ne.disableGutters&&{right:0})),ListItemSecondaryAction=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemSecondaryAction"}),{className:pe}=ue,me=_objectWithoutPropertiesLoose$2(ue,_excluded$t),ge=reactExports.useContext(ListContext$1),ye=_extends$2({},ue,{disableGutters:ge.disableGutters}),ve=useUtilityClasses$n(ye);return jsxRuntimeExports.jsx(ListItemSecondaryActionRoot,_extends$2({className:clsx(ve.root,pe),ownerState:ye,ref:ce},me))});ListItemSecondaryAction.muiName="ListItemSecondaryAction";const ListItemSecondaryAction$1=ListItemSecondaryAction,_excluded$s=["className"],_excluded2$4=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],overridesResolver$1=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.dense&&oe.dense,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart,ce.divider&&oe.divider,!ce.disableGutters&&oe.gutters,!ce.disablePadding&&oe.padding,ce.button&&oe.button,ce.hasSecondaryAction&&oe.secondaryAction]},useUtilityClasses$m=ne=>{const{alignItems:oe,button:ce,classes:ue,dense:pe,disabled:me,disableGutters:ge,disablePadding:ye,divider:ve,hasSecondaryAction:xe,selected:_e}=ne;return composeClasses$1({root:["root",pe&&"dense",!ge&&"gutters",!ye&&"padding",ve&&"divider",me&&"disabled",ce&&"button",oe==="flex-start"&&"alignItemsFlexStart",xe&&"secondaryAction",_e&&"selected"],container:["container"]},getListItemUtilityClass,ue)},ListItemRoot=styled$1("div",{name:"MuiListItem",slot:"Root",overridesResolver:overridesResolver$1})(({theme:ne,ownerState:oe})=>_extends$2({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!oe.disablePadding&&_extends$2({paddingTop:8,paddingBottom:8},oe.dense&&{paddingTop:4,paddingBottom:4},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},!!oe.secondaryAction&&{paddingRight:48}),!!oe.secondaryAction&&{[`& > .${listItemButtonClasses$1.root}`]:{paddingRight:48}},{[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`&.${listItemClasses$1.selected}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity),[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},[`&.${listItemClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity}},oe.alignItems==="flex-start"&&{alignItems:"flex-start"},oe.divider&&{borderBottom:`1px solid ${(ne.vars||ne).palette.divider}`,backgroundClip:"padding-box"},oe.button&&{transition:ne.transitions.create("background-color",{duration:ne.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(ne.vars||ne).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${listItemClasses$1.selected}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity)}}},oe.hasSecondaryAction&&{paddingRight:48})),ListItemContainer=styled$1("li",{name:"MuiListItem",slot:"Container",overridesResolver:(ne,oe)=>oe.container})({position:"relative"}),ListItem=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItem"}),{alignItems:pe="center",autoFocus:me=!1,button:ge=!1,children:ye,className:ve,component:xe,components:_e={},componentsProps:Se={},ContainerComponent:$e="li",ContainerProps:{className:Re}={},dense:Ae=!1,disabled:Ie=!1,disableGutters:ke=!1,disablePadding:Be=!1,divider:Ne=!1,focusVisibleClassName:Fe,secondaryAction:Ue,selected:We=!1,slotProps:qe={},slots:ze={}}=ue,Ge=_objectWithoutPropertiesLoose$2(ue.ContainerProps,_excluded$s),Ze=_objectWithoutPropertiesLoose$2(ue,_excluded2$4),Dt=reactExports.useContext(ListContext$1),Je=reactExports.useMemo(()=>({dense:Ae||Dt.dense||!1,alignItems:pe,disableGutters:ke}),[pe,Dt.dense,Ae,ke]),Ut=reactExports.useRef(null);useEnhancedEffect$1(()=>{me&&Ut.current&&Ut.current.focus()},[me]);const jt=reactExports.Children.toArray(ye),Ke=jt.length&&isMuiElement(jt[jt.length-1],["ListItemSecondaryAction"]),an=_extends$2({},ue,{alignItems:pe,autoFocus:me,button:ge,dense:Je.dense,disabled:Ie,disableGutters:ke,disablePadding:Be,divider:Ne,hasSecondaryAction:Ke,selected:We}),Zt=useUtilityClasses$m(an),en=useForkRef(Ut,ce),Kt=ze.root||_e.Root||ListItemRoot,Wt=qe.root||Se.root||{},un=_extends$2({className:clsx(Zt.root,Wt.className,ve),disabled:Ie},Ze);let Xt=xe||"li";return ge&&(un.component=xe||"div",un.focusVisibleClassName=clsx(listItemClasses$1.focusVisible,Fe),Xt=ButtonBase$1),Ke?(Xt=!un.component&&!xe?"div":Xt,$e==="li"&&(Xt==="li"?Xt="div":un.component==="li"&&(un.component="div")),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Je,children:jsxRuntimeExports.jsxs(ListItemContainer,_extends$2({as:$e,className:clsx(Zt.container,Re),ref:en,ownerState:an},Ge,{children:[jsxRuntimeExports.jsx(Kt,_extends$2({},Wt,!isHostComponent(Kt)&&{as:Xt,ownerState:_extends$2({},an,Wt.ownerState)},un,{children:jt})),jt.pop()]}))})):jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Je,children:jsxRuntimeExports.jsxs(Kt,_extends$2({},Wt,{as:Xt,ref:en},!isHostComponent(Kt)&&{ownerState:_extends$2({},an,Wt.ownerState)},un,{children:[jt,Ue&&jsxRuntimeExports.jsx(ListItemSecondaryAction$1,{children:Ue})]}))})}),ListItem$1=ListItem;function getListItemAvatarUtilityClass(ne){return generateUtilityClass$2("MuiListItemAvatar",ne)}generateUtilityClasses$2("MuiListItemAvatar",["root","alignItemsFlexStart"]);const _excluded$r=["className"],useUtilityClasses$l=ne=>{const{alignItems:oe,classes:ce}=ne;return composeClasses$1({root:["root",oe==="flex-start"&&"alignItemsFlexStart"]},getListItemAvatarUtilityClass,ce)},ListItemAvatarRoot=styled$1("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart]}})(({ownerState:ne})=>_extends$2({minWidth:56,flexShrink:0},ne.alignItems==="flex-start"&&{marginTop:8})),ListItemAvatar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemAvatar"}),{className:pe}=ue,me=_objectWithoutPropertiesLoose$2(ue,_excluded$r),ge=reactExports.useContext(ListContext$1),ye=_extends$2({},ue,{alignItems:ge.alignItems}),ve=useUtilityClasses$l(ye);return jsxRuntimeExports.jsx(ListItemAvatarRoot,_extends$2({className:clsx(ve.root,pe),ownerState:ye,ref:ce},me))}),ListItemAvatar$1=ListItemAvatar;function getListItemIconUtilityClass(ne){return generateUtilityClass$2("MuiListItemIcon",ne)}const listItemIconClasses=generateUtilityClasses$2("MuiListItemIcon",["root","alignItemsFlexStart"]),listItemIconClasses$1=listItemIconClasses,_excluded$q=["className"],useUtilityClasses$k=ne=>{const{alignItems:oe,classes:ce}=ne;return composeClasses$1({root:["root",oe==="flex-start"&&"alignItemsFlexStart"]},getListItemIconUtilityClass,ce)},ListItemIconRoot=styled$1("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.alignItems==="flex-start"&&oe.alignItemsFlexStart]}})(({theme:ne,ownerState:oe})=>_extends$2({minWidth:56,color:(ne.vars||ne).palette.action.active,flexShrink:0,display:"inline-flex"},oe.alignItems==="flex-start"&&{marginTop:8})),ListItemIcon=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemIcon"}),{className:pe}=ue,me=_objectWithoutPropertiesLoose$2(ue,_excluded$q),ge=reactExports.useContext(ListContext$1),ye=_extends$2({},ue,{alignItems:ge.alignItems}),ve=useUtilityClasses$k(ye);return jsxRuntimeExports.jsx(ListItemIconRoot,_extends$2({className:clsx(ve.root,pe),ownerState:ye,ref:ce},me))}),ListItemIcon$1=ListItemIcon;function getListItemTextUtilityClass(ne){return generateUtilityClass$2("MuiListItemText",ne)}const listItemTextClasses=generateUtilityClasses$2("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),listItemTextClasses$1=listItemTextClasses,_excluded$p=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],useUtilityClasses$j=ne=>{const{classes:oe,inset:ce,primary:ue,secondary:pe,dense:me}=ne;return composeClasses$1({root:["root",ce&&"inset",me&&"dense",ue&&pe&&"multiline"],primary:["primary"],secondary:["secondary"]},getListItemTextUtilityClass,oe)},ListItemTextRoot=styled$1("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${listItemTextClasses$1.primary}`]:oe.primary},{[`& .${listItemTextClasses$1.secondary}`]:oe.secondary},oe.root,ce.inset&&oe.inset,ce.primary&&ce.secondary&&oe.multiline,ce.dense&&oe.dense]}})(({ownerState:ne})=>_extends$2({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},ne.primary&&ne.secondary&&{marginTop:6,marginBottom:6},ne.inset&&{paddingLeft:56})),ListItemText=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiListItemText"}),{children:pe,className:me,disableTypography:ge=!1,inset:ye=!1,primary:ve,primaryTypographyProps:xe,secondary:_e,secondaryTypographyProps:Se}=ue,$e=_objectWithoutPropertiesLoose$2(ue,_excluded$p),{dense:Re}=reactExports.useContext(ListContext$1);let Ae=ve??pe,Ie=_e;const ke=_extends$2({},ue,{disableTypography:ge,inset:ye,primary:!!Ae,secondary:!!Ie,dense:Re}),Be=useUtilityClasses$j(ke);return Ae!=null&&Ae.type!==Type$2&&!ge&&(Ae=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:Re?"body2":"body1",className:Be.primary,component:xe!=null&&xe.variant?void 0:"span",display:"block"},xe,{children:Ae}))),Ie!=null&&Ie.type!==Type$2&&!ge&&(Ie=jsxRuntimeExports.jsx(Type$2,_extends$2({variant:"body2",className:Be.secondary,color:"text.secondary",display:"block"},Se,{children:Ie}))),jsxRuntimeExports.jsxs(ListItemTextRoot,_extends$2({className:clsx(Be.root,me),ownerState:ke,ref:ce},$e,{children:[Ae,Ie]}))}),ListItemText$1=ListItemText,_excluded$o=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem$1(ne,oe,ce){return ne===oe?ne.firstChild:oe&&oe.nextElementSibling?oe.nextElementSibling:ce?null:ne.firstChild}function previousItem$1(ne,oe,ce){return ne===oe?ce?ne.firstChild:ne.lastChild:oe&&oe.previousElementSibling?oe.previousElementSibling:ce?null:ne.lastChild}function textCriteriaMatches(ne,oe){if(oe===void 0)return!0;let ce=ne.innerText;return ce===void 0&&(ce=ne.textContent),ce=ce.trim().toLowerCase(),ce.length===0?!1:oe.repeating?ce[0]===oe.keys[0]:ce.indexOf(oe.keys.join(""))===0}function moveFocus$1(ne,oe,ce,ue,pe,me){let ge=!1,ye=pe(ne,oe,oe?ce:!1);for(;ye;){if(ye===ne.firstChild){if(ge)return!1;ge=!0}const ve=ue?!1:ye.disabled||ye.getAttribute("aria-disabled")==="true";if(!ye.hasAttribute("tabindex")||!textCriteriaMatches(ye,me)||ve)ye=pe(ne,ye,ce);else return ye.focus(),!0}return!1}const MenuList=reactExports.forwardRef(function(oe,ce){const{actions:ue,autoFocus:pe=!1,autoFocusItem:me=!1,children:ge,className:ye,disabledItemsFocusable:ve=!1,disableListWrap:xe=!1,onKeyDown:_e,variant:Se="selectedMenu"}=oe,$e=_objectWithoutPropertiesLoose$2(oe,_excluded$o),Re=reactExports.useRef(null),Ae=reactExports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect$1(()=>{pe&&Re.current.focus()},[pe]),reactExports.useImperativeHandle(ue,()=>({adjustStyleForScrollbar:(Fe,{direction:Ue})=>{const We=!Re.current.style.width;if(Fe.clientHeight{const Ue=Re.current,We=Fe.key,qe=ownerDocument(Ue).activeElement;if(We==="ArrowDown")Fe.preventDefault(),moveFocus$1(Ue,qe,xe,ve,nextItem$1);else if(We==="ArrowUp")Fe.preventDefault(),moveFocus$1(Ue,qe,xe,ve,previousItem$1);else if(We==="Home")Fe.preventDefault(),moveFocus$1(Ue,null,xe,ve,nextItem$1);else if(We==="End")Fe.preventDefault(),moveFocus$1(Ue,null,xe,ve,previousItem$1);else if(We.length===1){const ze=Ae.current,Ge=We.toLowerCase(),Ze=performance.now();ze.keys.length>0&&(Ze-ze.lastTime>500?(ze.keys=[],ze.repeating=!0,ze.previousKeyMatched=!0):ze.repeating&&Ge!==ze.keys[0]&&(ze.repeating=!1)),ze.lastTime=Ze,ze.keys.push(Ge);const Dt=qe&&!ze.repeating&&textCriteriaMatches(qe,ze);ze.previousKeyMatched&&(Dt||moveFocus$1(Ue,qe,!1,ve,nextItem$1,ze))?Fe.preventDefault():ze.previousKeyMatched=!1}_e&&_e(Fe)},ke=useForkRef(Re,ce);let Be=-1;reactExports.Children.forEach(ge,(Fe,Ue)=>{if(!reactExports.isValidElement(Fe)){Be===Ue&&(Be+=1,Be>=ge.length&&(Be=-1));return}Fe.props.disabled||(Se==="selectedMenu"&&Fe.props.selected||Be===-1)&&(Be=Ue),Be===Ue&&(Fe.props.disabled||Fe.props.muiSkipListHighlight||Fe.type.muiSkipListHighlight)&&(Be+=1,Be>=ge.length&&(Be=-1))});const Ne=reactExports.Children.map(ge,(Fe,Ue)=>{if(Ue===Be){const We={};return me&&(We.autoFocus=!0),Fe.props.tabIndex===void 0&&Se==="selectedMenu"&&(We.tabIndex=0),reactExports.cloneElement(Fe,We)}return Fe});return jsxRuntimeExports.jsx(List$2,_extends$2({role:"menu",ref:ke,className:ye,onKeyDown:Ie,tabIndex:pe?0:-1},$e,{children:Ne}))}),MenuList$1=MenuList;function getPopoverUtilityClass(ne){return generateUtilityClass$2("MuiPopover",ne)}generateUtilityClasses$2("MuiPopover",["root","paper"]);const _excluded$n=["onEntering"],_excluded2$3=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_excluded3=["slotProps"];function getOffsetTop(ne,oe){let ce=0;return typeof oe=="number"?ce=oe:oe==="center"?ce=ne.height/2:oe==="bottom"&&(ce=ne.height),ce}function getOffsetLeft(ne,oe){let ce=0;return typeof oe=="number"?ce=oe:oe==="center"?ce=ne.width/2:oe==="right"&&(ce=ne.width),ce}function getTransformOriginValue(ne){return[ne.horizontal,ne.vertical].map(oe=>typeof oe=="number"?`${oe}px`:oe).join(" ")}function resolveAnchorEl(ne){return typeof ne=="function"?ne():ne}const useUtilityClasses$i=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],paper:["paper"]},getPopoverUtilityClass,oe)},PopoverRoot=styled$1(Modal$2,{name:"MuiPopover",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),PopoverPaper=styled$1(Paper$1,{name:"MuiPopover",slot:"Paper",overridesResolver:(ne,oe)=>oe.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Popover=reactExports.forwardRef(function(oe,ce){var ue,pe,me;const ge=useThemeProps$3({props:oe,name:"MuiPopover"}),{action:ye,anchorEl:ve,anchorOrigin:xe={vertical:"top",horizontal:"left"},anchorPosition:_e,anchorReference:Se="anchorEl",children:$e,className:Re,container:Ae,elevation:Ie=8,marginThreshold:ke=16,open:Be,PaperProps:Ne={},slots:Fe,slotProps:Ue,transformOrigin:We={vertical:"top",horizontal:"left"},TransitionComponent:qe=Grow$1,transitionDuration:ze="auto",TransitionProps:{onEntering:Ge}={},disableScrollLock:Ze=!1}=ge,Dt=_objectWithoutPropertiesLoose$2(ge.TransitionProps,_excluded$n),Je=_objectWithoutPropertiesLoose$2(ge,_excluded2$3),Ut=(ue=Ue==null?void 0:Ue.paper)!=null?ue:Ne,jt=reactExports.useRef(),Ke=useForkRef(jt,Ut.ref),an=_extends$2({},ge,{anchorOrigin:xe,anchorReference:Se,elevation:Ie,marginThreshold:ke,externalPaperSlotProps:Ut,transformOrigin:We,TransitionComponent:qe,transitionDuration:ze,TransitionProps:Dt}),Zt=useUtilityClasses$i(an),en=reactExports.useCallback(()=>{if(Se==="anchorPosition")return _e;const sn=resolveAnchorEl(ve),qt=(sn&&sn.nodeType===1?sn:ownerDocument(jt.current).body).getBoundingClientRect();return{top:qt.top+getOffsetTop(qt,xe.vertical),left:qt.left+getOffsetLeft(qt,xe.horizontal)}},[ve,xe.horizontal,xe.vertical,_e,Se]),Kt=reactExports.useCallback(sn=>({vertical:getOffsetTop(sn,We.vertical),horizontal:getOffsetLeft(sn,We.horizontal)}),[We.horizontal,We.vertical]),Wt=reactExports.useCallback(sn=>{const yn={width:sn.offsetWidth,height:sn.offsetHeight},qt=Kt(yn);if(Se==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue(qt)};const wn=en();let Tn=wn.top-qt.vertical,xn=wn.left-qt.horizontal;const Nn=Tn+yn.height,zn=xn+yn.width,Yn=ownerWindow(resolveAnchorEl(ve)),Kn=Yn.innerHeight-ke,Rn=Yn.innerWidth-ke;if(ke!==null&&TnKn){const Mn=Nn-Kn;Tn-=Mn,qt.vertical+=Mn}if(ke!==null&&xnRn){const Mn=zn-Rn;xn-=Mn,qt.horizontal+=Mn}return{top:`${Math.round(Tn)}px`,left:`${Math.round(xn)}px`,transformOrigin:getTransformOriginValue(qt)}},[ve,Se,en,Kt,ke]),[un,Xt]=reactExports.useState(Be),nn=reactExports.useCallback(()=>{const sn=jt.current;if(!sn)return;const yn=Wt(sn);yn.top!==null&&(sn.style.top=yn.top),yn.left!==null&&(sn.style.left=yn.left),sn.style.transformOrigin=yn.transformOrigin,Xt(!0)},[Wt]);reactExports.useEffect(()=>(Ze&&window.addEventListener("scroll",nn),()=>window.removeEventListener("scroll",nn)),[ve,Ze,nn]);const vn=(sn,yn)=>{Ge&&Ge(sn,yn),nn()},Sn=()=>{Xt(!1)};reactExports.useEffect(()=>{Be&&nn()}),reactExports.useImperativeHandle(ye,()=>Be?{updatePosition:()=>{nn()}}:null,[Be,nn]),reactExports.useEffect(()=>{if(!Be)return;const sn=debounce$2(()=>{nn()}),yn=ownerWindow(ve);return yn.addEventListener("resize",sn),()=>{sn.clear(),yn.removeEventListener("resize",sn)}},[ve,Be,nn]);let Cn=ze;ze==="auto"&&!qe.muiSupportAuto&&(Cn=void 0);const Nt=Ae||(ve?ownerDocument(resolveAnchorEl(ve)).body:void 0),Yt=(pe=Fe==null?void 0:Fe.root)!=null?pe:PopoverRoot,Jt=(me=Fe==null?void 0:Fe.paper)!=null?me:PopoverPaper,hn=useSlotProps({elementType:Jt,externalSlotProps:_extends$2({},Ut,{style:un?Ut.style:_extends$2({},Ut.style,{opacity:0})}),additionalProps:{elevation:Ie,ref:Ke},ownerState:an,className:clsx(Zt.paper,Ut==null?void 0:Ut.className)}),Ye=useSlotProps({elementType:Yt,externalSlotProps:(Ue==null?void 0:Ue.root)||{},externalForwardedProps:Je,additionalProps:{ref:ce,slotProps:{backdrop:{invisible:!0}},container:Nt,open:Be},ownerState:an,className:clsx(Zt.root,Re)}),{slotProps:Xe}=Ye,Pt=_objectWithoutPropertiesLoose$2(Ye,_excluded3);return jsxRuntimeExports.jsx(Yt,_extends$2({},Pt,!isHostComponent(Yt)&&{slotProps:Xe,disableScrollLock:Ze},{children:jsxRuntimeExports.jsx(qe,_extends$2({appear:!0,in:Be,onEntering:vn,onExited:Sn,timeout:Cn},Dt,{children:jsxRuntimeExports.jsx(Jt,_extends$2({},hn,{children:$e}))}))}))}),Popover$1=Popover;function getMenuUtilityClass(ne){return generateUtilityClass$2("MuiMenu",ne)}generateUtilityClasses$2("MuiMenu",["root","paper","list"]);const _excluded$m=["onEntering"],_excluded2$2=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},useUtilityClasses$h=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,oe)},MenuRoot=styled$1(Popover$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),MenuPaper=styled$1(PopoverPaper,{name:"MuiMenu",slot:"Paper",overridesResolver:(ne,oe)=>oe.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),MenuMenuList=styled$1(MenuList$1,{name:"MuiMenu",slot:"List",overridesResolver:(ne,oe)=>oe.list})({outline:0}),Menu=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiMenu"}),{autoFocus:ge=!0,children:ye,className:ve,disableAutoFocusItem:xe=!1,MenuListProps:_e={},onClose:Se,open:$e,PaperProps:Re={},PopoverClasses:Ae,transitionDuration:Ie="auto",TransitionProps:{onEntering:ke}={},variant:Be="selectedMenu",slots:Ne={},slotProps:Fe={}}=me,Ue=_objectWithoutPropertiesLoose$2(me.TransitionProps,_excluded$m),We=_objectWithoutPropertiesLoose$2(me,_excluded2$2),qe=useRtl(),ze=_extends$2({},me,{autoFocus:ge,disableAutoFocusItem:xe,MenuListProps:_e,onEntering:ke,PaperProps:Re,transitionDuration:Ie,TransitionProps:Ue,variant:Be}),Ge=useUtilityClasses$h(ze),Ze=ge&&!xe&&$e,Dt=reactExports.useRef(null),Je=(Kt,Wt)=>{Dt.current&&Dt.current.adjustStyleForScrollbar(Kt,{direction:qe?"rtl":"ltr"}),ke&&ke(Kt,Wt)},Ut=Kt=>{Kt.key==="Tab"&&(Kt.preventDefault(),Se&&Se(Kt,"tabKeyDown"))};let jt=-1;reactExports.Children.map(ye,(Kt,Wt)=>{reactExports.isValidElement(Kt)&&(Kt.props.disabled||(Be==="selectedMenu"&&Kt.props.selected||jt===-1)&&(jt=Wt))});const Ke=(ue=Ne.paper)!=null?ue:MenuPaper,an=(pe=Fe.paper)!=null?pe:Re,Zt=useSlotProps({elementType:Ne.root,externalSlotProps:Fe.root,ownerState:ze,className:[Ge.root,ve]}),en=useSlotProps({elementType:Ke,externalSlotProps:an,ownerState:ze,className:Ge.paper});return jsxRuntimeExports.jsx(MenuRoot,_extends$2({onClose:Se,anchorOrigin:{vertical:"bottom",horizontal:qe?"right":"left"},transformOrigin:qe?RTL_ORIGIN:LTR_ORIGIN,slots:{paper:Ke,root:Ne.root},slotProps:{root:Zt,paper:en},open:$e,ref:ce,transitionDuration:Ie,TransitionProps:_extends$2({onEntering:Je},Ue),ownerState:ze},We,{classes:Ae,children:jsxRuntimeExports.jsx(MenuMenuList,_extends$2({onKeyDown:Ut,actions:Dt,autoFocus:ge&&(jt===-1||xe),autoFocusItem:Ze,variant:Be},_e,{className:clsx(Ge.list,_e.className),children:ye}))}))}),Menu$1=Menu;function getMenuItemUtilityClass(ne){return generateUtilityClass$2("MuiMenuItem",ne)}const menuItemClasses=generateUtilityClasses$2("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),menuItemClasses$1=menuItemClasses,_excluded$l=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],overridesResolver=(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.dense&&oe.dense,ce.divider&&oe.divider,!ce.disableGutters&&oe.gutters]},useUtilityClasses$g=ne=>{const{disabled:oe,dense:ce,divider:ue,disableGutters:pe,selected:me,classes:ge}=ne,ve=composeClasses$1({root:["root",ce&&"dense",oe&&"disabled",!pe&&"gutters",ue&&"divider",me&&"selected"]},getMenuItemUtilityClass,ge);return _extends$2({},ge,ve)},MenuItemRoot=styled$1(ButtonBase$1,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({},ne.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!oe.disableGutters&&{paddingLeft:16,paddingRight:16},oe.divider&&{borderBottom:`1px solid ${(ne.vars||ne).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(ne.vars||ne).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${menuItemClasses$1.selected}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity),[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.focusOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.focusOpacity)}},[`&.${menuItemClasses$1.selected}:hover`]:{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / calc(${ne.vars.palette.action.selectedOpacity} + ${ne.vars.palette.action.hoverOpacity}))`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity+ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.primary.mainChannel} / ${ne.vars.palette.action.selectedOpacity})`:alpha_1(ne.palette.primary.main,ne.palette.action.selectedOpacity)}},[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:(ne.vars||ne).palette.action.focus},[`&.${menuItemClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity},[`& + .${dividerClasses$1.root}`]:{marginTop:ne.spacing(1),marginBottom:ne.spacing(1)},[`& + .${dividerClasses$1.inset}`]:{marginLeft:52},[`& .${listItemTextClasses$1.root}`]:{marginTop:0,marginBottom:0},[`& .${listItemTextClasses$1.inset}`]:{paddingLeft:36},[`& .${listItemIconClasses$1.root}`]:{minWidth:36}},!oe.dense&&{[ne.breakpoints.up("sm")]:{minHeight:"auto"}},oe.dense&&_extends$2({minHeight:32,paddingTop:4,paddingBottom:4},ne.typography.body2,{[`& .${listItemIconClasses$1.root} svg`]:{fontSize:"1.25rem"}}))),MenuItem=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiMenuItem"}),{autoFocus:pe=!1,component:me="li",dense:ge=!1,divider:ye=!1,disableGutters:ve=!1,focusVisibleClassName:xe,role:_e="menuitem",tabIndex:Se,className:$e}=ue,Re=_objectWithoutPropertiesLoose$2(ue,_excluded$l),Ae=reactExports.useContext(ListContext$1),Ie=reactExports.useMemo(()=>({dense:ge||Ae.dense||!1,disableGutters:ve}),[Ae.dense,ge,ve]),ke=reactExports.useRef(null);useEnhancedEffect$1(()=>{pe&&ke.current&&ke.current.focus()},[pe]);const Be=_extends$2({},ue,{dense:Ie.dense,divider:ye,disableGutters:ve}),Ne=useUtilityClasses$g(ue),Fe=useForkRef(ke,ce);let Ue;return ue.disabled||(Ue=Se!==void 0?Se:-1),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Ie,children:jsxRuntimeExports.jsx(MenuItemRoot,_extends$2({ref:Fe,role:_e,tabIndex:Ue,component:me,focusVisibleClassName:clsx(Ne.focusVisible,xe),className:clsx(Ne.root,$e)},Re,{ownerState:Be,classes:Ne}))})}),MenuItem$1=MenuItem;function getNativeSelectUtilityClasses(ne){return generateUtilityClass$2("MuiNativeSelect",ne)}const nativeSelectClasses=generateUtilityClasses$2("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),nativeSelectClasses$1=nativeSelectClasses,_excluded$k=["className","disabled","error","IconComponent","inputRef","variant"],useUtilityClasses$f=ne=>{const{classes:oe,variant:ce,disabled:ue,multiple:pe,open:me,error:ge}=ne,ye={select:["select",ce,ue&&"disabled",pe&&"multiple",ge&&"error"],icon:["icon",`icon${capitalize$1(ce)}`,me&&"iconOpen",ue&&"disabled"]};return composeClasses$1(ye,getNativeSelectUtilityClasses,oe)},nativeSelectSelectStyles=({ownerState:ne,theme:oe})=>_extends$2({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":_extends$2({},oe.vars?{backgroundColor:`rgba(${oe.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:oe.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${nativeSelectClasses$1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(oe.vars||oe).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},ne.variant==="filled"&&{"&&&":{paddingRight:32}},ne.variant==="outlined"&&{borderRadius:(oe.vars||oe).shape.borderRadius,"&:focus":{borderRadius:(oe.vars||oe).shape.borderRadius},"&&&":{paddingRight:32}}),NativeSelectSelect=styled$1("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp$1,overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.select,oe[ce.variant],ce.error&&oe.error,{[`&.${nativeSelectClasses$1.multiple}`]:oe.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:ne,theme:oe})=>_extends$2({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(oe.vars||oe).palette.action.active,[`&.${nativeSelectClasses$1.disabled}`]:{color:(oe.vars||oe).palette.action.disabled}},ne.open&&{transform:"rotate(180deg)"},ne.variant==="filled"&&{right:7},ne.variant==="outlined"&&{right:7}),NativeSelectIcon=styled$1("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.icon,ce.variant&&oe[`icon${capitalize$1(ce.variant)}`],ce.open&&oe.iconOpen]}})(nativeSelectIconStyles),NativeSelectInput=reactExports.forwardRef(function(oe,ce){const{className:ue,disabled:pe,error:me,IconComponent:ge,inputRef:ye,variant:ve="standard"}=oe,xe=_objectWithoutPropertiesLoose$2(oe,_excluded$k),_e=_extends$2({},oe,{disabled:pe,variant:ve,error:me}),Se=useUtilityClasses$f(_e);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(NativeSelectSelect,_extends$2({ownerState:_e,className:clsx(Se.select,ue),disabled:pe,ref:ye||ce},xe)),oe.multiple?null:jsxRuntimeExports.jsx(NativeSelectIcon,{as:ge,ownerState:_e,className:Se.icon})]})}),NativeSelectInput$1=NativeSelectInput;var _span$1;const _excluded$j=["children","classes","className","label","notched"],NotchedOutlineRoot$1=styled$1("fieldset",{shouldForwardProp:rootShouldForwardProp$1})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),NotchedOutlineLegend=styled$1("legend",{shouldForwardProp:rootShouldForwardProp$1})(({ownerState:ne,theme:oe})=>_extends$2({float:"unset",width:"auto",overflow:"hidden"},!ne.withLabel&&{padding:0,lineHeight:"11px",transition:oe.transitions.create("width",{duration:150,easing:oe.transitions.easing.easeOut})},ne.withLabel&&_extends$2({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:oe.transitions.create("max-width",{duration:50,easing:oe.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},ne.notched&&{maxWidth:"100%",transition:oe.transitions.create("max-width",{duration:100,easing:oe.transitions.easing.easeOut,delay:50})})));function NotchedOutline(ne){const{className:oe,label:ce,notched:ue}=ne,pe=_objectWithoutPropertiesLoose$2(ne,_excluded$j),me=ce!=null&&ce!=="",ge=_extends$2({},ne,{notched:ue,withLabel:me});return jsxRuntimeExports.jsx(NotchedOutlineRoot$1,_extends$2({"aria-hidden":!0,className:oe,ownerState:ge},pe,{children:jsxRuntimeExports.jsx(NotchedOutlineLegend,{ownerState:ge,children:me?jsxRuntimeExports.jsx("span",{children:ce}):_span$1||(_span$1=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"}))})}))}const _excluded$i=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],useUtilityClasses$e=ne=>{const{classes:oe}=ne,ue=composeClasses$1({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,oe);return _extends$2({},oe,ue)},OutlinedInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:ne=>rootShouldForwardProp$1(ne)||ne==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:ne,ownerState:oe})=>{const ce=ne.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return _extends$2({position:"relative",borderRadius:(ne.vars||ne).shape.borderRadius,[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette.text.primary},"@media (hover: none)":{[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:ne.vars?`rgba(${ne.vars.palette.common.onBackgroundChannel} / 0.23)`:ce}},[`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette[oe.color].main,borderWidth:2},[`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette.error.main},[`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(ne.vars||ne).palette.action.disabled}},oe.startAdornment&&{paddingLeft:14},oe.endAdornment&&{paddingRight:14},oe.multiline&&_extends$2({padding:"16.5px 14px"},oe.size==="small"&&{padding:"8.5px 14px"}))}),NotchedOutlineRoot=styled$1(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(ne,oe)=>oe.notchedOutline})(({theme:ne})=>{const oe=ne.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:ne.vars?`rgba(${ne.vars.palette.common.onBackgroundChannel} / 0.23)`:oe}}),OutlinedInputInput=styled$1(InputBaseComponent,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:ne,ownerState:oe})=>_extends$2({padding:"16.5px 14px"},!ne.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:ne.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:ne.palette.mode==="light"?null:"#fff",caretColor:ne.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},ne.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[ne.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},oe.size==="small"&&{padding:"8.5px 14px"},oe.multiline&&{padding:0},oe.startAdornment&&{paddingLeft:0},oe.endAdornment&&{paddingRight:0})),OutlinedInput=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye;const ve=useThemeProps$3({props:oe,name:"MuiOutlinedInput"}),{components:xe={},fullWidth:_e=!1,inputComponent:Se="input",label:$e,multiline:Re=!1,notched:Ae,slots:Ie={},type:ke="text"}=ve,Be=_objectWithoutPropertiesLoose$2(ve,_excluded$i),Ne=useUtilityClasses$e(ve),Fe=useFormControl(),Ue=formControlState({props:ve,muiFormControl:Fe,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),We=_extends$2({},ve,{color:Ue.color||"primary",disabled:Ue.disabled,error:Ue.error,focused:Ue.focused,formControl:Fe,fullWidth:_e,hiddenLabel:Ue.hiddenLabel,multiline:Re,size:Ue.size,type:ke}),qe=(ue=(pe=Ie.root)!=null?pe:xe.Root)!=null?ue:OutlinedInputRoot,ze=(me=(ge=Ie.input)!=null?ge:xe.Input)!=null?me:OutlinedInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$2({slots:{root:qe,input:ze},renderSuffix:Ge=>jsxRuntimeExports.jsx(NotchedOutlineRoot,{ownerState:We,className:Ne.notchedOutline,label:$e!=null&&$e!==""&&Ue.required?ye||(ye=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[$e," ","*"]})):$e,notched:typeof Ae<"u"?Ae:!!(Ge.startAdornment||Ge.filled||Ge.focused)}),fullWidth:_e,inputComponent:Se,multiline:Re,ref:ce,type:ke},Be,{classes:_extends$2({},Ne,{notchedOutline:null})}))});OutlinedInput.muiName="Input";const OutlinedInput$1=OutlinedInput;function getSelectUtilityClasses(ne){return generateUtilityClass$2("MuiSelect",ne)}const selectClasses=generateUtilityClasses$2("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),selectClasses$1=selectClasses;var _span;const _excluded$h=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],SelectSelect=styled$1("div",{name:"MuiSelect",slot:"Select",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`&.${selectClasses$1.select}`]:oe.select},{[`&.${selectClasses$1.select}`]:oe[ce.variant]},{[`&.${selectClasses$1.error}`]:oe.error},{[`&.${selectClasses$1.multiple}`]:oe.multiple}]}})(nativeSelectSelectStyles,{[`&.${selectClasses$1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SelectIcon=styled$1("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.icon,ce.variant&&oe[`icon${capitalize$1(ce.variant)}`],ce.open&&oe.iconOpen]}})(nativeSelectIconStyles),SelectNativeInput=styled$1("input",{shouldForwardProp:ne=>slotShouldForwardProp(ne)&&ne!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(ne,oe)=>oe.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function areEqualValues(ne,oe){return typeof oe=="object"&&oe!==null?ne===oe:String(ne)===String(oe)}function isEmpty$2(ne){return ne==null||typeof ne=="string"&&!ne.trim()}const useUtilityClasses$d=ne=>{const{classes:oe,variant:ce,disabled:ue,multiple:pe,open:me,error:ge}=ne,ye={select:["select",ce,ue&&"disabled",pe&&"multiple",ge&&"error"],icon:["icon",`icon${capitalize$1(ce)}`,me&&"iconOpen",ue&&"disabled"],nativeInput:["nativeInput"]};return composeClasses$1(ye,getSelectUtilityClasses,oe)},SelectInput=reactExports.forwardRef(function(oe,ce){var ue;const{"aria-describedby":pe,"aria-label":me,autoFocus:ge,autoWidth:ye,children:ve,className:xe,defaultOpen:_e,defaultValue:Se,disabled:$e,displayEmpty:Re,error:Ae=!1,IconComponent:Ie,inputRef:ke,labelId:Be,MenuProps:Ne={},multiple:Fe,name:Ue,onBlur:We,onChange:qe,onClose:ze,onFocus:Ge,onOpen:Ze,open:Dt,readOnly:Je,renderValue:Ut,SelectDisplayProps:jt={},tabIndex:Ke,value:an,variant:Zt="standard"}=oe,en=_objectWithoutPropertiesLoose$2(oe,_excluded$h),[Kt,Wt]=useControlled({controlled:an,default:Se,name:"Select"}),[un,Xt]=useControlled({controlled:Dt,default:_e,name:"Select"}),nn=reactExports.useRef(null),vn=reactExports.useRef(null),[Sn,Cn]=reactExports.useState(null),{current:Nt}=reactExports.useRef(Dt!=null),[Yt,Jt]=reactExports.useState(),hn=useForkRef(ce,ke),Ye=reactExports.useCallback(Wn=>{vn.current=Wn,Wn&&Cn(Wn)},[]),Xe=Sn==null?void 0:Sn.parentNode;reactExports.useImperativeHandle(hn,()=>({focus:()=>{vn.current.focus()},node:nn.current,value:Kt}),[Kt]),reactExports.useEffect(()=>{_e&&un&&Sn&&!Nt&&(Jt(ye?null:Xe.clientWidth),vn.current.focus())},[Sn,ye]),reactExports.useEffect(()=>{ge&&vn.current.focus()},[ge]),reactExports.useEffect(()=>{if(!Be)return;const Wn=ownerDocument(vn.current).getElementById(Be);if(Wn){const dn=()=>{getSelection().isCollapsed&&vn.current.focus()};return Wn.addEventListener("click",dn),()=>{Wn.removeEventListener("click",dn)}}},[Be]);const Pt=(Wn,dn)=>{Wn?Ze&&Ze(dn):ze&&ze(dn),Nt||(Jt(ye?null:Xe.clientWidth),Xt(Wn))},sn=Wn=>{Wn.button===0&&(Wn.preventDefault(),vn.current.focus(),Pt(!0,Wn))},yn=Wn=>{Pt(!1,Wn)},qt=reactExports.Children.toArray(ve),wn=Wn=>{const dn=qt.find(Bn=>Bn.props.value===Wn.target.value);dn!==void 0&&(Wt(dn.props.value),qe&&qe(Wn,dn))},Tn=Wn=>dn=>{let Bn;if(dn.currentTarget.hasAttribute("tabindex")){if(Fe){Bn=Array.isArray(Kt)?Kt.slice():[];const mn=Kt.indexOf(Wn.props.value);mn===-1?Bn.push(Wn.props.value):Bn.splice(mn,1)}else Bn=Wn.props.value;if(Wn.props.onClick&&Wn.props.onClick(dn),Kt!==Bn&&(Wt(Bn),qe)){const mn=dn.nativeEvent||dn,Pn=new mn.constructor(mn.type,mn);Object.defineProperty(Pn,"target",{writable:!0,value:{value:Bn,name:Ue}}),qe(Pn,Wn)}Fe||Pt(!1,dn)}},xn=Wn=>{Je||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Wn.key)!==-1&&(Wn.preventDefault(),Pt(!0,Wn))},Nn=Sn!==null&&un,zn=Wn=>{!Nn&&We&&(Object.defineProperty(Wn,"target",{writable:!0,value:{value:Kt,name:Ue}}),We(Wn))};delete en["aria-invalid"];let Yn,Kn;const Rn=[];let Mn=!1;(isFilled({value:Kt})||Re)&&(Ut?Yn=Ut(Kt):Mn=!0);const Xn=qt.map(Wn=>{if(!reactExports.isValidElement(Wn))return null;let dn;if(Fe){if(!Array.isArray(Kt))throw new Error(formatMuiErrorMessage$1(2));dn=Kt.some(Bn=>areEqualValues(Bn,Wn.props.value)),dn&&Mn&&Rn.push(Wn.props.children)}else dn=areEqualValues(Kt,Wn.props.value),dn&&Mn&&(Kn=Wn.props.children);return reactExports.cloneElement(Wn,{"aria-selected":dn?"true":"false",onClick:Tn(Wn),onKeyUp:Bn=>{Bn.key===" "&&Bn.preventDefault(),Wn.props.onKeyUp&&Wn.props.onKeyUp(Bn)},role:"option",selected:dn,value:void 0,"data-value":Wn.props.value})});Mn&&(Fe?Rn.length===0?Yn=null:Yn=Rn.reduce((Wn,dn,Bn)=>(Wn.push(dn),Bn{const{classes:oe}=ne;return oe},styledRootConfig={name:"MuiSelect",overridesResolver:(ne,oe)=>oe.root,shouldForwardProp:ne=>rootShouldForwardProp$1(ne)&&ne!=="variant",slot:"Root"},StyledInput=styled$1(Input$1,styledRootConfig)(""),StyledOutlinedInput=styled$1(OutlinedInput$1,styledRootConfig)(""),StyledFilledInput=styled$1(FilledInput$1,styledRootConfig)(""),Select$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({name:"MuiSelect",props:oe}),{autoWidth:pe=!1,children:me,classes:ge={},className:ye,defaultOpen:ve=!1,displayEmpty:xe=!1,IconComponent:_e=ArrowDropDownIcon,id:Se,input:$e,inputProps:Re,label:Ae,labelId:Ie,MenuProps:ke,multiple:Be=!1,native:Ne=!1,onClose:Fe,onOpen:Ue,open:We,renderValue:qe,SelectDisplayProps:ze,variant:Ge="outlined"}=ue,Ze=_objectWithoutPropertiesLoose$2(ue,_excluded$g),Dt=Ne?NativeSelectInput$1:SelectInput$1,Je=useFormControl(),Ut=formControlState({props:ue,muiFormControl:Je,states:["variant","error"]}),jt=Ut.variant||Ge,Ke=_extends$2({},ue,{variant:jt,classes:ge}),an=useUtilityClasses$c(Ke),Zt=_objectWithoutPropertiesLoose$2(an,_excluded2$1),en=$e||{standard:jsxRuntimeExports.jsx(StyledInput,{ownerState:Ke}),outlined:jsxRuntimeExports.jsx(StyledOutlinedInput,{label:Ae,ownerState:Ke}),filled:jsxRuntimeExports.jsx(StyledFilledInput,{ownerState:Ke})}[jt],Kt=useForkRef(ce,en.ref);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(en,_extends$2({inputComponent:Dt,inputProps:_extends$2({children:me,error:Ut.error,IconComponent:_e,variant:jt,type:void 0,multiple:Be},Ne?{id:Se}:{autoWidth:pe,defaultOpen:ve,displayEmpty:xe,labelId:Ie,MenuProps:ke,onClose:Fe,onOpen:Ue,open:We,renderValue:qe,SelectDisplayProps:_extends$2({id:Se},ze)},Re,{classes:Re?deepmerge$1(Zt,Re.classes):Zt},$e?$e.props.inputProps:{})},(Be&&Ne||xe)&&jt==="outlined"?{notched:!0}:{},{ref:Kt,className:clsx(en.props.className,ye,an.root)},!$e&&{variant:jt},Ze))})});Select$1.muiName="Select";const Select$2=Select$1;function getSkeletonUtilityClass(ne){return generateUtilityClass$2("MuiSkeleton",ne)}generateUtilityClasses$2("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const _excluded$f=["animation","className","component","height","style","variant","width"];let _$7=ne=>ne,_t$1,_t2,_t3,_t4;const useUtilityClasses$b=ne=>{const{classes:oe,variant:ce,animation:ue,hasChildren:pe,width:me,height:ge}=ne;return composeClasses$1({root:["root",ce,ue,pe&&"withChildren",pe&&!me&&"fitContent",pe&&!ge&&"heightAuto"]},getSkeletonUtilityClass,oe)},pulseKeyframe=keyframes(_t$1||(_t$1=_$7` 0% { opacity: 1; } @@ -247,7 +247,7 @@ var s0=Object.defineProperty;var l0=(ne,oe,ce)=>oe in ne?s0(ne,oe,{enumerable:!0 right: 0; top: 0; } - `),waveKeyframe,(oe.vars||oe).palette.action.hover)),Skeleton$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSkeleton"}),{animation:pe="pulse",className:me,component:ge="span",height:ye,style:ve,variant:xe="text",width:_e}=ue,Se=_objectWithoutPropertiesLoose$2(ue,_excluded$f),$e=_extends$2({},ue,{animation:pe,component:ge,variant:xe,hasChildren:!!Se.children}),Re=useUtilityClasses$b($e);return jsxRuntimeExports.jsx(SkeletonRoot,_extends$2({as:ge,ref:ce,className:clsx(Re.root,me),ownerState:$e},Se,{style:_extends$2({width:_e,height:ye},ve)}))}),Placeholder$3=Skeleton$1,shouldSpreadAdditionalProps=ne=>!ne||!isHostComponent(ne),shouldSpreadAdditionalProps$1=shouldSpreadAdditionalProps;function getSliderUtilityClass(ne){return generateUtilityClass$2("MuiSlider",ne)}const sliderClasses=generateUtilityClasses$2("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),sliderClasses$1=sliderClasses,useValueLabelClasses=ne=>{const{open:oe}=ne;return{offset:clsx(oe&&sliderClasses$1.valueLabelOpen),circle:sliderClasses$1.valueLabelCircle,label:sliderClasses$1.valueLabelLabel}};function SliderValueLabel$1(ne){const{children:oe,className:ce,value:ue}=ne,pe=useValueLabelClasses(ne);return oe?reactExports.cloneElement(oe,{className:clsx(oe.props.className)},jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[oe.props.children,jsxRuntimeExports.jsx("span",{className:clsx(pe.offset,ce),"aria-hidden":!0,children:jsxRuntimeExports.jsx("span",{className:pe.circle,children:jsxRuntimeExports.jsx("span",{className:pe.label,children:ue})})})]})):null}const _excluded$e=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],useThemeProps$1=createUseThemeProps();function Identity(ne){return ne}const SliderRoot=styled$1("span",{name:"MuiSlider",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`color${capitalize$1(ce.color)}`],ce.size!=="medium"&&oe[`size${capitalize$1(ce.size)}`],ce.marked&&oe.marked,ce.orientation==="vertical"&&oe.vertical,ce.track==="inverted"&&oe.trackInverted,ce.track===!1&&oe.trackFalse]}})(({theme:ne})=>{var oe;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${sliderClasses$1.disabled}`]:{pointerEvents:"none",cursor:"default",color:(ne.vars||ne).palette.grey[400]},[`&.${sliderClasses$1.dragging}`]:{[`& .${sliderClasses$1.thumb}, & .${sliderClasses$1.track}`]:{transition:"none"}},variants:[...Object.keys(((oe=ne.vars)!=null?oe:ne).palette).filter(ce=>{var ue;return((ue=ne.vars)!=null?ue:ne).palette[ce].main}).map(ce=>({props:{color:ce},style:{color:(ne.vars||ne).palette[ce].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),SliderRail=styled$1("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(ne,oe)=>oe.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),SliderTrack=styled$1("span",{name:"MuiSlider",slot:"Track",overridesResolver:(ne,oe)=>oe.track})(({theme:ne})=>{var oe;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:ne.transitions.create(["left","width","bottom","height"],{duration:ne.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((oe=ne.vars)!=null?oe:ne).palette).filter(ce=>{var ue;return((ue=ne.vars)!=null?ue:ne).palette[ce].main}).map(ce=>({props:{color:ce,track:"inverted"},style:_extends$2({},ne.vars?{backgroundColor:ne.vars.palette.Slider[`${ce}Track`],borderColor:ne.vars.palette.Slider[`${ce}Track`]}:_extends$2({backgroundColor:lighten_1(ne.palette[ce].main,.62),borderColor:lighten_1(ne.palette[ce].main,.62)},ne.applyStyles("dark",{backgroundColor:darken_1(ne.palette[ce].main,.5)}),ne.applyStyles("dark",{borderColor:darken_1(ne.palette[ce].main,.5)})))}))]}}),SliderThumb=styled$1("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.thumb,oe[`thumbColor${capitalize$1(ce.color)}`],ce.size!=="medium"&&oe[`thumbSize${capitalize$1(ce.size)}`]]}})(({theme:ne})=>{var oe;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:ne.transitions.create(["box-shadow","left","bottom"],{duration:ne.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(ne.vars||ne).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${sliderClasses$1.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((oe=ne.vars)!=null?oe:ne).palette).filter(ce=>{var ue;return((ue=ne.vars)!=null?ue:ne).palette[ce].main}).map(ce=>({props:{color:ce},style:{[`&:hover, &.${sliderClasses$1.focusVisible}`]:_extends$2({},ne.vars?{boxShadow:`0px 0px 0px 8px rgba(${ne.vars.palette[ce].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${alpha_1(ne.palette[ce].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${sliderClasses$1.active}`]:_extends$2({},ne.vars?{boxShadow:`0px 0px 0px 14px rgba(${ne.vars.palette[ce].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${alpha_1(ne.palette[ce].main,.16)}`})}}))]}}),SliderValueLabel=styled$1(SliderValueLabel$1,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(ne,oe)=>oe.valueLabel})(({theme:ne})=>_extends$2({zIndex:1,whiteSpace:"nowrap"},ne.typography.body2,{fontWeight:500,transition:ne.transitions.create(["transform"],{duration:ne.transitions.duration.shortest}),position:"absolute",backgroundColor:(ne.vars||ne).palette.grey[600],borderRadius:2,color:(ne.vars||ne).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${sliderClasses$1.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${sliderClasses$1.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:ne.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),SliderMark=styled$1("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:ne=>slotShouldForwardProp(ne)&&ne!=="markActive",overridesResolver:(ne,oe)=>{const{markActive:ce}=ne;return[oe.mark,ce&&oe.markActive]}})(({theme:ne})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(ne.vars||ne).palette.background.paper,opacity:.8}}]})),SliderMarkLabel=styled$1("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:ne=>slotShouldForwardProp(ne)&&ne!=="markLabelActive",overridesResolver:(ne,oe)=>oe.markLabel})(({theme:ne})=>_extends$2({},ne.typography.body2,{color:(ne.vars||ne).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(ne.vars||ne).palette.text.primary}}]})),useUtilityClasses$a=ne=>{const{disabled:oe,dragging:ce,marked:ue,orientation:pe,track:me,classes:ge,color:ye,size:ve}=ne,xe={root:["root",oe&&"disabled",ce&&"dragging",ue&&"marked",pe==="vertical"&&"vertical",me==="inverted"&&"trackInverted",me===!1&&"trackFalse",ye&&`color${capitalize$1(ye)}`,ve&&`size${capitalize$1(ve)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",oe&&"disabled",ve&&`thumbSize${capitalize$1(ve)}`,ye&&`thumbColor${capitalize$1(ye)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return composeClasses$1(xe,getSliderUtilityClass,ge)},Forward=({children:ne})=>ne,Slider=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae,Ie,ke,Be,Ne,Fe,Ue,We,qe,ze,Ge,Ze,Dt;const Je=useThemeProps$1({props:oe,name:"MuiSlider"}),Ut=useRtl(),{"aria-label":jt,"aria-valuetext":Ke,"aria-labelledby":an,component:Zt="span",components:en={},componentsProps:Kt={},color:Wt="primary",classes:un,className:Xt,disableSwap:nn=!1,disabled:vn=!1,getAriaLabel:Sn,getAriaValueText:Cn,marks:Nt=!1,max:Yt=100,min:Jt=0,orientation:hn="horizontal",shiftStep:Ye=10,size:Xe="medium",step:Pt=1,scale:sn=Identity,slotProps:yn,slots:qt,track:wn="normal",valueLabelDisplay:Tn="off",valueLabelFormat:xn=Identity}=Je,Nn=_objectWithoutPropertiesLoose$2(Je,_excluded$e),zn=_extends$2({},Je,{isRtl:Ut,max:Yt,min:Jt,classes:un,disabled:vn,disableSwap:nn,orientation:hn,marks:Nt,color:Wt,size:Xe,step:Pt,shiftStep:Ye,scale:sn,track:wn,valueLabelDisplay:Tn,valueLabelFormat:xn}),{axisProps:Yn,getRootProps:Kn,getHiddenInputProps:Rn,getThumbProps:Mn,open:Xn,active:Jn,axis:pn,focusedThumbIndex:tn,range:Gt,dragging:bn,marks:kn,values:jn,trackOffset:Wn,trackLeap:dn,getThumbStyle:Bn}=useSlider(_extends$2({},zn,{rootRef:ce}));zn.marked=kn.length>0&&kn.some(oi=>oi.label),zn.dragging=bn,zn.focusedThumbIndex=tn;const mn=useUtilityClasses$a(zn),Pn=(ue=(pe=qt==null?void 0:qt.root)!=null?pe:en.Root)!=null?ue:SliderRoot,ur=(me=(ge=qt==null?void 0:qt.rail)!=null?ge:en.Rail)!=null?me:SliderRail,er=(ye=(ve=qt==null?void 0:qt.track)!=null?ve:en.Track)!=null?ye:SliderTrack,_r=(xe=(_e=qt==null?void 0:qt.thumb)!=null?_e:en.Thumb)!=null?xe:SliderThumb,dr=(Se=($e=qt==null?void 0:qt.valueLabel)!=null?$e:en.ValueLabel)!=null?Se:SliderValueLabel,Sr=(Re=(Ae=qt==null?void 0:qt.mark)!=null?Ae:en.Mark)!=null?Re:SliderMark,sr=(Ie=(ke=qt==null?void 0:qt.markLabel)!=null?ke:en.MarkLabel)!=null?Ie:SliderMarkLabel,nr=(Be=(Ne=qt==null?void 0:qt.input)!=null?Ne:en.Input)!=null?Be:"input",kr=(Fe=yn==null?void 0:yn.root)!=null?Fe:Kt.root,Mr=(Ue=yn==null?void 0:yn.rail)!=null?Ue:Kt.rail,Rr=(We=yn==null?void 0:yn.track)!=null?We:Kt.track,Yr=(qe=yn==null?void 0:yn.thumb)!=null?qe:Kt.thumb,li=(ze=yn==null?void 0:yn.valueLabel)!=null?ze:Kt.valueLabel,ei=(Ge=yn==null?void 0:yn.mark)!=null?Ge:Kt.mark,Pr=(Ze=yn==null?void 0:yn.markLabel)!=null?Ze:Kt.markLabel,hi=(Dt=yn==null?void 0:yn.input)!=null?Dt:Kt.input,mi=useSlotProps({elementType:Pn,getSlotProps:Kn,externalSlotProps:kr,externalForwardedProps:Nn,additionalProps:_extends$2({},shouldSpreadAdditionalProps$1(Pn)&&{as:Zt}),ownerState:_extends$2({},zn,kr==null?void 0:kr.ownerState),className:[mn.root,Xt]}),yi=useSlotProps({elementType:ur,externalSlotProps:Mr,ownerState:zn,className:mn.rail}),Gi=useSlotProps({elementType:er,externalSlotProps:Rr,additionalProps:{style:_extends$2({},Yn[pn].offset(Wn),Yn[pn].leap(dn))},ownerState:_extends$2({},zn,Rr==null?void 0:Rr.ownerState),className:mn.track}),gi=useSlotProps({elementType:_r,getSlotProps:Mn,externalSlotProps:Yr,ownerState:_extends$2({},zn,Yr==null?void 0:Yr.ownerState),className:mn.thumb}),xi=useSlotProps({elementType:dr,externalSlotProps:li,ownerState:_extends$2({},zn,li==null?void 0:li.ownerState),className:mn.valueLabel}),Ni=useSlotProps({elementType:Sr,externalSlotProps:ei,ownerState:zn,className:mn.mark}),fi=useSlotProps({elementType:sr,externalSlotProps:Pr,ownerState:zn,className:mn.markLabel}),bi=useSlotProps({elementType:nr,getSlotProps:Rn,externalSlotProps:hi,ownerState:zn});return jsxRuntimeExports.jsxs(Pn,_extends$2({},mi,{children:[jsxRuntimeExports.jsx(ur,_extends$2({},yi)),jsxRuntimeExports.jsx(er,_extends$2({},Gi)),kn.filter(oi=>oi.value>=Jt&&oi.value<=Yt).map((oi,ki)=>{const Co=valueToPercent(oi.value,Jt,Yt),Wi=Yn[pn].offset(Co);let Di;return wn===!1?Di=jn.indexOf(oi.value)!==-1:Di=wn==="normal"&&(Gt?oi.value>=jn[0]&&oi.value<=jn[jn.length-1]:oi.value<=jn[0])||wn==="inverted"&&(Gt?oi.value<=jn[0]||oi.value>=jn[jn.length-1]:oi.value>=jn[0]),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(Sr,_extends$2({"data-index":ki},Ni,!isHostComponent(Sr)&&{markActive:Di},{style:_extends$2({},Wi,Ni.style),className:clsx(Ni.className,Di&&mn.markActive)})),oi.label!=null?jsxRuntimeExports.jsx(sr,_extends$2({"aria-hidden":!0,"data-index":ki},fi,!isHostComponent(sr)&&{markLabelActive:Di},{style:_extends$2({},Wi,fi.style),className:clsx(mn.markLabel,fi.className,Di&&mn.markLabelActive),children:oi.label})):null]},ki)}),jn.map((oi,ki)=>{const Co=valueToPercent(oi,Jt,Yt),Wi=Yn[pn].offset(Co),Di=Tn==="off"?Forward:dr;return jsxRuntimeExports.jsx(Di,_extends$2({},!isHostComponent(Di)&&{valueLabelFormat:xn,valueLabelDisplay:Tn,value:typeof xn=="function"?xn(sn(oi),ki):xn,index:ki,open:Xn===ki||Jn===ki||Tn==="on",disabled:vn},xi,{children:jsxRuntimeExports.jsx(_r,_extends$2({"data-index":ki},gi,{className:clsx(mn.thumb,gi.className,Jn===ki&&mn.active,tn===ki&&mn.focusVisible),style:_extends$2({},Wi,Bn(ki),gi.style),children:jsxRuntimeExports.jsx(nr,_extends$2({"data-index":ki,"aria-label":Sn?Sn(ki):jt,"aria-valuenow":sn(oi),"aria-labelledby":an,"aria-valuetext":Cn?Cn(sn(oi),ki):Ke,value:jn[ki]},bi))}))}),ki)})]}))}),Slider$1=Slider;function getSnackbarContentUtilityClass(ne){return generateUtilityClass$2("MuiSnackbarContent",ne)}generateUtilityClasses$2("MuiSnackbarContent",["root","message","action"]);const _excluded$d=["action","className","message","role"],useUtilityClasses$9=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],action:["action"],message:["message"]},getSnackbarContentUtilityClass,oe)},SnackbarContentRoot=styled$1(Paper$1,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(ne,oe)=>oe.root})(({theme:ne})=>{const oe=ne.palette.mode==="light"?.8:.98,ce=emphasize_1(ne.palette.background.default,oe);return _extends$2({},ne.typography.body2,{color:ne.vars?ne.vars.palette.SnackbarContent.color:ne.palette.getContrastText(ce),backgroundColor:ne.vars?ne.vars.palette.SnackbarContent.bg:ce,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(ne.vars||ne).shape.borderRadius,flexGrow:1,[ne.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),SnackbarContentMessage=styled$1("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(ne,oe)=>oe.message})({padding:"8px 0"}),SnackbarContentAction=styled$1("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(ne,oe)=>oe.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),SnackbarContent=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSnackbarContent"}),{action:pe,className:me,message:ge,role:ye="alert"}=ue,ve=_objectWithoutPropertiesLoose$2(ue,_excluded$d),xe=ue,_e=useUtilityClasses$9(xe);return jsxRuntimeExports.jsxs(SnackbarContentRoot,_extends$2({role:ye,square:!0,elevation:6,className:clsx(_e.root,me),ownerState:xe,ref:ce},ve,{children:[jsxRuntimeExports.jsx(SnackbarContentMessage,{className:_e.message,ownerState:xe,children:ge}),pe?jsxRuntimeExports.jsx(SnackbarContentAction,{className:_e.action,ownerState:xe,children:pe}):null]}))}),SnackbarContent$1=SnackbarContent;function getSnackbarUtilityClass(ne){return generateUtilityClass$2("MuiSnackbar",ne)}generateUtilityClasses$2("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const _excluded$c=["onEnter","onExited"],_excluded2=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],useUtilityClasses$8=ne=>{const{classes:oe,anchorOrigin:ce}=ne,ue={root:["root",`anchorOrigin${capitalize$1(ce.vertical)}${capitalize$1(ce.horizontal)}`]};return composeClasses$1(ue,getSnackbarUtilityClass,oe)},SnackbarRoot=styled$1("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`anchorOrigin${capitalize$1(ce.anchorOrigin.vertical)}${capitalize$1(ce.anchorOrigin.horizontal)}`]]}})(({theme:ne,ownerState:oe})=>{const ce={left:"50%",right:"auto",transform:"translateX(-50%)"};return _extends$2({zIndex:(ne.vars||ne).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},oe.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},oe.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},oe.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[ne.breakpoints.up("sm")]:_extends$2({},oe.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},oe.anchorOrigin.horizontal==="center"&&ce,oe.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},oe.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),Snackbar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSnackbar"}),pe=useTheme$1(),me={enter:pe.transitions.duration.enteringScreen,exit:pe.transitions.duration.leavingScreen},{action:ge,anchorOrigin:{vertical:ye,horizontal:ve}={vertical:"bottom",horizontal:"left"},autoHideDuration:xe=null,children:_e,className:Se,ClickAwayListenerProps:$e,ContentProps:Re,disableWindowBlurListener:Ae=!1,message:Ie,open:ke,TransitionComponent:Be=Grow$1,transitionDuration:Ne=me,TransitionProps:{onEnter:Fe,onExited:Ue}={}}=ue,We=_objectWithoutPropertiesLoose$2(ue.TransitionProps,_excluded$c),qe=_objectWithoutPropertiesLoose$2(ue,_excluded2),ze=_extends$2({},ue,{anchorOrigin:{vertical:ye,horizontal:ve},autoHideDuration:xe,disableWindowBlurListener:Ae,TransitionComponent:Be,transitionDuration:Ne}),Ge=useUtilityClasses$8(ze),{getRootProps:Ze,onClickAway:Dt}=useSnackbar$1(_extends$2({},ze)),[Je,Ut]=reactExports.useState(!0),jt=useSlotProps({elementType:SnackbarRoot,getSlotProps:Ze,externalForwardedProps:qe,ownerState:ze,additionalProps:{ref:ce},className:[Ge.root,Se]}),Ke=Zt=>{Ut(!0),Ue&&Ue(Zt)},an=(Zt,en)=>{Ut(!1),Fe&&Fe(Zt,en)};return!ke&&Je?null:jsxRuntimeExports.jsx(ClickAwayListener,_extends$2({onClickAway:Dt},$e,{children:jsxRuntimeExports.jsx(SnackbarRoot,_extends$2({},jt,{children:jsxRuntimeExports.jsx(Be,_extends$2({appear:!0,in:ke,timeout:Ne,direction:ye==="top"?"down":"up",onEnter:an,onExited:Ke},We,{children:_e||jsxRuntimeExports.jsx(SnackbarContent$1,_extends$2({message:Ie,action:ge},Re))}))}))}))}),Snackbar$1=Snackbar;function getTooltipUtilityClass(ne){return generateUtilityClass$2("MuiTooltip",ne)}const tooltipClasses=generateUtilityClasses$2("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),tooltipClasses$1=tooltipClasses,_excluded$b=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function round$2(ne){return Math.round(ne*1e5)/1e5}const useUtilityClasses$7=ne=>{const{classes:oe,disableInteractive:ce,arrow:ue,touch:pe,placement:me}=ne,ge={popper:["popper",!ce&&"popperInteractive",ue&&"popperArrow"],tooltip:["tooltip",ue&&"tooltipArrow",pe&&"touch",`tooltipPlacement${capitalize$1(me.split("-")[0])}`],arrow:["arrow"]};return composeClasses$1(ge,getTooltipUtilityClass,oe)},TooltipPopper=styled$1(Popper$1,{name:"MuiTooltip",slot:"Popper",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.popper,!ce.disableInteractive&&oe.popperInteractive,ce.arrow&&oe.popperArrow,!ce.open&&oe.popperClose]}})(({theme:ne,ownerState:oe,open:ce})=>_extends$2({zIndex:(ne.vars||ne).zIndex.tooltip,pointerEvents:"none"},!oe.disableInteractive&&{pointerEvents:"auto"},!ce&&{pointerEvents:"none"},oe.arrow&&{[`&[data-popper-placement*="bottom"] .${tooltipClasses$1.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${tooltipClasses$1.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${tooltipClasses$1.arrow}`]:_extends$2({},oe.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${tooltipClasses$1.arrow}`]:_extends$2({},oe.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),TooltipTooltip=styled$1("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.tooltip,ce.touch&&oe.touch,ce.arrow&&oe.tooltipArrow,oe[`tooltipPlacement${capitalize$1(ce.placement.split("-")[0])}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({backgroundColor:ne.vars?ne.vars.palette.Tooltip.bg:alpha_1(ne.palette.grey[700],.92),borderRadius:(ne.vars||ne).shape.borderRadius,color:(ne.vars||ne).palette.common.white,fontFamily:ne.typography.fontFamily,padding:"4px 8px",fontSize:ne.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:ne.typography.fontWeightMedium},oe.arrow&&{position:"relative",margin:0},oe.touch&&{padding:"8px 16px",fontSize:ne.typography.pxToRem(14),lineHeight:`${round$2(16/14)}em`,fontWeight:ne.typography.fontWeightRegular},{[`.${tooltipClasses$1.popper}[data-popper-placement*="left"] &`]:_extends$2({transformOrigin:"right center"},oe.isRtl?_extends$2({marginLeft:"14px"},oe.touch&&{marginLeft:"24px"}):_extends$2({marginRight:"14px"},oe.touch&&{marginRight:"24px"})),[`.${tooltipClasses$1.popper}[data-popper-placement*="right"] &`]:_extends$2({transformOrigin:"left center"},oe.isRtl?_extends$2({marginRight:"14px"},oe.touch&&{marginRight:"24px"}):_extends$2({marginLeft:"14px"},oe.touch&&{marginLeft:"24px"})),[`.${tooltipClasses$1.popper}[data-popper-placement*="top"] &`]:_extends$2({transformOrigin:"center bottom",marginBottom:"14px"},oe.touch&&{marginBottom:"24px"}),[`.${tooltipClasses$1.popper}[data-popper-placement*="bottom"] &`]:_extends$2({transformOrigin:"center top",marginTop:"14px"},oe.touch&&{marginTop:"24px"})})),TooltipArrow=styled$1("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(ne,oe)=>oe.arrow})(({theme:ne})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:ne.vars?ne.vars.palette.Tooltip.bg:alpha_1(ne.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let hystersisOpen=!1;const hystersisTimer=new Timeout;let cursorPosition={x:0,y:0};function composeEventHandler(ne,oe){return(ce,...ue)=>{oe&&oe(ce,...ue),ne(ce,...ue)}}const Tooltip=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae,Ie,ke,Be,Ne,Fe,Ue,We;const qe=useThemeProps$3({props:oe,name:"MuiTooltip"}),{arrow:ze=!1,children:Ge,components:Ze={},componentsProps:Dt={},describeChild:Je=!1,disableFocusListener:Ut=!1,disableHoverListener:jt=!1,disableInteractive:Ke=!1,disableTouchListener:an=!1,enterDelay:Zt=100,enterNextDelay:en=0,enterTouchDelay:Kt=700,followCursor:Wt=!1,id:un,leaveDelay:Xt=0,leaveTouchDelay:nn=1500,onClose:vn,onOpen:Sn,open:Cn,placement:Nt="bottom",PopperComponent:Yt,PopperProps:Jt={},slotProps:hn={},slots:Ye={},title:Xe,TransitionComponent:Pt=Grow$1,TransitionProps:sn}=qe,yn=_objectWithoutPropertiesLoose$2(qe,_excluded$b),qt=reactExports.isValidElement(Ge)?Ge:jsxRuntimeExports.jsx("span",{children:Ge}),wn=useTheme$1(),Tn=useRtl(),[xn,Nn]=reactExports.useState(),[zn,Yn]=reactExports.useState(null),Kn=reactExports.useRef(!1),Rn=Ke||Wt,Mn=useTimeout(),Xn=useTimeout(),Jn=useTimeout(),pn=useTimeout(),[tn,Gt]=useControlled({controlled:Cn,default:!1,name:"Tooltip",state:"open"});let bn=tn;const kn=useId(un),jn=reactExports.useRef(),Wn=useEventCallback(()=>{jn.current!==void 0&&(document.body.style.WebkitUserSelect=jn.current,jn.current=void 0),pn.clear()});reactExports.useEffect(()=>Wn,[Wn]);const dn=pi=>{hystersisTimer.clear(),hystersisOpen=!0,Gt(!0),Sn&&!bn&&Sn(pi)},Bn=useEventCallback(pi=>{hystersisTimer.start(800+Xt,()=>{hystersisOpen=!1}),Gt(!1),vn&&bn&&vn(pi),Mn.start(wn.transitions.duration.shortest,()=>{Kn.current=!1})}),mn=pi=>{Kn.current&&pi.type!=="touchstart"||(xn&&xn.removeAttribute("title"),Xn.clear(),Jn.clear(),Zt||hystersisOpen&&en?Xn.start(hystersisOpen?en:Zt,()=>{dn(pi)}):dn(pi))},Pn=pi=>{Xn.clear(),Jn.start(Xt,()=>{Bn(pi)})},{isFocusVisibleRef:ur,onBlur:er,onFocus:_r,ref:dr}=useIsFocusVisible(),[,Sr]=reactExports.useState(!1),sr=pi=>{er(pi),ur.current===!1&&(Sr(!1),Pn(pi))},nr=pi=>{xn||Nn(pi.currentTarget),_r(pi),ur.current===!0&&(Sr(!0),mn(pi))},kr=pi=>{Kn.current=!0;const Ki=qt.props;Ki.onTouchStart&&Ki.onTouchStart(pi)},Mr=pi=>{kr(pi),Jn.clear(),Mn.clear(),Wn(),jn.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",pn.start(Kt,()=>{document.body.style.WebkitUserSelect=jn.current,mn(pi)})},Rr=pi=>{qt.props.onTouchEnd&&qt.props.onTouchEnd(pi),Wn(),Jn.start(nn,()=>{Bn(pi)})};reactExports.useEffect(()=>{if(!bn)return;function pi(Ki){(Ki.key==="Escape"||Ki.key==="Esc")&&Bn(Ki)}return document.addEventListener("keydown",pi),()=>{document.removeEventListener("keydown",pi)}},[Bn,bn]);const Yr=useForkRef(qt.ref,dr,Nn,ce);!Xe&&Xe!==0&&(bn=!1);const li=reactExports.useRef(),ei=pi=>{const Ki=qt.props;Ki.onMouseMove&&Ki.onMouseMove(pi),cursorPosition={x:pi.clientX,y:pi.clientY},li.current&&li.current.update()},Pr={},hi=typeof Xe=="string";Je?(Pr.title=!bn&&hi&&!jt?Xe:null,Pr["aria-describedby"]=bn?kn:null):(Pr["aria-label"]=hi?Xe:null,Pr["aria-labelledby"]=bn&&!hi?kn:null);const mi=_extends$2({},Pr,yn,qt.props,{className:clsx(yn.className,qt.props.className),onTouchStart:kr,ref:Yr},Wt?{onMouseMove:ei}:{}),yi={};an||(mi.onTouchStart=Mr,mi.onTouchEnd=Rr),jt||(mi.onMouseOver=composeEventHandler(mn,mi.onMouseOver),mi.onMouseLeave=composeEventHandler(Pn,mi.onMouseLeave),Rn||(yi.onMouseOver=mn,yi.onMouseLeave=Pn)),Ut||(mi.onFocus=composeEventHandler(nr,mi.onFocus),mi.onBlur=composeEventHandler(sr,mi.onBlur),Rn||(yi.onFocus=nr,yi.onBlur=sr));const Gi=reactExports.useMemo(()=>{var pi;let Ki=[{name:"arrow",enabled:!!zn,options:{element:zn,padding:4}}];return(pi=Jt.popperOptions)!=null&&pi.modifiers&&(Ki=Ki.concat(Jt.popperOptions.modifiers)),_extends$2({},Jt.popperOptions,{modifiers:Ki})},[zn,Jt]),gi=_extends$2({},qe,{isRtl:Tn,arrow:ze,disableInteractive:Rn,placement:Nt,PopperComponentProp:Yt,touch:Kn.current}),xi=useUtilityClasses$7(gi),Ni=(ue=(pe=Ye.popper)!=null?pe:Ze.Popper)!=null?ue:TooltipPopper,fi=(me=(ge=(ye=Ye.transition)!=null?ye:Ze.Transition)!=null?ge:Pt)!=null?me:Grow$1,bi=(ve=(xe=Ye.tooltip)!=null?xe:Ze.Tooltip)!=null?ve:TooltipTooltip,oi=(_e=(Se=Ye.arrow)!=null?Se:Ze.Arrow)!=null?_e:TooltipArrow,ki=appendOwnerState(Ni,_extends$2({},Jt,($e=hn.popper)!=null?$e:Dt.popper,{className:clsx(xi.popper,Jt==null?void 0:Jt.className,(Re=(Ae=hn.popper)!=null?Ae:Dt.popper)==null?void 0:Re.className)}),gi),Co=appendOwnerState(fi,_extends$2({},sn,(Ie=hn.transition)!=null?Ie:Dt.transition),gi),Wi=appendOwnerState(bi,_extends$2({},(ke=hn.tooltip)!=null?ke:Dt.tooltip,{className:clsx(xi.tooltip,(Be=(Ne=hn.tooltip)!=null?Ne:Dt.tooltip)==null?void 0:Be.className)}),gi),Di=appendOwnerState(oi,_extends$2({},(Fe=hn.arrow)!=null?Fe:Dt.arrow,{className:clsx(xi.arrow,(Ue=(We=hn.arrow)!=null?We:Dt.arrow)==null?void 0:Ue.className)}),gi);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[reactExports.cloneElement(qt,mi),jsxRuntimeExports.jsx(Ni,_extends$2({as:Yt??Popper$1,placement:Nt,anchorEl:Wt?{getBoundingClientRect:()=>({top:cursorPosition.y,left:cursorPosition.x,right:cursorPosition.x,bottom:cursorPosition.y,width:0,height:0})}:xn,popperRef:li,open:xn?bn:!1,id:kn,transition:!0},yi,ki,{popperOptions:Gi,children:({TransitionProps:pi})=>jsxRuntimeExports.jsx(fi,_extends$2({timeout:wn.transitions.duration.shorter},pi,Co,{children:jsxRuntimeExports.jsxs(bi,_extends$2({},Wi,{children:[Xe,ze?jsxRuntimeExports.jsx(oi,_extends$2({},Di,{ref:Yn})):null]}))}))}))]})}),Tooltip$1=Tooltip;function getSwitchUtilityClass(ne){return generateUtilityClass$2("MuiSwitch",ne)}const switchClasses=generateUtilityClasses$2("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),switchClasses$1=switchClasses,_excluded$a=["className","color","edge","size","sx"],useThemeProps=createUseThemeProps(),useUtilityClasses$6=ne=>{const{classes:oe,edge:ce,size:ue,color:pe,checked:me,disabled:ge}=ne,ye={root:["root",ce&&`edge${capitalize$1(ce)}`,`size${capitalize$1(ue)}`],switchBase:["switchBase",`color${capitalize$1(pe)}`,me&&"checked",ge&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},ve=composeClasses$1(ye,getSwitchUtilityClass,oe);return _extends$2({},oe,ve)},SwitchRoot=styled$1("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.edge&&oe[`edge${capitalize$1(ce.edge)}`],oe[`size${capitalize$1(ce.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${switchClasses$1.thumb}`]:{width:16,height:16},[`& .${switchClasses$1.switchBase}`]:{padding:4,[`&.${switchClasses$1.checked}`]:{transform:"translateX(16px)"}}}}]}),SwitchSwitchBase=styled$1(SwitchBase$1,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.switchBase,{[`& .${switchClasses$1.input}`]:oe.input},ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`]]}})(({theme:ne})=>({position:"absolute",top:0,left:0,zIndex:1,color:ne.vars?ne.vars.palette.Switch.defaultColor:`${ne.palette.mode==="light"?ne.palette.common.white:ne.palette.grey[300]}`,transition:ne.transitions.create(["left","transform"],{duration:ne.transitions.duration.shortest}),[`&.${switchClasses$1.checked}`]:{transform:"translateX(20px)"},[`&.${switchClasses$1.disabled}`]:{color:ne.vars?ne.vars.palette.Switch.defaultDisabledColor:`${ne.palette.mode==="light"?ne.palette.grey[100]:ne.palette.grey[600]}`},[`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]:{opacity:.5},[`&.${switchClasses$1.disabled} + .${switchClasses$1.track}`]:{opacity:ne.vars?ne.vars.opacity.switchTrackDisabled:`${ne.palette.mode==="light"?.12:.2}`},[`& .${switchClasses$1.input}`]:{left:"-100%",width:"300%"}}),({theme:ne})=>({"&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.activeChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette.action.active,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(ne.palette).filter(([,oe])=>oe.main&&oe.light).map(([oe])=>({props:{color:oe},style:{[`&.${switchClasses$1.checked}`]:{color:(ne.vars||ne).palette[oe].main,"&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${switchClasses$1.disabled}`]:{color:ne.vars?ne.vars.palette.Switch[`${oe}DisabledColor`]:`${ne.palette.mode==="light"?lighten_1(ne.palette[oe].main,.62):darken_1(ne.palette[oe].main,.55)}`}},[`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]:{backgroundColor:(ne.vars||ne).palette[oe].main}}}))]})),SwitchTrack=styled$1("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(ne,oe)=>oe.track})(({theme:ne})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:ne.transitions.create(["opacity","background-color"],{duration:ne.transitions.duration.shortest}),backgroundColor:ne.vars?ne.vars.palette.common.onBackground:`${ne.palette.mode==="light"?ne.palette.common.black:ne.palette.common.white}`,opacity:ne.vars?ne.vars.opacity.switchTrack:`${ne.palette.mode==="light"?.38:.3}`})),SwitchThumb=styled$1("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(ne,oe)=>oe.thumb})(({theme:ne})=>({boxShadow:(ne.vars||ne).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Switch$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps({props:oe,name:"MuiSwitch"}),{className:pe,color:me="primary",edge:ge=!1,size:ye="medium",sx:ve}=ue,xe=_objectWithoutPropertiesLoose$2(ue,_excluded$a),_e=_extends$2({},ue,{color:me,edge:ge,size:ye}),Se=useUtilityClasses$6(_e),$e=jsxRuntimeExports.jsx(SwitchThumb,{className:Se.thumb,ownerState:_e});return jsxRuntimeExports.jsxs(SwitchRoot,{className:clsx(Se.root,pe),sx:ve,ownerState:_e,children:[jsxRuntimeExports.jsx(SwitchSwitchBase,_extends$2({type:"checkbox",icon:$e,checkedIcon:$e,ref:ce,ownerState:_e},xe,{classes:_extends$2({},Se,{root:Se.switchBase})})),jsxRuntimeExports.jsx(SwitchTrack,{className:Se.track,ownerState:_e})]})}),Switch$2=Switch$1;function getTabUtilityClass(ne){return generateUtilityClass$2("MuiTab",ne)}const tabClasses=generateUtilityClasses$2("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),tabClasses$1=tabClasses,_excluded$9=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],useUtilityClasses$5=ne=>{const{classes:oe,textColor:ce,fullWidth:ue,wrapped:pe,icon:me,label:ge,selected:ye,disabled:ve}=ne,xe={root:["root",me&&ge&&"labelIcon",`textColor${capitalize$1(ce)}`,ue&&"fullWidth",pe&&"wrapped",ye&&"selected",ve&&"disabled"],iconWrapper:["iconWrapper"]};return composeClasses$1(xe,getTabUtilityClass,oe)},TabRoot=styled$1(ButtonBase$1,{name:"MuiTab",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.label&&ce.icon&&oe.labelIcon,oe[`textColor${capitalize$1(ce.textColor)}`],ce.fullWidth&&oe.fullWidth,ce.wrapped&&oe.wrapped]}})(({theme:ne,ownerState:oe})=>_extends$2({},ne.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},oe.label&&{flexDirection:oe.iconPosition==="top"||oe.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},oe.icon&&oe.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${tabClasses$1.iconWrapper}`]:_extends$2({},oe.iconPosition==="top"&&{marginBottom:6},oe.iconPosition==="bottom"&&{marginTop:6},oe.iconPosition==="start"&&{marginRight:ne.spacing(1)},oe.iconPosition==="end"&&{marginLeft:ne.spacing(1)})},oe.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${tabClasses$1.selected}`]:{opacity:1},[`&.${tabClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity}},oe.textColor==="primary"&&{color:(ne.vars||ne).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(ne.vars||ne).palette.primary.main},[`&.${tabClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled}},oe.textColor==="secondary"&&{color:(ne.vars||ne).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(ne.vars||ne).palette.secondary.main},[`&.${tabClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled}},oe.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},oe.wrapped&&{fontSize:ne.typography.pxToRem(12)})),Tab=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTab"}),{className:pe,disabled:me=!1,disableFocusRipple:ge=!1,fullWidth:ye,icon:ve,iconPosition:xe="top",indicator:_e,label:Se,onChange:$e,onClick:Re,onFocus:Ae,selected:Ie,selectionFollowsFocus:ke,textColor:Be="inherit",value:Ne,wrapped:Fe=!1}=ue,Ue=_objectWithoutPropertiesLoose$2(ue,_excluded$9),We=_extends$2({},ue,{disabled:me,disableFocusRipple:ge,selected:Ie,icon:!!ve,iconPosition:xe,label:!!Se,fullWidth:ye,textColor:Be,wrapped:Fe}),qe=useUtilityClasses$5(We),ze=ve&&Se&&reactExports.isValidElement(ve)?reactExports.cloneElement(ve,{className:clsx(qe.iconWrapper,ve.props.className)}):ve,Ge=Dt=>{!Ie&&$e&&$e(Dt,Ne),Re&&Re(Dt)},Ze=Dt=>{ke&&!Ie&&$e&&$e(Dt,Ne),Ae&&Ae(Dt)};return jsxRuntimeExports.jsxs(TabRoot,_extends$2({focusRipple:!ge,className:clsx(qe.root,pe),ref:ce,role:"tab","aria-selected":Ie,disabled:me,onClick:Ge,onFocus:Ze,ownerState:We,tabIndex:Ie?0:-1},Ue,{children:[xe==="top"||xe==="start"?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ze,Se]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Se,ze]}),_e]}))}),Tab$1=Tab;function getToolbarUtilityClass(ne){return generateUtilityClass$2("MuiToolbar",ne)}generateUtilityClasses$2("MuiToolbar",["root","gutters","regular","dense"]);const _excluded$8=["className","component","disableGutters","variant"],useUtilityClasses$4=ne=>{const{classes:oe,disableGutters:ce,variant:ue}=ne;return composeClasses$1({root:["root",!ce&&"gutters",ue]},getToolbarUtilityClass,oe)},ToolbarRoot=styled$1("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,!ce.disableGutters&&oe.gutters,oe[ce.variant]]}})(({theme:ne,ownerState:oe})=>_extends$2({position:"relative",display:"flex",alignItems:"center"},!oe.disableGutters&&{paddingLeft:ne.spacing(2),paddingRight:ne.spacing(2),[ne.breakpoints.up("sm")]:{paddingLeft:ne.spacing(3),paddingRight:ne.spacing(3)}},oe.variant==="dense"&&{minHeight:48}),({theme:ne,ownerState:oe})=>oe.variant==="regular"&&ne.mixins.toolbar),Toolbar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiToolbar"}),{className:pe,component:me="div",disableGutters:ge=!1,variant:ye="regular"}=ue,ve=_objectWithoutPropertiesLoose$2(ue,_excluded$8),xe=_extends$2({},ue,{component:me,disableGutters:ge,variant:ye}),_e=useUtilityClasses$4(xe);return jsxRuntimeExports.jsx(ToolbarRoot,_extends$2({as:me,className:clsx(_e.root,pe),ref:ce,ownerState:xe},ve))}),Toolbar$1=Toolbar,KeyboardArrowLeft=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),KeyboardArrowRight=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function easeInOutSin(ne){return(1+Math.sin(Math.PI*ne-Math.PI/2))/2}function animate(ne,oe,ce,ue={},pe=()=>{}){const{ease:me=easeInOutSin,duration:ge=300}=ue;let ye=null;const ve=oe[ne];let xe=!1;const _e=()=>{xe=!0},Se=$e=>{if(xe){pe(new Error("Animation cancelled"));return}ye===null&&(ye=$e);const Re=Math.min(1,($e-ye)/ge);if(oe[ne]=me(Re)*(ce-ve)+ve,Re>=1){requestAnimationFrame(()=>{pe(null)});return}requestAnimationFrame(Se)};return ve===ce?(pe(new Error("Element already at target position")),_e):(requestAnimationFrame(Se),_e)}const _excluded$7=["onChange"],styles$1={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ScrollbarSize(ne){const{onChange:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$7),ue=reactExports.useRef(),pe=reactExports.useRef(null),me=()=>{ue.current=pe.current.offsetHeight-pe.current.clientHeight};return useEnhancedEffect$1(()=>{const ge=debounce$2(()=>{const ve=ue.current;me(),ve!==ue.current&&oe(ue.current)}),ye=ownerWindow(pe.current);return ye.addEventListener("resize",ge),()=>{ge.clear(),ye.removeEventListener("resize",ge)}},[oe]),reactExports.useEffect(()=>{me(),oe(ue.current)},[oe]),jsxRuntimeExports.jsx("div",_extends$2({style:styles$1,ref:pe},ce))}function getTabScrollButtonUtilityClass(ne){return generateUtilityClass$2("MuiTabScrollButton",ne)}const tabScrollButtonClasses=generateUtilityClasses$2("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),tabScrollButtonClasses$1=tabScrollButtonClasses,_excluded$6=["className","slots","slotProps","direction","orientation","disabled"],useUtilityClasses$3=ne=>{const{classes:oe,orientation:ce,disabled:ue}=ne;return composeClasses$1({root:["root",ce,ue&&"disabled"]},getTabScrollButtonUtilityClass,oe)},TabScrollButtonRoot=styled$1(ButtonBase$1,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.orientation&&oe[ce.orientation]]}})(({ownerState:ne})=>_extends$2({width:40,flexShrink:0,opacity:.8,[`&.${tabScrollButtonClasses$1.disabled}`]:{opacity:0}},ne.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${ne.isRtl?-90:90}deg)`}})),TabScrollButton=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiTabScrollButton"}),{className:ge,slots:ye={},slotProps:ve={},direction:xe}=me,_e=_objectWithoutPropertiesLoose$2(me,_excluded$6),Se=useRtl(),$e=_extends$2({isRtl:Se},me),Re=useUtilityClasses$3($e),Ae=(ue=ye.StartScrollButtonIcon)!=null?ue:KeyboardArrowLeft,Ie=(pe=ye.EndScrollButtonIcon)!=null?pe:KeyboardArrowRight,ke=useSlotProps({elementType:Ae,externalSlotProps:ve.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:$e}),Be=useSlotProps({elementType:Ie,externalSlotProps:ve.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:$e});return jsxRuntimeExports.jsx(TabScrollButtonRoot,_extends$2({component:"div",className:clsx(Re.root,ge),ref:ce,role:null,ownerState:$e,tabIndex:null},_e,{children:xe==="left"?jsxRuntimeExports.jsx(Ae,_extends$2({},ke)):jsxRuntimeExports.jsx(Ie,_extends$2({},Be))}))}),TabScrollButton$1=TabScrollButton;function getTabsUtilityClass(ne){return generateUtilityClass$2("MuiTabs",ne)}const tabsClasses=generateUtilityClasses$2("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tabsClasses$1=tabsClasses,_excluded$5=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],nextItem=(ne,oe)=>ne===oe?ne.firstChild:oe&&oe.nextElementSibling?oe.nextElementSibling:ne.firstChild,previousItem=(ne,oe)=>ne===oe?ne.lastChild:oe&&oe.previousElementSibling?oe.previousElementSibling:ne.lastChild,moveFocus=(ne,oe,ce)=>{let ue=!1,pe=ce(ne,oe);for(;pe;){if(pe===ne.firstChild){if(ue)return;ue=!0}const me=pe.disabled||pe.getAttribute("aria-disabled")==="true";if(!pe.hasAttribute("tabindex")||me)pe=ce(ne,pe);else{pe.focus();return}}},useUtilityClasses$2=ne=>{const{vertical:oe,fixed:ce,hideScrollbar:ue,scrollableX:pe,scrollableY:me,centered:ge,scrollButtonsHideMobile:ye,classes:ve}=ne;return composeClasses$1({root:["root",oe&&"vertical"],scroller:["scroller",ce&&"fixed",ue&&"hideScrollbar",pe&&"scrollableX",me&&"scrollableY"],flexContainer:["flexContainer",oe&&"flexContainerVertical",ge&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",ye&&"scrollButtonsHideMobile"],scrollableX:[pe&&"scrollableX"],hideScrollbar:[ue&&"hideScrollbar"]},getTabsUtilityClass,ve)},TabsRoot=styled$1("div",{name:"MuiTabs",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${tabsClasses$1.scrollButtons}`]:oe.scrollButtons},{[`& .${tabsClasses$1.scrollButtons}`]:ce.scrollButtonsHideMobile&&oe.scrollButtonsHideMobile},oe.root,ce.vertical&&oe.vertical]}})(({ownerState:ne,theme:oe})=>_extends$2({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},ne.vertical&&{flexDirection:"column"},ne.scrollButtonsHideMobile&&{[`& .${tabsClasses$1.scrollButtons}`]:{[oe.breakpoints.down("sm")]:{display:"none"}}})),TabsScroller=styled$1("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.scroller,ce.fixed&&oe.fixed,ce.hideScrollbar&&oe.hideScrollbar,ce.scrollableX&&oe.scrollableX,ce.scrollableY&&oe.scrollableY]}})(({ownerState:ne})=>_extends$2({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},ne.fixed&&{overflowX:"hidden",width:"100%"},ne.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},ne.scrollableX&&{overflowX:"auto",overflowY:"hidden"},ne.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),FlexContainer=styled$1("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.flexContainer,ce.vertical&&oe.flexContainerVertical,ce.centered&&oe.centered]}})(({ownerState:ne})=>_extends$2({display:"flex"},ne.vertical&&{flexDirection:"column"},ne.centered&&{justifyContent:"center"})),TabsIndicator=styled$1("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(ne,oe)=>oe.indicator})(({ownerState:ne,theme:oe})=>_extends$2({position:"absolute",height:2,bottom:0,width:"100%",transition:oe.transitions.create()},ne.indicatorColor==="primary"&&{backgroundColor:(oe.vars||oe).palette.primary.main},ne.indicatorColor==="secondary"&&{backgroundColor:(oe.vars||oe).palette.secondary.main},ne.vertical&&{height:"100%",width:2,right:0})),TabsScrollbarSize=styled$1(ScrollbarSize)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),defaultIndicatorStyle={},Tabs=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTabs"}),pe=useTheme$1(),me=useRtl(),{"aria-label":ge,"aria-labelledby":ye,action:ve,centered:xe=!1,children:_e,className:Se,component:$e="div",allowScrollButtonsMobile:Re=!1,indicatorColor:Ae="primary",onChange:Ie,orientation:ke="horizontal",ScrollButtonComponent:Be=TabScrollButton$1,scrollButtons:Ne="auto",selectionFollowsFocus:Fe,slots:Ue={},slotProps:We={},TabIndicatorProps:qe={},TabScrollButtonProps:ze={},textColor:Ge="primary",value:Ze,variant:Dt="standard",visibleScrollbar:Je=!1}=ue,Ut=_objectWithoutPropertiesLoose$2(ue,_excluded$5),jt=Dt==="scrollable",Ke=ke==="vertical",an=Ke?"scrollTop":"scrollLeft",Zt=Ke?"top":"left",en=Ke?"bottom":"right",Kt=Ke?"clientHeight":"clientWidth",Wt=Ke?"height":"width",un=_extends$2({},ue,{component:$e,allowScrollButtonsMobile:Re,indicatorColor:Ae,orientation:ke,vertical:Ke,scrollButtons:Ne,textColor:Ge,variant:Dt,visibleScrollbar:Je,fixed:!jt,hideScrollbar:jt&&!Je,scrollableX:jt&&!Ke,scrollableY:jt&&Ke,centered:xe&&!jt,scrollButtonsHideMobile:!Re}),Xt=useUtilityClasses$2(un),nn=useSlotProps({elementType:Ue.StartScrollButtonIcon,externalSlotProps:We.startScrollButtonIcon,ownerState:un}),vn=useSlotProps({elementType:Ue.EndScrollButtonIcon,externalSlotProps:We.endScrollButtonIcon,ownerState:un}),[Sn,Cn]=reactExports.useState(!1),[Nt,Yt]=reactExports.useState(defaultIndicatorStyle),[Jt,hn]=reactExports.useState(!1),[Ye,Xe]=reactExports.useState(!1),[Pt,sn]=reactExports.useState(!1),[yn,qt]=reactExports.useState({overflow:"hidden",scrollbarWidth:0}),wn=new Map,Tn=reactExports.useRef(null),xn=reactExports.useRef(null),Nn=()=>{const Bn=Tn.current;let mn;if(Bn){const ur=Bn.getBoundingClientRect();mn={clientWidth:Bn.clientWidth,scrollLeft:Bn.scrollLeft,scrollTop:Bn.scrollTop,scrollLeftNormalized:getNormalizedScrollLeft(Bn,me?"rtl":"ltr"),scrollWidth:Bn.scrollWidth,top:ur.top,bottom:ur.bottom,left:ur.left,right:ur.right}}let Pn;if(Bn&&Ze!==!1){const ur=xn.current.children;if(ur.length>0){const er=ur[wn.get(Ze)];Pn=er?er.getBoundingClientRect():null}}return{tabsMeta:mn,tabMeta:Pn}},zn=useEventCallback(()=>{const{tabsMeta:Bn,tabMeta:mn}=Nn();let Pn=0,ur;if(Ke)ur="top",mn&&Bn&&(Pn=mn.top-Bn.top+Bn.scrollTop);else if(ur=me?"right":"left",mn&&Bn){const _r=me?Bn.scrollLeftNormalized+Bn.clientWidth-Bn.scrollWidth:Bn.scrollLeft;Pn=(me?-1:1)*(mn[ur]-Bn[ur]+_r)}const er={[ur]:Pn,[Wt]:mn?mn[Wt]:0};if(isNaN(Nt[ur])||isNaN(Nt[Wt]))Yt(er);else{const _r=Math.abs(Nt[ur]-er[ur]),dr=Math.abs(Nt[Wt]-er[Wt]);(_r>=1||dr>=1)&&Yt(er)}}),Yn=(Bn,{animation:mn=!0}={})=>{mn?animate(an,Tn.current,Bn,{duration:pe.transitions.duration.standard}):Tn.current[an]=Bn},Kn=Bn=>{let mn=Tn.current[an];Ke?mn+=Bn:(mn+=Bn*(me?-1:1),mn*=me&&detectScrollType()==="reverse"?-1:1),Yn(mn)},Rn=()=>{const Bn=Tn.current[Kt];let mn=0;const Pn=Array.from(xn.current.children);for(let ur=0;urBn){ur===0&&(mn=Bn);break}mn+=er[Kt]}return mn},Mn=()=>{Kn(-1*Rn())},Xn=()=>{Kn(Rn())},Jn=reactExports.useCallback(Bn=>{qt({overflow:null,scrollbarWidth:Bn})},[]),pn=()=>{const Bn={};Bn.scrollbarSizeListener=jt?jsxRuntimeExports.jsx(TabsScrollbarSize,{onChange:Jn,className:clsx(Xt.scrollableX,Xt.hideScrollbar)}):null;const Pn=jt&&(Ne==="auto"&&(Jt||Ye)||Ne===!0);return Bn.scrollButtonStart=Pn?jsxRuntimeExports.jsx(Be,_extends$2({slots:{StartScrollButtonIcon:Ue.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:nn},orientation:ke,direction:me?"right":"left",onClick:Mn,disabled:!Jt},ze,{className:clsx(Xt.scrollButtons,ze.className)})):null,Bn.scrollButtonEnd=Pn?jsxRuntimeExports.jsx(Be,_extends$2({slots:{EndScrollButtonIcon:Ue.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:vn},orientation:ke,direction:me?"left":"right",onClick:Xn,disabled:!Ye},ze,{className:clsx(Xt.scrollButtons,ze.className)})):null,Bn},tn=useEventCallback(Bn=>{const{tabsMeta:mn,tabMeta:Pn}=Nn();if(!(!Pn||!mn)){if(Pn[Zt]mn[en]){const ur=mn[an]+(Pn[en]-mn[en]);Yn(ur,{animation:Bn})}}}),Gt=useEventCallback(()=>{jt&&Ne!==!1&&sn(!Pt)});reactExports.useEffect(()=>{const Bn=debounce$2(()=>{Tn.current&&zn()});let mn;const Pn=_r=>{_r.forEach(dr=>{dr.removedNodes.forEach(Sr=>{var sr;(sr=mn)==null||sr.unobserve(Sr)}),dr.addedNodes.forEach(Sr=>{var sr;(sr=mn)==null||sr.observe(Sr)})}),Bn(),Gt()},ur=ownerWindow(Tn.current);ur.addEventListener("resize",Bn);let er;return typeof ResizeObserver<"u"&&(mn=new ResizeObserver(Bn),Array.from(xn.current.children).forEach(_r=>{mn.observe(_r)})),typeof MutationObserver<"u"&&(er=new MutationObserver(Pn),er.observe(xn.current,{childList:!0})),()=>{var _r,dr;Bn.clear(),ur.removeEventListener("resize",Bn),(_r=er)==null||_r.disconnect(),(dr=mn)==null||dr.disconnect()}},[zn,Gt]),reactExports.useEffect(()=>{const Bn=Array.from(xn.current.children),mn=Bn.length;if(typeof IntersectionObserver<"u"&&mn>0&&jt&&Ne!==!1){const Pn=Bn[0],ur=Bn[mn-1],er={root:Tn.current,threshold:.99},_r=nr=>{hn(!nr[0].isIntersecting)},dr=new IntersectionObserver(_r,er);dr.observe(Pn);const Sr=nr=>{Xe(!nr[0].isIntersecting)},sr=new IntersectionObserver(Sr,er);return sr.observe(ur),()=>{dr.disconnect(),sr.disconnect()}}},[jt,Ne,Pt,_e==null?void 0:_e.length]),reactExports.useEffect(()=>{Cn(!0)},[]),reactExports.useEffect(()=>{zn()}),reactExports.useEffect(()=>{tn(defaultIndicatorStyle!==Nt)},[tn,Nt]),reactExports.useImperativeHandle(ve,()=>({updateIndicator:zn,updateScrollButtons:Gt}),[zn,Gt]);const bn=jsxRuntimeExports.jsx(TabsIndicator,_extends$2({},qe,{className:clsx(Xt.indicator,qe.className),ownerState:un,style:_extends$2({},Nt,qe.style)}));let kn=0;const jn=reactExports.Children.map(_e,Bn=>{if(!reactExports.isValidElement(Bn))return null;const mn=Bn.props.value===void 0?kn:Bn.props.value;wn.set(mn,kn);const Pn=mn===Ze;return kn+=1,reactExports.cloneElement(Bn,_extends$2({fullWidth:Dt==="fullWidth",indicator:Pn&&!Sn&&bn,selected:Pn,selectionFollowsFocus:Fe,onChange:Ie,textColor:Ge,value:mn},kn===1&&Ze===!1&&!Bn.props.tabIndex?{tabIndex:0}:{}))}),Wn=Bn=>{const mn=xn.current,Pn=ownerDocument(mn).activeElement;if(Pn.getAttribute("role")!=="tab")return;let er=ke==="horizontal"?"ArrowLeft":"ArrowUp",_r=ke==="horizontal"?"ArrowRight":"ArrowDown";switch(ke==="horizontal"&&me&&(er="ArrowRight",_r="ArrowLeft"),Bn.key){case er:Bn.preventDefault(),moveFocus(mn,Pn,previousItem);break;case _r:Bn.preventDefault(),moveFocus(mn,Pn,nextItem);break;case"Home":Bn.preventDefault(),moveFocus(mn,null,nextItem);break;case"End":Bn.preventDefault(),moveFocus(mn,null,previousItem);break}},dn=pn();return jsxRuntimeExports.jsxs(TabsRoot,_extends$2({className:clsx(Xt.root,Se),ownerState:un,ref:ce,as:$e},Ut,{children:[dn.scrollButtonStart,dn.scrollbarSizeListener,jsxRuntimeExports.jsxs(TabsScroller,{className:Xt.scroller,ownerState:un,style:{overflow:yn.overflow,[Ke?`margin${me?"Left":"Right"}`:"marginBottom"]:Je?void 0:-yn.scrollbarWidth},ref:Tn,children:[jsxRuntimeExports.jsx(FlexContainer,{"aria-label":ge,"aria-labelledby":ye,"aria-orientation":ke==="vertical"?"vertical":null,className:Xt.flexContainer,ownerState:un,onKeyDown:Wn,ref:xn,role:"tablist",children:jn}),Sn&&bn]}),dn.scrollButtonEnd]}))}),Tabs$1=Tabs;function getTextFieldUtilityClass(ne){return generateUtilityClass$2("MuiTextField",ne)}generateUtilityClasses$2("MuiTextField",["root"]);const _excluded$4=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],variantComponent={standard:Input$1,filled:FilledInput$1,outlined:OutlinedInput$1},useUtilityClasses$1=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"]},getTextFieldUtilityClass,oe)},TextFieldRoot=styled$1(FormControl$1,{name:"MuiTextField",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),TextField=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTextField"}),{autoComplete:pe,autoFocus:me=!1,children:ge,className:ye,color:ve="primary",defaultValue:xe,disabled:_e=!1,error:Se=!1,FormHelperTextProps:$e,fullWidth:Re=!1,helperText:Ae,id:Ie,InputLabelProps:ke,inputProps:Be,InputProps:Ne,inputRef:Fe,label:Ue,maxRows:We,minRows:qe,multiline:ze=!1,name:Ge,onBlur:Ze,onChange:Dt,onFocus:Je,placeholder:Ut,required:jt=!1,rows:Ke,select:an=!1,SelectProps:Zt,type:en,value:Kt,variant:Wt="outlined"}=ue,un=_objectWithoutPropertiesLoose$2(ue,_excluded$4),Xt=_extends$2({},ue,{autoFocus:me,color:ve,disabled:_e,error:Se,fullWidth:Re,multiline:ze,required:jt,select:an,variant:Wt}),nn=useUtilityClasses$1(Xt),vn={};Wt==="outlined"&&(ke&&typeof ke.shrink<"u"&&(vn.notched=ke.shrink),vn.label=Ue),an&&((!Zt||!Zt.native)&&(vn.id=void 0),vn["aria-describedby"]=void 0);const Sn=useId(Ie),Cn=Ae&&Sn?`${Sn}-helper-text`:void 0,Nt=Ue&&Sn?`${Sn}-label`:void 0,Yt=variantComponent[Wt],Jt=jsxRuntimeExports.jsx(Yt,_extends$2({"aria-describedby":Cn,autoComplete:pe,autoFocus:me,defaultValue:xe,fullWidth:Re,multiline:ze,name:Ge,rows:Ke,maxRows:We,minRows:qe,type:en,value:Kt,id:Sn,inputRef:Fe,onBlur:Ze,onChange:Dt,onFocus:Je,placeholder:Ut,inputProps:Be},vn,Ne));return jsxRuntimeExports.jsxs(TextFieldRoot,_extends$2({className:clsx(nn.root,ye),disabled:_e,error:Se,fullWidth:Re,ref:ce,required:jt,color:ve,variant:Wt,ownerState:Xt},un,{children:[Ue!=null&&Ue!==""&&jsxRuntimeExports.jsx(InputLabel$1,_extends$2({htmlFor:Sn,id:Nt},ke,{children:Ue})),an?jsxRuntimeExports.jsx(Select$2,_extends$2({"aria-describedby":Cn,id:Sn,labelId:Nt,value:Kt,input:Jt},Zt,{children:ge})):Jt,Ae&&jsxRuntimeExports.jsx(FormHelperText$1,_extends$2({id:Cn},$e,{children:Ae}))]}))}),TextField$1=TextField,Flex=reactExports.forwardRef(({vertical:ne,...oe},ce)=>jsxRuntimeExports.jsx(Box$1,{ref:ce,position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:ne?"column":"row",...oe})),TreeIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3zM7 9H4V5h3zm10 6h3v4h-3zm0-10h3v4h-3z"}),"AccountTreeOutlined"),Add=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),ArrowBack=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),ArrowForwardOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForwardOutlined"),ArrowOutwardRounded=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 7c0 .55.45 1 1 1h7.59l-8.88 8.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L16 9.41V17c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1"}),"ArrowOutwardRounded"),BlurCircularOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1M7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5m3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1"}),"BlurCircularOutlined"),DisabledIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5m-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5"}),"BlurOnOutlined"),DebuggerIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65C8.03 15.48 8 15.23 8 15v-4c0-.23.03-.48.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18c.31-.08.63-.12.94-.12.32 0 .63.04.95.12l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69zm-6 2h4v2h-4zm0-4h4v2h-4z"}),"BugReportOutlined"),CameraOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m14.25 2.26-.08-.04-.01.02C13.46 2.09 12.74 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-4.75-3.31-8.72-7.75-9.74M19.41 9h-7.99l2.71-4.7c2.4.66 4.35 2.42 5.28 4.7M13.1 4.08 10.27 9l-1.15 2L6.4 6.3C7.84 4.88 9.82 4 12 4c.37 0 .74.03 1.1.08M5.7 7.09 8.54 12l1.15 2H4.26C4.1 13.36 4 12.69 4 12c0-1.85.64-3.55 1.7-4.91M4.59 15h7.98l-2.71 4.7c-2.4-.67-4.34-2.42-5.27-4.7m6.31 4.91L14.89 13l2.72 4.7C16.16 19.12 14.18 20 12 20c-.38 0-.74-.04-1.1-.09m7.4-3-4-6.91h5.43c.17.64.27 1.31.27 2 0 1.85-.64 3.55-1.7 4.91"}),"CameraOutlined"),CenterFocusWeakOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M5 15H3v4c0 1.1.9 2 2 2h4v-2H5zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2zm7 3c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m7-11h-4v2h4v4h2V5c0-1.1-.9-2-2-2m0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2z"}),"CenterFocusWeakOutlined"),PreviousIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeftOutlined"),NextIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRightOutlined"),DeleteIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"ClearOutlined"),CloseOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined"),CodeOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"CodeOutlined"),DataObjectOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObjectOutlined"),DownloadOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 9h-4V3H9v6H5l7 7zm-8 2V5h2v6h1.17L12 13.17 9.83 11zm-6 7h14v2H5z"}),"DownloadOutlined"),DragHandleOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 9H4v2h16zM4 15h16v-2H4z"}),"DragHandleOutlined"),DragIndicatorOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicatorOutlined"),EditIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined"),ErrorOutlineOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutlineOutlined"),FiberManualRecord=createSvgIcon(jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),FiberManualRecordOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6m0-2c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8"}),"FiberManualRecordOutlined"),FileOpenOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15 22H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8l6 6v6h-2V9h-5V4H6v16h9zm4-.34v-2.24l2.95 2.95 1.41-1.41L20.41 18h2.24v-2H17v5.66z"}),"FileOpenOutlined"),RotateIcon=createSvgIcon([jsxRuntimeExports.jsx("path",{d:"M9 12c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3m4 0c0 .55-.45 1-1 1s-1-.45-1-1 .45-1 1-1 1 .45 1 1"},"0"),jsxRuntimeExports.jsx("path",{d:"M8 10V8H5.09C6.47 5.61 9.05 4 12 4c3.72 0 6.85 2.56 7.74 6h2.06c-.93-4.56-4.96-8-9.8-8-3.27 0-6.18 1.58-8 4.01V4H2v6zm8 4v2h2.91c-1.38 2.39-3.96 4-6.91 4-3.72 0-6.85-2.56-7.74-6H2.2c.93 4.56 4.96 8 9.8 8 3.27 0 6.18-1.58 8-4.01V20h2v-6z"},"1")],"FlipCameraAndroidOutlined"),FullscreenOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"FullscreenOutlined"),GitHub=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),KeyboardArrowDownOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDownOutlined"),LaunchOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"LaunchOutlined"),LayersIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27zm0-11.47L17.74 9 12 13.47 6.26 9z"}),"LayersOutlined"),ListOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7zm-4 6h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"ListOutlined"),MapTwoTone=createSvgIcon([jsxRuntimeExports.jsx("path",{d:"m5 18.31 3-1.16V5.45L5 6.46zm11 .24 3-1.01V5.69l-3 1.17z",opacity:".3"},"0"),jsxRuntimeExports.jsx("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M8 17.15l-3 1.16V6.46l3-1.01zm6 1.38-4-1.4V5.47l4 1.4zm5-.99-3 1.01V6.86l3-1.16z"},"1")],"MapTwoTone"),ModeStandbyOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3"}),"ModeStandbyOutlined"),MoreVertOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVertOutlined"),NavigateNextOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10.02 6 8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6z"}),"NavigateNextOutlined"),OpenInNewOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNewOutlined"),PauseIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"PauseOutlined"),DestinationIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14M12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2"}),"PlaceOutlined"),PlayIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10 8.64 15.27 12 10 15.36zM8 5v14l11-7z"}),"PlayArrowOutlined"),ResetIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"ReplayOutlined"),RestartAltOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 13c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91m14 0c0-4.42-3.58-8-8-8-.06 0-.12.01-.18.01l1.09-1.09L11.5 2.5 8 6l3.5 3.5 1.41-1.41-1.08-1.08c.06 0 .12-.01.17-.01 3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93"}),"RestartAltOutlined"),RocketIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 15c-.83 0-1.58.34-2.12.88C2.7 17.06 2 22 2 22s4.94-.7 6.12-1.88c.54-.54.88-1.29.88-2.12 0-1.66-1.34-3-3-3m.71 3.71c-.28.28-2.17.76-2.17.76s.47-1.88.76-2.17c.17-.19.42-.3.7-.3.55 0 1 .45 1 1 0 .28-.11.53-.29.71m10.71-5.06c6.36-6.36 4.24-11.31 4.24-11.31S16.71.22 10.35 6.58l-2.49-.5c-.65-.13-1.33.08-1.81.55L2 10.69l5 2.14L11.17 17l2.14 5 4.05-4.05c.47-.47.68-1.15.55-1.81zM7.41 10.83l-1.91-.82 1.97-1.97 1.44.29c-.57.83-1.08 1.7-1.5 2.5m6.58 7.67-.82-1.91c.8-.42 1.67-.93 2.49-1.5l.29 1.44zM16 12.24c-1.32 1.32-3.38 2.4-4.04 2.73l-2.93-2.93c.32-.65 1.4-2.71 2.73-4.04 4.68-4.68 8.23-3.99 8.23-3.99s.69 3.55-3.99 8.23M15 11c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2"}),"RocketLaunchOutlined"),RouteTwoTone=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"6",cy:"6",r:"1",opacity:".3"},"0"),jsxRuntimeExports.jsx("circle",{cx:"18",cy:"18",r:"1",opacity:".3"},"1"),jsxRuntimeExports.jsx("path",{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82M6 7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m12 12c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"},"2")],"RouteTwoTone"),SearchOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined"),StepsIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 18h12v-2H9zM3 6v2h18V6zm6 7h12v-2H9z"}),"SegmentOutlined"),SettingsIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"SettingsOutlined"),SkipIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m6 18 8.5-6L6 6zm2-8.14L11.03 12 8 14.14zM16 6h2v12h-2z"}),"SkipNextOutlined"),StopIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6zm6.5 2.14L12.97 12 16 9.86z"}),"SkipPreviousOutlined"),TimelineOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2"}),"TimelineOutlined"),TimesOneMobiledataOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M4 7h4v10H6V9H4zm11.83 4.72L18.66 7h-2.33l-1.66 2.77L13 7h-2.33l2.83 4.72L10.33 17h2.33l2-3.34 2 3.34H19z"}),"TimesOneMobiledataOutlined"),StartIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12m10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6"}),"TripOriginOutlined"),SplitIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 13H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2m0 6H5v-4h14zm0-16H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 6H5V5h14z"}),"ViewAgendaOutlined"),ViewportIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M3 4c0-.55.45-1 1-1h2V1H4C2.34 1 1 2.34 1 4v2h2zm0 16v-2H1v2c0 1.66 1.34 3 3 3h2v-2H4c-.55 0-1-.45-1-1M20 1h-2v2h2c.55 0 1 .45 1 1v2h2V4c0-1.66-1.34-3-3-3m1 19c0 .55-.45 1-1 1h-2v2h2c1.66 0 3-1.34 3-3v-2h-2zm-2-5.13V9.13c0-.72-.38-1.38-1-1.73l-5-2.88c-.31-.18-.65-.27-1-.27s-.69.09-1 .27L6 7.39c-.62.36-1 1.02-1 1.74v5.74c0 .72.38 1.38 1 1.73l5 2.88c.31.18.65.27 1 .27s.69-.09 1-.27l5-2.88c.62-.35 1-1.01 1-1.73m-8 2.3-4-2.3v-4.63l4 2.33zm1-6.33L8.04 8.53 12 6.25l3.96 2.28zm5 4.03-4 2.3v-4.6l4-2.33z"}),"ViewInArOutlined"),WidgetsOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m16.66 4.52 2.83 2.83-2.83 2.83-2.83-2.83zM9 5v4H5V5zm10 10v4h-4v-4zM9 15v4H5v-4zm7.66-13.31L11 7.34 16.66 13l5.66-5.66zM11 3H3v8h8zm10 10h-8v8h8zm-10 0H3v8h8z"}),"WidgetsOutlined"),WorkspacesOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 15c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4m6-8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4m6 12c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4"}),"WorkspacesOutlined");var lodash$1={exports:{}};/** + `),waveKeyframe,(oe.vars||oe).palette.action.hover)),Skeleton$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSkeleton"}),{animation:pe="pulse",className:me,component:ge="span",height:ye,style:ve,variant:xe="text",width:_e}=ue,Se=_objectWithoutPropertiesLoose$2(ue,_excluded$f),$e=_extends$2({},ue,{animation:pe,component:ge,variant:xe,hasChildren:!!Se.children}),Re=useUtilityClasses$b($e);return jsxRuntimeExports.jsx(SkeletonRoot,_extends$2({as:ge,ref:ce,className:clsx(Re.root,me),ownerState:$e},Se,{style:_extends$2({width:_e,height:ye},ve)}))}),Placeholder$3=Skeleton$1,shouldSpreadAdditionalProps=ne=>!ne||!isHostComponent(ne),shouldSpreadAdditionalProps$1=shouldSpreadAdditionalProps;function getSliderUtilityClass(ne){return generateUtilityClass$2("MuiSlider",ne)}const sliderClasses=generateUtilityClasses$2("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),sliderClasses$1=sliderClasses,useValueLabelClasses=ne=>{const{open:oe}=ne;return{offset:clsx(oe&&sliderClasses$1.valueLabelOpen),circle:sliderClasses$1.valueLabelCircle,label:sliderClasses$1.valueLabelLabel}};function SliderValueLabel$1(ne){const{children:oe,className:ce,value:ue}=ne,pe=useValueLabelClasses(ne);return oe?reactExports.cloneElement(oe,{className:clsx(oe.props.className)},jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[oe.props.children,jsxRuntimeExports.jsx("span",{className:clsx(pe.offset,ce),"aria-hidden":!0,children:jsxRuntimeExports.jsx("span",{className:pe.circle,children:jsxRuntimeExports.jsx("span",{className:pe.label,children:ue})})})]})):null}const _excluded$e=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],useThemeProps$1=createUseThemeProps();function Identity(ne){return ne}const SliderRoot=styled$1("span",{name:"MuiSlider",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`color${capitalize$1(ce.color)}`],ce.size!=="medium"&&oe[`size${capitalize$1(ce.size)}`],ce.marked&&oe.marked,ce.orientation==="vertical"&&oe.vertical,ce.track==="inverted"&&oe.trackInverted,ce.track===!1&&oe.trackFalse]}})(({theme:ne})=>{var oe;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${sliderClasses$1.disabled}`]:{pointerEvents:"none",cursor:"default",color:(ne.vars||ne).palette.grey[400]},[`&.${sliderClasses$1.dragging}`]:{[`& .${sliderClasses$1.thumb}, & .${sliderClasses$1.track}`]:{transition:"none"}},variants:[...Object.keys(((oe=ne.vars)!=null?oe:ne).palette).filter(ce=>{var ue;return((ue=ne.vars)!=null?ue:ne).palette[ce].main}).map(ce=>({props:{color:ce},style:{color:(ne.vars||ne).palette[ce].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),SliderRail=styled$1("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(ne,oe)=>oe.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),SliderTrack=styled$1("span",{name:"MuiSlider",slot:"Track",overridesResolver:(ne,oe)=>oe.track})(({theme:ne})=>{var oe;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:ne.transitions.create(["left","width","bottom","height"],{duration:ne.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((oe=ne.vars)!=null?oe:ne).palette).filter(ce=>{var ue;return((ue=ne.vars)!=null?ue:ne).palette[ce].main}).map(ce=>({props:{color:ce,track:"inverted"},style:_extends$2({},ne.vars?{backgroundColor:ne.vars.palette.Slider[`${ce}Track`],borderColor:ne.vars.palette.Slider[`${ce}Track`]}:_extends$2({backgroundColor:lighten_1(ne.palette[ce].main,.62),borderColor:lighten_1(ne.palette[ce].main,.62)},ne.applyStyles("dark",{backgroundColor:darken_1(ne.palette[ce].main,.5)}),ne.applyStyles("dark",{borderColor:darken_1(ne.palette[ce].main,.5)})))}))]}}),SliderThumb=styled$1("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.thumb,oe[`thumbColor${capitalize$1(ce.color)}`],ce.size!=="medium"&&oe[`thumbSize${capitalize$1(ce.size)}`]]}})(({theme:ne})=>{var oe;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:ne.transitions.create(["box-shadow","left","bottom"],{duration:ne.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(ne.vars||ne).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${sliderClasses$1.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((oe=ne.vars)!=null?oe:ne).palette).filter(ce=>{var ue;return((ue=ne.vars)!=null?ue:ne).palette[ce].main}).map(ce=>({props:{color:ce},style:{[`&:hover, &.${sliderClasses$1.focusVisible}`]:_extends$2({},ne.vars?{boxShadow:`0px 0px 0px 8px rgba(${ne.vars.palette[ce].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${alpha_1(ne.palette[ce].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${sliderClasses$1.active}`]:_extends$2({},ne.vars?{boxShadow:`0px 0px 0px 14px rgba(${ne.vars.palette[ce].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${alpha_1(ne.palette[ce].main,.16)}`})}}))]}}),SliderValueLabel=styled$1(SliderValueLabel$1,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(ne,oe)=>oe.valueLabel})(({theme:ne})=>_extends$2({zIndex:1,whiteSpace:"nowrap"},ne.typography.body2,{fontWeight:500,transition:ne.transitions.create(["transform"],{duration:ne.transitions.duration.shortest}),position:"absolute",backgroundColor:(ne.vars||ne).palette.grey[600],borderRadius:2,color:(ne.vars||ne).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${sliderClasses$1.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${sliderClasses$1.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:ne.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),SliderMark=styled$1("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:ne=>slotShouldForwardProp(ne)&&ne!=="markActive",overridesResolver:(ne,oe)=>{const{markActive:ce}=ne;return[oe.mark,ce&&oe.markActive]}})(({theme:ne})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(ne.vars||ne).palette.background.paper,opacity:.8}}]})),SliderMarkLabel=styled$1("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:ne=>slotShouldForwardProp(ne)&&ne!=="markLabelActive",overridesResolver:(ne,oe)=>oe.markLabel})(({theme:ne})=>_extends$2({},ne.typography.body2,{color:(ne.vars||ne).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(ne.vars||ne).palette.text.primary}}]})),useUtilityClasses$a=ne=>{const{disabled:oe,dragging:ce,marked:ue,orientation:pe,track:me,classes:ge,color:ye,size:ve}=ne,xe={root:["root",oe&&"disabled",ce&&"dragging",ue&&"marked",pe==="vertical"&&"vertical",me==="inverted"&&"trackInverted",me===!1&&"trackFalse",ye&&`color${capitalize$1(ye)}`,ve&&`size${capitalize$1(ve)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",oe&&"disabled",ve&&`thumbSize${capitalize$1(ve)}`,ye&&`thumbColor${capitalize$1(ye)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return composeClasses$1(xe,getSliderUtilityClass,ge)},Forward=({children:ne})=>ne,Slider=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae,Ie,ke,Be,Ne,Fe,Ue,We,qe,ze,Ge,Ze,Dt;const Je=useThemeProps$1({props:oe,name:"MuiSlider"}),Ut=useRtl(),{"aria-label":jt,"aria-valuetext":Ke,"aria-labelledby":an,component:Zt="span",components:en={},componentsProps:Kt={},color:Wt="primary",classes:un,className:Xt,disableSwap:nn=!1,disabled:vn=!1,getAriaLabel:Sn,getAriaValueText:Cn,marks:Nt=!1,max:Yt=100,min:Jt=0,orientation:hn="horizontal",shiftStep:Ye=10,size:Xe="medium",step:Pt=1,scale:sn=Identity,slotProps:yn,slots:qt,track:wn="normal",valueLabelDisplay:Tn="off",valueLabelFormat:xn=Identity}=Je,Nn=_objectWithoutPropertiesLoose$2(Je,_excluded$e),zn=_extends$2({},Je,{isRtl:Ut,max:Yt,min:Jt,classes:un,disabled:vn,disableSwap:nn,orientation:hn,marks:Nt,color:Wt,size:Xe,step:Pt,shiftStep:Ye,scale:sn,track:wn,valueLabelDisplay:Tn,valueLabelFormat:xn}),{axisProps:Yn,getRootProps:Kn,getHiddenInputProps:Rn,getThumbProps:Mn,open:Xn,active:Jn,axis:pn,focusedThumbIndex:tn,range:Gt,dragging:bn,marks:kn,values:jn,trackOffset:Wn,trackLeap:dn,getThumbStyle:Bn}=useSlider(_extends$2({},zn,{rootRef:ce}));zn.marked=kn.length>0&&kn.some(oi=>oi.label),zn.dragging=bn,zn.focusedThumbIndex=tn;const mn=useUtilityClasses$a(zn),Pn=(ue=(pe=qt==null?void 0:qt.root)!=null?pe:en.Root)!=null?ue:SliderRoot,ur=(me=(ge=qt==null?void 0:qt.rail)!=null?ge:en.Rail)!=null?me:SliderRail,er=(ye=(ve=qt==null?void 0:qt.track)!=null?ve:en.Track)!=null?ye:SliderTrack,_r=(xe=(_e=qt==null?void 0:qt.thumb)!=null?_e:en.Thumb)!=null?xe:SliderThumb,dr=(Se=($e=qt==null?void 0:qt.valueLabel)!=null?$e:en.ValueLabel)!=null?Se:SliderValueLabel,Sr=(Re=(Ae=qt==null?void 0:qt.mark)!=null?Ae:en.Mark)!=null?Re:SliderMark,sr=(Ie=(ke=qt==null?void 0:qt.markLabel)!=null?ke:en.MarkLabel)!=null?Ie:SliderMarkLabel,nr=(Be=(Ne=qt==null?void 0:qt.input)!=null?Ne:en.Input)!=null?Be:"input",kr=(Fe=yn==null?void 0:yn.root)!=null?Fe:Kt.root,Mr=(Ue=yn==null?void 0:yn.rail)!=null?Ue:Kt.rail,Rr=(We=yn==null?void 0:yn.track)!=null?We:Kt.track,Yr=(qe=yn==null?void 0:yn.thumb)!=null?qe:Kt.thumb,li=(ze=yn==null?void 0:yn.valueLabel)!=null?ze:Kt.valueLabel,ei=(Ge=yn==null?void 0:yn.mark)!=null?Ge:Kt.mark,Pr=(Ze=yn==null?void 0:yn.markLabel)!=null?Ze:Kt.markLabel,hi=(Dt=yn==null?void 0:yn.input)!=null?Dt:Kt.input,mi=useSlotProps({elementType:Pn,getSlotProps:Kn,externalSlotProps:kr,externalForwardedProps:Nn,additionalProps:_extends$2({},shouldSpreadAdditionalProps$1(Pn)&&{as:Zt}),ownerState:_extends$2({},zn,kr==null?void 0:kr.ownerState),className:[mn.root,Xt]}),yi=useSlotProps({elementType:ur,externalSlotProps:Mr,ownerState:zn,className:mn.rail}),Gi=useSlotProps({elementType:er,externalSlotProps:Rr,additionalProps:{style:_extends$2({},Yn[pn].offset(Wn),Yn[pn].leap(dn))},ownerState:_extends$2({},zn,Rr==null?void 0:Rr.ownerState),className:mn.track}),gi=useSlotProps({elementType:_r,getSlotProps:Mn,externalSlotProps:Yr,ownerState:_extends$2({},zn,Yr==null?void 0:Yr.ownerState),className:mn.thumb}),xi=useSlotProps({elementType:dr,externalSlotProps:li,ownerState:_extends$2({},zn,li==null?void 0:li.ownerState),className:mn.valueLabel}),Ni=useSlotProps({elementType:Sr,externalSlotProps:ei,ownerState:zn,className:mn.mark}),fi=useSlotProps({elementType:sr,externalSlotProps:Pr,ownerState:zn,className:mn.markLabel}),bi=useSlotProps({elementType:nr,getSlotProps:Rn,externalSlotProps:hi,ownerState:zn});return jsxRuntimeExports.jsxs(Pn,_extends$2({},mi,{children:[jsxRuntimeExports.jsx(ur,_extends$2({},yi)),jsxRuntimeExports.jsx(er,_extends$2({},Gi)),kn.filter(oi=>oi.value>=Jt&&oi.value<=Yt).map((oi,ki)=>{const Co=valueToPercent(oi.value,Jt,Yt),Wi=Yn[pn].offset(Co);let Di;return wn===!1?Di=jn.indexOf(oi.value)!==-1:Di=wn==="normal"&&(Gt?oi.value>=jn[0]&&oi.value<=jn[jn.length-1]:oi.value<=jn[0])||wn==="inverted"&&(Gt?oi.value<=jn[0]||oi.value>=jn[jn.length-1]:oi.value>=jn[0]),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(Sr,_extends$2({"data-index":ki},Ni,!isHostComponent(Sr)&&{markActive:Di},{style:_extends$2({},Wi,Ni.style),className:clsx(Ni.className,Di&&mn.markActive)})),oi.label!=null?jsxRuntimeExports.jsx(sr,_extends$2({"aria-hidden":!0,"data-index":ki},fi,!isHostComponent(sr)&&{markLabelActive:Di},{style:_extends$2({},Wi,fi.style),className:clsx(mn.markLabel,fi.className,Di&&mn.markLabelActive),children:oi.label})):null]},ki)}),jn.map((oi,ki)=>{const Co=valueToPercent(oi,Jt,Yt),Wi=Yn[pn].offset(Co),Di=Tn==="off"?Forward:dr;return jsxRuntimeExports.jsx(Di,_extends$2({},!isHostComponent(Di)&&{valueLabelFormat:xn,valueLabelDisplay:Tn,value:typeof xn=="function"?xn(sn(oi),ki):xn,index:ki,open:Xn===ki||Jn===ki||Tn==="on",disabled:vn},xi,{children:jsxRuntimeExports.jsx(_r,_extends$2({"data-index":ki},gi,{className:clsx(mn.thumb,gi.className,Jn===ki&&mn.active,tn===ki&&mn.focusVisible),style:_extends$2({},Wi,Bn(ki),gi.style),children:jsxRuntimeExports.jsx(nr,_extends$2({"data-index":ki,"aria-label":Sn?Sn(ki):jt,"aria-valuenow":sn(oi),"aria-labelledby":an,"aria-valuetext":Cn?Cn(sn(oi),ki):Ke,value:jn[ki]},bi))}))}),ki)})]}))}),Slider$1=Slider;function getSnackbarContentUtilityClass(ne){return generateUtilityClass$2("MuiSnackbarContent",ne)}generateUtilityClasses$2("MuiSnackbarContent",["root","message","action"]);const _excluded$d=["action","className","message","role"],useUtilityClasses$9=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"],action:["action"],message:["message"]},getSnackbarContentUtilityClass,oe)},SnackbarContentRoot=styled$1(Paper$1,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(ne,oe)=>oe.root})(({theme:ne})=>{const oe=ne.palette.mode==="light"?.8:.98,ce=emphasize_1(ne.palette.background.default,oe);return _extends$2({},ne.typography.body2,{color:ne.vars?ne.vars.palette.SnackbarContent.color:ne.palette.getContrastText(ce),backgroundColor:ne.vars?ne.vars.palette.SnackbarContent.bg:ce,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(ne.vars||ne).shape.borderRadius,flexGrow:1,[ne.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),SnackbarContentMessage=styled$1("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(ne,oe)=>oe.message})({padding:"8px 0"}),SnackbarContentAction=styled$1("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(ne,oe)=>oe.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),SnackbarContent=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSnackbarContent"}),{action:pe,className:me,message:ge,role:ye="alert"}=ue,ve=_objectWithoutPropertiesLoose$2(ue,_excluded$d),xe=ue,_e=useUtilityClasses$9(xe);return jsxRuntimeExports.jsxs(SnackbarContentRoot,_extends$2({role:ye,square:!0,elevation:6,className:clsx(_e.root,me),ownerState:xe,ref:ce},ve,{children:[jsxRuntimeExports.jsx(SnackbarContentMessage,{className:_e.message,ownerState:xe,children:ge}),pe?jsxRuntimeExports.jsx(SnackbarContentAction,{className:_e.action,ownerState:xe,children:pe}):null]}))}),SnackbarContent$1=SnackbarContent;function getSnackbarUtilityClass(ne){return generateUtilityClass$2("MuiSnackbar",ne)}generateUtilityClasses$2("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const _excluded$c=["onEnter","onExited"],_excluded2=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],useUtilityClasses$8=ne=>{const{classes:oe,anchorOrigin:ce}=ne,ue={root:["root",`anchorOrigin${capitalize$1(ce.vertical)}${capitalize$1(ce.horizontal)}`]};return composeClasses$1(ue,getSnackbarUtilityClass,oe)},SnackbarRoot=styled$1("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,oe[`anchorOrigin${capitalize$1(ce.anchorOrigin.vertical)}${capitalize$1(ce.anchorOrigin.horizontal)}`]]}})(({theme:ne,ownerState:oe})=>{const ce={left:"50%",right:"auto",transform:"translateX(-50%)"};return _extends$2({zIndex:(ne.vars||ne).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},oe.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},oe.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},oe.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[ne.breakpoints.up("sm")]:_extends$2({},oe.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},oe.anchorOrigin.horizontal==="center"&&ce,oe.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},oe.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),Snackbar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiSnackbar"}),pe=useTheme$1(),me={enter:pe.transitions.duration.enteringScreen,exit:pe.transitions.duration.leavingScreen},{action:ge,anchorOrigin:{vertical:ye,horizontal:ve}={vertical:"bottom",horizontal:"left"},autoHideDuration:xe=null,children:_e,className:Se,ClickAwayListenerProps:$e,ContentProps:Re,disableWindowBlurListener:Ae=!1,message:Ie,open:ke,TransitionComponent:Be=Grow$1,transitionDuration:Ne=me,TransitionProps:{onEnter:Fe,onExited:Ue}={}}=ue,We=_objectWithoutPropertiesLoose$2(ue.TransitionProps,_excluded$c),qe=_objectWithoutPropertiesLoose$2(ue,_excluded2),ze=_extends$2({},ue,{anchorOrigin:{vertical:ye,horizontal:ve},autoHideDuration:xe,disableWindowBlurListener:Ae,TransitionComponent:Be,transitionDuration:Ne}),Ge=useUtilityClasses$8(ze),{getRootProps:Ze,onClickAway:Dt}=useSnackbar$1(_extends$2({},ze)),[Je,Ut]=reactExports.useState(!0),jt=useSlotProps({elementType:SnackbarRoot,getSlotProps:Ze,externalForwardedProps:qe,ownerState:ze,additionalProps:{ref:ce},className:[Ge.root,Se]}),Ke=Zt=>{Ut(!0),Ue&&Ue(Zt)},an=(Zt,en)=>{Ut(!1),Fe&&Fe(Zt,en)};return!ke&&Je?null:jsxRuntimeExports.jsx(ClickAwayListener,_extends$2({onClickAway:Dt},$e,{children:jsxRuntimeExports.jsx(SnackbarRoot,_extends$2({},jt,{children:jsxRuntimeExports.jsx(Be,_extends$2({appear:!0,in:ke,timeout:Ne,direction:ye==="top"?"down":"up",onEnter:an,onExited:Ke},We,{children:_e||jsxRuntimeExports.jsx(SnackbarContent$1,_extends$2({message:Ie,action:ge},Re))}))}))}))}),Snackbar$1=Snackbar;function getTooltipUtilityClass(ne){return generateUtilityClass$2("MuiTooltip",ne)}const tooltipClasses=generateUtilityClasses$2("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),tooltipClasses$1=tooltipClasses,_excluded$b=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function round$2(ne){return Math.round(ne*1e5)/1e5}const useUtilityClasses$7=ne=>{const{classes:oe,disableInteractive:ce,arrow:ue,touch:pe,placement:me}=ne,ge={popper:["popper",!ce&&"popperInteractive",ue&&"popperArrow"],tooltip:["tooltip",ue&&"tooltipArrow",pe&&"touch",`tooltipPlacement${capitalize$1(me.split("-")[0])}`],arrow:["arrow"]};return composeClasses$1(ge,getTooltipUtilityClass,oe)},TooltipPopper=styled$1(Popper$1,{name:"MuiTooltip",slot:"Popper",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.popper,!ce.disableInteractive&&oe.popperInteractive,ce.arrow&&oe.popperArrow,!ce.open&&oe.popperClose]}})(({theme:ne,ownerState:oe,open:ce})=>_extends$2({zIndex:(ne.vars||ne).zIndex.tooltip,pointerEvents:"none"},!oe.disableInteractive&&{pointerEvents:"auto"},!ce&&{pointerEvents:"none"},oe.arrow&&{[`&[data-popper-placement*="bottom"] .${tooltipClasses$1.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${tooltipClasses$1.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${tooltipClasses$1.arrow}`]:_extends$2({},oe.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${tooltipClasses$1.arrow}`]:_extends$2({},oe.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),TooltipTooltip=styled$1("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.tooltip,ce.touch&&oe.touch,ce.arrow&&oe.tooltipArrow,oe[`tooltipPlacement${capitalize$1(ce.placement.split("-")[0])}`]]}})(({theme:ne,ownerState:oe})=>_extends$2({backgroundColor:ne.vars?ne.vars.palette.Tooltip.bg:alpha_1(ne.palette.grey[700],.92),borderRadius:(ne.vars||ne).shape.borderRadius,color:(ne.vars||ne).palette.common.white,fontFamily:ne.typography.fontFamily,padding:"4px 8px",fontSize:ne.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:ne.typography.fontWeightMedium},oe.arrow&&{position:"relative",margin:0},oe.touch&&{padding:"8px 16px",fontSize:ne.typography.pxToRem(14),lineHeight:`${round$2(16/14)}em`,fontWeight:ne.typography.fontWeightRegular},{[`.${tooltipClasses$1.popper}[data-popper-placement*="left"] &`]:_extends$2({transformOrigin:"right center"},oe.isRtl?_extends$2({marginLeft:"14px"},oe.touch&&{marginLeft:"24px"}):_extends$2({marginRight:"14px"},oe.touch&&{marginRight:"24px"})),[`.${tooltipClasses$1.popper}[data-popper-placement*="right"] &`]:_extends$2({transformOrigin:"left center"},oe.isRtl?_extends$2({marginRight:"14px"},oe.touch&&{marginRight:"24px"}):_extends$2({marginLeft:"14px"},oe.touch&&{marginLeft:"24px"})),[`.${tooltipClasses$1.popper}[data-popper-placement*="top"] &`]:_extends$2({transformOrigin:"center bottom",marginBottom:"14px"},oe.touch&&{marginBottom:"24px"}),[`.${tooltipClasses$1.popper}[data-popper-placement*="bottom"] &`]:_extends$2({transformOrigin:"center top",marginTop:"14px"},oe.touch&&{marginTop:"24px"})})),TooltipArrow=styled$1("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(ne,oe)=>oe.arrow})(({theme:ne})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:ne.vars?ne.vars.palette.Tooltip.bg:alpha_1(ne.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let hystersisOpen=!1;const hystersisTimer=new Timeout;let cursorPosition={x:0,y:0};function composeEventHandler(ne,oe){return(ce,...ue)=>{oe&&oe(ce,...ue),ne(ce,...ue)}}const Tooltip=reactExports.forwardRef(function(oe,ce){var ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae,Ie,ke,Be,Ne,Fe,Ue,We;const qe=useThemeProps$3({props:oe,name:"MuiTooltip"}),{arrow:ze=!1,children:Ge,components:Ze={},componentsProps:Dt={},describeChild:Je=!1,disableFocusListener:Ut=!1,disableHoverListener:jt=!1,disableInteractive:Ke=!1,disableTouchListener:an=!1,enterDelay:Zt=100,enterNextDelay:en=0,enterTouchDelay:Kt=700,followCursor:Wt=!1,id:un,leaveDelay:Xt=0,leaveTouchDelay:nn=1500,onClose:vn,onOpen:Sn,open:Cn,placement:Nt="bottom",PopperComponent:Yt,PopperProps:Jt={},slotProps:hn={},slots:Ye={},title:Xe,TransitionComponent:Pt=Grow$1,TransitionProps:sn}=qe,yn=_objectWithoutPropertiesLoose$2(qe,_excluded$b),qt=reactExports.isValidElement(Ge)?Ge:jsxRuntimeExports.jsx("span",{children:Ge}),wn=useTheme$1(),Tn=useRtl(),[xn,Nn]=reactExports.useState(),[zn,Yn]=reactExports.useState(null),Kn=reactExports.useRef(!1),Rn=Ke||Wt,Mn=useTimeout(),Xn=useTimeout(),Jn=useTimeout(),pn=useTimeout(),[tn,Gt]=useControlled({controlled:Cn,default:!1,name:"Tooltip",state:"open"});let bn=tn;const kn=useId(un),jn=reactExports.useRef(),Wn=useEventCallback(()=>{jn.current!==void 0&&(document.body.style.WebkitUserSelect=jn.current,jn.current=void 0),pn.clear()});reactExports.useEffect(()=>Wn,[Wn]);const dn=pi=>{hystersisTimer.clear(),hystersisOpen=!0,Gt(!0),Sn&&!bn&&Sn(pi)},Bn=useEventCallback(pi=>{hystersisTimer.start(800+Xt,()=>{hystersisOpen=!1}),Gt(!1),vn&&bn&&vn(pi),Mn.start(wn.transitions.duration.shortest,()=>{Kn.current=!1})}),mn=pi=>{Kn.current&&pi.type!=="touchstart"||(xn&&xn.removeAttribute("title"),Xn.clear(),Jn.clear(),Zt||hystersisOpen&&en?Xn.start(hystersisOpen?en:Zt,()=>{dn(pi)}):dn(pi))},Pn=pi=>{Xn.clear(),Jn.start(Xt,()=>{Bn(pi)})},{isFocusVisibleRef:ur,onBlur:er,onFocus:_r,ref:dr}=useIsFocusVisible(),[,Sr]=reactExports.useState(!1),sr=pi=>{er(pi),ur.current===!1&&(Sr(!1),Pn(pi))},nr=pi=>{xn||Nn(pi.currentTarget),_r(pi),ur.current===!0&&(Sr(!0),mn(pi))},kr=pi=>{Kn.current=!0;const Ki=qt.props;Ki.onTouchStart&&Ki.onTouchStart(pi)},Mr=pi=>{kr(pi),Jn.clear(),Mn.clear(),Wn(),jn.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",pn.start(Kt,()=>{document.body.style.WebkitUserSelect=jn.current,mn(pi)})},Rr=pi=>{qt.props.onTouchEnd&&qt.props.onTouchEnd(pi),Wn(),Jn.start(nn,()=>{Bn(pi)})};reactExports.useEffect(()=>{if(!bn)return;function pi(Ki){(Ki.key==="Escape"||Ki.key==="Esc")&&Bn(Ki)}return document.addEventListener("keydown",pi),()=>{document.removeEventListener("keydown",pi)}},[Bn,bn]);const Yr=useForkRef(qt.ref,dr,Nn,ce);!Xe&&Xe!==0&&(bn=!1);const li=reactExports.useRef(),ei=pi=>{const Ki=qt.props;Ki.onMouseMove&&Ki.onMouseMove(pi),cursorPosition={x:pi.clientX,y:pi.clientY},li.current&&li.current.update()},Pr={},hi=typeof Xe=="string";Je?(Pr.title=!bn&&hi&&!jt?Xe:null,Pr["aria-describedby"]=bn?kn:null):(Pr["aria-label"]=hi?Xe:null,Pr["aria-labelledby"]=bn&&!hi?kn:null);const mi=_extends$2({},Pr,yn,qt.props,{className:clsx(yn.className,qt.props.className),onTouchStart:kr,ref:Yr},Wt?{onMouseMove:ei}:{}),yi={};an||(mi.onTouchStart=Mr,mi.onTouchEnd=Rr),jt||(mi.onMouseOver=composeEventHandler(mn,mi.onMouseOver),mi.onMouseLeave=composeEventHandler(Pn,mi.onMouseLeave),Rn||(yi.onMouseOver=mn,yi.onMouseLeave=Pn)),Ut||(mi.onFocus=composeEventHandler(nr,mi.onFocus),mi.onBlur=composeEventHandler(sr,mi.onBlur),Rn||(yi.onFocus=nr,yi.onBlur=sr));const Gi=reactExports.useMemo(()=>{var pi;let Ki=[{name:"arrow",enabled:!!zn,options:{element:zn,padding:4}}];return(pi=Jt.popperOptions)!=null&&pi.modifiers&&(Ki=Ki.concat(Jt.popperOptions.modifiers)),_extends$2({},Jt.popperOptions,{modifiers:Ki})},[zn,Jt]),gi=_extends$2({},qe,{isRtl:Tn,arrow:ze,disableInteractive:Rn,placement:Nt,PopperComponentProp:Yt,touch:Kn.current}),xi=useUtilityClasses$7(gi),Ni=(ue=(pe=Ye.popper)!=null?pe:Ze.Popper)!=null?ue:TooltipPopper,fi=(me=(ge=(ye=Ye.transition)!=null?ye:Ze.Transition)!=null?ge:Pt)!=null?me:Grow$1,bi=(ve=(xe=Ye.tooltip)!=null?xe:Ze.Tooltip)!=null?ve:TooltipTooltip,oi=(_e=(Se=Ye.arrow)!=null?Se:Ze.Arrow)!=null?_e:TooltipArrow,ki=appendOwnerState(Ni,_extends$2({},Jt,($e=hn.popper)!=null?$e:Dt.popper,{className:clsx(xi.popper,Jt==null?void 0:Jt.className,(Re=(Ae=hn.popper)!=null?Ae:Dt.popper)==null?void 0:Re.className)}),gi),Co=appendOwnerState(fi,_extends$2({},sn,(Ie=hn.transition)!=null?Ie:Dt.transition),gi),Wi=appendOwnerState(bi,_extends$2({},(ke=hn.tooltip)!=null?ke:Dt.tooltip,{className:clsx(xi.tooltip,(Be=(Ne=hn.tooltip)!=null?Ne:Dt.tooltip)==null?void 0:Be.className)}),gi),Di=appendOwnerState(oi,_extends$2({},(Fe=hn.arrow)!=null?Fe:Dt.arrow,{className:clsx(xi.arrow,(Ue=(We=hn.arrow)!=null?We:Dt.arrow)==null?void 0:Ue.className)}),gi);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[reactExports.cloneElement(qt,mi),jsxRuntimeExports.jsx(Ni,_extends$2({as:Yt??Popper$1,placement:Nt,anchorEl:Wt?{getBoundingClientRect:()=>({top:cursorPosition.y,left:cursorPosition.x,right:cursorPosition.x,bottom:cursorPosition.y,width:0,height:0})}:xn,popperRef:li,open:xn?bn:!1,id:kn,transition:!0},yi,ki,{popperOptions:Gi,children:({TransitionProps:pi})=>jsxRuntimeExports.jsx(fi,_extends$2({timeout:wn.transitions.duration.shorter},pi,Co,{children:jsxRuntimeExports.jsxs(bi,_extends$2({},Wi,{children:[Xe,ze?jsxRuntimeExports.jsx(oi,_extends$2({},Di,{ref:Yn})):null]}))}))}))]})}),Tooltip$1=Tooltip;function getSwitchUtilityClass(ne){return generateUtilityClass$2("MuiSwitch",ne)}const switchClasses=generateUtilityClasses$2("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),switchClasses$1=switchClasses,_excluded$a=["className","color","edge","size","sx"],useThemeProps=createUseThemeProps(),useUtilityClasses$6=ne=>{const{classes:oe,edge:ce,size:ue,color:pe,checked:me,disabled:ge}=ne,ye={root:["root",ce&&`edge${capitalize$1(ce)}`,`size${capitalize$1(ue)}`],switchBase:["switchBase",`color${capitalize$1(pe)}`,me&&"checked",ge&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},ve=composeClasses$1(ye,getSwitchUtilityClass,oe);return _extends$2({},oe,ve)},SwitchRoot=styled$1("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.edge&&oe[`edge${capitalize$1(ce.edge)}`],oe[`size${capitalize$1(ce.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${switchClasses$1.thumb}`]:{width:16,height:16},[`& .${switchClasses$1.switchBase}`]:{padding:4,[`&.${switchClasses$1.checked}`]:{transform:"translateX(16px)"}}}}]}),SwitchSwitchBase=styled$1(SwitchBase$1,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.switchBase,{[`& .${switchClasses$1.input}`]:oe.input},ce.color!=="default"&&oe[`color${capitalize$1(ce.color)}`]]}})(({theme:ne})=>({position:"absolute",top:0,left:0,zIndex:1,color:ne.vars?ne.vars.palette.Switch.defaultColor:`${ne.palette.mode==="light"?ne.palette.common.white:ne.palette.grey[300]}`,transition:ne.transitions.create(["left","transform"],{duration:ne.transitions.duration.shortest}),[`&.${switchClasses$1.checked}`]:{transform:"translateX(20px)"},[`&.${switchClasses$1.disabled}`]:{color:ne.vars?ne.vars.palette.Switch.defaultDisabledColor:`${ne.palette.mode==="light"?ne.palette.grey[100]:ne.palette.grey[600]}`},[`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]:{opacity:.5},[`&.${switchClasses$1.disabled} + .${switchClasses$1.track}`]:{opacity:ne.vars?ne.vars.opacity.switchTrackDisabled:`${ne.palette.mode==="light"?.12:.2}`},[`& .${switchClasses$1.input}`]:{left:"-100%",width:"300%"}}),({theme:ne})=>({"&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette.action.activeChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette.action.active,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(ne.palette).filter(([,oe])=>oe.main&&oe.light).map(([oe])=>({props:{color:oe},style:{[`&.${switchClasses$1.checked}`]:{color:(ne.vars||ne).palette[oe].main,"&:hover":{backgroundColor:ne.vars?`rgba(${ne.vars.palette[oe].mainChannel} / ${ne.vars.palette.action.hoverOpacity})`:alpha_1(ne.palette[oe].main,ne.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${switchClasses$1.disabled}`]:{color:ne.vars?ne.vars.palette.Switch[`${oe}DisabledColor`]:`${ne.palette.mode==="light"?lighten_1(ne.palette[oe].main,.62):darken_1(ne.palette[oe].main,.55)}`}},[`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]:{backgroundColor:(ne.vars||ne).palette[oe].main}}}))]})),SwitchTrack=styled$1("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(ne,oe)=>oe.track})(({theme:ne})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:ne.transitions.create(["opacity","background-color"],{duration:ne.transitions.duration.shortest}),backgroundColor:ne.vars?ne.vars.palette.common.onBackground:`${ne.palette.mode==="light"?ne.palette.common.black:ne.palette.common.white}`,opacity:ne.vars?ne.vars.opacity.switchTrack:`${ne.palette.mode==="light"?.38:.3}`})),SwitchThumb=styled$1("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(ne,oe)=>oe.thumb})(({theme:ne})=>({boxShadow:(ne.vars||ne).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Switch$1=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps({props:oe,name:"MuiSwitch"}),{className:pe,color:me="primary",edge:ge=!1,size:ye="medium",sx:ve}=ue,xe=_objectWithoutPropertiesLoose$2(ue,_excluded$a),_e=_extends$2({},ue,{color:me,edge:ge,size:ye}),Se=useUtilityClasses$6(_e),$e=jsxRuntimeExports.jsx(SwitchThumb,{className:Se.thumb,ownerState:_e});return jsxRuntimeExports.jsxs(SwitchRoot,{className:clsx(Se.root,pe),sx:ve,ownerState:_e,children:[jsxRuntimeExports.jsx(SwitchSwitchBase,_extends$2({type:"checkbox",icon:$e,checkedIcon:$e,ref:ce,ownerState:_e},xe,{classes:_extends$2({},Se,{root:Se.switchBase})})),jsxRuntimeExports.jsx(SwitchTrack,{className:Se.track,ownerState:_e})]})}),Switch$2=Switch$1;function getTabUtilityClass(ne){return generateUtilityClass$2("MuiTab",ne)}const tabClasses=generateUtilityClasses$2("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),tabClasses$1=tabClasses,_excluded$9=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],useUtilityClasses$5=ne=>{const{classes:oe,textColor:ce,fullWidth:ue,wrapped:pe,icon:me,label:ge,selected:ye,disabled:ve}=ne,xe={root:["root",me&&ge&&"labelIcon",`textColor${capitalize$1(ce)}`,ue&&"fullWidth",pe&&"wrapped",ye&&"selected",ve&&"disabled"],iconWrapper:["iconWrapper"]};return composeClasses$1(xe,getTabUtilityClass,oe)},TabRoot=styled$1(ButtonBase$1,{name:"MuiTab",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.label&&ce.icon&&oe.labelIcon,oe[`textColor${capitalize$1(ce.textColor)}`],ce.fullWidth&&oe.fullWidth,ce.wrapped&&oe.wrapped]}})(({theme:ne,ownerState:oe})=>_extends$2({},ne.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},oe.label&&{flexDirection:oe.iconPosition==="top"||oe.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},oe.icon&&oe.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${tabClasses$1.iconWrapper}`]:_extends$2({},oe.iconPosition==="top"&&{marginBottom:6},oe.iconPosition==="bottom"&&{marginTop:6},oe.iconPosition==="start"&&{marginRight:ne.spacing(1)},oe.iconPosition==="end"&&{marginLeft:ne.spacing(1)})},oe.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${tabClasses$1.selected}`]:{opacity:1},[`&.${tabClasses$1.disabled}`]:{opacity:(ne.vars||ne).palette.action.disabledOpacity}},oe.textColor==="primary"&&{color:(ne.vars||ne).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(ne.vars||ne).palette.primary.main},[`&.${tabClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled}},oe.textColor==="secondary"&&{color:(ne.vars||ne).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(ne.vars||ne).palette.secondary.main},[`&.${tabClasses$1.disabled}`]:{color:(ne.vars||ne).palette.text.disabled}},oe.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},oe.wrapped&&{fontSize:ne.typography.pxToRem(12)})),Tab=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTab"}),{className:pe,disabled:me=!1,disableFocusRipple:ge=!1,fullWidth:ye,icon:ve,iconPosition:xe="top",indicator:_e,label:Se,onChange:$e,onClick:Re,onFocus:Ae,selected:Ie,selectionFollowsFocus:ke,textColor:Be="inherit",value:Ne,wrapped:Fe=!1}=ue,Ue=_objectWithoutPropertiesLoose$2(ue,_excluded$9),We=_extends$2({},ue,{disabled:me,disableFocusRipple:ge,selected:Ie,icon:!!ve,iconPosition:xe,label:!!Se,fullWidth:ye,textColor:Be,wrapped:Fe}),qe=useUtilityClasses$5(We),ze=ve&&Se&&reactExports.isValidElement(ve)?reactExports.cloneElement(ve,{className:clsx(qe.iconWrapper,ve.props.className)}):ve,Ge=Dt=>{!Ie&&$e&&$e(Dt,Ne),Re&&Re(Dt)},Ze=Dt=>{ke&&!Ie&&$e&&$e(Dt,Ne),Ae&&Ae(Dt)};return jsxRuntimeExports.jsxs(TabRoot,_extends$2({focusRipple:!ge,className:clsx(qe.root,pe),ref:ce,role:"tab","aria-selected":Ie,disabled:me,onClick:Ge,onFocus:Ze,ownerState:We,tabIndex:Ie?0:-1},Ue,{children:[xe==="top"||xe==="start"?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ze,Se]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Se,ze]}),_e]}))}),Tab$1=Tab;function getToolbarUtilityClass(ne){return generateUtilityClass$2("MuiToolbar",ne)}generateUtilityClasses$2("MuiToolbar",["root","gutters","regular","dense"]);const _excluded$8=["className","component","disableGutters","variant"],useUtilityClasses$4=ne=>{const{classes:oe,disableGutters:ce,variant:ue}=ne;return composeClasses$1({root:["root",!ce&&"gutters",ue]},getToolbarUtilityClass,oe)},ToolbarRoot=styled$1("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,!ce.disableGutters&&oe.gutters,oe[ce.variant]]}})(({theme:ne,ownerState:oe})=>_extends$2({position:"relative",display:"flex",alignItems:"center"},!oe.disableGutters&&{paddingLeft:ne.spacing(2),paddingRight:ne.spacing(2),[ne.breakpoints.up("sm")]:{paddingLeft:ne.spacing(3),paddingRight:ne.spacing(3)}},oe.variant==="dense"&&{minHeight:48}),({theme:ne,ownerState:oe})=>oe.variant==="regular"&&ne.mixins.toolbar),Toolbar=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiToolbar"}),{className:pe,component:me="div",disableGutters:ge=!1,variant:ye="regular"}=ue,ve=_objectWithoutPropertiesLoose$2(ue,_excluded$8),xe=_extends$2({},ue,{component:me,disableGutters:ge,variant:ye}),_e=useUtilityClasses$4(xe);return jsxRuntimeExports.jsx(ToolbarRoot,_extends$2({as:me,className:clsx(_e.root,pe),ref:ce,ownerState:xe},ve))}),Toolbar$1=Toolbar,KeyboardArrowLeft=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),KeyboardArrowRight=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function easeInOutSin(ne){return(1+Math.sin(Math.PI*ne-Math.PI/2))/2}function animate(ne,oe,ce,ue={},pe=()=>{}){const{ease:me=easeInOutSin,duration:ge=300}=ue;let ye=null;const ve=oe[ne];let xe=!1;const _e=()=>{xe=!0},Se=$e=>{if(xe){pe(new Error("Animation cancelled"));return}ye===null&&(ye=$e);const Re=Math.min(1,($e-ye)/ge);if(oe[ne]=me(Re)*(ce-ve)+ve,Re>=1){requestAnimationFrame(()=>{pe(null)});return}requestAnimationFrame(Se)};return ve===ce?(pe(new Error("Element already at target position")),_e):(requestAnimationFrame(Se),_e)}const _excluded$7=["onChange"],styles$1={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ScrollbarSize(ne){const{onChange:oe}=ne,ce=_objectWithoutPropertiesLoose$2(ne,_excluded$7),ue=reactExports.useRef(),pe=reactExports.useRef(null),me=()=>{ue.current=pe.current.offsetHeight-pe.current.clientHeight};return useEnhancedEffect$1(()=>{const ge=debounce$2(()=>{const ve=ue.current;me(),ve!==ue.current&&oe(ue.current)}),ye=ownerWindow(pe.current);return ye.addEventListener("resize",ge),()=>{ge.clear(),ye.removeEventListener("resize",ge)}},[oe]),reactExports.useEffect(()=>{me(),oe(ue.current)},[oe]),jsxRuntimeExports.jsx("div",_extends$2({style:styles$1,ref:pe},ce))}function getTabScrollButtonUtilityClass(ne){return generateUtilityClass$2("MuiTabScrollButton",ne)}const tabScrollButtonClasses=generateUtilityClasses$2("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),tabScrollButtonClasses$1=tabScrollButtonClasses,_excluded$6=["className","slots","slotProps","direction","orientation","disabled"],useUtilityClasses$3=ne=>{const{classes:oe,orientation:ce,disabled:ue}=ne;return composeClasses$1({root:["root",ce,ue&&"disabled"]},getTabScrollButtonUtilityClass,oe)},TabScrollButtonRoot=styled$1(ButtonBase$1,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.root,ce.orientation&&oe[ce.orientation]]}})(({ownerState:ne})=>_extends$2({width:40,flexShrink:0,opacity:.8,[`&.${tabScrollButtonClasses$1.disabled}`]:{opacity:0}},ne.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${ne.isRtl?-90:90}deg)`}})),TabScrollButton=reactExports.forwardRef(function(oe,ce){var ue,pe;const me=useThemeProps$3({props:oe,name:"MuiTabScrollButton"}),{className:ge,slots:ye={},slotProps:ve={},direction:xe}=me,_e=_objectWithoutPropertiesLoose$2(me,_excluded$6),Se=useRtl(),$e=_extends$2({isRtl:Se},me),Re=useUtilityClasses$3($e),Ae=(ue=ye.StartScrollButtonIcon)!=null?ue:KeyboardArrowLeft,Ie=(pe=ye.EndScrollButtonIcon)!=null?pe:KeyboardArrowRight,ke=useSlotProps({elementType:Ae,externalSlotProps:ve.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:$e}),Be=useSlotProps({elementType:Ie,externalSlotProps:ve.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:$e});return jsxRuntimeExports.jsx(TabScrollButtonRoot,_extends$2({component:"div",className:clsx(Re.root,ge),ref:ce,role:null,ownerState:$e,tabIndex:null},_e,{children:xe==="left"?jsxRuntimeExports.jsx(Ae,_extends$2({},ke)):jsxRuntimeExports.jsx(Ie,_extends$2({},Be))}))}),TabScrollButton$1=TabScrollButton;function getTabsUtilityClass(ne){return generateUtilityClass$2("MuiTabs",ne)}const tabsClasses=generateUtilityClasses$2("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tabsClasses$1=tabsClasses,_excluded$5=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],nextItem=(ne,oe)=>ne===oe?ne.firstChild:oe&&oe.nextElementSibling?oe.nextElementSibling:ne.firstChild,previousItem=(ne,oe)=>ne===oe?ne.lastChild:oe&&oe.previousElementSibling?oe.previousElementSibling:ne.lastChild,moveFocus=(ne,oe,ce)=>{let ue=!1,pe=ce(ne,oe);for(;pe;){if(pe===ne.firstChild){if(ue)return;ue=!0}const me=pe.disabled||pe.getAttribute("aria-disabled")==="true";if(!pe.hasAttribute("tabindex")||me)pe=ce(ne,pe);else{pe.focus();return}}},useUtilityClasses$2=ne=>{const{vertical:oe,fixed:ce,hideScrollbar:ue,scrollableX:pe,scrollableY:me,centered:ge,scrollButtonsHideMobile:ye,classes:ve}=ne;return composeClasses$1({root:["root",oe&&"vertical"],scroller:["scroller",ce&&"fixed",ue&&"hideScrollbar",pe&&"scrollableX",me&&"scrollableY"],flexContainer:["flexContainer",oe&&"flexContainerVertical",ge&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",ye&&"scrollButtonsHideMobile"],scrollableX:[pe&&"scrollableX"],hideScrollbar:[ue&&"hideScrollbar"]},getTabsUtilityClass,ve)},TabsRoot=styled$1("div",{name:"MuiTabs",slot:"Root",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[{[`& .${tabsClasses$1.scrollButtons}`]:oe.scrollButtons},{[`& .${tabsClasses$1.scrollButtons}`]:ce.scrollButtonsHideMobile&&oe.scrollButtonsHideMobile},oe.root,ce.vertical&&oe.vertical]}})(({ownerState:ne,theme:oe})=>_extends$2({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},ne.vertical&&{flexDirection:"column"},ne.scrollButtonsHideMobile&&{[`& .${tabsClasses$1.scrollButtons}`]:{[oe.breakpoints.down("sm")]:{display:"none"}}})),TabsScroller=styled$1("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.scroller,ce.fixed&&oe.fixed,ce.hideScrollbar&&oe.hideScrollbar,ce.scrollableX&&oe.scrollableX,ce.scrollableY&&oe.scrollableY]}})(({ownerState:ne})=>_extends$2({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},ne.fixed&&{overflowX:"hidden",width:"100%"},ne.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},ne.scrollableX&&{overflowX:"auto",overflowY:"hidden"},ne.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),FlexContainer=styled$1("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(ne,oe)=>{const{ownerState:ce}=ne;return[oe.flexContainer,ce.vertical&&oe.flexContainerVertical,ce.centered&&oe.centered]}})(({ownerState:ne})=>_extends$2({display:"flex"},ne.vertical&&{flexDirection:"column"},ne.centered&&{justifyContent:"center"})),TabsIndicator=styled$1("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(ne,oe)=>oe.indicator})(({ownerState:ne,theme:oe})=>_extends$2({position:"absolute",height:2,bottom:0,width:"100%",transition:oe.transitions.create()},ne.indicatorColor==="primary"&&{backgroundColor:(oe.vars||oe).palette.primary.main},ne.indicatorColor==="secondary"&&{backgroundColor:(oe.vars||oe).palette.secondary.main},ne.vertical&&{height:"100%",width:2,right:0})),TabsScrollbarSize=styled$1(ScrollbarSize)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),defaultIndicatorStyle={},Tabs=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTabs"}),pe=useTheme$1(),me=useRtl(),{"aria-label":ge,"aria-labelledby":ye,action:ve,centered:xe=!1,children:_e,className:Se,component:$e="div",allowScrollButtonsMobile:Re=!1,indicatorColor:Ae="primary",onChange:Ie,orientation:ke="horizontal",ScrollButtonComponent:Be=TabScrollButton$1,scrollButtons:Ne="auto",selectionFollowsFocus:Fe,slots:Ue={},slotProps:We={},TabIndicatorProps:qe={},TabScrollButtonProps:ze={},textColor:Ge="primary",value:Ze,variant:Dt="standard",visibleScrollbar:Je=!1}=ue,Ut=_objectWithoutPropertiesLoose$2(ue,_excluded$5),jt=Dt==="scrollable",Ke=ke==="vertical",an=Ke?"scrollTop":"scrollLeft",Zt=Ke?"top":"left",en=Ke?"bottom":"right",Kt=Ke?"clientHeight":"clientWidth",Wt=Ke?"height":"width",un=_extends$2({},ue,{component:$e,allowScrollButtonsMobile:Re,indicatorColor:Ae,orientation:ke,vertical:Ke,scrollButtons:Ne,textColor:Ge,variant:Dt,visibleScrollbar:Je,fixed:!jt,hideScrollbar:jt&&!Je,scrollableX:jt&&!Ke,scrollableY:jt&&Ke,centered:xe&&!jt,scrollButtonsHideMobile:!Re}),Xt=useUtilityClasses$2(un),nn=useSlotProps({elementType:Ue.StartScrollButtonIcon,externalSlotProps:We.startScrollButtonIcon,ownerState:un}),vn=useSlotProps({elementType:Ue.EndScrollButtonIcon,externalSlotProps:We.endScrollButtonIcon,ownerState:un}),[Sn,Cn]=reactExports.useState(!1),[Nt,Yt]=reactExports.useState(defaultIndicatorStyle),[Jt,hn]=reactExports.useState(!1),[Ye,Xe]=reactExports.useState(!1),[Pt,sn]=reactExports.useState(!1),[yn,qt]=reactExports.useState({overflow:"hidden",scrollbarWidth:0}),wn=new Map,Tn=reactExports.useRef(null),xn=reactExports.useRef(null),Nn=()=>{const Bn=Tn.current;let mn;if(Bn){const ur=Bn.getBoundingClientRect();mn={clientWidth:Bn.clientWidth,scrollLeft:Bn.scrollLeft,scrollTop:Bn.scrollTop,scrollLeftNormalized:getNormalizedScrollLeft(Bn,me?"rtl":"ltr"),scrollWidth:Bn.scrollWidth,top:ur.top,bottom:ur.bottom,left:ur.left,right:ur.right}}let Pn;if(Bn&&Ze!==!1){const ur=xn.current.children;if(ur.length>0){const er=ur[wn.get(Ze)];Pn=er?er.getBoundingClientRect():null}}return{tabsMeta:mn,tabMeta:Pn}},zn=useEventCallback(()=>{const{tabsMeta:Bn,tabMeta:mn}=Nn();let Pn=0,ur;if(Ke)ur="top",mn&&Bn&&(Pn=mn.top-Bn.top+Bn.scrollTop);else if(ur=me?"right":"left",mn&&Bn){const _r=me?Bn.scrollLeftNormalized+Bn.clientWidth-Bn.scrollWidth:Bn.scrollLeft;Pn=(me?-1:1)*(mn[ur]-Bn[ur]+_r)}const er={[ur]:Pn,[Wt]:mn?mn[Wt]:0};if(isNaN(Nt[ur])||isNaN(Nt[Wt]))Yt(er);else{const _r=Math.abs(Nt[ur]-er[ur]),dr=Math.abs(Nt[Wt]-er[Wt]);(_r>=1||dr>=1)&&Yt(er)}}),Yn=(Bn,{animation:mn=!0}={})=>{mn?animate(an,Tn.current,Bn,{duration:pe.transitions.duration.standard}):Tn.current[an]=Bn},Kn=Bn=>{let mn=Tn.current[an];Ke?mn+=Bn:(mn+=Bn*(me?-1:1),mn*=me&&detectScrollType()==="reverse"?-1:1),Yn(mn)},Rn=()=>{const Bn=Tn.current[Kt];let mn=0;const Pn=Array.from(xn.current.children);for(let ur=0;urBn){ur===0&&(mn=Bn);break}mn+=er[Kt]}return mn},Mn=()=>{Kn(-1*Rn())},Xn=()=>{Kn(Rn())},Jn=reactExports.useCallback(Bn=>{qt({overflow:null,scrollbarWidth:Bn})},[]),pn=()=>{const Bn={};Bn.scrollbarSizeListener=jt?jsxRuntimeExports.jsx(TabsScrollbarSize,{onChange:Jn,className:clsx(Xt.scrollableX,Xt.hideScrollbar)}):null;const Pn=jt&&(Ne==="auto"&&(Jt||Ye)||Ne===!0);return Bn.scrollButtonStart=Pn?jsxRuntimeExports.jsx(Be,_extends$2({slots:{StartScrollButtonIcon:Ue.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:nn},orientation:ke,direction:me?"right":"left",onClick:Mn,disabled:!Jt},ze,{className:clsx(Xt.scrollButtons,ze.className)})):null,Bn.scrollButtonEnd=Pn?jsxRuntimeExports.jsx(Be,_extends$2({slots:{EndScrollButtonIcon:Ue.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:vn},orientation:ke,direction:me?"left":"right",onClick:Xn,disabled:!Ye},ze,{className:clsx(Xt.scrollButtons,ze.className)})):null,Bn},tn=useEventCallback(Bn=>{const{tabsMeta:mn,tabMeta:Pn}=Nn();if(!(!Pn||!mn)){if(Pn[Zt]mn[en]){const ur=mn[an]+(Pn[en]-mn[en]);Yn(ur,{animation:Bn})}}}),Gt=useEventCallback(()=>{jt&&Ne!==!1&&sn(!Pt)});reactExports.useEffect(()=>{const Bn=debounce$2(()=>{Tn.current&&zn()});let mn;const Pn=_r=>{_r.forEach(dr=>{dr.removedNodes.forEach(Sr=>{var sr;(sr=mn)==null||sr.unobserve(Sr)}),dr.addedNodes.forEach(Sr=>{var sr;(sr=mn)==null||sr.observe(Sr)})}),Bn(),Gt()},ur=ownerWindow(Tn.current);ur.addEventListener("resize",Bn);let er;return typeof ResizeObserver<"u"&&(mn=new ResizeObserver(Bn),Array.from(xn.current.children).forEach(_r=>{mn.observe(_r)})),typeof MutationObserver<"u"&&(er=new MutationObserver(Pn),er.observe(xn.current,{childList:!0})),()=>{var _r,dr;Bn.clear(),ur.removeEventListener("resize",Bn),(_r=er)==null||_r.disconnect(),(dr=mn)==null||dr.disconnect()}},[zn,Gt]),reactExports.useEffect(()=>{const Bn=Array.from(xn.current.children),mn=Bn.length;if(typeof IntersectionObserver<"u"&&mn>0&&jt&&Ne!==!1){const Pn=Bn[0],ur=Bn[mn-1],er={root:Tn.current,threshold:.99},_r=nr=>{hn(!nr[0].isIntersecting)},dr=new IntersectionObserver(_r,er);dr.observe(Pn);const Sr=nr=>{Xe(!nr[0].isIntersecting)},sr=new IntersectionObserver(Sr,er);return sr.observe(ur),()=>{dr.disconnect(),sr.disconnect()}}},[jt,Ne,Pt,_e==null?void 0:_e.length]),reactExports.useEffect(()=>{Cn(!0)},[]),reactExports.useEffect(()=>{zn()}),reactExports.useEffect(()=>{tn(defaultIndicatorStyle!==Nt)},[tn,Nt]),reactExports.useImperativeHandle(ve,()=>({updateIndicator:zn,updateScrollButtons:Gt}),[zn,Gt]);const bn=jsxRuntimeExports.jsx(TabsIndicator,_extends$2({},qe,{className:clsx(Xt.indicator,qe.className),ownerState:un,style:_extends$2({},Nt,qe.style)}));let kn=0;const jn=reactExports.Children.map(_e,Bn=>{if(!reactExports.isValidElement(Bn))return null;const mn=Bn.props.value===void 0?kn:Bn.props.value;wn.set(mn,kn);const Pn=mn===Ze;return kn+=1,reactExports.cloneElement(Bn,_extends$2({fullWidth:Dt==="fullWidth",indicator:Pn&&!Sn&&bn,selected:Pn,selectionFollowsFocus:Fe,onChange:Ie,textColor:Ge,value:mn},kn===1&&Ze===!1&&!Bn.props.tabIndex?{tabIndex:0}:{}))}),Wn=Bn=>{const mn=xn.current,Pn=ownerDocument(mn).activeElement;if(Pn.getAttribute("role")!=="tab")return;let er=ke==="horizontal"?"ArrowLeft":"ArrowUp",_r=ke==="horizontal"?"ArrowRight":"ArrowDown";switch(ke==="horizontal"&&me&&(er="ArrowRight",_r="ArrowLeft"),Bn.key){case er:Bn.preventDefault(),moveFocus(mn,Pn,previousItem);break;case _r:Bn.preventDefault(),moveFocus(mn,Pn,nextItem);break;case"Home":Bn.preventDefault(),moveFocus(mn,null,nextItem);break;case"End":Bn.preventDefault(),moveFocus(mn,null,previousItem);break}},dn=pn();return jsxRuntimeExports.jsxs(TabsRoot,_extends$2({className:clsx(Xt.root,Se),ownerState:un,ref:ce,as:$e},Ut,{children:[dn.scrollButtonStart,dn.scrollbarSizeListener,jsxRuntimeExports.jsxs(TabsScroller,{className:Xt.scroller,ownerState:un,style:{overflow:yn.overflow,[Ke?`margin${me?"Left":"Right"}`:"marginBottom"]:Je?void 0:-yn.scrollbarWidth},ref:Tn,children:[jsxRuntimeExports.jsx(FlexContainer,{"aria-label":ge,"aria-labelledby":ye,"aria-orientation":ke==="vertical"?"vertical":null,className:Xt.flexContainer,ownerState:un,onKeyDown:Wn,ref:xn,role:"tablist",children:jn}),Sn&&bn]}),dn.scrollButtonEnd]}))}),Tabs$1=Tabs;function getTextFieldUtilityClass(ne){return generateUtilityClass$2("MuiTextField",ne)}generateUtilityClasses$2("MuiTextField",["root"]);const _excluded$4=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],variantComponent={standard:Input$1,filled:FilledInput$1,outlined:OutlinedInput$1},useUtilityClasses$1=ne=>{const{classes:oe}=ne;return composeClasses$1({root:["root"]},getTextFieldUtilityClass,oe)},TextFieldRoot=styled$1(FormControl$1,{name:"MuiTextField",slot:"Root",overridesResolver:(ne,oe)=>oe.root})({}),TextField=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTextField"}),{autoComplete:pe,autoFocus:me=!1,children:ge,className:ye,color:ve="primary",defaultValue:xe,disabled:_e=!1,error:Se=!1,FormHelperTextProps:$e,fullWidth:Re=!1,helperText:Ae,id:Ie,InputLabelProps:ke,inputProps:Be,InputProps:Ne,inputRef:Fe,label:Ue,maxRows:We,minRows:qe,multiline:ze=!1,name:Ge,onBlur:Ze,onChange:Dt,onFocus:Je,placeholder:Ut,required:jt=!1,rows:Ke,select:an=!1,SelectProps:Zt,type:en,value:Kt,variant:Wt="outlined"}=ue,un=_objectWithoutPropertiesLoose$2(ue,_excluded$4),Xt=_extends$2({},ue,{autoFocus:me,color:ve,disabled:_e,error:Se,fullWidth:Re,multiline:ze,required:jt,select:an,variant:Wt}),nn=useUtilityClasses$1(Xt),vn={};Wt==="outlined"&&(ke&&typeof ke.shrink<"u"&&(vn.notched=ke.shrink),vn.label=Ue),an&&((!Zt||!Zt.native)&&(vn.id=void 0),vn["aria-describedby"]=void 0);const Sn=useId(Ie),Cn=Ae&&Sn?`${Sn}-helper-text`:void 0,Nt=Ue&&Sn?`${Sn}-label`:void 0,Yt=variantComponent[Wt],Jt=jsxRuntimeExports.jsx(Yt,_extends$2({"aria-describedby":Cn,autoComplete:pe,autoFocus:me,defaultValue:xe,fullWidth:Re,multiline:ze,name:Ge,rows:Ke,maxRows:We,minRows:qe,type:en,value:Kt,id:Sn,inputRef:Fe,onBlur:Ze,onChange:Dt,onFocus:Je,placeholder:Ut,inputProps:Be},vn,Ne));return jsxRuntimeExports.jsxs(TextFieldRoot,_extends$2({className:clsx(nn.root,ye),disabled:_e,error:Se,fullWidth:Re,ref:ce,required:jt,color:ve,variant:Wt,ownerState:Xt},un,{children:[Ue!=null&&Ue!==""&&jsxRuntimeExports.jsx(InputLabel$1,_extends$2({htmlFor:Sn,id:Nt},ke,{children:Ue})),an?jsxRuntimeExports.jsx(Select$2,_extends$2({"aria-describedby":Cn,id:Sn,labelId:Nt,value:Kt,input:Jt},Zt,{children:ge})):Jt,Ae&&jsxRuntimeExports.jsx(FormHelperText$1,_extends$2({id:Cn},$e,{children:Ae}))]}))}),TextField$1=TextField,Flex=reactExports.forwardRef(({vertical:ne,...oe},ce)=>jsxRuntimeExports.jsx(Box$1,{ref:ce,position:"relative",height:"100%",width:"100%",display:"flex",flexDirection:ne?"column":"row",...oe})),TreeIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3zM7 9H4V5h3zm10 6h3v4h-3zm0-10h3v4h-3z"}),"AccountTreeOutlined"),Add=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),ArrowBack=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),ArrowForwardOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForwardOutlined"),ArrowOutwardRounded=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 7c0 .55.45 1 1 1h7.59l-8.88 8.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L16 9.41V17c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1"}),"ArrowOutwardRounded"),BlurCircularOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1M7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5m3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1"}),"BlurCircularOutlined"),DisabledIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5m-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5M10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5M14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5m-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5"}),"BlurOnOutlined"),DebuggerIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65C8.03 15.48 8 15.23 8 15v-4c0-.23.03-.48.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18c.31-.08.63-.12.94-.12.32 0 .63.04.95.12l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69zm-6 2h4v2h-4zm0-4h4v2h-4z"}),"BugReportOutlined"),CameraOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m14.25 2.26-.08-.04-.01.02C13.46 2.09 12.74 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-4.75-3.31-8.72-7.75-9.74M19.41 9h-7.99l2.71-4.7c2.4.66 4.35 2.42 5.28 4.7M13.1 4.08 10.27 9l-1.15 2L6.4 6.3C7.84 4.88 9.82 4 12 4c.37 0 .74.03 1.1.08M5.7 7.09 8.54 12l1.15 2H4.26C4.1 13.36 4 12.69 4 12c0-1.85.64-3.55 1.7-4.91M4.59 15h7.98l-2.71 4.7c-2.4-.67-4.34-2.42-5.27-4.7m6.31 4.91L14.89 13l2.72 4.7C16.16 19.12 14.18 20 12 20c-.38 0-.74-.04-1.1-.09m7.4-3-4-6.91h5.43c.17.64.27 1.31.27 2 0 1.85-.64 3.55-1.7 4.91"}),"CameraOutlined"),CenterFocusWeakOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M5 15H3v4c0 1.1.9 2 2 2h4v-2H5zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2zm7 3c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m7-11h-4v2h4v4h2V5c0-1.1-.9-2-2-2m0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2z"}),"CenterFocusWeakOutlined"),CheckOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"CheckOutlined"),PreviousIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeftOutlined"),NextIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRightOutlined"),DeleteIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"ClearOutlined"),CloseOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined"),CodeOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"CodeOutlined"),DataObjectOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObjectOutlined"),DoneAllOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"}),"DoneAllOutlined"),DownloadOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 9h-4V3H9v6H5l7 7zm-8 2V5h2v6h1.17L12 13.17 9.83 11zm-6 7h14v2H5z"}),"DownloadOutlined"),DragHandleOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 9H4v2h16zM4 15h16v-2H4z"}),"DragHandleOutlined"),DragIndicatorOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicatorOutlined"),EditIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined"),ErrorOutlineOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutlineOutlined"),FiberManualRecord=createSvgIcon(jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),FiberManualRecordOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6m0-2c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8"}),"FiberManualRecordOutlined"),FileOpenOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15 22H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h8l6 6v6h-2V9h-5V4H6v16h9zm4-.34v-2.24l2.95 2.95 1.41-1.41L20.41 18h2.24v-2H17v5.66z"}),"FileOpenOutlined"),RotateIcon=createSvgIcon([jsxRuntimeExports.jsx("path",{d:"M9 12c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3m4 0c0 .55-.45 1-1 1s-1-.45-1-1 .45-1 1-1 1 .45 1 1"},"0"),jsxRuntimeExports.jsx("path",{d:"M8 10V8H5.09C6.47 5.61 9.05 4 12 4c3.72 0 6.85 2.56 7.74 6h2.06c-.93-4.56-4.96-8-9.8-8-3.27 0-6.18 1.58-8 4.01V4H2v6zm8 4v2h2.91c-1.38 2.39-3.96 4-6.91 4-3.72 0-6.85-2.56-7.74-6H2.2c.93 4.56 4.96 8 9.8 8 3.27 0 6.18-1.58 8-4.01V20h2v-6z"},"1")],"FlipCameraAndroidOutlined"),FullscreenOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"FullscreenOutlined"),GitHub=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),KeyboardArrowDownOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDownOutlined"),LaunchOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"LaunchOutlined"),LayersIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27zm0-11.47L17.74 9 12 13.47 6.26 9z"}),"LayersOutlined"),ListOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7zm-4 6h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"ListOutlined"),MapTwoTone=createSvgIcon([jsxRuntimeExports.jsx("path",{d:"m5 18.31 3-1.16V5.45L5 6.46zm11 .24 3-1.01V5.69l-3 1.17z",opacity:".3"},"0"),jsxRuntimeExports.jsx("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M8 17.15l-3 1.16V6.46l3-1.01zm6 1.38-4-1.4V5.47l4 1.4zm5-.99-3 1.01V6.86l3-1.16z"},"1")],"MapTwoTone"),ModeStandbyOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3"}),"ModeStandbyOutlined"),MoreVertOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVertOutlined"),NavigateNextOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10.02 6 8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6z"}),"NavigateNextOutlined"),OpenInNewOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNewOutlined"),PauseIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"PauseOutlined"),DestinationIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14M12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2"}),"PlaceOutlined"),PlayIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M10 8.64 15.27 12 10 15.36zM8 5v14l11-7z"}),"PlayArrowOutlined"),ResetIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"ReplayOutlined"),RestartAltOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 13c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91m14 0c0-4.42-3.58-8-8-8-.06 0-.12.01-.18.01l1.09-1.09L11.5 2.5 8 6l3.5 3.5 1.41-1.41-1.08-1.08c.06 0 .12-.01.17-.01 3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93"}),"RestartAltOutlined"),RocketIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 15c-.83 0-1.58.34-2.12.88C2.7 17.06 2 22 2 22s4.94-.7 6.12-1.88c.54-.54.88-1.29.88-2.12 0-1.66-1.34-3-3-3m.71 3.71c-.28.28-2.17.76-2.17.76s.47-1.88.76-2.17c.17-.19.42-.3.7-.3.55 0 1 .45 1 1 0 .28-.11.53-.29.71m10.71-5.06c6.36-6.36 4.24-11.31 4.24-11.31S16.71.22 10.35 6.58l-2.49-.5c-.65-.13-1.33.08-1.81.55L2 10.69l5 2.14L11.17 17l2.14 5 4.05-4.05c.47-.47.68-1.15.55-1.81zM7.41 10.83l-1.91-.82 1.97-1.97 1.44.29c-.57.83-1.08 1.7-1.5 2.5m6.58 7.67-.82-1.91c.8-.42 1.67-.93 2.49-1.5l.29 1.44zM16 12.24c-1.32 1.32-3.38 2.4-4.04 2.73l-2.93-2.93c.32-.65 1.4-2.71 2.73-4.04 4.68-4.68 8.23-3.99 8.23-3.99s.69 3.55-3.99 8.23M15 11c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2"}),"RocketLaunchOutlined"),RouteTwoTone=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"6",cy:"6",r:"1",opacity:".3"},"0"),jsxRuntimeExports.jsx("circle",{cx:"18",cy:"18",r:"1",opacity:".3"},"1"),jsxRuntimeExports.jsx("path",{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82M6 7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m12 12c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"},"2")],"RouteTwoTone"),SearchOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined"),StepsIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 18h12v-2H9zM3 6v2h18V6zm6 7h12v-2H9z"}),"SegmentOutlined"),SettingsIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"SettingsOutlined"),ShieldOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83v-4.7l6-2.25 6 2.25z"}),"ShieldOutlined"),SkipIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m6 18 8.5-6L6 6zm2-8.14L11.03 12 8 14.14zM16 6h2v12h-2z"}),"SkipNextOutlined"),StopIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6zm6.5 2.14L12.97 12 16 9.86z"}),"SkipPreviousOutlined"),TimelineOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2"}),"TimelineOutlined"),TimesOneMobiledataOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M4 7h4v10H6V9H4zm11.83 4.72L18.66 7h-2.33l-1.66 2.77L13 7h-2.33l2.83 4.72L10.33 17h2.33l2-3.34 2 3.34H19z"}),"TimesOneMobiledataOutlined"),StartIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12m10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6"}),"TripOriginOutlined"),SplitIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 13H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2m0 6H5v-4h14zm0-16H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 6H5V5h14z"}),"ViewAgendaOutlined"),ViewportIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M3 4c0-.55.45-1 1-1h2V1H4C2.34 1 1 2.34 1 4v2h2zm0 16v-2H1v2c0 1.66 1.34 3 3 3h2v-2H4c-.55 0-1-.45-1-1M20 1h-2v2h2c.55 0 1 .45 1 1v2h2V4c0-1.66-1.34-3-3-3m1 19c0 .55-.45 1-1 1h-2v2h2c1.66 0 3-1.34 3-3v-2h-2zm-2-5.13V9.13c0-.72-.38-1.38-1-1.73l-5-2.88c-.31-.18-.65-.27-1-.27s-.69.09-1 .27L6 7.39c-.62.36-1 1.02-1 1.74v5.74c0 .72.38 1.38 1 1.73l5 2.88c.31.18.65.27 1 .27s.69-.09 1-.27l5-2.88c.62-.35 1-1.01 1-1.73m-8 2.3-4-2.3v-4.63l4 2.33zm1-6.33L8.04 8.53 12 6.25l3.96 2.28zm5 4.03-4 2.3v-4.6l4-2.33z"}),"ViewInArOutlined"),WidgetsOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m16.66 4.52 2.83 2.83-2.83 2.83-2.83-2.83zM9 5v4H5V5zm10 10v4h-4v-4zM9 15v4H5v-4zm7.66-13.31L11 7.34 16.66 13l5.66-5.66zM11 3H3v8h8zm10 10h-8v8h8zm-10 0H3v8h8z"}),"WidgetsOutlined"),WorkspacesOutlined=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M6 15c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4m6-8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4m6 12c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4"}),"WorkspacesOutlined");var lodash$1={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -273,7 +273,7 @@ __p += '`),Qr&&(hr+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+hr+`return __p -}`;var Wr=Qu(function(){return ri(_n,Ir+"return "+hr).apply(ce,In)});if(Wr.source=hr,Ol(Wr))throw Wr;return Wr}function Zg(we){return ii(we).toLowerCase()}function Qg(we){return ii(we).toUpperCase()}function Jg(we,Te,je){if(we=ii(we),we&&(je||Te===ce))return sc(we);if(!we||!(Te=no(Te)))return we;var Qe=vo(we),cn=vo(Te),_n=lc(Qe,cn),In=cc(Qe,cn)+1;return Yo(Qe,_n,In).join("")}function e1(we,Te,je){if(we=ii(we),we&&(je||Te===ce))return we.slice(0,dc(we)+1);if(!we||!(Te=no(Te)))return we;var Qe=vo(we),cn=cc(Qe,vo(Te))+1;return Yo(Qe,0,cn).join("")}function t1(we,Te,je){if(we=ii(we),we&&(je||Te===ce))return we.replace(mi,"");if(!we||!(Te=no(Te)))return we;var Qe=vo(we),cn=lc(Qe,vo(Te));return Yo(Qe,cn).join("")}function n1(we,Te){var je=Dt,Qe=Je;if(Si(Te)){var cn="separator"in Te?Te.separator:cn;je="length"in Te?Gr(Te.length):je,Qe="omission"in Te?no(Te.omission):Qe}we=ii(we);var _n=we.length;if(fa(we)){var In=vo(we);_n=In.length}if(je>=_n)return we;var Dn=je-pa(Qe);if(Dn<1)return Qe;var Hn=In?Yo(In,0,Dn).join(""):we.slice(0,Dn);if(cn===ce)return Hn+Qe;if(In&&(Dn+=Hn.length-Dn),Ml(cn)){if(we.slice(Dn).search(cn)){var rr,ir=Hn;for(cn.global||(cn=Ks(cn.source,ii(ki.exec(cn))+"g")),cn.lastIndex=0;rr=cn.exec(ir);)var hr=rr.index;Hn=Hn.slice(0,hr===ce?Dn:hr)}}else if(we.indexOf(no(cn),Dn)!=Dn){var br=Hn.lastIndexOf(cn);br>-1&&(Hn=Hn.slice(0,br))}return Hn+Qe}function r1(we){return we=ii(we),we&&sr.test(we)?we.replace(dr,kd):we}var i1=_a(function(we,Te,je){return we+(je?" ":"")+Te.toUpperCase()}),Bl=Jc("toUpperCase");function Zu(we,Te,je){return we=ii(we),Te=je?ce:Te,Te===ce?Td(we)?Md(we):vi(we):we.match(Te)||[]}var Qu=qr(function(we,Te){try{return Vn(we,ce,Te)}catch(je){return Ol(je)?je:new Fr(je)}}),o1=Mo(function(we,Te){return lr(Te,function(je){je=To(je),Po(we,je,kl(we[je],we))}),we});function a1(we){var Te=we==null?0:we.length,je=Dr();return we=Te?xr(we,function(Qe){if(typeof Qe[1]!="function")throw new lo(ge);return[je(Qe[0]),Qe[1]]}):[],qr(function(Qe){for(var cn=-1;++cnKt)return[];var je=Xt,Qe=zi(we,Xt);Te=Dr(Te),we-=Xt;for(var cn=Vs(Qe,Te);++je0||Te<0)?new Kr(je):(we<0?je=je.takeRight(-we):we&&(je=je.drop(we)),Te!==ce&&(Te=Gr(Te),je=Te<0?je.dropRight(-Te):je.take(Te-we)),je)},Kr.prototype.takeRightWhile=function(we){return this.reverse().takeWhile(we).reverse()},Kr.prototype.toArray=function(){return this.take(Xt)},So(Kr.prototype,function(we,Te){var je=/^(?:filter|find|map|reject)|While$/.test(Te),Qe=/^(?:head|last)$/.test(Te),cn=gn[Qe?"take"+(Te=="last"?"Right":""):Te],_n=Qe||/^find/.test(Te);cn&&(gn.prototype[Te]=function(){var In=this.__wrapped__,Dn=Qe?[1]:arguments,Hn=In instanceof Kr,rr=Dn[0],ir=Hn||zr(In),hr=function(Xr){var Qr=cn.apply(gn,Lr([Xr],Dn));return Qe&&br?Qr[0]:Qr};ir&&je&&typeof rr=="function"&&rr.length!=1&&(Hn=ir=!1);var br=this.__chain__,Ir=!!this.__actions__.length,Br=_n&&!br,Wr=Hn&&!Ir;if(!_n&&ir){In=Wr?In:new Kr(this);var Nr=we.apply(In,Dn);return Nr.__actions__.push({func:$s,args:[hr],thisArg:ce}),new co(Nr,br)}return Br&&Wr?we.apply(this,Dn):(Nr=this.thru(hr),Br?Qe?Nr.value()[0]:Nr.value():Nr)})}),lr(["pop","push","shift","sort","splice","unshift"],function(we){var Te=Ka[we],je=/^(?:push|sort|unshift)$/.test(we)?"tap":"thru",Qe=/^(?:pop|shift)$/.test(we);gn.prototype[we]=function(){var cn=arguments;if(Qe&&!this.__chain__){var _n=this.value();return Te.apply(zr(_n)?_n:[],cn)}return this[je](function(In){return Te.apply(zr(In)?In:[],cn)})}}),So(Kr.prototype,function(we,Te){var je=gn[Te];if(je){var Qe=je.name+"";ai.call(ba,Qe)||(ba[Qe]=[]),ba[Qe].push({name:Te,func:je})}}),ba[bs(ce,Be).name]=[{name:"wrapper",func:ce}],Kr.prototype.clone=nh,Kr.prototype.reverse=rh,Kr.prototype.value=ih,gn.prototype.at=Mp,gn.prototype.chain=Lp,gn.prototype.commit=Dp,gn.prototype.next=Bp,gn.prototype.plant=Fp,gn.prototype.reverse=jp,gn.prototype.toJSON=gn.prototype.valueOf=gn.prototype.value=Up,gn.prototype.first=gn.prototype.head,ka&&(gn.prototype[ka]=Np),gn},ma=Ld();zo?((zo.exports=ma)._=ma,Ya._=ma):Li._=ma}).call(commonjsGlobal)})(lodash$1,lodash$1.exports);var lodashExports$1=lodash$1.exports;function Space(ne){return jsxRuntimeExports.jsx(Box$1,{px:.5,display:"inline-block",...ne})}function Label$1({primary:ne,secondary:oe}){return jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Box$1,{children:ne}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Box$1,{sx:{opacity:.56},children:oe})]})}var __assign$2=function(){return __assign$2=Object.assign||function(oe){for(var ce,ue=1,pe=arguments.length;ue>>0).toString(36)},create$5=function(ne){ne=ne||{};var oe=ne.assign||Object.assign,ce=typeof window=="object",ue=oe({raw:"",pfx:"_",client:ce,assign:oe,stringify:JSON.stringify,kebab:function(pe){return pe.replace(KEBAB_REGEX,"-$&").toLowerCase()},decl:function(pe,me){return pe=ue.kebab(pe),pe+":"+me+";"},hash:function(pe){return hash$1(ue.stringify(pe))},selector:function(pe,me){return pe+(me[0]===":"?"":" ")+me},putRaw:function(pe){ue.raw+=pe}},ne);return ue.client&&(ue.sh||document.head.appendChild(ue.sh=document.createElement("style")),ue.putRaw=function(pe){{var me=ue.sh.sheet;try{me.insertRule(pe,me.cssRules.length)}catch{}}}),ue.put=function(pe,me,ge){var ye="",ve,xe,_e=[];for(ve in me)xe=me[ve],xe instanceof Object&&!(xe instanceof Array)?_e.push(ve):ye+=ue.decl(ve,xe,pe,ge);ye&&(ye=pe+"{"+ye+"}",ue.putRaw(ge?ge+"{"+ye+"}":ye));for(var Se=0;Se<_e.length;Se++)ve=_e[Se],ve[0]==="@"&&ve!=="@font-face"?ue.putAt(pe,me[ve],ve):ue.put(ue.selector(pe,ve),me[ve],ge)},ue.putAt=ue.put,ue},addon$1=function(ne){ne.client&&(document.head.appendChild(ne.msh=document.createElement("style")),ne.createRule=function(oe,ce){var ue=oe+"{}";ce&&(ue=ce+"{"+ue+"}");var pe=ce?ne.msh.sheet:ne.sh.sheet,me=pe.insertRule(ue,pe.cssRules.length),ge=(pe.cssRules||pe.rules)[me];if(ge.index=me,ce){var ye=(ge.cssRules||ge.rules)[0];ge.style=ye.style,ge.styleMap=ye.styleMap}return ge})},removeRule$2={};function removeRule$1(ne){var oe=ne.index,ce=ne.parentStyleSheet,ue=ce.cssRules||ce.rules;for(oe=Math.max(oe,ue.length-1);oe>=0;){if(ue[oe]===ne){ce.deleteRule(oe);break}oe--}}removeRule$2.removeRule=removeRule$1;var removeRule=removeRule$2.removeRule,addon=function(ne){if(!ne.client)return;var oe=ne.kebab;function ce(pe,me){this.rule=ne.createRule(pe,me),this.decl={}}ce.prototype.diff=function(pe){var me=this.decl,ge=this.rule.style,ye;for(ye in me)pe[ye]===void 0&&ge.removeProperty(ye);for(ye in pe)pe[ye]!==me[ye]&&ge.setProperty(oe(ye),pe[ye]);this.decl=pe},ce.prototype.del=function(){removeRule(this.rule)};function ue(){this.tree={}}ue.prototype.diff=function(pe){var me=this.tree;for(var ge in me)if(pe[ge]===void 0){var ye=me[ge];for(var ve in ye)ye[ve].del()}for(var ge in pe)if(me[ge]===void 0)for(var ve in pe[ge]){var xe=new ce(ve,ge);xe.diff(pe[ge][ve]),pe[ge][ve]=xe}else{var _e=me[ge],Se=pe[ge];for(var ve in _e)Se[ve]||_e[ve].del();for(var ve in Se){var xe=_e[ve];xe?(xe.diff(Se[ve]),Se[ve]=xe):(xe=new ce(ve,ge),xe.diff(Se[ve]),Se[ve]=xe)}}this.tree=pe},ne.VRule=ce,ne.VSheet=ue};function cssToTree(ne,oe,ce,ue){var pe={},me=!1,ge,ye;for(ge in oe)ye=oe[ge],typeof ye!="object"&&(me=!0,pe[ge]=ye);me&&(ne[ue]||(ne[ue]={}),ne[ue][ce]=pe);for(ge in oe)if(ye=oe[ge],typeof ye=="object")if(ge[0]==="@")cssToTree(ne,ye,ce,ge);else{var ve=ge.indexOf("&")>-1,xe=ce.split(",");if(ve)for(var _e=0;_eoe,merge$4=(ne,oe)=>({...ne,...oe}),urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nanoid$1=(ne=21)=>{let oe="",ce=crypto.getRandomValues(new Uint8Array(ne));for(;ne--;)oe+=urlAlphabet[ce[ne]&63];return oe};function createSlice(ne,{init:oe,effect:ce,reduce:ue=merge$4}={}){const pe=reactExports.createContext([ne,lodashExports$1.noop,!1,nanoid$1()]);return[()=>reactExports.useContext(pe),({children:me})=>{const[ge,ye]=reactExports.useState(!1),[ve,xe]=useGetSet(ne),[_e,Se]=reactExports.useReducer(()=>nanoid$1(),nanoid$1()),$e=reactExports.useCallback((Ae,Ie)=>{const ke=ue(ve(),Ae(ve()));ce==null||ce({prev:ve(),next:ke}),Ie||Se==null||Se(),xe(ke)},[ve,Se]),Re=reactExports.useMemo(()=>[ve(),$e,ge,_e],[ve(),$e,ge,_e]);return useAsync$1(async()=>{const Ae=await(oe==null?void 0:oe());Ae&&$e(()=>Ae),ye(!0)}),jsxRuntimeExports.jsx(pe.Provider,{value:Re,children:me})}]}function withLocalStorage(ne,oe){return{init:()=>{const ce=localStorage.getItem(ne);return ce?JSON.parse(ce):oe},effect:({next:ce})=>localStorage.setItem(ne,JSON.stringify(ce))}}const[useLog,LogProvider]=createSlice([],{reduce:(ne,oe)=>{switch(oe.action){case"append":return[oe.log,...ne];case"clear":return[]}}}),SnackbarContext=reactExports.createContext(()=>lodashExports$1.noop);function useSnackbar(){return reactExports.useContext(SnackbarContext)}function SnackbarProvider({children:ne}){const[oe,ce]=reactExports.useState([]),[ue,pe]=reactExports.useState(!1),[me,ge]=reactExports.useState(void 0),[,ye]=useLog();reactExports.useEffect(()=>{oe.length&&!me?(ge({...oe[0]}),ce(Se=>Se.slice(1)),pe(!0)):oe.length&&me&&ue&&pe(!1)},[oe,me,ue]);const ve=reactExports.useCallback((Se,$e,Re={})=>(ce(Ae=>[...Ae,{message:jsxRuntimeExports.jsx(Label$1,{primary:Se,secondary:$e}),action:Re.action,actionLabel:Re.actionLabel,key:new Date().getTime()}]),ye(()=>({action:"append",log:{content:lodashExports$1.filter([Se,$e]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`}})),Re.error&&console.error(`${Se}, ${$e}`),()=>xe()),[ce]),xe=(Se,$e)=>{$e!=="clickaway"&&pe(!1)},_e=()=>ge(void 0);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SnackbarContext.Provider,{value:ve,children:ne}),jsxRuntimeExports.jsx(Snackbar$1,{sx:{"> .MuiPaper-root":{bgcolor:"background.paper",color:"text.primary"}},anchorOrigin:{horizontal:"right",vertical:"bottom"},open:ue,autoHideDuration:6e3,onClose:xe,TransitionProps:{onExited:_e},message:me==null?void 0:me.message,action:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[(me==null?void 0:me.action)&&jsxRuntimeExports.jsx(MuiButton,{variant:"text",onClick:Se=>{var $e;($e=me==null?void 0:me.action)==null||$e.call(me),xe==null||xe()},color:"primary",children:me==null?void 0:me.actionLabel}),jsxRuntimeExports.jsx(IconButton$1,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:xe,children:jsxRuntimeExports.jsx(CloseOutlined,{})})]})},me==null?void 0:me.key)]})}function composeClasses(ne,oe,ce=void 0){const ue={};return Object.keys(ne).forEach(pe=>{ue[pe]=ne[pe].reduce((me,ge)=>{if(ge){const ye=oe(ge);ye!==""&&me.push(ye),ce&&ce[ge]&&me.push(ce[ge])}return me},[]).join(" ")}),ue}const defaultGenerator=ne=>ne,createClassNameGenerator=()=>{let ne=defaultGenerator;return{configure(oe){ne=oe},generate(oe){return ne(oe)},reset(){ne=defaultGenerator}}},ClassNameGenerator=createClassNameGenerator(),ClassNameGenerator$1=ClassNameGenerator,globalStateClasses={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(ne,oe,ce="Mui"){const ue=globalStateClasses[oe];return ue?`${ce}-${ue}`:`${ClassNameGenerator$1.generate(ne)}-${oe}`}function generateUtilityClasses(ne,oe,ce="Mui"){const ue={};return oe.forEach(pe=>{ue[pe]=generateUtilityClass(ne,pe,ce)}),ue}const Context=reactExports.createContext(null);function useUniquePrefix(){const[ne,oe]=reactExports.useState(null);return reactExports.useEffect(()=>{oe(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),ne}function TabContext(ne){const{children:oe,value:ce}=ne,ue=useUniquePrefix(),pe=reactExports.useMemo(()=>({idPrefix:ue,value:ce}),[ue,ce]);return jsxRuntimeExports.jsx(Context.Provider,{value:pe,children:oe})}function useTabContext(){return reactExports.useContext(Context)}function getPanelId(ne,oe){const{idPrefix:ce}=ne;return ce===null?null:`${ne.idPrefix}-P-${oe}`}function getTabId(ne,oe){const{idPrefix:ce}=ne;return ce===null?null:`${ne.idPrefix}-T-${oe}`}const _excluded$3=["children"],TabList=reactExports.forwardRef(function(oe,ce){const{children:ue}=oe,pe=_objectWithoutPropertiesLoose$2(oe,_excluded$3),me=useTabContext();if(me===null)throw new TypeError("No TabContext provided");const ge=reactExports.Children.map(ue,ye=>reactExports.isValidElement(ye)?reactExports.cloneElement(ye,{"aria-controls":getPanelId(me,ye.props.value),id:getTabId(me,ye.props.value)}):null);return jsxRuntimeExports.jsx(Tabs$1,_extends$2({},pe,{ref:ce,value:me.value,children:ge}))}),TabList$1=TabList;function getTabPanelUtilityClass(ne){return generateUtilityClass("MuiTabPanel",ne)}generateUtilityClasses("MuiTabPanel",["root"]);const _excluded$2=["children","className","value"],useUtilityClasses=ne=>{const{classes:oe}=ne;return composeClasses({root:["root"]},getTabPanelUtilityClass,oe)},TabPanelRoot=styled$1("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(ne,oe)=>oe.root})(({theme:ne})=>({padding:ne.spacing(3)})),TabPanel=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTabPanel"}),{children:pe,className:me,value:ge}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$2),ve=_extends$2({},ue),xe=useUtilityClasses(ve),_e=useTabContext();if(_e===null)throw new TypeError("No TabContext provided");const Se=getPanelId(_e,ge),$e=getTabId(_e,ge);return jsxRuntimeExports.jsx(TabPanelRoot,_extends$2({"aria-labelledby":$e,className:clsx(xe.root,me),hidden:ge!==_e.value,id:Se,ref:ce,role:"tabpanel",ownerState:ve},ye,{children:ge===_e.value&&pe}))}),TabPanel$1=TabPanel;var colorName={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},names=colorName,colorParse=parse$c,baseHues={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function parse$c(ne){var oe,ce=[],ue=1,pe;if(typeof ne=="string")if(ne=ne.toLowerCase(),names[ne])ce=names[ne].slice(),pe="rgb";else if(ne==="transparent")ue=0,pe="rgb",ce=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(ne)){var me=ne.slice(1),ge=me.length,ye=ge<=4;ue=1,ye?(ce=[parseInt(me[0]+me[0],16),parseInt(me[1]+me[1],16),parseInt(me[2]+me[2],16)],ge===4&&(ue=parseInt(me[3]+me[3],16)/255)):(ce=[parseInt(me[0]+me[1],16),parseInt(me[2]+me[3],16),parseInt(me[4]+me[5],16)],ge===8&&(ue=parseInt(me[6]+me[7],16)/255)),ce[0]||(ce[0]=0),ce[1]||(ce[1]=0),ce[2]||(ce[2]=0),pe="rgb"}else if(oe=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(ne)){var ve=oe[1],xe=ve==="rgb",me=ve.replace(/a$/,"");pe=me;var ge=me==="cmyk"?4:me==="gray"?1:3;ce=oe[2].trim().split(/\s*[,\/]\s*|\s+/).map(function($e,Re){if(/%$/.test($e))return Re===ge?parseFloat($e)/100:me==="rgb"?parseFloat($e)*255/100:parseFloat($e);if(me[Re]==="h"){if(/deg$/.test($e))return parseFloat($e);if(baseHues[$e]!==void 0)return baseHues[$e]}return parseFloat($e)}),ve===me&&ce.push(1),ue=xe||ce[ge]===void 0?1:ce[ge],ce=ce.slice(0,ge)}else ne.length>10&&/[0-9](?:\s|\/)/.test(ne)&&(ce=ne.match(/([0-9]+)/g).map(function(_e){return parseFloat(_e)}),pe=ne.match(/([a-z])/ig).join("").toLowerCase());else isNaN(ne)?Array.isArray(ne)||ne.length?(ce=[ne[0],ne[1],ne[2]],pe="rgb",ue=ne.length===4?ne[3]:1):ne instanceof Object&&(ne.r!=null||ne.red!=null||ne.R!=null?(pe="rgb",ce=[ne.r||ne.red||ne.R||0,ne.g||ne.green||ne.G||0,ne.b||ne.blue||ne.B||0]):(pe="hsl",ce=[ne.h||ne.hue||ne.H||0,ne.s||ne.saturation||ne.S||0,ne.l||ne.lightness||ne.L||ne.b||ne.brightness]),ue=ne.a||ne.alpha||ne.opacity||1,ne.opacity!=null&&(ue/=100)):(pe="rgb",ce=[ne>>>16,(ne&65280)>>>8,ne&255]);return{space:pe,values:ce,alpha:ue}}var rgb$3={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},rgb$2=rgb$3,hsl$1={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(ne){var oe=ne[0]/360,ce=ne[1]/100,ue=ne[2]/100,pe,me,ge,ye,ve;if(ce===0)return ve=ue*255,[ve,ve,ve];ue<.5?me=ue*(1+ce):me=ue+ce-ue*ce,pe=2*ue-me,ye=[0,0,0];for(var xe=0;xe<3;xe++)ge=oe+1/3*-(xe-1),ge<0?ge++:ge>1&&ge--,6*ge<1?ve=pe+(me-pe)*6*ge:2*ge<1?ve=me:3*ge<2?ve=pe+(me-pe)*(2/3-ge)*6:ve=pe,ye[xe]=ve*255;return ye}};rgb$2.hsl=function(ne){var oe=ne[0]/255,ce=ne[1]/255,ue=ne[2]/255,pe=Math.min(oe,ce,ue),me=Math.max(oe,ce,ue),ge=me-pe,ye,ve,xe;return me===pe?ye=0:oe===me?ye=(ce-ue)/ge:ce===me?ye=2+(ue-oe)/ge:ue===me&&(ye=4+(oe-ce)/ge),ye=Math.min(ye*60,360),ye<0&&(ye+=360),xe=(pe+me)/2,me===pe?ve=0:xe<=.5?ve=ge/(me+pe):ve=ge/(2-me-pe),[ye,ve*100,xe*100]};function lerp$2(ne,oe,ce){return ne*(1-ce)+oe*ce}var lerp_1=lerp$2,clamp_1=clamp$1;function clamp$1(ne,oe,ce){return oece?ce:ne:neoe?oe:ne}const parse$b=colorParse,hsl=hsl$1,lerp$1=lerp_1,clamp=clamp_1;var colorInterpolate=interpolate;function interpolate(ne){return ne=ne.map(function(oe){if(oe=parse$b(oe),oe.space!="rgb"){if(oe.space!="hsl")throw"c.spacespace is not supported.";oe.values=hsl.rgb(oe.values)}return oe.values.push(oe.alpha),oe.values}),function(oe,ce){ce=ce||lerp$1,oe=clamp(oe,0,1);var ue=(ne.length-1)*oe,pe=Math.floor(ue),me=Math.ceil(ue);oe=ue-pe;var ge=ne[pe],ye=ne[me],ve=ge.map(function(xe,_e){return xe=ce(xe,ye[_e],oe),_e<3&&(xe=Math.round(xe)),xe});return ve[3]===1?"rgb("+ve.slice(0,3)+")":"rgba("+ve+")"}}const interpolate$1=getDefaultExportFromCjs(colorInterpolate);var reactIs$1={exports:{}},reactIs_production_min$1={};/** @license React v17.0.2 +}`;var Wr=Qu(function(){return ri(_n,Ir+"return "+hr).apply(ce,In)});if(Wr.source=hr,Ol(Wr))throw Wr;return Wr}function Zg(we){return ii(we).toLowerCase()}function Qg(we){return ii(we).toUpperCase()}function Jg(we,Te,je){if(we=ii(we),we&&(je||Te===ce))return sc(we);if(!we||!(Te=no(Te)))return we;var Qe=vo(we),cn=vo(Te),_n=lc(Qe,cn),In=cc(Qe,cn)+1;return Yo(Qe,_n,In).join("")}function e1(we,Te,je){if(we=ii(we),we&&(je||Te===ce))return we.slice(0,dc(we)+1);if(!we||!(Te=no(Te)))return we;var Qe=vo(we),cn=cc(Qe,vo(Te))+1;return Yo(Qe,0,cn).join("")}function t1(we,Te,je){if(we=ii(we),we&&(je||Te===ce))return we.replace(mi,"");if(!we||!(Te=no(Te)))return we;var Qe=vo(we),cn=lc(Qe,vo(Te));return Yo(Qe,cn).join("")}function n1(we,Te){var je=Dt,Qe=Je;if(Si(Te)){var cn="separator"in Te?Te.separator:cn;je="length"in Te?Gr(Te.length):je,Qe="omission"in Te?no(Te.omission):Qe}we=ii(we);var _n=we.length;if(fa(we)){var In=vo(we);_n=In.length}if(je>=_n)return we;var Dn=je-pa(Qe);if(Dn<1)return Qe;var Hn=In?Yo(In,0,Dn).join(""):we.slice(0,Dn);if(cn===ce)return Hn+Qe;if(In&&(Dn+=Hn.length-Dn),Ml(cn)){if(we.slice(Dn).search(cn)){var rr,ir=Hn;for(cn.global||(cn=Ks(cn.source,ii(ki.exec(cn))+"g")),cn.lastIndex=0;rr=cn.exec(ir);)var hr=rr.index;Hn=Hn.slice(0,hr===ce?Dn:hr)}}else if(we.indexOf(no(cn),Dn)!=Dn){var br=Hn.lastIndexOf(cn);br>-1&&(Hn=Hn.slice(0,br))}return Hn+Qe}function r1(we){return we=ii(we),we&&sr.test(we)?we.replace(dr,kd):we}var i1=_a(function(we,Te,je){return we+(je?" ":"")+Te.toUpperCase()}),Bl=Jc("toUpperCase");function Zu(we,Te,je){return we=ii(we),Te=je?ce:Te,Te===ce?Td(we)?Md(we):vi(we):we.match(Te)||[]}var Qu=qr(function(we,Te){try{return Vn(we,ce,Te)}catch(je){return Ol(je)?je:new Fr(je)}}),o1=Mo(function(we,Te){return lr(Te,function(je){je=To(je),Po(we,je,kl(we[je],we))}),we});function a1(we){var Te=we==null?0:we.length,je=Dr();return we=Te?xr(we,function(Qe){if(typeof Qe[1]!="function")throw new lo(ge);return[je(Qe[0]),Qe[1]]}):[],qr(function(Qe){for(var cn=-1;++cnKt)return[];var je=Xt,Qe=zi(we,Xt);Te=Dr(Te),we-=Xt;for(var cn=Vs(Qe,Te);++je0||Te<0)?new Kr(je):(we<0?je=je.takeRight(-we):we&&(je=je.drop(we)),Te!==ce&&(Te=Gr(Te),je=Te<0?je.dropRight(-Te):je.take(Te-we)),je)},Kr.prototype.takeRightWhile=function(we){return this.reverse().takeWhile(we).reverse()},Kr.prototype.toArray=function(){return this.take(Xt)},So(Kr.prototype,function(we,Te){var je=/^(?:filter|find|map|reject)|While$/.test(Te),Qe=/^(?:head|last)$/.test(Te),cn=gn[Qe?"take"+(Te=="last"?"Right":""):Te],_n=Qe||/^find/.test(Te);cn&&(gn.prototype[Te]=function(){var In=this.__wrapped__,Dn=Qe?[1]:arguments,Hn=In instanceof Kr,rr=Dn[0],ir=Hn||zr(In),hr=function(Xr){var Qr=cn.apply(gn,Lr([Xr],Dn));return Qe&&br?Qr[0]:Qr};ir&&je&&typeof rr=="function"&&rr.length!=1&&(Hn=ir=!1);var br=this.__chain__,Ir=!!this.__actions__.length,Br=_n&&!br,Wr=Hn&&!Ir;if(!_n&&ir){In=Wr?In:new Kr(this);var Nr=we.apply(In,Dn);return Nr.__actions__.push({func:$s,args:[hr],thisArg:ce}),new co(Nr,br)}return Br&&Wr?we.apply(this,Dn):(Nr=this.thru(hr),Br?Qe?Nr.value()[0]:Nr.value():Nr)})}),lr(["pop","push","shift","sort","splice","unshift"],function(we){var Te=Ka[we],je=/^(?:push|sort|unshift)$/.test(we)?"tap":"thru",Qe=/^(?:pop|shift)$/.test(we);gn.prototype[we]=function(){var cn=arguments;if(Qe&&!this.__chain__){var _n=this.value();return Te.apply(zr(_n)?_n:[],cn)}return this[je](function(In){return Te.apply(zr(In)?In:[],cn)})}}),So(Kr.prototype,function(we,Te){var je=gn[Te];if(je){var Qe=je.name+"";ai.call(ba,Qe)||(ba[Qe]=[]),ba[Qe].push({name:Te,func:je})}}),ba[bs(ce,Be).name]=[{name:"wrapper",func:ce}],Kr.prototype.clone=nh,Kr.prototype.reverse=rh,Kr.prototype.value=ih,gn.prototype.at=Mp,gn.prototype.chain=Lp,gn.prototype.commit=Dp,gn.prototype.next=Bp,gn.prototype.plant=Fp,gn.prototype.reverse=jp,gn.prototype.toJSON=gn.prototype.valueOf=gn.prototype.value=Up,gn.prototype.first=gn.prototype.head,ka&&(gn.prototype[ka]=Np),gn},ma=Ld();zo?((zo.exports=ma)._=ma,Ya._=ma):Li._=ma}).call(commonjsGlobal)})(lodash$1,lodash$1.exports);var lodashExports$1=lodash$1.exports;function Space(ne){return jsxRuntimeExports.jsx(Box$1,{px:.5,display:"inline-block",...ne})}function Label$1({primary:ne,secondary:oe}){return jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Box$1,{children:ne}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Box$1,{sx:{opacity:.56},children:oe})]})}var __assign$2=function(){return __assign$2=Object.assign||function(oe){for(var ce,ue=1,pe=arguments.length;ue>>0).toString(36)},create$5=function(ne){ne=ne||{};var oe=ne.assign||Object.assign,ce=typeof window=="object",ue=oe({raw:"",pfx:"_",client:ce,assign:oe,stringify:JSON.stringify,kebab:function(pe){return pe.replace(KEBAB_REGEX,"-$&").toLowerCase()},decl:function(pe,me){return pe=ue.kebab(pe),pe+":"+me+";"},hash:function(pe){return hash$1(ue.stringify(pe))},selector:function(pe,me){return pe+(me[0]===":"?"":" ")+me},putRaw:function(pe){ue.raw+=pe}},ne);return ue.client&&(ue.sh||document.head.appendChild(ue.sh=document.createElement("style")),ue.putRaw=function(pe){{var me=ue.sh.sheet;try{me.insertRule(pe,me.cssRules.length)}catch{}}}),ue.put=function(pe,me,ge){var ye="",ve,xe,_e=[];for(ve in me)xe=me[ve],xe instanceof Object&&!(xe instanceof Array)?_e.push(ve):ye+=ue.decl(ve,xe,pe,ge);ye&&(ye=pe+"{"+ye+"}",ue.putRaw(ge?ge+"{"+ye+"}":ye));for(var Se=0;Se<_e.length;Se++)ve=_e[Se],ve[0]==="@"&&ve!=="@font-face"?ue.putAt(pe,me[ve],ve):ue.put(ue.selector(pe,ve),me[ve],ge)},ue.putAt=ue.put,ue},addon$1=function(ne){ne.client&&(document.head.appendChild(ne.msh=document.createElement("style")),ne.createRule=function(oe,ce){var ue=oe+"{}";ce&&(ue=ce+"{"+ue+"}");var pe=ce?ne.msh.sheet:ne.sh.sheet,me=pe.insertRule(ue,pe.cssRules.length),ge=(pe.cssRules||pe.rules)[me];if(ge.index=me,ce){var ye=(ge.cssRules||ge.rules)[0];ge.style=ye.style,ge.styleMap=ye.styleMap}return ge})},removeRule$2={};function removeRule$1(ne){var oe=ne.index,ce=ne.parentStyleSheet,ue=ce.cssRules||ce.rules;for(oe=Math.max(oe,ue.length-1);oe>=0;){if(ue[oe]===ne){ce.deleteRule(oe);break}oe--}}removeRule$2.removeRule=removeRule$1;var removeRule=removeRule$2.removeRule,addon=function(ne){if(!ne.client)return;var oe=ne.kebab;function ce(pe,me){this.rule=ne.createRule(pe,me),this.decl={}}ce.prototype.diff=function(pe){var me=this.decl,ge=this.rule.style,ye;for(ye in me)pe[ye]===void 0&&ge.removeProperty(ye);for(ye in pe)pe[ye]!==me[ye]&&ge.setProperty(oe(ye),pe[ye]);this.decl=pe},ce.prototype.del=function(){removeRule(this.rule)};function ue(){this.tree={}}ue.prototype.diff=function(pe){var me=this.tree;for(var ge in me)if(pe[ge]===void 0){var ye=me[ge];for(var ve in ye)ye[ve].del()}for(var ge in pe)if(me[ge]===void 0)for(var ve in pe[ge]){var xe=new ce(ve,ge);xe.diff(pe[ge][ve]),pe[ge][ve]=xe}else{var _e=me[ge],Se=pe[ge];for(var ve in _e)Se[ve]||_e[ve].del();for(var ve in Se){var xe=_e[ve];xe?(xe.diff(Se[ve]),Se[ve]=xe):(xe=new ce(ve,ge),xe.diff(Se[ve]),Se[ve]=xe)}}this.tree=pe},ne.VRule=ce,ne.VSheet=ue};function cssToTree(ne,oe,ce,ue){var pe={},me=!1,ge,ye;for(ge in oe)ye=oe[ge],typeof ye!="object"&&(me=!0,pe[ge]=ye);me&&(ne[ue]||(ne[ue]={}),ne[ue][ce]=pe);for(ge in oe)if(ye=oe[ge],typeof ye=="object")if(ge[0]==="@")cssToTree(ne,ye,ce,ge);else{var ve=ge.indexOf("&")>-1,xe=ce.split(",");if(ve)for(var _e=0;_eoe,merge$4=(ne,oe)=>({...ne,...oe}),urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nanoid$1=(ne=21)=>{let oe="",ce=crypto.getRandomValues(new Uint8Array(ne));for(;ne--;)oe+=urlAlphabet[ce[ne]&63];return oe};function createSlice(ne,{init:oe,effect:ce,reduce:ue=merge$4}={}){const pe=reactExports.createContext([ne,lodashExports$1.noop,!1,nanoid$1()]);return[()=>reactExports.useContext(pe),({children:me})=>{const[ge,ye]=reactExports.useState(!1),[ve,xe]=useGetSet(ne),[_e,Se]=reactExports.useReducer(()=>nanoid$1(),nanoid$1()),$e=reactExports.useCallback((Ae,Ie)=>{const ke=ue(ve(),Ae(ve()));ce==null||ce({prev:ve(),next:ke}),Ie||Se==null||Se(),xe(ke)},[ve,Se]),Re=reactExports.useMemo(()=>[ve(),$e,ge,_e],[ve(),$e,ge,_e]);return useAsync$1(async()=>{const Ae=await(oe==null?void 0:oe());Ae&&$e(()=>Ae),ye(!0)}),jsxRuntimeExports.jsx(pe.Provider,{value:Re,children:me})}]}function withLocalStorage(ne,oe){return{init:()=>{const ce=localStorage.getItem(ne);return ce?JSON.parse(ce):oe},effect:({next:ce})=>localStorage.setItem(ne,JSON.stringify(ce))}}const[useLog,LogProvider]=createSlice([],{reduce:(ne,oe)=>{switch(oe.action){case"append":return[oe.log,...ne];case"clear":return[]}}}),SnackbarContext=reactExports.createContext(()=>lodashExports$1.noop);function useSnackbar(){return reactExports.useContext(SnackbarContext)}function SnackbarProvider({children:ne}){const[oe,ce]=reactExports.useState([]),[ue,pe]=reactExports.useState(!1),[me,ge]=reactExports.useState(void 0),[,ye]=useLog();reactExports.useEffect(()=>{oe.length&&!me?(ge({...oe[0]}),ce(Se=>Se.slice(1)),pe(!0)):oe.length&&me&&ue&&pe(!1)},[oe,me,ue]);const ve=reactExports.useCallback((Se,$e,Re={})=>(ce(Ae=>[...Ae,{message:jsxRuntimeExports.jsx(Label$1,{primary:Se,secondary:$e}),action:Re.action,actionLabel:Re.actionLabel,key:new Date().getTime()}]),ye(()=>({action:"append",log:{content:lodashExports$1.filter([Se,$e]).join(", "),timestamp:`${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`}})),Re.error&&console.error(`${Se}, ${$e}`),()=>xe()),[ce]),xe=(Se,$e)=>{$e!=="clickaway"&&pe(!1)},_e=()=>ge(void 0);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SnackbarContext.Provider,{value:ve,children:ne}),jsxRuntimeExports.jsx(Snackbar$1,{sx:{"> .MuiPaper-root":{bgcolor:"background.paper",color:"text.primary"}},anchorOrigin:{horizontal:"right",vertical:"bottom"},open:ue,autoHideDuration:6e3,onClose:xe,TransitionProps:{onExited:_e},message:me==null?void 0:me.message,action:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[(me==null?void 0:me.action)&&jsxRuntimeExports.jsx(Button$2,{variant:"text",onClick:Se=>{var $e;($e=me==null?void 0:me.action)==null||$e.call(me),xe==null||xe()},color:"primary",children:me==null?void 0:me.actionLabel}),jsxRuntimeExports.jsx(IconButton$1,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:xe,children:jsxRuntimeExports.jsx(CloseOutlined,{})})]})},me==null?void 0:me.key)]})}function composeClasses(ne,oe,ce=void 0){const ue={};return Object.keys(ne).forEach(pe=>{ue[pe]=ne[pe].reduce((me,ge)=>{if(ge){const ye=oe(ge);ye!==""&&me.push(ye),ce&&ce[ge]&&me.push(ce[ge])}return me},[]).join(" ")}),ue}const defaultGenerator=ne=>ne,createClassNameGenerator=()=>{let ne=defaultGenerator;return{configure(oe){ne=oe},generate(oe){return ne(oe)},reset(){ne=defaultGenerator}}},ClassNameGenerator=createClassNameGenerator(),ClassNameGenerator$1=ClassNameGenerator,globalStateClasses={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(ne,oe,ce="Mui"){const ue=globalStateClasses[oe];return ue?`${ce}-${ue}`:`${ClassNameGenerator$1.generate(ne)}-${oe}`}function generateUtilityClasses(ne,oe,ce="Mui"){const ue={};return oe.forEach(pe=>{ue[pe]=generateUtilityClass(ne,pe,ce)}),ue}const Context=reactExports.createContext(null);function useUniquePrefix(){const[ne,oe]=reactExports.useState(null);return reactExports.useEffect(()=>{oe(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),ne}function TabContext(ne){const{children:oe,value:ce}=ne,ue=useUniquePrefix(),pe=reactExports.useMemo(()=>({idPrefix:ue,value:ce}),[ue,ce]);return jsxRuntimeExports.jsx(Context.Provider,{value:pe,children:oe})}function useTabContext(){return reactExports.useContext(Context)}function getPanelId(ne,oe){const{idPrefix:ce}=ne;return ce===null?null:`${ne.idPrefix}-P-${oe}`}function getTabId(ne,oe){const{idPrefix:ce}=ne;return ce===null?null:`${ne.idPrefix}-T-${oe}`}const _excluded$3=["children"],TabList=reactExports.forwardRef(function(oe,ce){const{children:ue}=oe,pe=_objectWithoutPropertiesLoose$2(oe,_excluded$3),me=useTabContext();if(me===null)throw new TypeError("No TabContext provided");const ge=reactExports.Children.map(ue,ye=>reactExports.isValidElement(ye)?reactExports.cloneElement(ye,{"aria-controls":getPanelId(me,ye.props.value),id:getTabId(me,ye.props.value)}):null);return jsxRuntimeExports.jsx(Tabs$1,_extends$2({},pe,{ref:ce,value:me.value,children:ge}))}),TabList$1=TabList;function getTabPanelUtilityClass(ne){return generateUtilityClass("MuiTabPanel",ne)}generateUtilityClasses("MuiTabPanel",["root"]);const _excluded$2=["children","className","value"],useUtilityClasses=ne=>{const{classes:oe}=ne;return composeClasses({root:["root"]},getTabPanelUtilityClass,oe)},TabPanelRoot=styled$1("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(ne,oe)=>oe.root})(({theme:ne})=>({padding:ne.spacing(3)})),TabPanel=reactExports.forwardRef(function(oe,ce){const ue=useThemeProps$3({props:oe,name:"MuiTabPanel"}),{children:pe,className:me,value:ge}=ue,ye=_objectWithoutPropertiesLoose$2(ue,_excluded$2),ve=_extends$2({},ue),xe=useUtilityClasses(ve),_e=useTabContext();if(_e===null)throw new TypeError("No TabContext provided");const Se=getPanelId(_e,ge),$e=getTabId(_e,ge);return jsxRuntimeExports.jsx(TabPanelRoot,_extends$2({"aria-labelledby":$e,className:clsx(xe.root,me),hidden:ge!==_e.value,id:Se,ref:ce,role:"tabpanel",ownerState:ve},ye,{children:ge===_e.value&&pe}))}),TabPanel$1=TabPanel;var colorName={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},names=colorName,colorParse=parse$c,baseHues={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function parse$c(ne){var oe,ce=[],ue=1,pe;if(typeof ne=="string")if(ne=ne.toLowerCase(),names[ne])ce=names[ne].slice(),pe="rgb";else if(ne==="transparent")ue=0,pe="rgb",ce=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(ne)){var me=ne.slice(1),ge=me.length,ye=ge<=4;ue=1,ye?(ce=[parseInt(me[0]+me[0],16),parseInt(me[1]+me[1],16),parseInt(me[2]+me[2],16)],ge===4&&(ue=parseInt(me[3]+me[3],16)/255)):(ce=[parseInt(me[0]+me[1],16),parseInt(me[2]+me[3],16),parseInt(me[4]+me[5],16)],ge===8&&(ue=parseInt(me[6]+me[7],16)/255)),ce[0]||(ce[0]=0),ce[1]||(ce[1]=0),ce[2]||(ce[2]=0),pe="rgb"}else if(oe=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(ne)){var ve=oe[1],xe=ve==="rgb",me=ve.replace(/a$/,"");pe=me;var ge=me==="cmyk"?4:me==="gray"?1:3;ce=oe[2].trim().split(/\s*[,\/]\s*|\s+/).map(function($e,Re){if(/%$/.test($e))return Re===ge?parseFloat($e)/100:me==="rgb"?parseFloat($e)*255/100:parseFloat($e);if(me[Re]==="h"){if(/deg$/.test($e))return parseFloat($e);if(baseHues[$e]!==void 0)return baseHues[$e]}return parseFloat($e)}),ve===me&&ce.push(1),ue=xe||ce[ge]===void 0?1:ce[ge],ce=ce.slice(0,ge)}else ne.length>10&&/[0-9](?:\s|\/)/.test(ne)&&(ce=ne.match(/([0-9]+)/g).map(function(_e){return parseFloat(_e)}),pe=ne.match(/([a-z])/ig).join("").toLowerCase());else isNaN(ne)?Array.isArray(ne)||ne.length?(ce=[ne[0],ne[1],ne[2]],pe="rgb",ue=ne.length===4?ne[3]:1):ne instanceof Object&&(ne.r!=null||ne.red!=null||ne.R!=null?(pe="rgb",ce=[ne.r||ne.red||ne.R||0,ne.g||ne.green||ne.G||0,ne.b||ne.blue||ne.B||0]):(pe="hsl",ce=[ne.h||ne.hue||ne.H||0,ne.s||ne.saturation||ne.S||0,ne.l||ne.lightness||ne.L||ne.b||ne.brightness]),ue=ne.a||ne.alpha||ne.opacity||1,ne.opacity!=null&&(ue/=100)):(pe="rgb",ce=[ne>>>16,(ne&65280)>>>8,ne&255]);return{space:pe,values:ce,alpha:ue}}var rgb$3={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},rgb$2=rgb$3,hsl$1={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(ne){var oe=ne[0]/360,ce=ne[1]/100,ue=ne[2]/100,pe,me,ge,ye,ve;if(ce===0)return ve=ue*255,[ve,ve,ve];ue<.5?me=ue*(1+ce):me=ue+ce-ue*ce,pe=2*ue-me,ye=[0,0,0];for(var xe=0;xe<3;xe++)ge=oe+1/3*-(xe-1),ge<0?ge++:ge>1&&ge--,6*ge<1?ve=pe+(me-pe)*6*ge:2*ge<1?ve=me:3*ge<2?ve=pe+(me-pe)*(2/3-ge)*6:ve=pe,ye[xe]=ve*255;return ye}};rgb$2.hsl=function(ne){var oe=ne[0]/255,ce=ne[1]/255,ue=ne[2]/255,pe=Math.min(oe,ce,ue),me=Math.max(oe,ce,ue),ge=me-pe,ye,ve,xe;return me===pe?ye=0:oe===me?ye=(ce-ue)/ge:ce===me?ye=2+(ue-oe)/ge:ue===me&&(ye=4+(oe-ce)/ge),ye=Math.min(ye*60,360),ye<0&&(ye+=360),xe=(pe+me)/2,me===pe?ve=0:xe<=.5?ve=ge/(me+pe):ve=ge/(2-me-pe),[ye,ve*100,xe*100]};function lerp$2(ne,oe,ce){return ne*(1-ce)+oe*ce}var lerp_1=lerp$2,clamp_1=clamp$1;function clamp$1(ne,oe,ce){return oece?ce:ne:neoe?oe:ne}const parse$b=colorParse,hsl=hsl$1,lerp$1=lerp_1,clamp=clamp_1;var colorInterpolate=interpolate;function interpolate(ne){return ne=ne.map(function(oe){if(oe=parse$b(oe),oe.space!="rgb"){if(oe.space!="hsl")throw"c.spacespace is not supported.";oe.values=hsl.rgb(oe.values)}return oe.values.push(oe.alpha),oe.values}),function(oe,ce){ce=ce||lerp$1,oe=clamp(oe,0,1);var ue=(ne.length-1)*oe,pe=Math.floor(ue),me=Math.ceil(ue);oe=ue-pe;var ge=ne[pe],ye=ne[me],ve=ge.map(function(xe,_e){return xe=ce(xe,ye[_e],oe),_e<3&&(xe=Math.round(xe)),xe});return ve[3]===1?"rgb("+ve.slice(0,3)+")":"rgba("+ve+")"}}const interpolate$1=getDefaultExportFromCjs(colorInterpolate);var reactIs$1={exports:{}},reactIs_production_min$1={};/** @license React v17.0.2 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. @@ -390,29 +390,30 @@ PERFORMANCE OF THIS SOFTWARE. * * Copyright © 2012-2016 Faisal Salman * Dual licensed under GPLv2 or MIT -*/(function(me,ge){var ye="0.7.18",ve="",xe="?",_e="function",Se="undefined",$e="object",Re="string",Ae="major",Ie="model",ke="name",Be="type",Ne="vendor",Fe="version",Ue="architecture",We="console",qe="mobile",ze="tablet",Ge="smarttv",Ze="wearable",Dt="embedded",Je={extend:function(Kt,Wt){var un={};for(var Xt in Kt)Wt[Xt]&&Wt[Xt].length%2===0?un[Xt]=Wt[Xt].concat(Kt[Xt]):un[Xt]=Kt[Xt];return un},has:function(Kt,Wt){return typeof Kt=="string"?Wt.toLowerCase().indexOf(Kt.toLowerCase())!==-1:!1},lowerize:function(Kt){return Kt.toLowerCase()},major:function(Kt){return typeof Kt===Re?Kt.replace(/[^\d\.]/g,"").split(".")[0]:ge},trim:function(Kt){return Kt.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},Ut={rgx:function(Kt,Wt){for(var un=0,Xt,nn,vn,Sn,Cn,Nt;un0?Sn.length==2?typeof Sn[1]==_e?this[Sn[0]]=Sn[1].call(this,Nt):this[Sn[0]]=Sn[1]:Sn.length==3?typeof Sn[1]===_e&&!(Sn[1].exec&&Sn[1].test)?this[Sn[0]]=Nt?Sn[1].call(this,Nt,Sn[2]):ge:this[Sn[0]]=Nt?Nt.replace(Sn[1],Sn[2]):ge:Sn.length==4&&(this[Sn[0]]=Nt?Sn[3].call(this,Nt.replace(Sn[1],Sn[2])):ge):this[Sn]=Nt||ge;un+=2}},str:function(Kt,Wt){for(var un in Wt)if(typeof Wt[un]===$e&&Wt[un].length>0){for(var Xt=0;Xt1&&!window.MSStream)};oe.exports={checkType:ve,broPayload:xe,mobilePayload:_e,stvPayload:Se,consolePayload:$e,wearPayload:Re,getNavigatorInstance:Ae,isIOS13Check:Ie}}])})(dist$6);var distExports$1=dist$6.exports;function ViewControls({onSplitHorizontal:ne,onClose:oe,onSplitVertical:ce,closeDisabled:ue,splitHorizontalDisabled:pe,splitVerticalDisabled:me,onPopOut:ge,onMaximise:ye,popOutDisabled:ve}){return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:xe=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Stack$1,{sx:{m:1},children:jsxRuntimeExports.jsx(Tooltip$1,{title:"Panel Options",children:jsxRuntimeExports.jsx(IconButton$1,{size:"small",...bindTrigger(xe),children:jsxRuntimeExports.jsx(MoreVertOutlined,{fontSize:"small",sx:{color:"text.secondary"}})})})}),jsxRuntimeExports.jsxs(Menu$1,{TransitionProps:{mountOnEnter:!0,unmountOnExit:!0},...bindMenu(xe),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{ce==null||ce(),xe.close()},disabled:me,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(SplitIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Split vertical"})]}),jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{ne==null||ne(),xe.close()},disabled:pe,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(SplitIcon,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Split horizontal"})]}),jsxRuntimeExports.jsx(Divider$1,{}),!ve&&jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsxs(MenuItem$1,{disabled:ue||ve||distExports$1.isMobile,onClick:()=>{ge==null||ge(),oe==null||oe(),xe.close()},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(OpenInNewOutlined,{fontSize:"small"})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Move to new window"})]}),jsxRuntimeExports.jsxs(MenuItem$1,{disabled:ve||distExports$1.isMobile,onClick:()=>{ge==null||ge(),xe.close()},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Duplicate to new window"})]}),jsxRuntimeExports.jsx(Divider$1,{})]}),jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{ye==null||ye(),xe.close()},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(FullscreenOutlined,{})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Maximise"})]}),jsxRuntimeExports.jsx(Divider$1,{}),jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{oe==null||oe(),xe.close()},disabled:ue,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(CloseOutlined,{fontSize:"small"})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Close"})]})]})]})})}function findInTree(ne,oe){const ce=ue=>{var pe;return"children"in ue&&((pe=ue.children)!=null&&pe.length)?lodashExports$1.flatMap(ue.children,ce):[ue]};return lodashExports$1.find(ce(ne),oe)}const ViewTreeContext=reactExports.createContext({});function useViewTreeContext(){return reactExports.useContext(ViewTreeContext)}function handleSwap(ne,oe,ce){const ue=findInTree(ne,me=>me.key===oe),pe=findInTree(ne,me=>me.key===ce);if((ue==null?void 0:ue.type)==="leaf"&&(pe==null?void 0:pe.type)==="leaf"){const me=lodashExports$1.pick(ue,"content","key"),ge=lodashExports$1.pick(pe,"content","key");Object.assign(ue,ge),Object.assign(pe,me)}return ne}function ViewTree(ne){const{onChange:oe,root:ce}=ne;return jsxRuntimeExports.jsx(DndProvider,{backend:HTML5Backend,children:jsxRuntimeExports.jsx(ViewBranch,{...ne,onSwap:(ue,pe)=>{ce&&(oe==null||oe(produce(ce,me=>handleSwap(me,ue,pe))))}})})}function ViewLeaf({root:ne={type:"leaf",key:""},renderLeaf:oe,onChange:ce,onClose:ue,onPopOut:pe,onMaximise:me,canPopOut:ge,depth:ye=0,onSwap:ve,onDrop:xe}){const[{isOver:_e},Se]=useDrop(()=>({accept:["panel"],collect:Ie=>({isOver:Ie.isOver()&&Ie.getItem().key!==ne.key&&!!ne.acceptDrop}),drop:Ie=>{xe==null||xe(Ie,ne),ve==null||ve(Ie.key,ne.key)}})),[{isDragging:$e},Re]=useDrag(()=>({type:"panel",item:ne,collect:Ie=>({isDragging:Ie.isDragging()})})),Ae=reactExports.useMemo(()=>{const Ie=ke=>ce==null?void 0:ce(transaction(ne,Be=>({key:nanoid$1(),type:"branch",orientation:ke,children:[{...structuredClone(Be),size:50,key:nanoid$1()},{...structuredClone(Be),size:50,key:nanoid$1()}]})));return ne.type==="leaf"?{isViewTree:!0,state:ne.content,controls:jsxRuntimeExports.jsx(ViewControls,{onClose:ue,closeDisabled:!ye,onSplitHorizontal:()=>Ie("horizontal"),onSplitVertical:()=>Ie("vertical"),onPopOut:()=>{pe==null||pe(ne)},onMaximise:()=>{me==null||me(ne)},popOutDisabled:!(ge!=null&&ge(ne))}),dragHandle:jsxRuntimeExports.jsx(Box$1,{ref:Re,sx:{display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(DragIndicatorOutlined,{fontSize:"small",color:"disabled",sx:{mr:.5,cursor:"grab"}})}),onChange:ke=>ce==null?void 0:ce(produce(ne,Be=>{Be.content={...Be.content,...ke}}))}:{}},[ce,ue,ye,ne,Re]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Flex,{ref:Se,sx:{overflow:"hidden","::before":{pointerEvents:"none",content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1,boxShadow:Ie=>_e?`inset 0 0 0 2px ${Ie.palette.primary.main}`:"none",transition:Ie=>Ie.transitions.create("box-shadow")},transition:Ie=>Ie.transitions.create("opacity"),opacity:Ie=>$e?Ie.palette.action.disabledOpacity:1},children:jsxRuntimeExports.jsx(ViewTreeContext.Provider,{value:Ae,children:oe==null?void 0:oe(ne)})})})}function ViewBranch(ne){const{root:oe={type:"leaf",key:""},onChange:ce,depth:ue=0}=ne,{palette:pe,spacing:me,transitions:ge}=useTheme$1(),ye=oe.type==="branch"&&oe.locked,ve=useCss$1({...ye&&{display:"none"},"div&":{background:pe.text.secondary,opacity:.5,transition:ge.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),xe=useCss$1({...ye&&{pointerEvents:"none"},"div&":{background:pe.mode==="dark"?pe.background.default:pe.divider,boxShadow:`inset 0 0 0 1px ${pe.background.paper}`,"&:hover":{background:pe.primary.main,boxShadow:"none"},"&.Horizontal":{padding:0,width:"3px"},"&.Vertical":{padding:0}}}),_e=$e=>Number(me($e).slice(0,-2));function Se($e,Re=[]){const Ae=lodashExports$1.chain(Re).map(Ie=>lodashExports$1.isUndefined(Ie.size)||isNaN(Ie.size)?0:Ie.size).sum().value();return lodashExports$1.isUndefined($e)?100-Ae:$e}return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:oe.type==="leaf"?jsxRuntimeExports.jsx(ViewLeaf,{...ne}):jsxRuntimeExports.jsx(m$8,{gutterClassName:xe,draggerClassName:ve,onResizeFinished:($e,Re)=>ce==null?void 0:ce(produce(oe,Ae=>{lodashExports$1.forEach(Re,(Ie,ke)=>{Ae.children[ke].size=Ie})})),minHeights:lodashExports$1.map(oe.children,()=>_e(6)-8),minWidths:lodashExports$1.map(oe.children,()=>_e(32)),initialSizes:lodashExports$1.map(oe.children,($e,Re,Ae)=>Se($e.size,Ae)),direction:{vertical:z$5.Vertical,horizontal:z$5.Horizontal}[oe.orientation],children:lodashExports$1.map(oe.children,($e,Re)=>$e.hidden?jsxRuntimeExports.jsx(Box$1,{},"placeholder"):reactExports.createElement(ViewBranch,{...ne,key:$e.key,depth:ue+1,root:$e,onChange:Ae=>ce==null?void 0:ce(produce(oe,Ie=>Ie.children[Re]=Ae)),onClose:()=>ce==null?void 0:ce(transaction(oe,Ae=>(Ae.children.splice(Re,1),Ae.children.length===1?Ae.children[0].type==="leaf"?{type:"leaf",key:nanoid$1(),content:Ae.children[0].content}:Ae.children[0]:(lodashExports$1.forEach(Ae.children,(Ie,ke,Be)=>Ie.size=100/Be.length),Ae))))}))})})}function useSmallDisplay(){const ne=useTheme$1();return useMediaQuery(ne.breakpoints.down("sm"))}function Select({trigger:ne,items:oe,value:ce,onChange:ue,showTooltip:pe,placeholder:me="Select Option"}){return useSmallDisplay(),lodashExports$1.max([lodashExports$1.findIndex(oe,{value:ce}),0]),jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ge=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:me,children:jsxRuntimeExports.jsx("span",{children:ne==null?void 0:ne(bindTrigger(ge))})}),jsxRuntimeExports.jsx(Menu$1,{...bindMenu(ge),anchorOrigin:{horizontal:"left",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"left"},children:lodashExports$1.map(oe,({value:ye,label:ve,disabled:xe,icon:_e})=>jsxRuntimeExports.jsx(Tooltip$1,{title:pe&&ye,placement:"right",children:jsxRuntimeExports.jsxs(MenuItem$1,{disabled:xe,value:ye,selected:ye===ce,onClick:()=>{ge.close(),ue==null||ue(ye)},children:[_e&&jsxRuntimeExports.jsx(ListItemIcon$1,{sx:{transform:"scale(0.8)"},children:_e}),ve]},ye)},ye))})]})})}function SelectField(ne){const{placeholder:oe,value:ce,items:ue=[],onChange:pe}=ne;return jsxRuntimeExports.jsx(TextField$1,{sx:{minWidth:120},select:!0,label:oe,defaultValue:ce,variant:"filled",...ne,onChange:me=>pe==null?void 0:pe(me.target.value),children:lodashExports$1.map(ue,me=>jsxRuntimeExports.jsx(MenuItem$1,{value:me.value,children:me.label},me.value))})}const defaultRemotes=[{url:"internal://basic-maps",transport:"native",key:"default-internal"},{url:"https://cdn.jsdelivr.net/gh/ShortestPathLab/posthoc-app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],defaultRenderers=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],defaultPlaybackRate=1,defaults$3={renderer:defaultRenderers,remote:defaultRemotes,"playback/playbackRate":defaultPlaybackRate,"appearance/theme":"dark","appearance/acrylic":!0,"appearance/accentColor":"blue","behaviour/showOnStart":"explore"},[useSettings,SettingsProvider]=createSlice({},withLocalStorage("settings",defaults$3)),{common:common$1,...accentColors}=colors,shadow=` +*/(function(me,ge){var ye="0.7.18",ve="",xe="?",_e="function",Se="undefined",$e="object",Re="string",Ae="major",Ie="model",ke="name",Be="type",Ne="vendor",Fe="version",Ue="architecture",We="console",qe="mobile",ze="tablet",Ge="smarttv",Ze="wearable",Dt="embedded",Je={extend:function(Kt,Wt){var un={};for(var Xt in Kt)Wt[Xt]&&Wt[Xt].length%2===0?un[Xt]=Wt[Xt].concat(Kt[Xt]):un[Xt]=Kt[Xt];return un},has:function(Kt,Wt){return typeof Kt=="string"?Wt.toLowerCase().indexOf(Kt.toLowerCase())!==-1:!1},lowerize:function(Kt){return Kt.toLowerCase()},major:function(Kt){return typeof Kt===Re?Kt.replace(/[^\d\.]/g,"").split(".")[0]:ge},trim:function(Kt){return Kt.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},Ut={rgx:function(Kt,Wt){for(var un=0,Xt,nn,vn,Sn,Cn,Nt;un0?Sn.length==2?typeof Sn[1]==_e?this[Sn[0]]=Sn[1].call(this,Nt):this[Sn[0]]=Sn[1]:Sn.length==3?typeof Sn[1]===_e&&!(Sn[1].exec&&Sn[1].test)?this[Sn[0]]=Nt?Sn[1].call(this,Nt,Sn[2]):ge:this[Sn[0]]=Nt?Nt.replace(Sn[1],Sn[2]):ge:Sn.length==4&&(this[Sn[0]]=Nt?Sn[3].call(this,Nt.replace(Sn[1],Sn[2])):ge):this[Sn]=Nt||ge;un+=2}},str:function(Kt,Wt){for(var un in Wt)if(typeof Wt[un]===$e&&Wt[un].length>0){for(var Xt=0;Xt1&&!window.MSStream)};oe.exports={checkType:ve,broPayload:xe,mobilePayload:_e,stvPayload:Se,consolePayload:$e,wearPayload:Re,getNavigatorInstance:Ae,isIOS13Check:Ie}}])})(dist$6);var distExports$1=dist$6.exports;function ViewControls({onSplitHorizontal:ne,onClose:oe,onSplitVertical:ce,closeDisabled:ue,splitHorizontalDisabled:pe,splitVerticalDisabled:me,onPopOut:ge,onMaximise:ye,popOutDisabled:ve}){return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:xe=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Stack$1,{sx:{m:1},children:jsxRuntimeExports.jsx(Tooltip$1,{title:"Panel Options",children:jsxRuntimeExports.jsx(IconButton$1,{size:"small",...bindTrigger(xe),children:jsxRuntimeExports.jsx(MoreVertOutlined,{fontSize:"small",sx:{color:"text.secondary"}})})})}),jsxRuntimeExports.jsxs(Menu$1,{TransitionProps:{mountOnEnter:!0,unmountOnExit:!0},...bindMenu(xe),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{ce==null||ce(),xe.close()},disabled:me,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(SplitIcon,{fontSize:"small"})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Split vertical"})]}),jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{ne==null||ne(),xe.close()},disabled:pe,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(SplitIcon,{fontSize:"small",sx:{transform:"rotate(90deg)"}})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Split horizontal"})]}),jsxRuntimeExports.jsx(Divider$1,{}),!ve&&jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsxs(MenuItem$1,{disabled:ue||ve||distExports$1.isMobile,onClick:()=>{ge==null||ge(),oe==null||oe(),xe.close()},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(OpenInNewOutlined,{fontSize:"small"})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Move to new window"})]}),jsxRuntimeExports.jsxs(MenuItem$1,{disabled:ve||distExports$1.isMobile,onClick:()=>{ge==null||ge(),xe.close()},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Duplicate to new window"})]}),jsxRuntimeExports.jsx(Divider$1,{})]}),jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{ye==null||ye(),xe.close()},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(FullscreenOutlined,{})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Maximise"})]}),jsxRuntimeExports.jsx(Divider$1,{}),jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{oe==null||oe(),xe.close()},disabled:ue,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(CloseOutlined,{fontSize:"small"})}),jsxRuntimeExports.jsx(ListItemText$1,{children:"Close"})]})]})]})})}function findInTree(ne,oe){const ce=ue=>{var pe;return"children"in ue&&((pe=ue.children)!=null&&pe.length)?lodashExports$1.flatMap(ue.children,ce):[ue]};return lodashExports$1.find(ce(ne),oe)}const ViewTreeContext=reactExports.createContext({});function useViewTreeContext(){return reactExports.useContext(ViewTreeContext)}function handleSwap(ne,oe,ce){const ue=findInTree(ne,me=>me.key===oe),pe=findInTree(ne,me=>me.key===ce);if((ue==null?void 0:ue.type)==="leaf"&&(pe==null?void 0:pe.type)==="leaf"){const me=lodashExports$1.pick(ue,"content","key"),ge=lodashExports$1.pick(pe,"content","key");Object.assign(ue,ge),Object.assign(pe,me)}return ne}function ViewTree(ne){const{onChange:oe,root:ce}=ne;return jsxRuntimeExports.jsx(DndProvider,{backend:HTML5Backend,children:jsxRuntimeExports.jsx(ViewBranch,{...ne,onSwap:(ue,pe)=>{ce&&(oe==null||oe(produce(ce,me=>handleSwap(me,ue,pe))))}})})}function ViewLeaf({root:ne={type:"leaf",key:""},renderLeaf:oe,onChange:ce,onClose:ue,onPopOut:pe,onMaximise:me,canPopOut:ge,depth:ye=0,onSwap:ve,onDrop:xe}){const[{isOver:_e},Se]=useDrop(()=>({accept:["panel"],collect:Ie=>({isOver:Ie.isOver()&&Ie.getItem().key!==ne.key&&!!ne.acceptDrop}),drop:Ie=>{xe==null||xe(Ie,ne),ve==null||ve(Ie.key,ne.key)}})),[{isDragging:$e},Re]=useDrag(()=>({type:"panel",item:ne,collect:Ie=>({isDragging:Ie.isDragging()})})),Ae=reactExports.useMemo(()=>{const Ie=ke=>ce==null?void 0:ce(transaction(ne,Be=>({key:nanoid$1(),type:"branch",orientation:ke,children:[{...structuredClone(Be),size:50,key:nanoid$1()},{...structuredClone(Be),size:50,key:nanoid$1()}]})));return ne.type==="leaf"?{isViewTree:!0,state:ne.content,controls:jsxRuntimeExports.jsx(ViewControls,{onClose:ue,closeDisabled:!ye,onSplitHorizontal:()=>Ie("horizontal"),onSplitVertical:()=>Ie("vertical"),onPopOut:()=>{pe==null||pe(ne)},onMaximise:()=>{me==null||me(ne)},popOutDisabled:!(ge!=null&&ge(ne))}),dragHandle:jsxRuntimeExports.jsx(Box$1,{ref:Re,sx:{display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(DragIndicatorOutlined,{fontSize:"small",color:"disabled",sx:{mr:.5,cursor:"grab"}})}),onChange:ke=>ce==null?void 0:ce(produce(ne,Be=>{Be.content={...Be.content,...ke}}))}:{}},[ce,ue,ye,ne,Re]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Flex,{ref:Se,sx:{overflow:"hidden","::before":{pointerEvents:"none",content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1,boxShadow:Ie=>_e?`inset 0 0 0 2px ${Ie.palette.primary.main}`:"none",transition:Ie=>Ie.transitions.create("box-shadow")},transition:Ie=>Ie.transitions.create("opacity"),opacity:Ie=>$e?Ie.palette.action.disabledOpacity:1},children:jsxRuntimeExports.jsx(ViewTreeContext.Provider,{value:Ae,children:oe==null?void 0:oe(ne)})})})}function ViewBranch(ne){const{root:oe={type:"leaf",key:""},onChange:ce,depth:ue=0}=ne,{palette:pe,spacing:me,transitions:ge}=useTheme$1(),ye=oe.type==="branch"&&oe.locked,ve=useCss$1({...ye&&{display:"none"},"div&":{background:pe.text.secondary,opacity:.5,transition:ge.create("opacity"),"&.Horizontal":{width:"3px"},"&.Vertical":{height:"3px"}}}),xe=useCss$1({...ye&&{pointerEvents:"none"},"div&":{background:pe.mode==="dark"?pe.background.default:pe.divider,boxShadow:`inset 0 0 0 1px ${pe.background.paper}`,"&:hover":{background:pe.primary.main,boxShadow:"none"},"&.Horizontal":{padding:0,width:"3px"},"&.Vertical":{padding:0}}}),_e=$e=>Number(me($e).slice(0,-2));function Se($e,Re=[]){const Ae=lodashExports$1.chain(Re).map(Ie=>lodashExports$1.isUndefined(Ie.size)||isNaN(Ie.size)?0:Ie.size).sum().value();return lodashExports$1.isUndefined($e)?100-Ae:$e}return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:oe.type==="leaf"?jsxRuntimeExports.jsx(ViewLeaf,{...ne}):jsxRuntimeExports.jsx(m$8,{gutterClassName:xe,draggerClassName:ve,onResizeFinished:($e,Re)=>ce==null?void 0:ce(produce(oe,Ae=>{lodashExports$1.forEach(Re,(Ie,ke)=>{Ae.children[ke].size=Ie})})),minHeights:lodashExports$1.map(oe.children,()=>_e(6)-8),minWidths:lodashExports$1.map(oe.children,()=>_e(32)),initialSizes:lodashExports$1.map(oe.children,($e,Re,Ae)=>Se($e.size,Ae)),direction:{vertical:z$5.Vertical,horizontal:z$5.Horizontal}[oe.orientation],children:lodashExports$1.map(oe.children,($e,Re)=>$e.hidden?jsxRuntimeExports.jsx(Box$1,{},"placeholder"):reactExports.createElement(ViewBranch,{...ne,key:$e.key,depth:ue+1,root:$e,onChange:Ae=>ce==null?void 0:ce(produce(oe,Ie=>Ie.children[Re]=Ae)),onClose:()=>ce==null?void 0:ce(transaction(oe,Ae=>(Ae.children.splice(Re,1),Ae.children.length===1?Ae.children[0].type==="leaf"?{type:"leaf",key:nanoid$1(),content:Ae.children[0].content}:Ae.children[0]:(lodashExports$1.forEach(Ae.children,(Ie,ke,Be)=>Ie.size=100/Be.length),Ae))))}))})})}function useSmallDisplay(){const ne=useTheme$1();return useMediaQuery(ne.breakpoints.down("sm"))}function Select({trigger:ne,items:oe,value:ce,onChange:ue,showTooltip:pe,placeholder:me="Select Option"}){return useSmallDisplay(),lodashExports$1.max([lodashExports$1.findIndex(oe,{value:ce}),0]),jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ge=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:me,children:jsxRuntimeExports.jsx("span",{children:ne==null?void 0:ne(bindTrigger(ge))})}),jsxRuntimeExports.jsx(Menu$1,{...bindMenu(ge),anchorOrigin:{horizontal:"left",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"left"},children:lodashExports$1.map(oe,({value:ye,label:ve,disabled:xe,icon:_e})=>jsxRuntimeExports.jsx(Tooltip$1,{title:pe&&ye,placement:"right",children:jsxRuntimeExports.jsxs(MenuItem$1,{disabled:xe,value:ye,selected:ye===ce,onClick:()=>{ge.close(),ue==null||ue(ye)},children:[_e&&jsxRuntimeExports.jsx(ListItemIcon$1,{sx:{transform:"scale(0.8)"},children:_e}),ve]},ye)},ye))})]})})}function SelectField(ne){const{placeholder:oe,value:ce,items:ue=[],onChange:pe}=ne;return jsxRuntimeExports.jsx(TextField$1,{sx:{minWidth:120},select:!0,label:oe,defaultValue:ce,variant:"filled",...ne,onChange:me=>pe==null?void 0:pe(me.target.value),children:lodashExports$1.map(ue,me=>jsxRuntimeExports.jsx(MenuItem$1,{value:me.value,children:me.label},me.value))})}const defaultRemotes=[{url:"internal://basic-maps",transport:"native",key:"default-internal"},{url:"https://cdn.jsdelivr.net/gh/ShortestPathLab/posthoc-app@adapter-warthog-wasm-dist/warthog-wasm.mjs",transport:"ipc",key:"default-ipc"}],defaultRenderers=[{url:"internal://d2-renderer/",key:"d2-renderer",transport:"native"}],defaultPlaybackRate=1,defaults$3={renderer:defaultRenderers,remote:defaultRemotes,trustedOrigins:[],"playback/playbackRate":defaultPlaybackRate,"appearance/theme":"dark","appearance/acrylic":!0,"appearance/accentColor":"blue","behaviour/showOnStart":"explore"},[useSettings,SettingsProvider]=createSlice({},withLocalStorage("settings",defaults$3)),{common:common$1,...accentColors}=colors,shadow=` 0px 4px 9px -1px rgb(0 0 0 / 4%), 0px 5px 24px 0px rgb(0 0 0 / 4%), 0px 10px 48px 0px rgb(0 0 0 / 4%) `,getShade=(ne="blue",oe="light",ce="A700",ue="A100")=>colors[ne][oe==="dark"?ue:ce],fontFamily=`"Inter", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,headingFamily=`"Inter Tight", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", - "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,makeTheme=(ne,oe)=>createTheme({palette:{primary:{main:getShade(oe,ne)},mode:ne,background:ne==="dark"?{default:"#0a0c10",paper:"#111317"}:{default:"#ebecef",paper:"#ffffff"}},typography:{allVariants:{fontFamily},h1:{fontFamily:headingFamily},h2:{fontFamily:headingFamily},h3:{fontFamily:headingFamily},h4:{fontFamily:headingFamily},h5:{fontFamily:headingFamily},h6:{fontFamily:headingFamily},button:{textTransform:"none",fontWeight:400,letterSpacing:0,backgroundColor:"background.paper"},subtitle2:{marginTop:6,fontWeight:400}},components:{MuiPopover:{styleOverrides:{paper:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06))"}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundImage:"linear-gradient(#1c2128, #1c2128)",fontFamily}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h4:{marginBottom:12},h6:{fontWeight:500}}}},shadows:["",...lodashExports$1.times(24,lodashExports$1.constant(shadow))]});function useAcrylic(ne){const[{"appearance/acrylic":oe}]=useSettings();return oe?{backdropFilter:"blur(16px)",background:({palette:ce})=>alpha$1(ne??ce.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:ce})=>ne??ce.background.paper}}function usePaper(){return(ne=1)=>({borderRadius:1,transition:({transitions:oe})=>oe.create(["background-color","box-shadow"]),boxShadow:({shadows:oe,palette:ce})=>ce.mode==="dark"?oe[1]:oe[Math.max(lodashExports$1.floor(ne)-1,0)],backgroundColor:({palette:oe})=>oe.mode==="dark"?alpha$1(oe.action.disabledBackground,ne*.02):oe.background.paper,border:({palette:oe})=>oe.mode==="dark"?`1px solid ${alpha$1(oe.text.primary,ne*.08)}`:`1px solid ${alpha$1(oe.text.primary,ne*.16)}`})}const textFieldProps={variant:"filled"};function FeaturePickerButton({children:ne,icon:oe,arrow:ce,...ue}){return jsxRuntimeExports.jsx(MuiButton,{...ue,sx:{minWidth:0,...ue.sx},startIcon:oe,endIcon:ce&&jsxRuntimeExports.jsx(KeyboardArrowDownOutlined,{sx:{ml:-.5,color:"text.secondary",opacity:pe=>ue.disabled?pe.palette.action.disabledOpacity:1}}),children:jsxRuntimeExports.jsx(Box$1,{sx:{color:"text.primary",opacity:pe=>ue.disabled?pe.palette.action.disabledOpacity:1},children:ne})})}function FeaturePicker({label:ne,value:oe,onChange:ce,items:ue,icon:pe,arrow:me,disabled:ge,ButtonProps:ye,showTooltip:ve,itemOrientation:xe="horizontal",ellipsis:_e=1/0,paper:Se}){const $e=usePaper(),{palette:Re}=useTheme$1(),Ae=(ke,Be)=>ke&&reactExports.cloneElement(ke,{sx:{color:Be?getShade(Be,Re.mode):"primary.main"}}),Ie=lodashExports$1.find(ue,{id:oe});return jsxRuntimeExports.jsx(Select,{showTooltip:ve,placeholder:lodashExports$1.startCase(ne),trigger:ke=>{var Be;return jsxRuntimeExports.jsx(FeaturePickerButton,{...ke,...ye,sx:Se?{...$e(1),my:.5,px:1.25,py:.5}:{},disabled:!((Be=lodashExports$1.filter(ue,Ne=>!Ne.hidden))!=null&&Be.length)||ge,icon:Ie!=null&&Ie.icon?Ae(Ie.icon,Ie.color):pe,arrow:me,children:lodashExports$1.truncate((Ie==null?void 0:Ie.name)??ne,{length:_e})})},items:lodashExports$1.map(ue,({id:ke,name:Be,description:Ne,hidden:Fe,icon:Ue,color:We})=>({value:ke,label:jsxRuntimeExports.jsxs(Flex,{vertical:xe==="vertical",children:[jsxRuntimeExports.jsxs(Type$2,{component:"div",children:[Be,jsxRuntimeExports.jsx(Space,{})]}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Ne})]}),icon:Ae(Ue,We),disabled:Fe})),value:Ie==null?void 0:Ie.id,onChange:ce})}function _defineProperty$4(ne,oe,ce){return oe in ne?Object.defineProperty(ne,oe,{value:ce,enumerable:!0,configurable:!0,writable:!0}):ne[oe]=ce,ne}function ownKeys$3(ne,oe){var ce=Object.keys(ne);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ne);oe&&(ue=ue.filter(function(pe){return Object.getOwnPropertyDescriptor(ne,pe).enumerable})),ce.push.apply(ce,ue)}return ce}function _objectSpread2$3(ne){for(var oe=1;oe=0)&&(ce[pe]=ne[pe]);return ce}function _objectWithoutProperties(ne,oe){if(ne==null)return{};var ce=_objectWithoutPropertiesLoose(ne,oe),ue,pe;if(Object.getOwnPropertySymbols){var me=Object.getOwnPropertySymbols(ne);for(pe=0;pe=0)&&Object.prototype.propertyIsEnumerable.call(ne,ue)&&(ce[ue]=ne[ue])}return ce}function _slicedToArray$2(ne,oe){return _arrayWithHoles$2(ne)||_iterableToArrayLimit$2(ne,oe)||_unsupportedIterableToArray$3(ne,oe)||_nonIterableRest$2()}function _arrayWithHoles$2(ne){if(Array.isArray(ne))return ne}function _iterableToArrayLimit$2(ne,oe){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ne)))){var ce=[],ue=!0,pe=!1,me=void 0;try{for(var ge=ne[Symbol.iterator](),ye;!(ue=(ye=ge.next()).done)&&(ce.push(ye.value),!(oe&&ce.length===oe));ue=!0);}catch(ve){pe=!0,me=ve}finally{try{!ue&&ge.return!=null&&ge.return()}finally{if(pe)throw me}}return ce}}function _unsupportedIterableToArray$3(ne,oe){if(ne){if(typeof ne=="string")return _arrayLikeToArray$3(ne,oe);var ce=Object.prototype.toString.call(ne).slice(8,-1);if(ce==="Object"&&ne.constructor&&(ce=ne.constructor.name),ce==="Map"||ce==="Set")return Array.from(ne);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return _arrayLikeToArray$3(ne,oe)}}function _arrayLikeToArray$3(ne,oe){(oe==null||oe>ne.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce=ne.length?ne.apply(this,pe):function(){for(var ge=arguments.length,ye=new Array(ge),ve=0;ve1&&arguments[1]!==void 0?arguments[1]:{};validators$1.initial(ne),validators$1.handler(oe);var ce={current:ne},ue=curry$1(didStateUpdate)(ce,oe),pe=curry$1(updateState)(ce),me=curry$1(validators$1.changes)(ne),ge=curry$1(extractChanges)(ce);function ye(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(_e){return _e};return validators$1.selector(xe),xe(ce.current)}function ve(xe){compose$2(ue,pe,me,ge)(xe)}return[ye,ve]}function extractChanges(ne,oe){return isFunction$5(oe)?oe(ne.current):oe}function updateState(ne,oe){return ne.current=_objectSpread2$2(_objectSpread2$2({},ne.current),oe),oe}function didStateUpdate(ne,oe,ce){return isFunction$5(oe)?oe(ne.current):Object.keys(ce).forEach(function(ue){var pe;return(pe=oe[ue])===null||pe===void 0?void 0:pe.call(oe,ne.current[ue])}),ce}var index$2={create:create$4},config$1={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function curry(ne){return function oe(){for(var ce=this,ue=arguments.length,pe=new Array(ue),me=0;me=ne.length?ne.apply(this,pe):function(){for(var ge=arguments.length,ye=new Array(ge),ve=0;ve{ue.current=!1}:ne,oe)}var l$7=he;function D$5(){}function h$9(ne,oe,ce,ue){return De(ne,ue)||be(ne,oe,ce,ue)}function De(ne,oe){return ne.editor.getModel(te(ne,oe))}function be(ne,oe,ce,ue){return ne.editor.createModel(oe,ce,ue?te(ne,ue):void 0)}function te(ne,oe){return ne.Uri.parse(oe)}function Oe({original:ne,modified:oe,language:ce,originalLanguage:ue,modifiedLanguage:pe,originalModelPath:me,modifiedModelPath:ge,keepCurrentOriginalModel:ye=!1,keepCurrentModifiedModel:ve=!1,theme:xe="light",loading:_e="Loading...",options:Se={},height:$e="100%",width:Re="100%",className:Ae,wrapperProps:Ie={},beforeMount:ke=D$5,onMount:Be=D$5}){let[Ne,Fe]=reactExports.useState(!1),[Ue,We]=reactExports.useState(!0),qe=reactExports.useRef(null),ze=reactExports.useRef(null),Ge=reactExports.useRef(null),Ze=reactExports.useRef(Be),Dt=reactExports.useRef(ke),Je=reactExports.useRef(!1);k$8(()=>{let an=loader.init();return an.then(Zt=>(ze.current=Zt)&&We(!1)).catch(Zt=>(Zt==null?void 0:Zt.type)!=="cancelation"&&console.error("Monaco initialization: error:",Zt)),()=>qe.current?Ke():an.cancel()}),l$7(()=>{if(qe.current&&ze.current){let an=qe.current.getOriginalEditor(),Zt=h$9(ze.current,ne||"",ue||ce||"text",me||"");Zt!==an.getModel()&&an.setModel(Zt)}},[me],Ne),l$7(()=>{if(qe.current&&ze.current){let an=qe.current.getModifiedEditor(),Zt=h$9(ze.current,oe||"",pe||ce||"text",ge||"");Zt!==an.getModel()&&an.setModel(Zt)}},[ge],Ne),l$7(()=>{let an=qe.current.getModifiedEditor();an.getOption(ze.current.editor.EditorOption.readOnly)?an.setValue(oe||""):oe!==an.getValue()&&(an.executeEdits("",[{range:an.getModel().getFullModelRange(),text:oe||"",forceMoveMarkers:!0}]),an.pushUndoStop())},[oe],Ne),l$7(()=>{var an,Zt;(Zt=(an=qe.current)==null?void 0:an.getModel())==null||Zt.original.setValue(ne||"")},[ne],Ne),l$7(()=>{let{original:an,modified:Zt}=qe.current.getModel();ze.current.editor.setModelLanguage(an,ue||ce||"text"),ze.current.editor.setModelLanguage(Zt,pe||ce||"text")},[ce,ue,pe],Ne),l$7(()=>{var an;(an=ze.current)==null||an.editor.setTheme(xe)},[xe],Ne),l$7(()=>{var an;(an=qe.current)==null||an.updateOptions(Se)},[Se],Ne);let Ut=reactExports.useCallback(()=>{var en;if(!ze.current)return;Dt.current(ze.current);let an=h$9(ze.current,ne||"",ue||ce||"text",me||""),Zt=h$9(ze.current,oe||"",pe||ce||"text",ge||"");(en=qe.current)==null||en.setModel({original:an,modified:Zt})},[ce,oe,pe,ne,ue,me,ge]),jt=reactExports.useCallback(()=>{var an;!Je.current&&Ge.current&&(qe.current=ze.current.editor.createDiffEditor(Ge.current,{automaticLayout:!0,...Se}),Ut(),(an=ze.current)==null||an.editor.setTheme(xe),Fe(!0),Je.current=!0)},[Se,xe,Ut]);reactExports.useEffect(()=>{Ne&&Ze.current(qe.current,ze.current)},[Ne]),reactExports.useEffect(()=>{!Ue&&!Ne&&jt()},[Ue,Ne,jt]);function Ke(){var Zt,en,Kt,Wt;let an=(Zt=qe.current)==null?void 0:Zt.getModel();ye||((en=an==null?void 0:an.original)==null||en.dispose()),ve||((Kt=an==null?void 0:an.modified)==null||Kt.dispose()),(Wt=qe.current)==null||Wt.dispose()}return React$2.createElement(H$5,{width:Re,height:$e,isEditorReady:Ne,loading:_e,_ref:Ge,className:Ae,wrapperProps:Ie})}var ie=Oe;reactExports.memo(ie);function Pe(){let[ne,oe]=reactExports.useState(loader.__getMonacoInstance());return k$8(()=>{let ce;return ne||(ce=loader.init(),ce.then(ue=>{oe(ue)})),()=>ce==null?void 0:ce.cancel()}),ne}var Le=Pe;function He(ne){let oe=reactExports.useRef();return reactExports.useEffect(()=>{oe.current=ne},[ne]),oe.current}var se=He,_$5=new Map;function Ve({defaultValue:ne,defaultLanguage:oe,defaultPath:ce,value:ue,language:pe,path:me,theme:ge="light",line:ye,loading:ve="Loading...",options:xe={},overrideServices:_e={},saveViewState:Se=!0,keepCurrentModel:$e=!1,width:Re="100%",height:Ae="100%",className:Ie,wrapperProps:ke={},beforeMount:Be=D$5,onMount:Ne=D$5,onChange:Fe,onValidate:Ue=D$5}){let[We,qe]=reactExports.useState(!1),[ze,Ge]=reactExports.useState(!0),Ze=reactExports.useRef(null),Dt=reactExports.useRef(null),Je=reactExports.useRef(null),Ut=reactExports.useRef(Ne),jt=reactExports.useRef(Be),Ke=reactExports.useRef(),an=reactExports.useRef(ue),Zt=se(me),en=reactExports.useRef(!1),Kt=reactExports.useRef(!1);k$8(()=>{let Xt=loader.init();return Xt.then(nn=>(Ze.current=nn)&&Ge(!1)).catch(nn=>(nn==null?void 0:nn.type)!=="cancelation"&&console.error("Monaco initialization: error:",nn)),()=>Dt.current?un():Xt.cancel()}),l$7(()=>{var nn,vn,Sn,Cn;let Xt=h$9(Ze.current,ne||ue||"",oe||pe||"",me||ce||"");Xt!==((nn=Dt.current)==null?void 0:nn.getModel())&&(Se&&_$5.set(Zt,(vn=Dt.current)==null?void 0:vn.saveViewState()),(Sn=Dt.current)==null||Sn.setModel(Xt),Se&&((Cn=Dt.current)==null||Cn.restoreViewState(_$5.get(me))))},[me],We),l$7(()=>{var Xt;(Xt=Dt.current)==null||Xt.updateOptions(xe)},[xe],We),l$7(()=>{!Dt.current||ue===void 0||(Dt.current.getOption(Ze.current.editor.EditorOption.readOnly)?Dt.current.setValue(ue):ue!==Dt.current.getValue()&&(Kt.current=!0,Dt.current.executeEdits("",[{range:Dt.current.getModel().getFullModelRange(),text:ue,forceMoveMarkers:!0}]),Dt.current.pushUndoStop(),Kt.current=!1))},[ue],We),l$7(()=>{var nn,vn;let Xt=(nn=Dt.current)==null?void 0:nn.getModel();Xt&&pe&&((vn=Ze.current)==null||vn.editor.setModelLanguage(Xt,pe))},[pe],We),l$7(()=>{var Xt;ye!==void 0&&((Xt=Dt.current)==null||Xt.revealLine(ye))},[ye],We),l$7(()=>{var Xt;(Xt=Ze.current)==null||Xt.editor.setTheme(ge)},[ge],We);let Wt=reactExports.useCallback(()=>{var Xt;if(!(!Je.current||!Ze.current)&&!en.current){jt.current(Ze.current);let nn=me||ce,vn=h$9(Ze.current,ue||ne||"",oe||pe||"",nn||"");Dt.current=(Xt=Ze.current)==null?void 0:Xt.editor.create(Je.current,{model:vn,automaticLayout:!0,...xe},_e),Se&&Dt.current.restoreViewState(_$5.get(nn)),Ze.current.editor.setTheme(ge),ye!==void 0&&Dt.current.revealLine(ye),qe(!0),en.current=!0}},[ne,oe,ce,ue,pe,me,xe,_e,Se,ge,ye]);reactExports.useEffect(()=>{We&&Ut.current(Dt.current,Ze.current)},[We]),reactExports.useEffect(()=>{!ze&&!We&&Wt()},[ze,We,Wt]),an.current=ue,reactExports.useEffect(()=>{var Xt,nn;We&&Fe&&((Xt=Ke.current)==null||Xt.dispose(),Ke.current=(nn=Dt.current)==null?void 0:nn.onDidChangeModelContent(vn=>{Kt.current||Fe(Dt.current.getValue(),vn)}))},[We,Fe]),reactExports.useEffect(()=>{if(We){let Xt=Ze.current.editor.onDidChangeMarkers(nn=>{var Sn;let vn=(Sn=Dt.current.getModel())==null?void 0:Sn.uri;if(vn&&nn.find(Cn=>Cn.path===vn.path)){let Cn=Ze.current.editor.getModelMarkers({resource:vn});Ue==null||Ue(Cn)}});return()=>{Xt==null||Xt.dispose()}}return()=>{}},[We,Ue]);function un(){var Xt,nn;(Xt=Ke.current)==null||Xt.dispose(),$e?Se&&_$5.set(me,Dt.current.saveViewState()):(nn=Dt.current.getModel())==null||nn.dispose(),Dt.current.dispose()}return React$2.createElement(H$5,{width:Re,height:Ae,isEditorReady:We,loading:ve,_ref:Je,className:Ie,wrapperProps:ke})}var fe=Ve,de=reactExports.memo(fe),Ft$1=de;let windowObject;typeof window<"u"?windowObject=window:typeof self<"u"?windowObject=self:windowObject=global;let cancelFrame=null,requestFrame=null;const TIMEOUT_DURATION=20,clearTimeoutFn=windowObject.clearTimeout,setTimeoutFn=windowObject.setTimeout,cancelAnimationFrameFn=windowObject.cancelAnimationFrame||windowObject.mozCancelAnimationFrame||windowObject.webkitCancelAnimationFrame,requestAnimationFrameFn=windowObject.requestAnimationFrame||windowObject.mozRequestAnimationFrame||windowObject.webkitRequestAnimationFrame;cancelAnimationFrameFn==null||requestAnimationFrameFn==null?(cancelFrame=clearTimeoutFn,requestFrame=function(oe){return setTimeoutFn(oe,TIMEOUT_DURATION)}):(cancelFrame=function([oe,ce]){cancelAnimationFrameFn(oe),clearTimeoutFn(ce)},requestFrame=function(oe){const ce=requestAnimationFrameFn(function(){clearTimeoutFn(ue),oe()}),ue=setTimeoutFn(function(){cancelAnimationFrameFn(ce),oe()},TIMEOUT_DURATION);return[ce,ue]});function createDetectElementResize(ne){let oe,ce,ue,pe,me,ge,ye;const ve=typeof document<"u"&&document.attachEvent;if(!ve){ge=function(Be){const Ne=Be.__resizeTriggers__,Fe=Ne.firstElementChild,Ue=Ne.lastElementChild,We=Fe.firstElementChild;Ue.scrollLeft=Ue.scrollWidth,Ue.scrollTop=Ue.scrollHeight,We.style.width=Fe.offsetWidth+1+"px",We.style.height=Fe.offsetHeight+1+"px",Fe.scrollLeft=Fe.scrollWidth,Fe.scrollTop=Fe.scrollHeight},me=function(Be){return Be.offsetWidth!==Be.__resizeLast__.width||Be.offsetHeight!==Be.__resizeLast__.height},ye=function(Be){if(Be.target.className&&typeof Be.target.className.indexOf=="function"&&Be.target.className.indexOf("contract-trigger")<0&&Be.target.className.indexOf("expand-trigger")<0)return;const Ne=this;ge(this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){me(Ne)&&(Ne.__resizeLast__.width=Ne.offsetWidth,Ne.__resizeLast__.height=Ne.offsetHeight,Ne.__resizeListeners__.forEach(function(We){We.call(Ne,Be)}))})};let $e=!1,Re="";ue="animationstart";const Ae="Webkit Moz O ms".split(" ");let Ie="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),ke="";{const Be=document.createElement("fakeelement");if(Be.style.animationName!==void 0&&($e=!0),$e===!1){for(let Ne=0;Ne div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',Ae=$e.head||$e.getElementsByTagName("head")[0],Ie=$e.createElement("style");Ie.id="detectElementResize",Ie.type="text/css",ne!=null&&Ie.setAttribute("nonce",ne),Ie.styleSheet?Ie.styleSheet.cssText=Re:Ie.appendChild($e.createTextNode(Re)),Ae.appendChild(Ie)}};return{addResizeListener:function($e,Re){if(ve)$e.attachEvent("onresize",Re);else{if(!$e.__resizeTriggers__){const Ae=$e.ownerDocument,Ie=windowObject.getComputedStyle($e);Ie&&Ie.position==="static"&&($e.style.position="relative"),xe(Ae),$e.__resizeLast__={},$e.__resizeListeners__=[],($e.__resizeTriggers__=Ae.createElement("div")).className="resize-triggers";const ke=Ae.createElement("div");ke.className="expand-trigger",ke.appendChild(Ae.createElement("div"));const Be=Ae.createElement("div");Be.className="contract-trigger",$e.__resizeTriggers__.appendChild(ke),$e.__resizeTriggers__.appendChild(Be),$e.appendChild($e.__resizeTriggers__),ge($e),$e.addEventListener("scroll",ye,!0),ue&&($e.__resizeTriggers__.__animationListener__=function(Fe){Fe.animationName===ce&&ge($e)},$e.__resizeTriggers__.addEventListener(ue,$e.__resizeTriggers__.__animationListener__))}$e.__resizeListeners__.push(Re)}},removeResizeListener:function($e,Re){if(ve)$e.detachEvent("onresize",Re);else if($e.__resizeListeners__.splice($e.__resizeListeners__.indexOf(Re),1),!$e.__resizeListeners__.length){$e.removeEventListener("scroll",ye,!0),$e.__resizeTriggers__.__animationListener__&&($e.__resizeTriggers__.removeEventListener(ue,$e.__resizeTriggers__.__animationListener__),$e.__resizeTriggers__.__animationListener__=null);try{$e.__resizeTriggers__=!$e.removeChild($e.__resizeTriggers__)}catch{}}}}}class AutoSizer extends reactExports.Component{constructor(...oe){super(...oe),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:ce,disableWidth:ue,onResize:pe}=this.props;if(this._parentNode){const me=window.getComputedStyle(this._parentNode)||{},ge=parseFloat(me.paddingLeft||"0"),ye=parseFloat(me.paddingRight||"0"),ve=parseFloat(me.paddingTop||"0"),xe=parseFloat(me.paddingBottom||"0"),_e=this._parentNode.getBoundingClientRect(),Se=_e.height-ve-xe,$e=_e.width-ge-ye,Re=this._parentNode.offsetHeight-ve-xe,Ae=this._parentNode.offsetWidth-ge-ye;(!ce&&(this.state.height!==Re||this.state.scaledHeight!==Se)||!ue&&(this.state.width!==Ae||this.state.scaledWidth!==$e))&&(this.setState({height:Re,width:Ae,scaledHeight:Se,scaledWidth:$e}),typeof pe=="function"&&pe({height:Re,scaledHeight:Se,scaledWidth:$e,width:Ae}))}},this._setRef=ce=>{this._autoSizer=ce}}componentDidMount(){const{nonce:oe}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=createDetectElementResize(oe),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:oe,defaultHeight:ce,defaultWidth:ue,disableHeight:pe=!1,disableWidth:me=!1,nonce:ge,onResize:ye,style:ve={},tagName:xe="div",..._e}=this.props,{height:Se,scaledHeight:$e,scaledWidth:Re,width:Ae}=this.state,Ie={overflow:"visible"},ke={};let Be=!1;return pe||(Se===0&&(Be=!0),Ie.height=0,ke.height=Se,ke.scaledHeight=$e),me||(Ae===0&&(Be=!0),Ie.width=0,ke.width=Ae,ke.scaledWidth=Re),reactExports.createElement(xe,{ref:this._setRef,style:{...Ie,...ve},..._e},!Be&&oe(ke))}}const DELAY=2500;function ScriptEditor({code:ne,onChange:oe}){const ce=useTheme$1();return useMonacoTheme(ce),jsxRuntimeExports.jsx(Flex,{height:"100%",overflow:"hidden",children:jsxRuntimeExports.jsx(AutoSizer,{children:({width:ue,height:pe})=>jsxRuntimeExports.jsx(Ft$1,{theme:ce.palette.mode==="dark"?"posthoc-dark":"light",width:ue,loading:jsxRuntimeExports.jsx(CircularProgress$1,{variant:"indeterminate"}),height:pe,language:"javascript",defaultValue:ne,onChange:lodashExports$1.debounce(me=>oe==null?void 0:oe(me),DELAY),options:{minimap:{enabled:!1}}})})})}function useMonacoTheme(ne){var ce;const oe=Le();(ce=oe==null?void 0:oe.editor)==null||ce.defineTheme("posthoc-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":ne.palette.background.paper}})}function ScriptViewer(ne){const oe=useTheme$1();return useMonacoTheme(oe),jsxRuntimeExports.jsx(Flex,{height:"100%",overflow:"hidden",children:jsxRuntimeExports.jsx(AutoSizer,{children:({width:ce,height:ue})=>jsxRuntimeExports.jsx(Ft$1,{theme:oe.palette.mode==="dark"?"posthoc-dark":"light",width:ce,loading:jsxRuntimeExports.jsx(CircularProgress$1,{variant:"indeterminate"}),height:ue,language:"javascript",...ne,options:{minimap:{enabled:!1},...ne.options}})})})}function makeTypeString({returnType:ne,params:oe}){return`@type {(${lodashExports$1.join(lodashExports$1.map(oe,ce=>`${ce.name}: ${ce.type}`),", ")}) => ${ne}}`}function makeComment(ne){const[oe,ce,ue]=["/**"," * "," */"],pe=lodashExports$1.map(lodashExports$1.chunk(lodashExports$1.split(ne.description," "),9),me=>lodashExports$1.join(me," "));return lodashExports$1.join([oe,...lodashExports$1.map(pe,me=>`${ce}${me}`),`${ce}${makeTypeString(ne)}`,ue],` -`)}function makeBody({name:ne,params:oe,defaultReturnValue:ce}){return lodashExports$1.join([`function ${ne}(${lodashExports$1.join(lodashExports$1.map(oe,"name"),", ")}) {`,` return ${JSON.stringify(ce)};`,"}"],` -`)}function makeTemplate(ne){return lodashExports$1.join(lodashExports$1.map(ne,oe=>lodashExports$1.join([makeComment(oe),makeBody(oe)],` -`)),` + "Droid Sans", "Helvetica Neue", "Arial", sans-serif`,makeTheme=(ne,oe)=>createTheme({palette:{primary:{main:getShade(oe,ne)},mode:ne,background:ne==="dark"?{default:"#0a0c10",paper:"#111317"}:{default:"#ebecef",paper:"#ffffff"}},typography:{allVariants:{fontFamily},h1:{fontFamily:headingFamily},h2:{fontFamily:headingFamily},h3:{fontFamily:headingFamily},h4:{fontFamily:headingFamily},h5:{fontFamily:headingFamily},h6:{fontFamily:headingFamily},button:{textTransform:"none",fontWeight:400,letterSpacing:0,backgroundColor:"background.paper"},subtitle2:{marginTop:6,fontWeight:400}},components:{MuiPopover:{styleOverrides:{paper:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06))"}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundImage:"linear-gradient(#1c2128, #1c2128)",fontFamily}}},MuiTypography:{styleOverrides:{body1:{fontWeight:400,fontSize:"0.875rem"},overline:{fontWeight:400,textTransform:"none",letterSpacing:0,fontSize:"0.875rem"},h4:{marginBottom:12},h6:{fontWeight:500}}}},shadows:["",...lodashExports$1.times(24,lodashExports$1.constant(shadow))]});function useAcrylic(ne){const[{"appearance/acrylic":oe}]=useSettings();return oe?{backdropFilter:"blur(16px)",background:({palette:ce})=>alpha$1(ne??ce.background.paper,.75)}:{backdropFilter:"blur(0px)",background:({palette:ce})=>ne??ce.background.paper}}function usePaper(){return(ne=1)=>({borderRadius:1,transition:({transitions:oe})=>oe.create(["background-color","box-shadow"]),boxShadow:({shadows:oe,palette:ce})=>ce.mode==="dark"?oe[1]:oe[Math.max(lodashExports$1.floor(ne)-1,0)],backgroundColor:({palette:oe})=>oe.mode==="dark"?alpha$1(oe.action.disabledBackground,ne*.02):oe.background.paper,border:({palette:oe})=>oe.mode==="dark"?`1px solid ${alpha$1(oe.text.primary,ne*.08)}`:`1px solid ${alpha$1(oe.text.primary,ne*.16)}`})}const textFieldProps={variant:"filled"};function FeaturePickerButton({children:ne,icon:oe,arrow:ce,...ue}){return jsxRuntimeExports.jsx(Button$2,{...ue,sx:{minWidth:0,...ue.sx},startIcon:oe,endIcon:ce&&jsxRuntimeExports.jsx(KeyboardArrowDownOutlined,{sx:{ml:-.5,color:"text.secondary",opacity:pe=>ue.disabled?pe.palette.action.disabledOpacity:1}}),children:jsxRuntimeExports.jsx(Box$1,{sx:{color:"text.primary",opacity:pe=>ue.disabled?pe.palette.action.disabledOpacity:1},children:ne})})}function FeaturePicker({label:ne,value:oe,onChange:ce,items:ue,icon:pe,arrow:me,disabled:ge,ButtonProps:ye,showTooltip:ve,itemOrientation:xe="horizontal",ellipsis:_e=1/0,paper:Se}){const $e=usePaper(),{palette:Re}=useTheme$1(),Ae=(ke,Be)=>ke&&reactExports.cloneElement(ke,{sx:{color:Be?getShade(Be,Re.mode):"primary.main"}}),Ie=lodashExports$1.find(ue,{id:oe});return jsxRuntimeExports.jsx(Select,{showTooltip:ve,placeholder:lodashExports$1.startCase(ne),trigger:ke=>{var Be;return jsxRuntimeExports.jsx(FeaturePickerButton,{...ke,...ye,sx:Se?{...$e(1),my:.5,px:1.25,py:.5}:{},disabled:!((Be=lodashExports$1.filter(ue,Ne=>!Ne.hidden))!=null&&Be.length)||ge,icon:Ie!=null&&Ie.icon?Ae(Ie.icon,Ie.color):pe,arrow:me,children:lodashExports$1.truncate((Ie==null?void 0:Ie.name)??ne,{length:_e})})},items:lodashExports$1.map(ue,({id:ke,name:Be,description:Ne,hidden:Fe,icon:Ue,color:We})=>({value:ke,label:jsxRuntimeExports.jsxs(Flex,{vertical:xe==="vertical",children:[jsxRuntimeExports.jsxs(Type$2,{component:"div",children:[Be,jsxRuntimeExports.jsx(Space,{})]}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Ne})]}),icon:Ae(Ue,We),disabled:Fe})),value:Ie==null?void 0:Ie.id,onChange:ce})}/*! + * OverlayScrollbars + * Version: 2.5.0 + * + * Copyright (c) Rene Haas | KingSora. + * https://github.com/KingSora + * + * Released under the MIT license. + */const createCache$1=(ne,oe)=>{const{o:ce,u:ue,_:pe}=ne;let me=ce,ge;const ye=(_e,Se)=>{const $e=me,Re=_e,Ae=Se||(ue?!ue($e,Re):$e!==Re);return(Ae||pe)&&(me=Re,ge=$e),[me,Ae,ge]};return[oe?_e=>ye(oe(me,ge),_e):ye,_e=>[me,!!_e,ge]]},t$7=typeof window<"u",n$7=t$7?window:{},o$4=Math.max,s$5=Math.min,e$6=Math.round,r$6=n$7.cancelAnimationFrame,l$7=n$7.requestAnimationFrame,i$8=n$7.setTimeout,a$4=n$7.clearTimeout,getApi=ne=>typeof n$7[ne]<"u"?n$7[ne]:void 0,u$7=getApi("MutationObserver"),f$7=getApi("IntersectionObserver"),_$5=getApi("ResizeObserver"),d$a=getApi("ScrollTimeline"),v$8=t$7&&Node.ELEMENT_NODE,{toString:h$9,hasOwnProperty:p$9}=Object.prototype,g$6=/^\[object (.+)\]$/,isUndefined=ne=>ne===void 0,isNull$1=ne=>ne===null,type$1=ne=>isUndefined(ne)||isNull$1(ne)?`${ne}`:h$9.call(ne).replace(g$6,"$1").toLowerCase(),isNumber$2=ne=>typeof ne=="number",isString$3=ne=>typeof ne=="string",isBoolean$2=ne=>typeof ne=="boolean",isFunction$5=ne=>typeof ne=="function",isArray$5=ne=>Array.isArray(ne),isObject$8=ne=>typeof ne=="object"&&!isArray$5(ne)&&!isNull$1(ne),isArrayLike=ne=>{const oe=!!ne&&ne.length,ce=isNumber$2(oe)&&oe>-1&&oe%1==0;return isArray$5(ne)||!isFunction$5(ne)&&ce?oe>0&&isObject$8(ne)?oe-1 in ne:!0:!1},isPlainObject$2=ne=>{if(!ne||!isObject$8(ne)||type$1(ne)!=="object")return!1;let oe;const ce="constructor",ue=ne[ce],pe=ue&&ue.prototype,me=p$9.call(ne,ce),ge=pe&&p$9.call(pe,"isPrototypeOf");if(ue&&!me&&!ge)return!1;for(oe in ne);return isUndefined(oe)||p$9.call(ne,oe)},isHTMLElement=ne=>{const oe=HTMLElement;return ne?oe?ne instanceof oe:ne.nodeType===v$8:!1},isElement$2=ne=>{const oe=Element;return ne?oe?ne instanceof oe:ne.nodeType===v$8:!1};function each(ne,oe){if(isArrayLike(ne))for(let ce=0;ceoe(ne[ce],ce,ne));return ne}const inArray=(ne,oe)=>ne.indexOf(oe)>=0,concat=(ne,oe)=>ne.concat(oe),push$2=(ne,oe,ce)=>(!ce&&!isString$3(oe)&&isArrayLike(oe)?Array.prototype.push.apply(ne,oe):ne.push(oe),ne),from$3=ne=>Array.from(ne||[]),createOrKeepArray=ne=>isArray$5(ne)?ne:[ne],isEmptyArray=ne=>!!ne&&!ne.length,deduplicateArray=ne=>from$3(new Set(ne)),runEachAndClear=(ne,oe,ce)=>{each(ne,pe=>pe&&pe.apply(void 0,oe||[])),!ce&&(ne.length=0)},b$7="paddingTop",w$7="paddingRight",S$6="paddingLeft",y$5="paddingBottom",m$7="marginLeft",O$4="marginRight",$$6="marginBottom",C$5="overflowX",x$4="overflowY",H$5="width",I$4="height",z$4="hidden",E$4="visible",equal=(ne,oe,ce,ue)=>{if(ne&&oe){let pe=!0;return each(ce,me=>{const ge=ue?ue(ne[me]):ne[me],ye=ue?ue(oe[me]):oe[me];ge!==ye&&(pe=!1)}),pe}return!1},equalWH=(ne,oe)=>equal(ne,oe,["w","h"]),equalXY=(ne,oe)=>equal(ne,oe,["x","y"]),equalTRBL=(ne,oe)=>equal(ne,oe,["t","r","b","l"]),noop$a=()=>{},bind$3=(ne,...oe)=>ne.bind(0,...oe),selfClearTimeout=ne=>{let oe;const ce=ne?i$8:l$7,ue=ne?a$4:r$6;return[pe=>{ue(oe),oe=ce(pe,isFunction$5(ne)?ne():ne)},()=>ue(oe)]},debounce=(ne,oe)=>{let ce,ue,pe,me=noop$a;const{v:ge,p:ye,S:ve}=oe||{},xe=function(Ae){me(),a$4(ce),ce=ue=void 0,me=noop$a,ne.apply(this,Ae)},_e=Re=>ve&&ue?ve(ue,Re):Re,Se=()=>{me!==noop$a&&xe(_e(pe)||pe)},$e=function(){const Ae=from$3(arguments),Ie=isFunction$5(ge)?ge():ge;if(isNumber$2(Ie)&&Ie>=0){const Be=isFunction$5(ye)?ye():ye,Ne=isNumber$2(Be)&&Be>=0,Fe=Ie>0?i$8:l$7,Ue=Ie>0?a$4:r$6,qe=_e(Ae)||Ae,ze=xe.bind(0,qe);me();const Ge=Fe(ze,Ie);me=()=>Ue(Ge),Ne&&!ce&&(ce=i$8(Se,Be)),ue=pe=qe}else xe(Ae)};return $e.m=Se,$e},hasOwnProperty$4=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),keys$3=ne=>ne?Object.keys(ne):[],assignDeep=(ne,oe,ce,ue,pe,me,ge)=>{const ye=[oe,ce,ue,pe,me,ge];return(typeof ne!="object"||isNull$1(ne))&&!isFunction$5(ne)&&(ne={}),each(ye,ve=>{each(ve,(xe,_e)=>{const Se=ve[_e];if(ne===Se)return!0;const $e=isArray$5(Se);if(Se&&isPlainObject$2(Se)){const Re=ne[_e];let Ae=Re;$e&&!isArray$5(Re)?Ae=[]:!$e&&!isPlainObject$2(Re)&&(Ae={}),ne[_e]=assignDeep(Ae,Se)}else ne[_e]=$e?Se.slice():Se})}),ne},removeUndefinedProperties=(ne,oe)=>each(assignDeep({},ne),(ce,ue,pe)=>{ce===void 0?delete pe[ue]:oe&&ce&&isPlainObject$2(ce)&&(pe[ue]=removeUndefinedProperties(ce,oe))}),isEmptyObject=ne=>{for(const oe in ne)return!1;return!0},capNumber=(ne,oe,ce)=>o$4(ne,s$5(oe,ce)),getDomTokensArray=ne=>from$3(new Set((isArray$5(ne)?ne:(ne||"").split(" ")).filter(oe=>oe))),getAttr=(ne,oe)=>ne&&ne.getAttribute(oe),setAttrs=(ne,oe,ce)=>{each(getDomTokensArray(oe),ue=>{ne&&ne.setAttribute(ue,ce||"")})},removeAttrs=(ne,oe)=>{each(getDomTokensArray(oe),ce=>ne&&ne.removeAttribute(ce))},domTokenListAttr=(ne,oe)=>{const ce=getDomTokensArray(getAttr(ne,oe)),ue=bind$3(setAttrs,ne,oe),pe=(me,ge)=>{const ye=new Set(ce);return each(getDomTokensArray(me),ve=>ye[ge](ve)),from$3(ye).join(" ")};return{O:me=>ue(pe(me,"delete")),$:me=>ue(pe(me,"add")),C:me=>{const ge=getDomTokensArray(me);return ge.reduce((ye,ve)=>ye&&ce.includes(ve),ge.length>0)}}},removeAttrClass=(ne,oe,ce)=>{domTokenListAttr(ne,oe).O(ce)},addAttrClass=(ne,oe,ce)=>(domTokenListAttr(ne,oe).$(ce),bind$3(removeAttrClass,ne,oe,ce)),addRemoveAttrClass=(ne,oe,ce,ue)=>{(ue?addAttrClass:removeAttrClass)(ne,oe,ce)},hasAttrClass=(ne,oe,ce)=>domTokenListAttr(ne,oe).C(ce),createDomTokenListClass=ne=>domTokenListAttr(ne,"class"),removeClass=(ne,oe)=>{createDomTokenListClass(ne).O(oe)},addClass=(ne,oe)=>(createDomTokenListClass(ne).$(oe),bind$3(removeClass,ne,oe)),A$5=t$7&&Element.prototype,find$1=(ne,oe)=>{const ce=[],ue=oe?isElement$2(oe)&&oe:document;return ue?push$2(ce,ue.querySelectorAll(ne)):ce},findFirst=(ne,oe)=>{const ce=oe?isElement$2(oe)&&oe:document;return ce?ce.querySelector(ne):null},is$c=(ne,oe)=>isElement$2(ne)?(A$5.matches||A$5.msMatchesSelector).call(ne,oe):!1,contents=ne=>ne?from$3(ne.childNodes):[],parent=ne=>ne&&ne.parentElement,closest$3=(ne,oe)=>isElement$2(ne)&&ne.closest(oe),liesBetween=(ne,oe,ce)=>{const ue=closest$3(ne,oe),pe=ne&&findFirst(ce,ue),me=closest$3(pe,oe)===ue;return ue&&pe?ue===ne||pe===ne||me&&closest$3(closest$3(ne,ce),oe)!==ue:!1},removeElements=ne=>{if(isArrayLike(ne))each(from$3(ne),oe=>removeElements(oe));else if(ne){const oe=parent(ne);oe&&oe.removeChild(ne)}},before=(ne,oe,ce)=>{if(ce&&ne){let ue=oe,pe;return isArrayLike(ce)?(pe=document.createDocumentFragment(),each(ce,me=>{me===ue&&(ue=me.previousSibling),pe.appendChild(me)})):pe=ce,oe&&(ue?ue!==oe&&(ue=ue.nextSibling):ue=ne.firstChild),ne.insertBefore(pe,ue||null),()=>removeElements(ce)}return noop$a},appendChildren=(ne,oe)=>before(ne,null,oe),insertAfter=(ne,oe)=>before(parent(ne),ne&&ne.nextSibling,oe),createDiv=ne=>{const oe=document.createElement("div");return setAttrs(oe,"class",ne),oe},createDOM=ne=>{const oe=createDiv();return oe.innerHTML=ne.trim(),each(contents(oe),ce=>removeElements(ce))},T$4=/^--/,getCSSVal=(ne,oe)=>ne.getPropertyValue(oe)||ne[oe]||"",validFiniteNumber=ne=>{const oe=ne||0;return isFinite(oe)?oe:0},parseToZeroOrNumber=ne=>validFiniteNumber(parseFloat(ne||"")),ratioToCssPercent=ne=>`${(validFiniteNumber(ne)*100).toFixed(3)}%`,numberToCssPx=ne=>`${validFiniteNumber(ne)}px`;function setStyles(ne,oe){ne&&each(oe,(ce,ue)=>{try{const pe=ne.style,me=isNumber$2(ce)?numberToCssPx(ce):(ce||"")+"";T$4.test(ue)?pe.setProperty(ue,me):pe[ue]=me}catch{}})}function getStyles$2(ne,oe,ce){const ue=isString$3(oe);let pe=ue?"":{};if(ne){const me=n$7.getComputedStyle(ne,ce)||ne.style;pe=ue?getCSSVal(me,oe):oe.reduce((ge,ye)=>(ge[ye]=getCSSVal(me,ye),ge),pe)}return pe}const getDirectionIsRTL=ne=>getStyles$2(ne,"direction")==="rtl",topRightBottomLeft=(ne,oe,ce)=>{const ue=oe?`${oe}-`:"",pe=ce?`-${ce}`:"",me=`${ue}top${pe}`,ge=`${ue}right${pe}`,ye=`${ue}bottom${pe}`,ve=`${ue}left${pe}`,xe=getStyles$2(ne,[me,ge,ye,ve]);return{t:parseToZeroOrNumber(xe[me]),r:parseToZeroOrNumber(xe[ge]),b:parseToZeroOrNumber(xe[ye]),l:parseToZeroOrNumber(xe[ve])}},getTrasformTranslateValue=(ne,oe)=>`translate${isObject$8(ne)?`(${ne.x},${ne.y})`:`${oe?"X":"Y"}(${ne})`}`,D$5={w:0,h:0},getElmWidthHeightProperty=(ne,oe)=>oe?{w:oe[`${ne}Width`],h:oe[`${ne}Height`]}:D$5,windowSize=ne=>getElmWidthHeightProperty("inner",ne||n$7),k$8=bind$3(getElmWidthHeightProperty,"offset"),R$4=bind$3(getElmWidthHeightProperty,"client"),M$4=bind$3(getElmWidthHeightProperty,"scroll"),fractionalSize=ne=>{const oe=parseFloat(getStyles$2(ne,H$5))||0,ce=parseFloat(getStyles$2(ne,I$4))||0;return{w:oe-e$6(oe),h:ce-e$6(ce)}},getBoundingClientRect=ne=>ne.getBoundingClientRect(),domRectHasDimensions=ne=>!!(ne&&(ne[I$4]||ne[H$5])),domRectAppeared=(ne,oe)=>{const ce=domRectHasDimensions(ne);return!domRectHasDimensions(oe)&&ce},removeEventListener$1=(ne,oe,ce,ue)=>{each(getDomTokensArray(oe),pe=>{ne.removeEventListener(pe,ce,ue)})},addEventListener$1=(ne,oe,ce,ue)=>{var pe;const me=(pe=ue&&ue.H)!=null?pe:!0,ge=ue&&ue.I||!1,ye=ue&&ue.A||!1,ve={passive:me,capture:ge};return bind$3(runEachAndClear,getDomTokensArray(oe).map(xe=>{const _e=ye?Se=>{removeEventListener$1(ne,xe,_e,ge),ce(Se)}:ce;return ne.addEventListener(xe,_e,ve),bind$3(removeEventListener$1,ne,xe,_e,ge)}))},stopPropagation=ne=>ne.stopPropagation(),preventDefault$1=ne=>ne.preventDefault(),V$4={x:0,y:0},absoluteCoordinates=ne=>{const oe=ne&&getBoundingClientRect(ne);return oe?{x:oe.left+n$7.scrollX,y:oe.top+n$7.scrollY}:V$4},convertScrollPosition=(ne,oe,ce)=>ce?ce.n?-ne+0:ce.i?oe-ne:ne:ne,getRawScrollBounds=(ne,oe)=>[convertScrollPosition(0,ne,oe),convertScrollPosition(ne,ne,oe)],getRawScrollRatio=(ne,oe,ce)=>capNumber(0,1,convertScrollPosition(ne,oe,ce)/oe||0),scrollElementTo=(ne,oe)=>{const{x:ce,y:ue}=isNumber$2(oe)?{x:oe,y:oe}:oe||{};isNumber$2(ce)&&(ne.scrollLeft=ce),isNumber$2(ue)&&(ne.scrollTop=ue)},getElmentScroll=ne=>({x:ne.scrollLeft,y:ne.scrollTop}),manageListener=(ne,oe)=>{each(createOrKeepArray(oe),ne)},createEventListenerHub=ne=>{const oe=new Map,ce=(me,ge)=>{if(me){const ye=oe.get(me);manageListener(ve=>{ye&&ye[ve?"delete":"clear"](ve)},ge)}else oe.forEach(ye=>{ye.clear()}),oe.clear()},ue=(me,ge)=>{if(isString$3(me)){const xe=oe.get(me)||new Set;return oe.set(me,xe),manageListener(_e=>{isFunction$5(_e)&&xe.add(_e)},ge),bind$3(ce,me,ge)}isBoolean$2(ge)&&ge&&ce();const ye=keys$3(me),ve=[];return each(ye,xe=>{const _e=me[xe];_e&&push$2(ve,ue(xe,_e))}),bind$3(runEachAndClear,ve)},pe=(me,ge)=>{each(from$3(oe.get(me)),ye=>{ge&&!isEmptyArray(ge)?ye.apply(0,ge):ye()})};return ue(ne||{}),[ue,ce,pe]},opsStringify=ne=>JSON.stringify(ne,(oe,ce)=>{if(isFunction$5(ce))throw 0;return ce}),getPropByPath=(ne,oe)=>ne?`${oe}`.split(".").reduce((ce,ue)=>ce&&hasOwnProperty$4(ce,ue)?ce[ue]:void 0,ne):void 0,L$4={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},getOptionsDiff=(ne,oe)=>{const ce={},ue=concat(keys$3(oe),keys$3(ne));return each(ue,pe=>{const me=ne[pe],ge=oe[pe];if(isObject$8(me)&&isObject$8(ge))assignDeep(ce[pe]={},getOptionsDiff(me,ge)),isEmptyObject(ce[pe])&&delete ce[pe];else if(hasOwnProperty$4(oe,pe)&&ge!==me){let ye=!0;if(isArray$5(me)||isArray$5(ge))try{opsStringify(me)===opsStringify(ge)&&(ye=!1)}catch{}ye&&(ce[pe]=ge)}}),ce},createOptionCheck=(ne,oe,ce)=>ue=>[getPropByPath(ne,ue),ce||getPropByPath(oe,ue)!==void 0],P$2="data-overlayscrollbars",U$4="os-environment",B$3=`${U$4}-scrollbar-hidden`,N$4=`${P$2}-initialize`,j$4=P$2,F$5=`${j$4}-overflow-x`,q$7=`${j$4}-overflow-y`,W$4="overflowVisible",X$4="scrollbarPressed",Y$5="updating",J$4="body",K$4=`${P$2}-viewport`,Z$5="arrange",G$3="scrollbarHidden",Q$4=W$4,tt$3=`${P$2}-padding`,nt$2=Q$4,ot$2=`${P$2}-content`,st$2="os-size-observer",et$3=`${st$2}-appear`,ct$2=`${st$2}-listener`,at$2="os-trinsic-observer",ut$2="os-theme-none",ft="os-scrollbar",_t=`${ft}-rtl`,dt$2=`${ft}-horizontal`,vt=`${ft}-vertical`,ht$2=`${ft}-track`,pt$1=`${ft}-handle`,gt$1=`${ft}-visible`,bt$1=`${ft}-cornerless`,wt=`${ft}-transitionless`,St=`${ft}-interaction`,yt=`${ft}-unusable`,mt$1=`${ft}-auto-hide`,Ot=`${mt$1}-hidden`,$t=`${ft}-wheel`,Ct$1=`${ht$2}-interactive`,xt=`${pt$1}-interactive`,Ht$1={},It={},addPlugins=ne=>{each(ne,oe=>each(oe,(ce,ue)=>{Ht$1[ue]=oe[ue]}))},registerPluginModuleInstances=(ne,oe,ce)=>keys$3(ne).map(ue=>{const{static:pe,instance:me}=ne[ue],[ge,ye,ve]=ce||[],xe=ce?me:pe;if(xe){const _e=ce?xe(ge,ye,oe):xe(oe);return(ve||It)[ue]=_e}}),getStaticPluginModuleInstance=ne=>It[ne],zt="__osOptionsValidationPlugin",Et$1="__osSizeObserverPlugin",getShowNativeOverlaidScrollbars=(ne,oe)=>{const{T:ce}=oe,[ue,pe]=ne("showNativeOverlaidScrollbars");return[ue&&ce.x&&ce.y,pe]},overflowIsVisible=ne=>ne.indexOf(E$4)===0,getViewportOverflowState=(ne,oe)=>{const{D:ce}=ne,ue=ve=>{const xe=getStyles$2(ce,ve),Se=(oe?oe[ve]:xe)==="scroll";return[xe,Se]},[pe,me]=ue(C$5),[ge,ye]=ue(x$4);return{k:{x:pe,y:ge},R:{x:me,y:ye}}},setViewportOverflowState=(ne,oe,ce,ue)=>{const pe=oe.x||oe.y,me=(_e,Se)=>{const $e=overflowIsVisible(_e),Re=$e&&pe?"hidden":"",Ae=Se&&$e&&_e.replace(`${E$4}-`,"")||Re;return[Se&&!$e?_e:"",overflowIsVisible(Ae)?"hidden":Ae]},[ge,ye]=me(ce.x,oe.x),[ve,xe]=me(ce.y,oe.y);return ue[C$5]=ye&&ve?ye:ge,ue[x$4]=xe&&ge?xe:ve,getViewportOverflowState(ne,ue)},Tt="__osScrollbarsHidingPlugin",kt="__osClickScrollPlugin";let Mt;const createEnvironment=()=>{const ne=(Fe,Ue,We,qe)=>{appendChildren(Fe,Ue);const ze=R$4(Ue),Ge=k$8(Ue),Ze=fractionalSize(We);return qe&&removeElements(Ue),{x:Ge.h-ze.h+Ze.h,y:Ge.w-ze.w+Ze.w}},oe=Fe=>{let Ue=!1;const We=addClass(Fe,B$3);try{Ue=getStyles$2(Fe,"scrollbar-width")==="none"||getStyles$2(Fe,"display","::-webkit-scrollbar")==="none"}catch{}return We(),Ue},ce=(Fe,Ue)=>{setStyles(Fe,{[C$5]:z$4,[x$4]:z$4,direction:"rtl"}),scrollElementTo(Fe,{x:0});const We=absoluteCoordinates(Fe),qe=absoluteCoordinates(Ue);scrollElementTo(Fe,{x:-999});const ze=absoluteCoordinates(Ue);return{i:We.x===qe.x,n:qe.x!==ze.x}},{body:ue}=document,me=createDOM(`
`)[0],ge=me.firstChild,[ye,,ve]=createEventListenerHub(),[xe,_e]=createCache$1({o:ne(ue,me,ge),u:equalXY},bind$3(ne,ue,me,ge,!0)),[Se]=_e(),$e=oe(me),Re={x:Se.x===0,y:Se.y===0},Ae={elements:{host:null,padding:!$e,viewport:Fe=>$e&&Fe===Fe.ownerDocument.body&&Fe,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},Ie=assignDeep({},L$4),ke=bind$3(assignDeep,{},Ie),Be=bind$3(assignDeep,{},Ae),Ne={P:Se,T:Re,L:$e,J:!!d$a,K:ce(me,ge),Z:bind$3(ye,"r"),G:Be,tt:Fe=>assignDeep(Ae,Fe)&&Be(),nt:ke,ot:Fe=>assignDeep(Ie,Fe)&&ke(),st:assignDeep({},Ae),et:assignDeep({},Ie)};return removeAttrs(me,"style"),removeElements(me),n$7.addEventListener("resize",()=>{let Fe;if(!$e&&(!Re.x||!Re.y)){const Ue=getStaticPluginModuleInstance(Tt);Fe=!!(Ue?Ue.Y():noop$a)(Ne,xe)}ve("r",[Fe])}),Ne},getEnvironment=()=>(Mt||(Mt=createEnvironment()),Mt),resolveInitialization=(ne,oe)=>isFunction$5(oe)?oe.apply(0,ne):oe,staticInitializationElement=(ne,oe,ce,ue)=>{const pe=isUndefined(ue)?ce:ue;return resolveInitialization(ne,pe)||oe.apply(0,ne)},dynamicInitializationElement=(ne,oe,ce,ue)=>{const pe=isUndefined(ue)?ce:ue,me=resolveInitialization(ne,pe);return!!me&&(isHTMLElement(me)?me:oe.apply(0,ne))},cancelInitialization=(ne,oe)=>{const{nativeScrollbarsOverlaid:ce,body:ue}=oe||{},{T:pe,L:me,G:ge}=getEnvironment(),{nativeScrollbarsOverlaid:ye,body:ve}=ge().cancel,xe=ce??ye,_e=isUndefined(ue)?ve:ue,Se=(pe.x||pe.y)&&xe,$e=ne&&(isNull$1(_e)?!me:_e);return!!Se||!!$e},Vt=new WeakMap,addInstance=(ne,oe)=>{Vt.set(ne,oe)},removeInstance=ne=>{Vt.delete(ne)},getInstance=ne=>Vt.get(ne),createEventContentChange=(ne,oe,ce)=>{let ue=!1;const pe=ce?new WeakMap:!1,me=()=>{ue=!0},ge=ye=>{if(pe&&ce){const ve=ce.map(xe=>{const[_e,Se]=xe||[];return[Se&&_e?(ye||find$1)(_e,ne):[],Se]});each(ve,xe=>each(xe[0],_e=>{const Se=xe[1],$e=pe.get(_e)||[];if(ne.contains(_e)&&Se){const Ae=addEventListener$1(_e,Se,Ie=>{ue?(Ae(),pe.delete(_e)):oe(Ie)});pe.set(_e,push$2($e,Ae))}else runEachAndClear($e),pe.delete(_e)}))}};return ge(),[me,ge]},createDOMObserver=(ne,oe,ce,ue)=>{let pe=!1;const{ct:me,rt:ge,lt:ye,it:ve,ut:xe,ft:_e}=ue||{},Se=debounce(()=>pe&&ce(!0),{v:33,p:99}),[$e,Re]=createEventContentChange(ne,Se,ye),Ae=me||[],Ie=ge||[],ke=concat(Ae,Ie),Be=(Fe,Ue)=>{if(!isEmptyArray(Ue)){const We=xe||noop$a,qe=_e||noop$a,ze=[],Ge=[];let Ze=!1,Dt=!1;if(each(Ue,Je=>{const{attributeName:Ut,target:jt,type:Ke,oldValue:an,addedNodes:Zt,removedNodes:en}=Je,Kt=Ke==="attributes",Wt=Ke==="childList",un=ne===jt,Xt=Kt&&Ut,nn=Xt&&getAttr(jt,Ut||"")||null,vn=Xt&&an!==nn,Sn=inArray(Ie,Ut)&&vn;if(oe&&(Wt||!un)){const Cn=Kt&&vn,Nt=Cn&&ve&&is$c(jt,ve),Jt=(Nt?!We(jt,Ut,an,nn):!Kt||Cn)&&!qe(Je,!!Nt,ne,ue);each(Zt,hn=>push$2(ze,hn)),each(en,hn=>push$2(ze,hn)),Dt=Dt||Jt}!oe&&un&&vn&&!We(jt,Ut,an,nn)&&(push$2(Ge,Ut),Ze=Ze||Sn)}),Re(Je=>deduplicateArray(ze).reduce((Ut,jt)=>(push$2(Ut,find$1(Je,jt)),is$c(jt,Je)?push$2(Ut,jt):Ut),[])),oe)return!Fe&&Dt&&ce(!1),[!1];if(!isEmptyArray(Ge)||Ze){const Je=[deduplicateArray(Ge),Ze];return!Fe&&ce.apply(0,Je),Je}}},Ne=new u$7(bind$3(Be,!1));return[()=>(Ne.observe(ne,{attributes:!0,attributeOldValue:!0,attributeFilter:ke,subtree:oe,childList:oe,characterData:oe}),pe=!0,()=>{pe&&($e(),Ne.disconnect(),pe=!1)}),()=>{if(pe)return Se.m(),Be(!0,Ne.takeRecords())}]},createSizeObserver=(ne,oe,ce)=>{const{_t:pe,dt:me}=ce||{},ge=getStaticPluginModuleInstance(Et$1),{K:ye}=getEnvironment(),ve=bind$3(getDirectionIsRTL,ne),[xe]=createCache$1({o:!1,_:!0});return()=>{const _e=[],$e=createDOM(`
`)[0],Re=$e.firstChild,Ae=Ie=>{const ke=Ie instanceof ResizeObserverEntry,Be=!ke&&isArray$5(Ie);let Ne=!1,Fe=!1,Ue=!0;if(ke){const[We,,qe]=xe(Ie.contentRect),ze=domRectHasDimensions(We),Ge=domRectAppeared(We,qe);Fe=!qe||Ge,Ne=!Fe&&!ze,Ue=!Ne}else Be?[,Ue]=Ie:Fe=Ie===!0;if(pe&&Ue){const We=Be?Ie[0]:getDirectionIsRTL($e);scrollElementTo($e,{x:convertScrollPosition(3333333,3333333,We&&ye),y:3333333})}Ne||oe({vt:Be?Ie:void 0,ht:!Be,dt:Fe})};if(_$5){const Ie=new _$5(ke=>Ae(ke.pop()));Ie.observe(Re),push$2(_e,()=>{Ie.disconnect()})}else if(ge){const[Ie,ke]=ge(Re,Ae,me);push$2(_e,concat([addClass($e,et$3),addEventListener$1($e,"animationstart",Ie)],ke))}else return noop$a;if(pe){const[Ie]=createCache$1({o:void 0},ve);push$2(_e,addEventListener$1($e,"scroll",ke=>{const Be=Ie(),[Ne,Fe,Ue]=Be;Fe&&(removeClass(Re,"ltr rtl"),addClass(Re,Ne?"rtl":"ltr"),Ae([!!Ne,Fe,Ue])),stopPropagation(ke)}))}return bind$3(runEachAndClear,push$2(_e,appendChildren(ne,$e)))}},createTrinsicObserver=(ne,oe)=>{let ce;const ue=ve=>ve.h===0||ve.isIntersecting||ve.intersectionRatio>0,pe=createDiv(at$2),[me]=createCache$1({o:!1}),ge=(ve,xe)=>{if(ve){const _e=me(ue(ve)),[,Se]=_e;return Se&&!xe&&oe(_e)&&[_e]}},ye=(ve,xe)=>ge(xe.pop(),ve);return[()=>{const ve=[];if(f$7)ce=new f$7(bind$3(ye,!1),{root:ne}),ce.observe(pe),push$2(ve,()=>{ce.disconnect()});else{const xe=()=>{const _e=k$8(pe);ge(_e)};push$2(ve,createSizeObserver(pe,xe)()),xe()}return bind$3(runEachAndClear,push$2(ve,appendChildren(ne,pe)))},()=>ce&&ye(!0,ce.takeRecords())]},createObserversSetup=(ne,oe,ce,ue)=>{let pe,me,ge,ye,ve,xe;const{L:_e}=getEnvironment(),Se=`[${j$4}]`,$e=`[${K$4}]`,Re=["tabindex"],Ae=["wrap","cols","rows"],Ie=["id","class","style","open"],{gt:ke,bt:Be,D:Ne,wt:Fe,St:Ue,V:We,yt:qe,Ot:ze}=ne,Ge={$t:!1,N:getDirectionIsRTL(ke)},Ze=getEnvironment(),Dt=getStaticPluginModuleInstance(Tt),[Je]=createCache$1({u:equalWH,o:{w:0,h:0}},()=>{const Yt=Dt&&Dt.M(ne,oe,Ge,Ze,ce).W,Jt=qe(Q$4),hn=!We&&qe(Z$5),Ye=hn&&getElmentScroll(Ne);ze(Q$4),We&&ze(Y$5,!0);const Xe=hn&&Yt&&Yt()[0],Pt=M$4(Fe),sn=M$4(Ne),yn=fractionalSize(Ne);return ze(Q$4,Jt),We&&ze(Y$5),Xe&&Xe(),scrollElementTo(Ne,Ye),{w:sn.w+Pt.w+yn.w,h:sn.h+Pt.h+yn.h}}),Ut=Ue?Ae:concat(Ie,Ae),jt=debounce(ue,{v:()=>pe,p:()=>me,S(Yt,Jt){const[hn]=Yt,[Ye]=Jt;return[concat(keys$3(hn),keys$3(Ye)).reduce((Xe,Pt)=>(Xe[Pt]=hn[Pt]||Ye[Pt],Xe),{})]}}),Ke=Yt=>{if(We){const Jt=getDirectionIsRTL(ke);assignDeep(Yt,{Ct:xe!==Jt}),assignDeep(Ge,{N:Jt}),xe=Jt}},an=Yt=>{each(Yt||Re,Jt=>{if(inArray(Re,Jt)){const hn=getAttr(Be,Jt);isString$3(hn)?setAttrs(Ne,Jt,hn):removeAttrs(Ne,Jt)}})},Zt=(Yt,Jt)=>{const[hn,Ye]=Yt,Xe={xt:Ye};return assignDeep(Ge,{$t:hn}),!Jt&&ue(Xe),Xe},en=({ht:Yt,vt:Jt,dt:hn})=>{const Xe=!(Yt&&!hn&&!Jt)&&_e?jt:ue,[Pt,sn]=Jt||[],yn={ht:Yt||hn,dt:hn,Ct:sn};Ke(yn),Jt&&assignDeep(Ge,{N:Pt}),Xe(yn)},Kt=(Yt,Jt)=>{const[,hn]=Je(),Ye={Ht:hn};return Ke(Ye),hn&&!Jt&&(Yt?ue:jt)(Ye),Ye},Wt=(Yt,Jt,hn)=>{const Ye={It:Jt};return Ke(Ye),Jt&&!hn?jt(Ye):We||an(Yt),Ye},{Z:un}=Ze,[Xt,nn]=Fe?createTrinsicObserver(Be,Zt):[],vn=!We&&createSizeObserver(Be,en,{dt:!0,_t:!0}),[Sn,Cn]=createDOMObserver(Be,!1,Wt,{rt:Ie,ct:concat(Ie,Re)}),Nt=We&&_$5&&new _$5(Yt=>{const Jt=Yt[Yt.length-1].contentRect;en({ht:!0,dt:domRectAppeared(Jt,ve)}),ve=Jt});return[()=>{an(),Nt&&Nt.observe(Be);const Yt=vn&&vn(),Jt=Xt&&Xt(),hn=Sn(),Ye=un(Xe=>{const[,Pt]=Je();jt({zt:Xe,Ht:Pt})});return()=>{Nt&&Nt.disconnect(),Yt&&Yt(),Jt&&Jt(),ye&&ye(),hn(),Ye()}},({Et:Yt,At:Jt,Tt:hn})=>{const Ye={},[Xe]=Yt("update.ignoreMutation"),[Pt,sn]=Yt("update.attributes"),[yn,qt]=Yt("update.elementEvents"),[wn,Tn]=Yt("update.debounce"),xn=qt||sn,Nn=Jt||hn,zn=Yn=>isFunction$5(Xe)&&Xe(Yn);if(xn){ge&&ge(),ye&&ye();const[Yn,Kn]=createDOMObserver(Fe||Ne,!0,Kt,{ct:concat(Ut,Pt||[]),lt:yn,it:Se,ft:(Rn,Mn)=>{const{target:Xn,attributeName:Jn}=Rn;return(!Mn&&Jn&&!We?liesBetween(Xn,Se,$e):!1)||!!closest$3(Xn,`.${ft}`)||!!zn(Rn)}});ye=Yn(),ge=Kn}if(Tn)if(jt.m(),isArray$5(wn)){const Yn=wn[0],Kn=wn[1];pe=isNumber$2(Yn)&&Yn,me=isNumber$2(Kn)&&Kn}else isNumber$2(wn)?(pe=wn,me=!1):(pe=!1,me=!1);if(Nn){const Yn=Cn(),Kn=nn&&nn(),Rn=ge&&ge();Yn&&assignDeep(Ye,Wt(Yn[0],Yn[1],Nn)),Kn&&assignDeep(Ye,Zt(Kn[0],Nn)),Rn&&assignDeep(Ye,Kt(Rn[0],Nn))}return Ke(Ye),Ye},Ge]},createScrollbarsSetupElements=(ne,oe,ce,ue)=>{const{G:pe,K:me}=getEnvironment(),{scrollbars:ge}=pe(),{slot:ye}=ge,{gt:ve,bt:xe,D:_e,Dt:Se,kt:$e,Rt:Re,V:Ae}=oe,{scrollbars:Ie}=Se?{}:ne,{slot:ke}=Ie||{},Be=new Map,Ne=Yt=>d$a&&new d$a({source:$e,axis:Yt}),Fe=Ne("x"),Ue=Ne("y"),We=dynamicInitializationElement([ve,xe,_e],()=>Ae&&Re?ve:xe,ye,ke),qe=(Yt,Jt)=>{if(Jt){const yn=Yt?H$5:I$4,{Mt:qt,Vt:wn}=Jt,Tn=getBoundingClientRect(wn)[yn],xn=getBoundingClientRect(qt)[yn];return capNumber(0,1,Tn/xn||0)}const hn=Yt?"x":"y",{Lt:Ye,Pt:Xe}=ce,Pt=Xe[hn],sn=Ye[hn];return capNumber(0,1,Pt/(Pt+sn)||0)},ze=(Yt,Jt,hn,Ye)=>{const Xe=qe(hn,Yt);return 1/Xe*(1-Xe)*(Ye?1-Jt:Jt)||0},Ge=(Yt,Jt)=>assignDeep(Yt,Jt?{clear:["left"]}:{}),Ze=Yt=>{Be.forEach((Jt,hn)=>{(Yt?inArray(createOrKeepArray(Yt),hn):!0)&&(each(Jt||[],Xe=>{Xe&&Xe.cancel()}),Be.delete(hn))})},Dt=(Yt,Jt,hn,Ye)=>{const Xe=Be.get(Yt)||[],Pt=Xe.find(sn=>sn&&sn.timeline===Jt);Pt?Pt.effect=new KeyframeEffect(Yt,hn,{composite:Ye}):Be.set(Yt,concat(Xe,[Yt.animate(hn,{timeline:Jt,composite:Ye})]))},Je=(Yt,Jt,hn)=>{const Ye=hn?addClass:removeClass;each(Yt,Xe=>{Ye(Xe.Ut,Jt)})},Ut=(Yt,Jt)=>{each(Yt,hn=>{const[Ye,Xe]=Jt(hn);setStyles(Ye,Xe)})},jt=(Yt,Jt)=>{Ut(Yt,hn=>{const{Vt:Ye}=hn;return[Ye,{[Jt?H$5:I$4]:ratioToCssPercent(qe(Jt))}]})},Ke=(Yt,Jt)=>{const{Lt:hn}=ce,Ye=Jt?hn.x:hn.y,Xe=(Pt,sn,yn)=>getTrasformTranslateValue(ratioToCssPercent(ze(Pt,getRawScrollRatio(sn,Ye,yn),Jt,yn)),Jt);if(Fe&&Ue)each(Yt,Pt=>{const{Ut:sn,Vt:yn}=Pt,qt=Jt&&getDirectionIsRTL(sn)&&me;Dt(yn,Jt?Fe:Ue,Ge({transform:getRawScrollBounds(Ye,qt).map(wn=>Xe(Pt,wn,qt))},qt))});else{const Pt=getElmentScroll($e);Ut(Yt,sn=>{const{Vt:yn,Ut:qt}=sn;return[yn,{transform:Xe(sn,Jt?Pt.x:Pt.y,Jt&&getDirectionIsRTL(qt)&&me)}]})}},an=Yt=>Ae&&!Re&&parent(Yt)===_e,Zt=[],en=[],Kt=[],Wt=(Yt,Jt,hn)=>{const Ye=isBoolean$2(hn),Xe=Ye?hn:!0,Pt=Ye?!hn:!0;Xe&&Je(en,Yt,Jt),Pt&&Je(Kt,Yt,Jt)},un=()=>{jt(en,!0),jt(Kt)},Xt=()=>{Ke(en,!0),Ke(Kt)},nn=()=>{if(Ae){const{Lt:Yt}=ce,Jt=.5;if(Fe&&Ue)each(concat(Kt,en),({Ut:hn})=>{if(an(hn)){const Ye=(Xe,Pt,sn)=>{const yn=sn&&getDirectionIsRTL(hn)&&me;Dt(hn,Xe,Ge({transform:getRawScrollBounds(Pt-Jt,yn).map(qt=>getTrasformTranslateValue(numberToCssPx(qt),sn))},yn),"add")};Ye(Fe,Yt.x,!0),Ye(Ue,Yt.y)}else Ze(hn)});else{const hn=getElmentScroll($e),Ye=Xe=>{const{Ut:Pt}=Xe,sn=an(Pt)&&Pt,yn=(qt,wn,Tn)=>{const xn=getRawScrollRatio(qt,wn,Tn),Nn=wn*xn;return numberToCssPx(Tn?-Nn:Nn)};return[sn,{transform:sn?getTrasformTranslateValue({x:yn(hn.x,Yt.x,getDirectionIsRTL(Pt)&&me),y:yn(hn.y,Yt.y)}):""}]};Ut(en,Ye),Ut(Kt,Ye)}}},vn=Yt=>{const Jt=Yt?dt$2:vt,hn=Yt?en:Kt,Ye=isEmptyArray(hn)?wt:"",Xe=createDiv(`${ft} ${Jt} ${Ye}`),Pt=createDiv(ht$2),sn=createDiv(pt$1),yn={Ut:Xe,Mt:Pt,Vt:sn};return push$2(hn,yn),push$2(Zt,[appendChildren(Xe,Pt),appendChildren(Pt,sn),bind$3(removeElements,Xe),Ze,ue(yn,Wt,Ke,Yt)]),yn},Sn=bind$3(vn,!0),Cn=bind$3(vn,!1),Nt=()=>(appendChildren(We,en[0].Ut),appendChildren(We,Kt[0].Ut),i$8(()=>{Wt(wt)},300),bind$3(runEachAndClear,Zt));return Sn(),Cn(),[{Bt:un,Nt:Xt,jt:nn,Ft:Wt,qt:{J:Fe,Wt:en,Xt:Sn,Yt:bind$3(Ut,en)},Jt:{J:Ue,Wt:Kt,Xt:Cn,Yt:bind$3(Ut,Kt)}},Nt]},createScrollbarsSetupEvents=(ne,oe,ce)=>{const{bt:ue,kt:pe,Kt:me}=oe;return(ge,ye,ve,xe)=>{const{Ut:_e,Mt:Se,Vt:$e}=ge,[Re,Ae]=selfClearTimeout(333),[Ie,ke]=selfClearTimeout(),Be=bind$3(ve,[ge],xe),Ne=!!pe.scrollBy,Fe=`client${xe?"X":"Y"}`,Ue=xe?H$5:I$4,We=xe?"left":"top",qe=xe?"w":"h",ze=xe?"x":"y",Ge=Je=>Je.propertyName.indexOf(Ue)>-1,Ze=()=>{const Je="pointerup pointerleave pointercancel lostpointercapture",Ut=(jt,Ke)=>an=>{const{Lt:Zt}=ce,en=k$8(Se)[qe]-k$8($e)[qe],Wt=Ke*an/en*Zt[ze];scrollElementTo(pe,{[ze]:jt+Wt})};return addEventListener$1(Se,"pointerdown",jt=>{const Ke=closest$3(jt.target,`.${pt$1}`)===$e,an=Ke?$e:Se,Zt=ne.scrollbars,{button:en,isPrimary:Kt,pointerType:Wt}=jt,{pointers:un}=Zt;if(en===0&&Kt&&Zt[Ke?"dragScroll":"clickScroll"]&&(un||[]).includes(Wt)){const nn=!Ke&&jt.shiftKey,vn=bind$3(getBoundingClientRect,$e),Sn=bind$3(getBoundingClientRect,Se),Cn=(xn,Nn)=>(xn||vn())[We]-(Nn||Sn())[We],Nt=e$6(getBoundingClientRect(pe)[Ue])/k$8(pe)[qe]||1,Yt=Ut(getElmentScroll(pe)[ze]||0,1/Nt),Jt=jt[Fe],hn=vn(),Ye=Sn(),Xe=hn[Ue],Pt=Cn(hn,Ye)+Xe/2,sn=Jt-Ye[We],yn=Ke?0:sn-Pt,qt=xn=>{runEachAndClear(Tn),an.releasePointerCapture(xn.pointerId)},Tn=[addAttrClass(ue,j$4,X$4),addEventListener$1(me,Je,qt),addEventListener$1(me,"selectstart",xn=>preventDefault$1(xn),{H:!1}),addEventListener$1(Se,Je,qt),addEventListener$1(Se,"pointermove",xn=>{const Nn=xn[Fe]-Jt;(Ke||nn)&&Yt(yn+Nn)})];if(an.setPointerCapture(jt.pointerId),nn)Yt(yn);else if(!Ke){const xn=getStaticPluginModuleInstance(kt);xn&&push$2(Tn,xn(Yt,Cn,yn,Xe,sn))}}})};let Dt=!0;return bind$3(runEachAndClear,[addEventListener$1(_e,"pointerenter",()=>{ye(St,!0)}),addEventListener$1(_e,"pointerleave pointercancel",()=>{ye(St,!1)}),addEventListener$1(_e,"wheel",Je=>{const{deltaX:Ut,deltaY:jt,deltaMode:Ke}=Je;Ne&&Dt&&Ke===0&&parent(_e)===ue&&pe.scrollBy({left:Ut,top:jt,behavior:"smooth"}),Dt=!1,ye($t,!0),Re(()=>{Dt=!0,ye($t)}),preventDefault$1(Je)},{H:!1,I:!0}),addEventListener$1($e,"transitionstart",Je=>{if(Ge(Je)){const Ut=()=>{Be(),Ie(Ut)};Ut()}}),addEventListener$1($e,"transitionend transitioncancel",Je=>{Ge(Je)&&(ke(),Be())}),addEventListener$1(_e,"mousedown",bind$3(addEventListener$1,me,"click",stopPropagation,{A:!0,I:!0}),{I:!0}),Ze(),Ae,ke])}},createScrollbarsSetup=(ne,oe,ce,ue,pe,me)=>{let ge,ye,ve,xe,_e,Se=noop$a,$e=0;const[Re,Ae]=selfClearTimeout(),[Ie,ke]=selfClearTimeout(),[Be,Ne]=selfClearTimeout(100),[Fe,Ue]=selfClearTimeout(100),[We,qe]=selfClearTimeout(100),[ze,Ge]=selfClearTimeout(()=>$e),[Ze,Dt]=createScrollbarsSetupElements(ne,pe,ue,createScrollbarsSetupEvents(oe,pe,ue)),{bt:Je,Zt:Ut,Rt:jt}=pe,{Ft:Ke,Bt:an,Nt:Zt,jt:en}=Ze,Kt=vn=>{Ke(mt$1,vn,!0),Ke(mt$1,vn,!1)},Wt=(vn,Sn)=>{if(Ge(),vn)Ke(Ot);else{const Cn=bind$3(Ke,Ot,!0);$e>0&&!Sn?ze(Cn):Cn()}},un=vn=>vn.pointerType==="mouse",Xt=vn=>{un(vn)&&(xe=ye,xe&&Wt(!0))},nn=[Ne,Ge,Ue,qe,ke,Ae,()=>Se(),addEventListener$1(Je,"pointerover",Xt,{A:!0}),addEventListener$1(Je,"pointerenter",Xt),addEventListener$1(Je,"pointerleave",vn=>{un(vn)&&(xe=!1,ye&&Wt(!1))}),addEventListener$1(Je,"pointermove",vn=>{un(vn)&&ge&&Re(()=>{Ne(),Wt(!0),Fe(()=>{ge&&Wt(!1)})})}),addEventListener$1(Ut,"scroll",vn=>{Ie(()=>{Zt(),ve&&Wt(!0),Be(()=>{ve&&!xe&&Wt(!1)})}),me(vn),en()})];return[()=>bind$3(runEachAndClear,push$2(nn,Dt())),({Et:vn,Tt:Sn,Gt:Cn,Qt:Nt})=>{const{tn:Yt,nn:Jt,sn:hn}=Nt||{},{Ct:Ye,dt:Xe}=Cn||{},{N:Pt}=ce,{T:sn}=getEnvironment(),{Lt:yn,k:qt,en:wn}=ue,[Tn,xn]=vn("showNativeOverlaidScrollbars"),[Nn,zn]=vn("scrollbars.theme"),[Yn,Kn]=vn("scrollbars.visibility"),[Rn,Mn]=vn("scrollbars.autoHide"),[Xn,Jn]=vn("scrollbars.autoHideSuspend"),[pn]=vn("scrollbars.autoHideDelay"),[tn,Gt]=vn("scrollbars.dragScroll"),[bn,kn]=vn("scrollbars.clickScroll"),jn=Xe&&!Sn,Wn=wn.x||wn.y,dn=Yt||Jt||Ye||Sn,Bn=hn||Kn,mn=Tn&&sn.x&&sn.y,Pn=(ur,er)=>{const _r=Yn==="visible"||Yn==="auto"&&ur==="scroll";return Ke(gt$1,_r,er),_r};if($e=pn,jn&&(Xn&&Wn?(Kt(!1),Se(),We(()=>{Se=addEventListener$1(Ut,"scroll",bind$3(Kt,!0),{A:!0})})):Kt(!0)),xn&&Ke(ut$2,mn),zn&&(Ke(_e),Ke(Nn,!0),_e=Nn),Jn&&!Xn&&Kt(!0),Mn&&(ge=Rn==="move",ye=Rn==="leave",ve=Rn!=="never",Wt(!ve,!0)),Gt&&Ke(xt,tn),kn&&Ke(Ct$1,bn),Bn){const ur=Pn(qt.x,!0),er=Pn(qt.y,!1);Ke(bt$1,!(ur&&er))}dn&&(an(),Zt(),en(),Ke(yt,!yn.x,!0),Ke(yt,!yn.y,!1),Ke(_t,Pt&&!jt))},{},Ze]},createStructureSetupElements=ne=>{const oe=getEnvironment(),{G:ce,L:ue}=oe,{elements:pe}=ce(),{host:me,padding:ge,viewport:ye,content:ve}=pe,xe=isHTMLElement(ne),_e=xe?{}:ne,{elements:Se}=_e,{host:$e,padding:Re,viewport:Ae,content:Ie}=Se||{},ke=xe?ne:_e.target,Be=is$c(ke,"textarea"),Ne=ke.ownerDocument,Fe=Ne.documentElement,Ue=ke===Ne.body,We=Ne.defaultView,qe=()=>Ne.activeElement,ze=Yn=>{Yn&&Yn.focus&&Yn.focus()},Ge=bind$3(staticInitializationElement,[ke]),Ze=bind$3(dynamicInitializationElement,[ke]),Dt=bind$3(resolveInitialization,[ke]),Je=bind$3(createDiv,""),Ut=bind$3(Ge,Je,ye),jt=bind$3(Ze,Je,ve),Ke=Ut(Ae),an=Ke===ke,Zt=an&&Ue,en=!an&&jt(Ie),Kt=!an&&isHTMLElement(Ke)&&Ke===en,Wt=Kt&&!!Dt(ve),un=Wt?Ut():Ke,Xt=Wt?en:jt(),vn=Zt?Fe:Kt?un:Ke,Sn=Be?Ge(Je,me,$e):ke,Cn=Zt?vn:Sn,Nt=Kt?Xt:en,Yt={gt:ke,bt:Cn,D:vn,cn:!an&&Ze(Je,ge,Re),wt:Nt,kt:Zt?Fe:vn,Zt:Zt?Ne:vn,rn:Ue?Fe:ke,ln:We,Kt:Ne,St:Be,Rt:Ue,Dt:xe,V:an,an:Kt,yt:Yn=>hasAttrClass(vn,an?j$4:K$4,Yn),Ot:(Yn,Kn)=>addRemoveAttrClass(vn,an?j$4:K$4,Yn,Kn)},Jt=keys$3(Yt).reduce((Yn,Kn)=>{const Rn=Yt[Kn];return push$2(Yn,Rn&&isHTMLElement(Rn)&&!parent(Rn)?Rn:!1)},[]),hn=Yn=>Yn?inArray(Jt,Yn):null,{gt:Ye,bt:Xe,cn:Pt,D:sn,wt:yn}=Yt,qt=[()=>{removeAttrs(Xe,[j$4,N$4]),removeAttrs(Ye,N$4),Ue&&removeAttrs(Fe,[N$4,j$4])}],wn=Be&&hn(Xe);let Tn=Be?Ye:contents([yn,sn,Pt,Xe,Ye].find(Yn=>hn(Yn)===!1));const xn=Zt?Ye:yn||sn,Nn=bind$3(runEachAndClear,qt);return[Yt,()=>{const Yn=qe(),Kn=Xn=>{appendChildren(parent(Xn),contents(Xn)),removeElements(Xn)},Rn=Xn=>Xn?addEventListener$1(Xn,"focus blur",Jn=>{stopPropagation(Jn),Jn.stopImmediatePropagation()},{I:!0,H:!1}):noop$a,Mn=Rn(Yn);if(setAttrs(Xe,j$4,an?"viewport":"host"),setAttrs(Pt,tt$3,""),setAttrs(yn,ot$2,""),an||(setAttrs(sn,K$4,""),Ue&&addAttrClass(Fe,j$4,J$4)),wn&&(insertAfter(Ye,Xe),push$2(qt,()=>{insertAfter(Xe,Ye),removeElements(Xe)})),appendChildren(xn,Tn),appendChildren(Xe,Pt),appendChildren(Pt||Xe,!an&&sn),appendChildren(sn,yn),push$2(qt,[Mn,()=>{const Xn=qe(),Jn=Rn(Xn);removeAttrs(Pt,tt$3),removeAttrs(yn,ot$2),removeAttrs(sn,[F$5,q$7,K$4]),hn(yn)&&Kn(yn),hn(sn)&&Kn(sn),hn(Pt)&&Kn(Pt),ze(Xn),Jn()}]),ue&&!an&&(addAttrClass(sn,K$4,G$3),push$2(qt,bind$3(removeAttrs,sn,K$4))),!an&&We.top===We&&Yn===ke){const Xn="tabindex",Jn=getAttr(sn,Xn);setAttrs(sn,Xn,"-1"),ze(sn);const pn=()=>Jn?setAttrs(sn,Xn,Jn):removeAttrs(sn,Xn),tn=addEventListener$1(Ne,"pointerdown keydown",()=>{pn(),tn()});push$2(qt,[pn,tn])}else ze(Yn);return Mn(),Tn=0,Nn},Nn]},createTrinsicUpdateSegment=({wt:ne})=>({Gt:oe,un:ce,Tt:ue})=>{const{xt:pe}=oe||{},{$t:me}=ce;ne&&(pe||ue)&&setStyles(ne,{[I$4]:me&&"100%"})},createPaddingUpdateSegment=({bt:ne,cn:oe,D:ce,V:ue},pe)=>{const[me,ge]=createCache$1({u:equalTRBL,o:topRightBottomLeft()},bind$3(topRightBottomLeft,ne,"padding",""));return({Et:ye,Gt:ve,un:xe,Tt:_e})=>{let[Se,$e]=ge(_e);const{L:Re}=getEnvironment(),{ht:Ae,Ht:Ie,Ct:ke}=ve||{},{N:Be}=xe,[Ne,Fe]=ye("paddingAbsolute");(Ae||$e||(_e||Ie))&&([Se,$e]=me(_e));const We=!ue&&(Fe||ke||$e);if(We){const qe=!Ne||!oe&&!Re,ze=Se.r+Se.l,Ge=Se.t+Se.b,Ze={[O$4]:qe&&!Be?-ze:0,[$$6]:qe?-Ge:0,[m$7]:qe&&Be?-ze:0,top:qe?-Se.t:0,right:qe?Be?-Se.r:"auto":0,left:qe?Be?"auto":-Se.l:0,[H$5]:qe&&`calc(100% + ${ze}px)`},Dt={[b$7]:qe?Se.t:0,[w$7]:qe?Se.r:0,[y$5]:qe?Se.b:0,[S$6]:qe?Se.l:0};setStyles(oe||ce,Ze),setStyles(ce,Dt),assignDeep(pe,{cn:Se,fn:!qe,j:oe?Dt:assignDeep({},Ze,Dt)})}return{_n:We}}},createOverflowUpdateSegment=(ne,oe)=>{const ce=getEnvironment(),{bt:ue,cn:pe,D:me,V:ge,Ot:ye,Rt:ve,ln:xe}=ne,{L:_e,T:Se}=ce,$e=ve&&ge,Re=bind$3(o$4,0),Ae={u:equalWH,o:{w:0,h:0}},Ie={u:equalXY,o:{x:z$4,y:z$4}},ke=(Je,Ut)=>{const jt=n$7.devicePixelRatio%1!==0?1:0,Ke={w:Re(Je.w-Ut.w),h:Re(Je.h-Ut.h)};return{w:Ke.w>jt?Ke.w:0,h:Ke.h>jt?Ke.h:0}},[Be,Ne]=createCache$1(Ae,bind$3(fractionalSize,me)),[Fe,Ue]=createCache$1(Ae,bind$3(M$4,me)),[We,qe]=createCache$1(Ae),[ze,Ge]=createCache$1(Ae),[Ze]=createCache$1(Ie),Dt=getStaticPluginModuleInstance(Tt);return({Et:Je,Gt:Ut,un:jt,Tt:Ke},{_n:an})=>{const{ht:Zt,It:en,Ht:Kt,xt:Wt,Ct:un,zt:Xt}=Ut||{},{$t:nn}=jt,vn=Dt&&Dt.M(ne,oe,jt,ce,Je),{q:Sn,W:Cn,X:Nt,F:Yt}=vn||{},Jt=(mn,Pn)=>{if(setStyles(me,{[I$4]:""}),Pn){const{fn:ur,cn:er}=oe,{R:_r}=mn,dr=fractionalSize(ue),Sr=R$4(ue),sr=getStyles$2(me,"boxSizing")==="content-box",nr=ur||sr?er.b+er.t:0,kr=!(Se.x&&sr);setStyles(me,{[I$4]:Sr.h+dr.h+(_r.x&&kr&&Yt?Yt(mn).U.x:0)-nr})}},[hn,Ye]=getShowNativeOverlaidScrollbars(Je,ce),[Xe,Pt]=Je("overflow"),sn=!ge&&(Zt||Kt||en||Ye||Wt),yn=Zt||an||Kt||un||Xt||Ye,qt=overflowIsVisible(Xe.x),wn=overflowIsVisible(Xe.y),Tn=qt||wn;let xn=Ne(Ke),Nn=Ue(Ke),zn=qe(Ke),Yn=Ge(Ke),Kn;if(Ye&&_e&&ye(G$3,!hn),sn&&(Kn=getViewportOverflowState(ne),Jt(Kn,nn)),yn){Tn&&ye(Q$4,!1);const[mn,Pn]=Cn?Cn(Kn):[],[ur,er]=xn=Be(Ke),[_r,dr]=Nn=Fe(Ke),Sr=R$4(me),sr=_r,nr=Sr;mn&&mn(),(dr||er||Ye)&&Pn&&!hn&&Sn&&Sn(Pn,_r,ur);const kr=windowSize(xe),Mr={w:Re(o$4(_r.w,sr.w)+ur.w),h:Re(o$4(_r.h,sr.h)+ur.h)},Rr={w:Re(($e?kr.w:nr.w+Re(Sr.w-_r.w))+ur.w),h:Re(($e?kr.h:nr.h+Re(Sr.h-_r.h))+ur.h)};Yn=ze(Rr),zn=We(ke(Mr,Rr),Ke)}const[Rn,Mn]=Yn,[Xn,Jn]=zn,[pn,tn]=Nn,[Gt,bn]=xn,kn={x:Xn.w>0,y:Xn.h>0},jn=qt&&wn&&(kn.x||kn.y)||qt&&kn.x&&!kn.y||wn&&kn.y&&!kn.x;if(an||un||Xt||bn||tn||Mn||Jn||Pt||Ye||sn||yn){const mn={},Pn=setViewportOverflowState(ne,kn,Xe,mn);Nt&&Nt(Pn,jt,!!Sn&&Sn(Pn,pn,Gt),mn),sn&&Jt(Pn,nn),ge?(setAttrs(ue,F$5,mn[C$5]),setAttrs(ue,q$7,mn[x$4])):setStyles(me,mn)}addRemoveAttrClass(ue,j$4,W$4,jn),addRemoveAttrClass(pe,tt$3,nt$2,jn),ge||addRemoveAttrClass(me,K$4,Q$4,Tn);const[dn,Bn]=Ze(getViewportOverflowState(ne).k);return assignDeep(oe,{k:dn,Pt:{x:Rn.w,y:Rn.h},Lt:{x:Xn.w,y:Xn.h},en:kn}),{sn:Bn,tn:Mn,nn:Jn}}},createStructureSetup=ne=>{const[oe,ce,ue]=createStructureSetupElements(ne),pe={cn:{t:0,r:0,b:0,l:0},fn:!1,j:{[O$4]:0,[$$6]:0,[m$7]:0,[b$7]:0,[w$7]:0,[y$5]:0,[S$6]:0},Pt:{x:0,y:0},Lt:{x:0,y:0},k:{x:z$4,y:z$4},en:{x:!1,y:!1}},{gt:me,D:ge,V:ye}=oe,{L:ve,T:xe}=getEnvironment(),_e=!ve&&(xe.x||xe.y),Se=[createTrinsicUpdateSegment(oe),createPaddingUpdateSegment(oe,pe),createOverflowUpdateSegment(oe,pe)];return[ce,$e=>{const Re={},Ie=_e&&getElmentScroll(ge),ke=ye?addAttrClass(ge,j$4,Y$5):noop$a;return each(Se,Be=>{assignDeep(Re,Be($e,Re)||{})}),ke(),scrollElementTo(ge,Ie),!ye&&scrollElementTo(me,0),Re},pe,oe,ue]},createSetups=(ne,oe,ce,ue)=>{const pe=createOptionCheck(oe,{}),[me,ge,ye,ve,xe]=createStructureSetup(ne),[_e,Se,$e]=createObserversSetup(ve,ye,pe,Ne=>{Be({},Ne)}),[Re,Ae,,Ie]=createScrollbarsSetup(ne,oe,$e,ye,ve,ue),ke=Ne=>keys$3(Ne).some(Fe=>!!Ne[Fe]),Be=(Ne,Fe)=>{const{dn:Ue,Tt:We,At:qe,vn:ze}=Ne,Ge=Ue||{},Ze=!!We,Dt={Et:createOptionCheck(oe,Ge,Ze),dn:Ge,Tt:Ze};if(ze)return Ae(Dt),!1;const Je=Fe||Se(assignDeep({},Dt,{At:qe})),Ut=ge(assignDeep({},Dt,{un:$e,Gt:Je}));Ae(assignDeep({},Dt,{Gt:Je,Qt:Ut}));const jt=ke(Je),Ke=ke(Ut),an=jt||Ke||!isEmptyObject(Ge)||Ze;return an&&ce(Ne,{Gt:Je,Qt:Ut}),an};return[()=>{const{rn:Ne,D:Fe}=ve,Ue=getElmentScroll(Ne),We=[_e(),me(),Re()];return scrollElementTo(Fe,Ue),bind$3(runEachAndClear,We)},Be,()=>({hn:$e,pn:ye}),{gn:ve,bn:Ie},xe]},OverlayScrollbars=(ne,oe,ce)=>{const{nt:ue}=getEnvironment(),pe=isHTMLElement(ne),me=pe?ne:ne.target,ge=getInstance(me);if(oe&&!ge){let ye=!1;const ve=[],xe={},_e=Dt=>{const Je=removeUndefinedProperties(Dt,!0),Ut=getStaticPluginModuleInstance(zt);return Ut?Ut(Je,!0):Je},Se=assignDeep({},ue(),_e(oe)),[$e,Re,Ae]=createEventListenerHub(),[Ie,ke,Be]=createEventListenerHub(ce),Ne=(Dt,Je)=>{Be(Dt,Je),Ae(Dt,Je)},[Fe,Ue,We,qe,ze]=createSetups(ne,Se,({dn:Dt,Tt:Je},{Gt:Ut,Qt:jt})=>{const{ht:Ke,Ct:an,xt:Zt,Ht:en,It:Kt,dt:Wt}=Ut,{tn:un,nn:Xt,sn:nn}=jt;Ne("updated",[Ze,{updateHints:{sizeChanged:!!Ke,directionChanged:!!an,heightIntrinsicChanged:!!Zt,overflowEdgeChanged:!!un,overflowAmountChanged:!!Xt,overflowStyleChanged:!!nn,contentMutation:!!en,hostMutation:!!Kt,appear:!!Wt},changedOptions:Dt||{},force:!!Je}])},Dt=>Ne("scroll",[Ze,Dt])),Ge=Dt=>{removeInstance(me),runEachAndClear(ve),ye=!0,Ne("destroyed",[Ze,Dt]),Re(),ke()},Ze={options(Dt,Je){if(Dt){const Ut=Je?ue():{},jt=getOptionsDiff(Se,assignDeep(Ut,_e(Dt)));isEmptyObject(jt)||(assignDeep(Se,jt),Ue({dn:jt}))}return assignDeep({},Se)},on:Ie,off:(Dt,Je)=>{Dt&&Je&&ke(Dt,Je)},state(){const{hn:Dt,pn:Je}=We(),{N:Ut}=Dt,{Pt:jt,Lt:Ke,k:an,en:Zt,cn:en,fn:Kt}=Je;return assignDeep({},{overflowEdge:jt,overflowAmount:Ke,overflowStyle:an,hasOverflow:Zt,padding:en,paddingAbsolute:Kt,directionRTL:Ut,destroyed:ye})},elements(){const{gt:Dt,bt:Je,cn:Ut,D:jt,wt:Ke,kt:an,Zt}=qe.gn,{qt:en,Jt:Kt}=qe.bn,Wt=Xt=>{const{Vt:nn,Mt:vn,Ut:Sn}=Xt;return{scrollbar:Sn,track:vn,handle:nn}},un=Xt=>{const{Wt:nn,Xt:vn}=Xt,Sn=Wt(nn[0]);return assignDeep({},Sn,{clone:()=>{const Cn=Wt(vn());return Ue({vn:!0}),Cn}})};return assignDeep({},{target:Dt,host:Je,padding:Ut||jt,viewport:jt,content:Ke||jt,scrollOffsetElement:an,scrollEventElement:Zt,scrollbarHorizontal:un(en),scrollbarVertical:un(Kt)})},update:Dt=>Ue({Tt:Dt,At:!0}),destroy:bind$3(Ge,!1),plugin:Dt=>xe[keys$3(Dt)[0]]};return push$2(ve,[ze]),addInstance(me,Ze),registerPluginModuleInstances(Ht$1,OverlayScrollbars,[Ze,$e,xe]),cancelInitialization(qe.gn.Rt,!pe&&ne.cancel)?(Ge(!0),Ze):(push$2(ve,Fe()),Ne("initialized",[Ze]),Ze.update(!0),Ze)}return ge};OverlayScrollbars.plugin=ne=>{const oe=isArray$5(ne),ce=oe?ne:[ne],ue=ce.map(pe=>registerPluginModuleInstances(pe,OverlayScrollbars)[0]);return addPlugins(ce),oe?ue:ue[0]};OverlayScrollbars.valid=ne=>{const oe=ne&&ne.elements,ce=isFunction$5(oe)&&oe();return isPlainObject$2(ce)&&!!getInstance(ce.target)};OverlayScrollbars.env=()=>{const{P:ne,T:oe,L:ce,K:ue,J:pe,st:me,et:ge,G:ye,tt:ve,nt:xe,ot:_e}=getEnvironment();return assignDeep({},{scrollbarsSize:ne,scrollbarsOverlaid:oe,scrollbarsHiding:ce,rtlScrollBehavior:ue,scrollTimeline:pe,staticDefaultInitialization:me,staticDefaultOptions:ge,getDefaultInitialization:ye,setDefaultInitialization:ve,getDefaultOptions:xe,setDefaultOptions:_e})};const O$3=()=>{if(typeof window>"u"){const xe=()=>{};return[xe,xe]}let ne,oe;const ce=window,ue=typeof ce.requestIdleCallback=="function",pe=ce.requestAnimationFrame,me=ce.cancelAnimationFrame,ge=ue?ce.requestIdleCallback:pe,ye=ue?ce.cancelIdleCallback:me,ve=()=>{ye(ne),me(oe)};return[(xe,_e)=>{ve(),ne=ge(ue?()=>{ve(),oe=pe(xe)}:xe,typeof _e=="object"?_e:{timeout:2233})},ve]},S$5=ne=>{const{options:oe,events:ce,defer:ue}=ne||{},[pe,me]=reactExports.useMemo(O$3,[]),ge=reactExports.useRef(null),ye=reactExports.useRef(ue),ve=reactExports.useRef(oe),xe=reactExports.useRef(ce);return reactExports.useEffect(()=>{ye.current=ue},[ue]),reactExports.useEffect(()=>{const{current:_e}=ge;ve.current=oe,OverlayScrollbars.valid(_e)&&_e.options(oe||{},!0)},[oe]),reactExports.useEffect(()=>{const{current:_e}=ge;xe.current=ce,OverlayScrollbars.valid(_e)&&_e.on(ce||{},!0)},[ce]),reactExports.useEffect(()=>()=>{var _e;me(),(_e=ge.current)==null||_e.destroy()},[]),reactExports.useMemo(()=>[_e=>{const Se=ge.current;if(OverlayScrollbars.valid(Se))return;const $e=ye.current,Re=ve.current||{},Ae=xe.current||{},Ie=()=>ge.current=OverlayScrollbars(_e,Re,Ae);$e?pe(Ie,$e):Ie()},()=>ge.current],[])},F$4=(ne,oe)=>{const{element:ce="div",options:ue,events:pe,defer:me,children:ge,...ye}=ne,ve=ce,xe=reactExports.useRef(null),_e=reactExports.useRef(null),[Se,$e]=S$5({options:ue,events:pe,defer:me});return reactExports.useEffect(()=>{const{current:Re}=xe,{current:Ae}=_e;return Re&&Ae&&Se({target:Re,elements:{viewport:Ae,content:Ae}}),()=>{var Ie;return(Ie=$e())==null?void 0:Ie.destroy()}},[Se,ce]),reactExports.useImperativeHandle(oe,()=>({osInstance:$e,getElement:()=>xe.current}),[]),React$2.createElement(ve,{"data-overlayscrollbars-initialize":"",ref:xe,...ye},React$2.createElement("div",{"data-overlayscrollbars-contents":"",ref:_e},ge))},A$4=reactExports.forwardRef(F$4),Scroll=reactExports.forwardRef(({children:ne,x:oe,y:ce,px:ue=6,py:pe=0,...me},ge)=>{const{palette:ye,spacing:ve}=useTheme$1(),xe=useCss$1({"--os-padding-perpendicular":"2px","div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${ve(ue)})`,marginTop:ve(ue)},"div.os-scrollbar-horizontal > div.os-scrollbar-track":{width:`calc(100% - ${ve(pe*2)})`,marginLeft:ve(pe)},"div > div.os-scrollbar-track":{"--os-handle-perpendicular-size":"2px","--os-handle-perpendicular-size-hover":"6px","--os-handle-perpendicular-size-active":"6px","> div.os-scrollbar-handle":{borderRadius:0,opacity:.5,"&:hover":{opacity:.8}}}}),_e=reactExports.useCallback(Se=>{if(ge&&Se){const $e=Se.elements().viewport;$e&&(typeof ge=="function"?ge==null||ge($e):ge.current=$e)}},[ge]);return jsxRuntimeExports.jsx(A$4,{options:{overflow:{x:oe?"scroll":"hidden",y:ce?"scroll":"hidden"},scrollbars:{autoHide:"leave",theme:ye.mode==="dark"?"os-theme-light":"os-theme-dark"}},...me,style:{width:"100%",height:"100%",...me.style},className:`${xe} ${me.className}`,events:{initialized:_e},children:ne})});function Placeholder$2({label:ne,icon:oe=jsxRuntimeExports.jsx(WidgetsOutlined,{}),secondary:ce,action:ue,...pe}){return jsxRuntimeExports.jsxs(Flex,{justifyContent:"center",alignItems:"center",color:"text.secondary",sx:{gap:2,p:6,pt:12,background:me=>`repeating-linear-gradient( + 45deg, + ${me.palette.background.default}, + transparent 1px, + transparent 7px, + ${me.palette.background.default} 8px + )`},textAlign:"center",vertical:!0,...pe,children:[oe,jsxRuntimeExports.jsx(Type$2,{component:"div",children:ne}),!!ce&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"caption",sx:{px:8,maxWidth:480},children:ce}),!!ue&&jsxRuntimeExports.jsx(Box$1,{pt:2,children:ue})]})}function Button({children:ne,sx:oe,...ce}){const ue=usePaper();return jsxRuntimeExports.jsx(Button$2,{disableElevation:!0,variant:"outlined",color:"primary",...ce,sx:{minWidth:0,borderColor:pe=>alpha$1(pe.palette.text.primary,pe.palette.action.activatedOpacity),...ce.variant==="text"?void 0:ue(1),...oe},children:jsxRuntimeExports.jsx(Box$1,{sx:{color:"text.primary",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:ne})})}const isTraceLayer=ne=>{var oe;return((oe=ne.source)==null?void 0:oe.type)==="trace"};var download$1={exports:{}};(function(ne,oe){(function(ce,ue){ne.exports=ue()})(commonjsGlobal,function(){return function ce(ue,pe,me){var ge=window,ye="application/octet-stream",ve=me||ye,xe=ue,_e=!pe&&!me&&xe,Se=document.createElement("a"),$e=function(ze){return String(ze)},Re=ge.Blob||ge.MozBlob||ge.WebKitBlob||$e,Ae=pe||"download",Ie,ke;if(Re=Re.call?Re.bind(ge):Blob,String(this)==="true"&&(xe=[xe,ve],ve=xe[0],xe=xe[1]),_e&&_e.length<2048&&(Ae=_e.split("/").pop().split("?")[0],Se.href=_e,Se.href.indexOf(_e)!==-1)){var Be=new XMLHttpRequest;return Be.open("GET",_e,!0),Be.responseType="blob",Be.onload=function(ze){ce(ze.target.response,Ae,ye)},setTimeout(function(){Be.send()},0),Be}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(xe))if(xe.length>1024*1024*1.999&&Re!==$e)xe=We(xe),ve=xe.type||ye;else return navigator.msSaveBlob?navigator.msSaveBlob(We(xe),Ae):qe(xe);else if(/([\x80-\xff])/.test(xe)){var Ne=0,Fe=new Uint8Array(xe.length),Ue=Fe.length;for(Ne;NelodashExports$1.omitBy(merge$4(ne,oe),lodashExports$1.isUndefined)});function wait$1(ne){return new Promise(oe=>lodashExports$1.delay(oe,ne))}function useBusyState(ne){const[,oe]=useBusy();return reactExports.useCallback(async(ce,ue)=>{oe(()=>({[ne]:ue})),wait$1(300);const pe=await ce();return oe(()=>({[ne]:void 0})),pe},[ne,oe])}function formatByte(ne){return`${(ne/(1024*1024)).toFixed(2)} MB`}const[useConnections,ConnectionsProvider]=createSlice([],{reduce:replace$1}),[useFeatures,FeaturesProvider]=createSlice({algorithms:[],maps:[],formats:[],traces:[]}),[useLoading,LoadingProvider]=createSlice({specimen:0,connections:0,features:0,map:0,general:0},{reduce:(ne,{action:oe,key:ce})=>produce(ne,ue=>{switch(oe){case"start":ue[ce]+=1;break;case"end":ue[ce]-=1}return ue})});function useAnyLoading(){const[ne]=useLoading();return lodashExports$1.some(lodashExports$1.values(ne))}function useLoadingState(ne="general"){const[,oe]=useLoading();return reactExports.useCallback(async ce=>{oe(()=>({action:"start",key:ne}));const ue=await ce();return oe(()=>({action:"end",key:ne})),ue},[ne,oe])}let e$6=class extends Error{},t$7=class extends e$6{},n$7=class extends e$6{};const c$5=(ne,oe=",")=>ne.join(oe),l$6={accept:"*",multiple:!1,strict:!1},r$6=ne=>{const{accept:oe,multiple:ce,strict:ue}={...l$6,...ne},pe=p$9({multiple:ce,accept:Array.isArray(oe)?c$5(oe):oe});return new Promise(me=>{pe.onchange=()=>{me(s$5(pe.files,ce,ue)),pe.remove()},pe.click()})},s$5=(ne,oe,ce)=>new Promise((ue,pe)=>{if(!ne)return pe(new t$7);const me=i$8(ne,oe,ce);if(!me)return pe(new n$7);ue(me)}),i$8=(ne,oe,ce)=>!oe&&ce?ne.length===1?ne[0]:null:ne.length?ne:null,p$9=({accept:ne,multiple:oe})=>{const ce=document.createElement("input");return ce.type="file",ce.multiple=oe,ce.accept=ne,ce},hashWorkerUrl=""+new URL("hash.worker-60989a6e.js",import.meta.url).href,ipcWorkerUrl=""+new URL("ipc.worker-78007631.js",import.meta.url).href,compressWorkerUrl=""+new URL("compress.worker-0facefa0.js",import.meta.url).href,compressBinaryWorkerUrl=""+new URL("compressBinary.worker-3920d804.js",import.meta.url).href,decompressBinaryWorkerUrl=""+new URL("decompressBinary.worker-8b19c09f.js",import.meta.url).href,yamlWorkerUrl=""+new URL("parseYaml.worker-7a719c90.js",import.meta.url).href;class HashWorker extends Worker{constructor(){super(hashWorkerUrl,{type:"module"})}}class CompressWorker extends Worker{constructor(){super(compressWorkerUrl,{type:"module"})}}class CompressBinaryWorker extends Worker{constructor(){super(compressBinaryWorkerUrl,{type:"module"})}}class DecompressBinaryWorker extends Worker{constructor(){super(decompressBinaryWorkerUrl,{type:"module"})}}class IPCWorker extends Worker{constructor(){super(ipcWorkerUrl,{type:"module"})}}class ParseYamlWorker extends Worker{constructor(){super(yamlWorkerUrl,{type:"module"})}}var noop$a=function(){},_undefined$3=noop$a(),isValue$d=function(ne){return ne!==_undefined$3&&ne!==null},isValue$c=isValue$d,forEach$3=Array.prototype.forEach,create$3=Object.create,process$2=function(ne,oe){var ce;for(ce in ne)oe[ce]=ne[ce]},normalizeOptions$2=function(ne){var oe=create$3(null);return forEach$3.call(arguments,function(ce){isValue$c(ce)&&process$2(Object(ce),oe)}),oe},isImplemented$e=function(){var ne=Math.sign;return typeof ne!="function"?!1:ne(10)===1&&ne(-20)===-1},shim$b,hasRequiredShim$a;function requireShim$a(){return hasRequiredShim$a||(hasRequiredShim$a=1,shim$b=function(ne){return ne=Number(ne),isNaN(ne)||ne===0?ne:ne>0?1:-1}),shim$b}var sign$5=isImplemented$e()?Math.sign:requireShim$a(),sign$4=sign$5,abs$1=Math.abs,floor$2=Math.floor,toInteger$3=function(ne){return isNaN(ne)?0:(ne=Number(ne),ne===0||!isFinite(ne)?ne:sign$4(ne)*floor$2(abs$1(ne)))},toInteger$2=toInteger$3,max$5=Math.max,toPosInteger$1=function(ne){return max$5(0,toInteger$2(ne))},toPosInt$1=toPosInteger$1,resolveLength$2=function(ne,oe,ce){var ue;return isNaN(ne)?(ue=oe,ue>=0?ce&&ue?ue-1:ue:1):ne===!1?!1:toPosInt$1(ne)},validCallable$1=function(ne){if(typeof ne!="function")throw new TypeError(ne+" is not a function");return ne},isValue$b=isValue$d,validValue$1=function(ne){if(!isValue$b(ne))throw new TypeError("Cannot use null or undefined");return ne},callable$3=validCallable$1,value$2=validValue$1,bind$3=Function.prototype.bind,call$3=Function.prototype.call,keys$3=Object.keys,objPropertyIsEnumerable=Object.prototype.propertyIsEnumerable,_iterate=function(ne,oe){return function(ce,ue){var pe,me=arguments[2],ge=arguments[3];return ce=Object(value$2(ce)),callable$3(ue),pe=keys$3(ce),ge&&pe.sort(typeof ge=="function"?bind$3.call(ge,ce):void 0),typeof ne!="function"&&(ne=pe[ne]),call$3.call(ne,pe,function(ye,ve){return objPropertyIsEnumerable.call(ce,ye)?call$3.call(ue,me,ce[ye],ye,ce,ve):oe})}},forEach$2=_iterate("forEach"),registeredExtensions={},custom$2={exports:{}},isImplemented$d=function(){var ne=Object.assign,oe;return typeof ne!="function"?!1:(oe={foo:"raz"},ne(oe,{bar:"dwa"},{trzy:"trzy"}),oe.foo+oe.bar+oe.trzy==="razdwatrzy")},isImplemented$c,hasRequiredIsImplemented$8;function requireIsImplemented$8(){return hasRequiredIsImplemented$8||(hasRequiredIsImplemented$8=1,isImplemented$c=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),isImplemented$c}var shim$a,hasRequiredShim$9;function requireShim$9(){if(hasRequiredShim$9)return shim$a;hasRequiredShim$9=1;var ne=isValue$d,oe=Object.keys;return shim$a=function(ce){return oe(ne(ce)?Object(ce):ce)},shim$a}var keys$2,hasRequiredKeys$1;function requireKeys$1(){return hasRequiredKeys$1||(hasRequiredKeys$1=1,keys$2=requireIsImplemented$8()()?Object.keys:requireShim$9()),keys$2}var shim$9,hasRequiredShim$8;function requireShim$8(){if(hasRequiredShim$8)return shim$9;hasRequiredShim$8=1;var ne=requireKeys$1(),oe=validValue$1,ce=Math.max;return shim$9=function(ue,pe){var me,ge,ye=ce(arguments.length,2),ve;for(ue=Object(oe(ue)),ve=function(xe){try{ue[xe]=pe[xe]}catch(_e){me||(me=_e)}},ge=1;ge-1},shim$8}var contains$4=isImplemented$b()?String.prototype.contains:requireShim$7(),isValue$8=is$c,isPlainFunction$1=is$8,assign$6=assign$7,normalizeOpts$2=normalizeOptions$2,contains$3=contains$4,d$9=d$a.exports=function(ne,oe){var ce,ue,pe,me,ge;return arguments.length<2||typeof ne!="string"?(me=oe,oe=ne,ne=null):me=arguments[2],isValue$8(ne)?(ce=contains$3.call(ne,"c"),ue=contains$3.call(ne,"e"),pe=contains$3.call(ne,"w")):(ce=pe=!0,ue=!1),ge={value:oe,configurable:ce,enumerable:ue,writable:pe},me?assign$6(normalizeOpts$2(me),ge):ge};d$9.gs=function(ne,oe,ce){var ue,pe,me,ge;return typeof ne!="string"?(me=ce,ce=oe,oe=ne,ne=null):me=arguments[3],isValue$8(oe)?isPlainFunction$1(oe)?isValue$8(ce)?isPlainFunction$1(ce)||(me=ce,ce=void 0):ce=void 0:(me=oe,oe=ce=void 0):oe=void 0,isValue$8(ne)?(ue=contains$3.call(ne,"c"),pe=contains$3.call(ne,"e")):(ue=!0,pe=!1),ge={get:oe,set:ce,configurable:ue,enumerable:pe},me?assign$6(normalizeOpts$2(me),ge):ge};var dExports$1=d$a.exports,eventEmitter$1={exports:{}};(function(ne,oe){var ce=dExports$1,ue=validCallable$1,pe=Function.prototype.apply,me=Function.prototype.call,ge=Object.create,ye=Object.defineProperty,ve=Object.defineProperties,xe=Object.prototype.hasOwnProperty,_e={configurable:!0,enumerable:!1,writable:!0},Se,$e,Re,Ae,Ie,ke,Be;Se=function(Ne,Fe){var Ue;return ue(Fe),xe.call(this,"__ee__")?Ue=this.__ee__:(Ue=_e.value=ge(null),ye(this,"__ee__",_e),_e.value=null),Ue[Ne]?typeof Ue[Ne]=="object"?Ue[Ne].push(Fe):Ue[Ne]=[Ue[Ne],Fe]:Ue[Ne]=Fe,this},$e=function(Ne,Fe){var Ue,We;return ue(Fe),We=this,Se.call(this,Ne,Ue=function(){Re.call(We,Ne,Ue),pe.call(Fe,this,arguments)}),Ue.__eeOnceListener__=Fe,this},Re=function(Ne,Fe){var Ue,We,qe,ze;if(ue(Fe),!xe.call(this,"__ee__"))return this;if(Ue=this.__ee__,!Ue[Ne])return this;if(We=Ue[Ne],typeof We=="object")for(ze=0;qe=We[ze];++ze)(qe===Fe||qe.__eeOnceListener__===Fe)&&(We.length===2?Ue[Ne]=We[ze?0:1]:We.splice(ze,1));else(We===Fe||We.__eeOnceListener__===Fe)&&delete Ue[Ne];return this},Ae=function(Ne){var Fe,Ue,We,qe,ze;if(xe.call(this,"__ee__")&&(qe=this.__ee__[Ne],!!qe))if(typeof qe=="object"){for(Ue=arguments.length,ze=new Array(Ue-1),Fe=1;Fe=55296&&Ue<=56319&&(Ge+=$e[++ke])),Ge=Re?xe.call(Re,Ae,Ge,Be):Ge,Ie?(_e.value=Ge,Se(Ne,Be,_e)):Ne[Be]=Ge,++Be;Fe=Be}}if(Fe===void 0)for(Fe=ue($e.length),Ie&&(Ne=new Ie(Fe)),ke=0;ke=0?_e=ge(_e):_e=oe(this.length)-ge(me(_e)),ve=_e;ve"}},safeToString}var toShortStringRepresentation,hasRequiredToShortStringRepresentation;function requireToShortStringRepresentation(){if(hasRequiredToShortStringRepresentation)return toShortStringRepresentation;hasRequiredToShortStringRepresentation=1;var ne=requireSafeToString(),oe=/[\n\r\u2028\u2029]/g;return toShortStringRepresentation=function(ce){var ue=ne(ce);return ue.length>100&&(ue=ue.slice(0,99)+"…"),ue=ue.replace(oe,function(pe){return JSON.stringify(pe).slice(1,-1)}),ue},toShortStringRepresentation}var isPromise={exports:{}},hasRequiredIsPromise;function requireIsPromise(){if(hasRequiredIsPromise)return isPromise.exports;hasRequiredIsPromise=1,isPromise.exports=ne,isPromise.exports.default=ne;function ne(oe){return!!oe&&(typeof oe=="object"||typeof oe=="function")&&typeof oe.then=="function"}return isPromise.exports}var hasRequiredPromise;function requirePromise(){if(hasRequiredPromise)return promise;hasRequiredPromise=1;var ne=requireMap(),oe=requirePrimitiveSet(),ce=requireValidateStringifiableValue(),ue=requireToShortStringRepresentation(),pe=requireIsPromise(),me=requireNextTick(),ge=Object.create,ye=oe("then","then:finally","done","done:finally");return registeredExtensions.promise=function(ve,xe){var _e=ge(null),Se=ge(null),$e=ge(null);if(ve===!0)ve=null;else if(ve=ce(ve),!ye[ve])throw new TypeError("'"+ue(ve)+"' is not valid promise mode");xe.on("set",function(Re,Ae,Ie){var ke=!1;if(!pe(Ie)){Se[Re]=Ie,xe.emit("setasync",Re,1);return}_e[Re]=1,$e[Re]=Ie;var Be=function(We){var qe=_e[Re];if(ke)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);qe&&(delete _e[Re],Se[Re]=We,xe.emit("setasync",Re,qe))},Ne=function(){ke=!0,_e[Re]&&(delete _e[Re],delete $e[Re],xe.delete(Re))},Fe=ve;if(Fe||(Fe="then"),Fe==="then"){var Ue=function(){me(Ne)};Ie=Ie.then(function(We){me(Be.bind(this,We))},Ue),typeof Ie.finally=="function"&&Ie.finally(Ue)}else if(Fe==="done"){if(typeof Ie.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");Ie.done(Be,Ne)}else if(Fe==="done:finally"){if(typeof Ie.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof Ie.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");Ie.done(Be),Ie.finally(Ne)}}),xe.on("get",function(Re,Ae,Ie){var ke;if(_e[Re]){++_e[Re];return}ke=$e[Re];var Be=function(){xe.emit("getasync",Re,Ae,Ie)};pe(ke)?typeof ke.done=="function"?ke.done(Be):ke.then(function(){me(Be)}):Be()}),xe.on("delete",function(Re){if(delete $e[Re],_e[Re]){delete _e[Re];return}if(hasOwnProperty.call(Se,Re)){var Ae=Se[Re];delete Se[Re],xe.emit("deleteasync",Re,[Ae])}}),xe.on("clear",function(){var Re=Se;Se=ge(null),_e=ge(null),$e=ge(null),xe.emit("clearasync",ne(Re,function(Ae){return[Ae]}))})},promise}var dispose={},hasRequiredDispose;function requireDispose(){if(hasRequiredDispose)return dispose;hasRequiredDispose=1;var ne=validCallable$1,oe=forEach$2,ce=registeredExtensions,ue=Function.prototype.apply;return ce.dispose=function(pe,me,ge){var ye;if(ne(pe),ge.async&&ce.async||ge.promise&&ce.promise){me.on("deleteasync",ye=function(ve,xe){ue.call(pe,null,xe)}),me.on("clearasync",function(ve){oe(ve,function(xe,_e){ye(_e,xe)})});return}me.on("delete",ye=function(ve,xe){pe(xe)}),me.on("clear",function(ve){oe(ve,function(xe,_e){ye(_e,xe)})})},dispose}var maxAge={},maxTimeout,hasRequiredMaxTimeout;function requireMaxTimeout(){return hasRequiredMaxTimeout||(hasRequiredMaxTimeout=1,maxTimeout=2147483647),maxTimeout}var validTimeout,hasRequiredValidTimeout;function requireValidTimeout(){if(hasRequiredValidTimeout)return validTimeout;hasRequiredValidTimeout=1;var ne=toPosInteger$1,oe=requireMaxTimeout();return validTimeout=function(ce){if(ce=ne(ce),ce>oe)throw new TypeError(ce+" exceeds maximum possible timeout");return ce},validTimeout}var hasRequiredMaxAge;function requireMaxAge(){if(hasRequiredMaxAge)return maxAge;hasRequiredMaxAge=1;var ne=requireFrom$1(),oe=forEach$2,ce=requireNextTick(),ue=requireIsPromise(),pe=requireValidTimeout(),me=registeredExtensions,ge=Function.prototype,ye=Math.max,ve=Math.min,xe=Object.create;return me.maxAge=function(_e,Se,$e){var Re,Ae,Ie,ke;_e=pe(_e),_e&&(Re=xe(null),Ae=$e.async&&me.async||$e.promise&&me.promise?"async":"",Se.on("set"+Ae,function(Be){Re[Be]=setTimeout(function(){Se.delete(Be)},_e),typeof Re[Be].unref=="function"&&Re[Be].unref(),ke&&(ke[Be]&&ke[Be]!=="nextTick"&&clearTimeout(ke[Be]),ke[Be]=setTimeout(function(){delete ke[Be]},Ie),typeof ke[Be].unref=="function"&&ke[Be].unref())}),Se.on("delete"+Ae,function(Be){clearTimeout(Re[Be]),delete Re[Be],ke&&(ke[Be]!=="nextTick"&&clearTimeout(ke[Be]),delete ke[Be])}),$e.preFetch&&($e.preFetch===!0||isNaN($e.preFetch)?Ie=.333:Ie=ye(ve(Number($e.preFetch),1),0),Ie&&(ke={},Ie=(1-Ie)*_e,Se.on("get"+Ae,function(Be,Ne,Fe){ke[Be]||(ke[Be]="nextTick",ce(function(){var Ue;ke[Be]==="nextTick"&&(delete ke[Be],Se.delete(Be),$e.async&&(Ne=ne(Ne),Ne.push(ge)),Ue=Se.memoized.apply(Fe,Ne),$e.promise&&ue(Ue)&&(typeof Ue.done=="function"?Ue.done(ge,ge):Ue.then(ge,ge)))}))}))),Se.on("clear"+Ae,function(){oe(Re,function(Be){clearTimeout(Be)}),Re={},ke&&(oe(ke,function(Be){Be!=="nextTick"&&clearTimeout(Be)}),ke={})}))},maxAge}var max$4={},lruQueue,hasRequiredLruQueue;function requireLruQueue(){if(hasRequiredLruQueue)return lruQueue;hasRequiredLruQueue=1;var ne=toPosInteger$1,oe=Object.create,ce=Object.prototype.hasOwnProperty;return lruQueue=function(ue){var pe=0,me=1,ge=oe(null),ye=oe(null),ve=0,xe;return ue=ne(ue),{hit:function(_e){var Se=ye[_e],$e=++ve;if(ge[$e]=_e,ye[_e]=$e,!Se)return++pe,pe<=ue?void 0:(_e=ge[me],xe(_e),_e);if(delete ge[Se],me===Se)for(;!ce.call(ge,++me););},delete:xe=function(_e){var Se=ye[_e];if(Se&&(delete ge[Se],delete ye[_e],--pe,me===Se)){if(!pe){ve=0,me=1;return}for(;!ce.call(ge,++me););}},clear:function(){pe=0,me=1,ge=oe(null),ye=oe(null),ve=0}}},lruQueue}var hasRequiredMax;function requireMax(){if(hasRequiredMax)return max$4;hasRequiredMax=1;var ne=toPosInteger$1,oe=requireLruQueue(),ce=registeredExtensions;return ce.max=function(ue,pe,me){var ge,ye,ve;ue=ne(ue),ue&&(ye=oe(ue),ge=me.async&&ce.async||me.promise&&ce.promise?"async":"",pe.on("set"+ge,ve=function(xe){xe=ye.hit(xe),xe!==void 0&&pe.delete(xe)}),pe.on("get"+ge,ve),pe.on("delete"+ge,ye.delete),pe.on("clear"+ge,ye.clear))},max$4}var refCounter={},hasRequiredRefCounter;function requireRefCounter(){if(hasRequiredRefCounter)return refCounter;hasRequiredRefCounter=1;var ne=dExports$1,oe=registeredExtensions,ce=Object.create,ue=Object.defineProperties;return oe.refCounter=function(pe,me,ge){var ye,ve;ye=ce(null),ve=ge.async&&oe.async||ge.promise&&oe.promise?"async":"",me.on("set"+ve,function(xe,_e){ye[xe]=_e||1}),me.on("get"+ve,function(xe){++ye[xe]}),me.on("delete"+ve,function(xe){delete ye[xe]}),me.on("clear"+ve,function(){ye={}}),ue(me.memoized,{deleteRef:ne(function(){var xe=me.get(arguments);return xe===null||!ye[xe]?null:--ye[xe]?!1:(me.delete(xe),!0)}),getRefCount:ne(function(){var xe=me.get(arguments);return xe===null||!ye[xe]?0:ye[xe]})})},refCounter}var normalizeOpts$1=normalizeOptions$2,resolveLength=resolveLength$2,plain=plain$1,memoizee=function(ne){var oe=normalizeOpts$1(arguments[1]),ce;return oe.normalizer||(ce=oe.length=resolveLength(oe.length,ne.length,oe.async),ce!==0&&(oe.primitive?ce===!1?oe.normalizer=requirePrimitive():ce>1&&(oe.normalizer=requireGetPrimitiveFixed()(ce)):ce===!1?oe.normalizer=requireGet()():ce===1?oe.normalizer=requireGet1()():oe.normalizer=requireGetFixed()(ce))),oe.async&&requireAsync(),oe.promise&&requirePromise(),oe.dispose&&requireDispose(),oe.maxAge&&requireMaxAge(),oe.max&&requireMax(),oe.refCounter&&requireRefCounter(),plain(ne,oe)};const memoizee$1=getDefaultExportFromCjs(memoizee),usingWorker=ne=>async oe=>{const ce=new ne,ue=await oe(ce);if("error"in ue)throw console.error(ue.error),new Error(ue.error);return ce.terminate(),ue.result},usingWorkerTask=ne=>oe=>usingWorker(ne)(ce=>(ce.postMessage(oe),new Promise((ue,pe)=>{ce.onmessage=me=>{ue(me.data)},ce.onerror=me=>{console.error(me),pe(me)}}))),usingMemoizedWorkerTask=(ne,oe={async:!0,length:1})=>memoizee$1(usingWorkerTask(ne),oe);lodashExports$1.memoize(usingWorkerTask(HashWorker));lodashExports$1.memoize(usingWorkerTask(CompressWorker));const compressBinaryAsync=lodashExports$1.memoize(usingWorkerTask(CompressBinaryWorker)),decompressBinaryAsync=lodashExports$1.memoize(usingWorkerTask(DecompressBinaryWorker)),parseYamlAsync=lodashExports$1.memoize(usingWorkerTask(ParseYamlWorker));function ext$1(ne){return ne.split(".").pop()}function name$2(ne){return ne.split(".").shift()}const customId="internal/custom",custom$1=(ne,oe="resource")=>({name:(ne==null?void 0:ne.id)===customId?`Imported ${lodashExports$1.startCase(oe)} - ${ne==null?void 0:ne.name}`:`Import ${lodashExports$1.startCase(oe)}`,description:"Internal",id:customId}),EXTENSIONS=["json","yaml","yml"],FORMATS$1=EXTENSIONS.map(ne=>`.trace.${ne}`);async function uploadTrace(){const ne=await r$6({accept:EXTENSIONS.map(oe=>`.${oe}`),strict:!0});if(ne)return readUploadedTrace(ne)}function readUploadedTrace(ne){return{file:ne,read:async()=>{if(isTraceFormat(ne)){const oe=await ne.text(),ce=await parseYamlAsync(oe);return{...custom$1(),format:ce==null?void 0:ce.format,content:ce,name:lodashExports$1.startCase(name$2(ne.name)),type:customId,key:nanoid$1()}}else throw new Error(`The file should have one of these extensions: ${FORMATS$1.join(", ")}`)}}}function isTraceFormat(ne){return!!lodashExports$1.find(FORMATS$1,oe=>ne.name.endsWith(oe))}async function uploadMap(ne){const oe=await r$6({accept:ne.map(({id:ce})=>`.${ce}`),strict:!0});if(oe)return readUploadedMap(oe,ne)}function readUploadedMap(ne,oe){return{file:ne,read:async()=>{if(lodashExports$1.find(oe,{id:ext$1(ne.name)}))return{...custom$1(),format:ext$1(ne.name),content:await ne.text(),name:lodashExports$1.startCase(name$2(ne.name))};throw new Error(`The format (${ext$1(ne.name)}) is unsupported.`)}}}function name$1(ne){return ne.split(".").shift()}function MapPicker({onChange:ne,value:oe}){const ce=useSnackbar(),ue=useLoadingState("map"),[{features:pe,connections:me}]=useLoading(),ge=useBusyState("map"),[ye]=useConnections(),[{maps:ve,formats:xe}]=useFeatures();return jsxRuntimeExports.jsx(FeaturePicker,{showTooltip:!0,arrow:!0,paper:!0,disabled:!!pe||!!me,ellipsis:25,icon:jsxRuntimeExports.jsx(FileOpenOutlined,{}),label:"Choose Map",value:oe==null?void 0:oe.id,items:[custom$1(oe,"map"),...ve.map(_e=>{var Se;return{..._e,description:(Se=lodashExports$1.find(ye,{url:_e.source}))==null?void 0:Se.name}})],onChange:async _e=>{switch(_e){case custom$1().id:try{const Se=await uploadMap(xe);Se&&ue(async()=>{ce("Opening map...");const $e=Se.file.size>LARGE_FILE_B?await ge(Se.read,`Opening map (${formatByte(Se.file.size)})`):await Se.read();$e&&(ne==null||ne($e))})}catch(Se){ce(`${Se}`)}break;default:ne==null||ne(lodashExports$1.find(ve,{id:_e}));break}}})}function TracePicker({onChange:ne,value:oe}){const ce=useSnackbar(),ue=useLoadingState("specimen"),pe=useBusyState("specimen"),[me]=useConnections(),[{features:ge,connections:ye}]=useLoading(),[{traces:ve}]=useFeatures();return jsxRuntimeExports.jsx(FeaturePicker,{showTooltip:!0,paper:!0,arrow:!0,ellipsis:25,disabled:!!ge||!!ye,icon:jsxRuntimeExports.jsx(FileOpenOutlined,{}),label:"Choose Trace",value:oe==null?void 0:oe.id,items:[custom$1(oe,"trace"),...ve.map(xe=>{var _e;return{...xe,description:(_e=lodashExports$1.find(me,{url:xe.source}))==null?void 0:_e.name}})],onChange:async xe=>{switch(xe){case custom$1().id:try{const _e=await uploadTrace();_e&&ue(async()=>{ce("Opening trace...");try{const Se=_e.file.size>LARGE_FILE_B?await pe(_e.read,`Opening trace (${formatByte(_e.file.size)})`):await _e.read();Se&&(ne==null||ne(Se))}catch(Se){console.error(Se),ce(`Error opening, ${lodashExports$1.get(Se,"message")}`),ne==null||ne({id:custom$1().id,error:lodashExports$1.get(Se,"message"),name:lodashExports$1.startCase(name$1(_e.file.name))})}})}catch(_e){console.error(_e),ce(`Error opening, ${lodashExports$1.get(_e,"message")}`),ne==null||ne({id:custom$1().id,error:lodashExports$1.get(_e,"message"),name:"File"})}break;default:ne==null||ne(lodashExports$1.find(ve,{id:xe}));break}}})}const Heading=({label:ne})=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",sx:{pt:1},children:ne}),Label=({label:ne})=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",children:ne}),Option=({label:ne,content:oe})=>jsxRuntimeExports.jsxs(Flex,{alignItems:"center",children:[jsxRuntimeExports.jsx(Label,{label:ne}),jsxRuntimeExports.jsx(Space,{flex:1}),oe]});var hexRgb$1=function(ne){if(typeof ne!="string")throw new TypeError("Expected a string");ne=ne.replace(/^#/,""),ne.length===3&&(ne=ne[0]+ne[0]+ne[1]+ne[1]+ne[2]+ne[2]);var oe=parseInt(ne,16);return[oe>>16,oe>>8&255,oe&255]},rgbHex$1=(ne,oe,ce,ue)=>{const pe=(ne+(ue||"")).toString().includes("%");if(typeof ne=="string"){const me=ne.match(/(0?\.?\d{1,3})%?\b/g).map(Number);ne=me[0],oe=me[1],ce=me[2],ue=me[3]}else ue!==void 0&&(ue=parseFloat(ue));if(typeof ne!="number"||typeof oe!="number"||typeof ce!="number"||ne>255||oe>255||ce>255)throw new TypeError("Expected three numbers below 256");if(typeof ue=="number"){if(!pe&&ue>=0&&ue<=1)ue=Math.round(255*ue);else if(pe&&ue>=0&&ue<=100)ue=Math.round(255*ue/100);else throw new TypeError(`Expected alpha value (${ue}) as a fraction or percentage`);ue=(ue|256).toString(16).slice(1)}else ue="";return(ce|oe<<8|ne<<16|1<<24).toString(16).slice(1)+ue},colorDiff={};/** +Use Save As... to download, then click back to return to this page.`)&&(location.href=ze),!0;var Ze=document.createElement("iframe");document.body.appendChild(Ze),!Ge&&/^data:/.test(ze)&&(ze="data:"+ze.replace(/^data:([\w\/\-\+]+)/,ye)),Ze.src=ze,setTimeout(function(){document.body.removeChild(Ze)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(Ie,Ae);if(ge.URL)qe(ge.URL.createObjectURL(Ie),!0);else{if(typeof Ie=="string"||Ie.constructor===$e)try{return qe("data:"+ve+";base64,"+ge.btoa(Ie))}catch{return qe("data:"+ve+","+encodeURIComponent(Ie))}ke=new FileReader,ke.onload=function(ze){qe(this.result)},ke.readAsDataURL(Ie)}return!0}})})(download$1);var downloadExports=download$1.exports;const download=getDefaultExportFromCjs(downloadExports);let e$5=class extends Error{},t$6=class extends e$5{},n$6=class extends e$5{};const c$5=(ne,oe=",")=>ne.join(oe),l$6={accept:"*",multiple:!1,strict:!1},r$5=ne=>{const{accept:oe,multiple:ce,strict:ue}={...l$6,...ne},pe=p$8({multiple:ce,accept:Array.isArray(oe)?c$5(oe):oe});return new Promise(me=>{pe.onchange=()=>{me(s$4(pe.files,ce,ue)),pe.remove()},pe.click()})},s$4=(ne,oe,ce)=>new Promise((ue,pe)=>{if(!ne)return pe(new t$6);const me=i$7(ne,oe,ce);if(!me)return pe(new n$6);ue(me)}),i$7=(ne,oe,ce)=>!oe&&ce?ne.length===1?ne[0]:null:ne.length?ne:null,p$8=({accept:ne,multiple:oe})=>{const ce=document.createElement("input");return ce.type="file",ce.multiple=oe,ce.accept=ne,ce};function isPlainObject$1(ne){return(ne==null?void 0:ne.constructor)===Object}var validPathRegex=/^[^.[\]]+(?:\.[^.[\]]+)*(?:\[\d+])*(?:\.[^.[\]]+(?:\[\d+])*)*$/,pathSplitRegex=/\.|(?=\[)/g,matchBracketsRegex=/[[\]]/g;function set$4(ne,oe,ce){if(!validPathRegex.test(oe))throw new Error("Invalid path, look at the examples for the correct format.");const ue=oe.split(pathSplitRegex);let pe=ne;for(let me=0;melodashExports$1.omitBy(merge$4(ne,oe),lodashExports$1.isUndefined)});function wait$1(ne){return new Promise(oe=>lodashExports$1.delay(oe,ne))}function useBusyState(ne){const[,oe]=useBusy();return reactExports.useCallback(async(ce,ue)=>{oe(()=>({[ne]:ue})),wait$1(300);const pe=await ce();return oe(()=>({[ne]:void 0})),pe},[ne,oe])}function formatByte(ne){return`${(ne/(1024*1024)).toFixed(2)} MB`}const[useConnections,ConnectionsProvider]=createSlice([],{reduce:replace$1}),[useFeatures,FeaturesProvider]=createSlice({algorithms:[],maps:[],formats:[],traces:[]}),[useLoading,LoadingProvider]=createSlice({specimen:0,connections:0,features:0,map:0,general:0},{reduce:(ne,{action:oe,key:ce})=>produce(ne,ue=>{switch(oe){case"start":ue[ce]+=1;break;case"end":ue[ce]-=1}return ue})});function useAnyLoading(){const[ne]=useLoading();return lodashExports$1.some(lodashExports$1.values(ne))}function useLoadingState(ne="general"){const[,oe]=useLoading();return reactExports.useCallback(async ce=>{oe(()=>({action:"start",key:ne}));const ue=await ce();return oe(()=>({action:"end",key:ne})),ue},[ne,oe])}const hashWorkerUrl=""+new URL("hash.worker-60989a6e.js",import.meta.url).href,ipcWorkerUrl=""+new URL("ipc.worker-78007631.js",import.meta.url).href,compressWorkerUrl=""+new URL("compress.worker-0facefa0.js",import.meta.url).href,compressBinaryWorkerUrl=""+new URL("compressBinary.worker-3920d804.js",import.meta.url).href,decompressBinaryWorkerUrl=""+new URL("decompressBinary.worker-8b19c09f.js",import.meta.url).href,yamlWorkerUrl=""+new URL("parseYaml.worker-7a719c90.js",import.meta.url).href;class HashWorker extends Worker{constructor(){super(hashWorkerUrl,{type:"module"})}}class CompressWorker extends Worker{constructor(){super(compressWorkerUrl,{type:"module"})}}class CompressBinaryWorker extends Worker{constructor(){super(compressBinaryWorkerUrl,{type:"module"})}}class DecompressBinaryWorker extends Worker{constructor(){super(decompressBinaryWorkerUrl,{type:"module"})}}class IPCWorker extends Worker{constructor(){super(ipcWorkerUrl,{type:"module"})}}class ParseYamlWorker extends Worker{constructor(){super(yamlWorkerUrl,{type:"module"})}}var noop$9=function(){},_undefined$3=noop$9(),isValue$d=function(ne){return ne!==_undefined$3&&ne!==null},isValue$c=isValue$d,forEach$3=Array.prototype.forEach,create$4=Object.create,process$2=function(ne,oe){var ce;for(ce in ne)oe[ce]=ne[ce]},normalizeOptions$2=function(ne){var oe=create$4(null);return forEach$3.call(arguments,function(ce){isValue$c(ce)&&process$2(Object(ce),oe)}),oe},isImplemented$e=function(){var ne=Math.sign;return typeof ne!="function"?!1:ne(10)===1&&ne(-20)===-1},shim$b,hasRequiredShim$a;function requireShim$a(){return hasRequiredShim$a||(hasRequiredShim$a=1,shim$b=function(ne){return ne=Number(ne),isNaN(ne)||ne===0?ne:ne>0?1:-1}),shim$b}var sign$5=isImplemented$e()?Math.sign:requireShim$a(),sign$4=sign$5,abs$1=Math.abs,floor$2=Math.floor,toInteger$3=function(ne){return isNaN(ne)?0:(ne=Number(ne),ne===0||!isFinite(ne)?ne:sign$4(ne)*floor$2(abs$1(ne)))},toInteger$2=toInteger$3,max$5=Math.max,toPosInteger$1=function(ne){return max$5(0,toInteger$2(ne))},toPosInt$1=toPosInteger$1,resolveLength$2=function(ne,oe,ce){var ue;return isNaN(ne)?(ue=oe,ue>=0?ce&&ue?ue-1:ue:1):ne===!1?!1:toPosInt$1(ne)},validCallable$1=function(ne){if(typeof ne!="function")throw new TypeError(ne+" is not a function");return ne},isValue$b=isValue$d,validValue$1=function(ne){if(!isValue$b(ne))throw new TypeError("Cannot use null or undefined");return ne},callable$3=validCallable$1,value$2=validValue$1,bind$2=Function.prototype.bind,call$3=Function.prototype.call,keys$2=Object.keys,objPropertyIsEnumerable=Object.prototype.propertyIsEnumerable,_iterate=function(ne,oe){return function(ce,ue){var pe,me=arguments[2],ge=arguments[3];return ce=Object(value$2(ce)),callable$3(ue),pe=keys$2(ce),ge&&pe.sort(typeof ge=="function"?bind$2.call(ge,ce):void 0),typeof ne!="function"&&(ne=pe[ne]),call$3.call(ne,pe,function(ye,ve){return objPropertyIsEnumerable.call(ce,ye)?call$3.call(ue,me,ce[ye],ye,ce,ve):oe})}},forEach$2=_iterate("forEach"),registeredExtensions={},custom$2={exports:{}},isImplemented$d=function(){var ne=Object.assign,oe;return typeof ne!="function"?!1:(oe={foo:"raz"},ne(oe,{bar:"dwa"},{trzy:"trzy"}),oe.foo+oe.bar+oe.trzy==="razdwatrzy")},isImplemented$c,hasRequiredIsImplemented$8;function requireIsImplemented$8(){return hasRequiredIsImplemented$8||(hasRequiredIsImplemented$8=1,isImplemented$c=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),isImplemented$c}var shim$a,hasRequiredShim$9;function requireShim$9(){if(hasRequiredShim$9)return shim$a;hasRequiredShim$9=1;var ne=isValue$d,oe=Object.keys;return shim$a=function(ce){return oe(ne(ce)?Object(ce):ce)},shim$a}var keys$1,hasRequiredKeys$1;function requireKeys$1(){return hasRequiredKeys$1||(hasRequiredKeys$1=1,keys$1=requireIsImplemented$8()()?Object.keys:requireShim$9()),keys$1}var shim$9,hasRequiredShim$8;function requireShim$8(){if(hasRequiredShim$8)return shim$9;hasRequiredShim$8=1;var ne=requireKeys$1(),oe=validValue$1,ce=Math.max;return shim$9=function(ue,pe){var me,ge,ye=ce(arguments.length,2),ve;for(ue=Object(oe(ue)),ve=function(xe){try{ue[xe]=pe[xe]}catch(_e){me||(me=_e)}},ge=1;ge-1},shim$8}var contains$4=isImplemented$b()?String.prototype.contains:requireShim$7(),isValue$8=is$b,isPlainFunction$1=is$7,assign$6=assign$7,normalizeOpts$2=normalizeOptions$2,contains$3=contains$4,d$8=d$9.exports=function(ne,oe){var ce,ue,pe,me,ge;return arguments.length<2||typeof ne!="string"?(me=oe,oe=ne,ne=null):me=arguments[2],isValue$8(ne)?(ce=contains$3.call(ne,"c"),ue=contains$3.call(ne,"e"),pe=contains$3.call(ne,"w")):(ce=pe=!0,ue=!1),ge={value:oe,configurable:ce,enumerable:ue,writable:pe},me?assign$6(normalizeOpts$2(me),ge):ge};d$8.gs=function(ne,oe,ce){var ue,pe,me,ge;return typeof ne!="string"?(me=ce,ce=oe,oe=ne,ne=null):me=arguments[3],isValue$8(oe)?isPlainFunction$1(oe)?isValue$8(ce)?isPlainFunction$1(ce)||(me=ce,ce=void 0):ce=void 0:(me=oe,oe=ce=void 0):oe=void 0,isValue$8(ne)?(ue=contains$3.call(ne,"c"),pe=contains$3.call(ne,"e")):(ue=!0,pe=!1),ge={get:oe,set:ce,configurable:ue,enumerable:pe},me?assign$6(normalizeOpts$2(me),ge):ge};var dExports$1=d$9.exports,eventEmitter$1={exports:{}};(function(ne,oe){var ce=dExports$1,ue=validCallable$1,pe=Function.prototype.apply,me=Function.prototype.call,ge=Object.create,ye=Object.defineProperty,ve=Object.defineProperties,xe=Object.prototype.hasOwnProperty,_e={configurable:!0,enumerable:!1,writable:!0},Se,$e,Re,Ae,Ie,ke,Be;Se=function(Ne,Fe){var Ue;return ue(Fe),xe.call(this,"__ee__")?Ue=this.__ee__:(Ue=_e.value=ge(null),ye(this,"__ee__",_e),_e.value=null),Ue[Ne]?typeof Ue[Ne]=="object"?Ue[Ne].push(Fe):Ue[Ne]=[Ue[Ne],Fe]:Ue[Ne]=Fe,this},$e=function(Ne,Fe){var Ue,We;return ue(Fe),We=this,Se.call(this,Ne,Ue=function(){Re.call(We,Ne,Ue),pe.call(Fe,this,arguments)}),Ue.__eeOnceListener__=Fe,this},Re=function(Ne,Fe){var Ue,We,qe,ze;if(ue(Fe),!xe.call(this,"__ee__"))return this;if(Ue=this.__ee__,!Ue[Ne])return this;if(We=Ue[Ne],typeof We=="object")for(ze=0;qe=We[ze];++ze)(qe===Fe||qe.__eeOnceListener__===Fe)&&(We.length===2?Ue[Ne]=We[ze?0:1]:We.splice(ze,1));else(We===Fe||We.__eeOnceListener__===Fe)&&delete Ue[Ne];return this},Ae=function(Ne){var Fe,Ue,We,qe,ze;if(xe.call(this,"__ee__")&&(qe=this.__ee__[Ne],!!qe))if(typeof qe=="object"){for(Ue=arguments.length,ze=new Array(Ue-1),Fe=1;Fe=55296&&Ue<=56319&&(Ge+=$e[++ke])),Ge=Re?xe.call(Re,Ae,Ge,Be):Ge,Ie?(_e.value=Ge,Se(Ne,Be,_e)):Ne[Be]=Ge,++Be;Fe=Be}}if(Fe===void 0)for(Fe=ue($e.length),Ie&&(Ne=new Ie(Fe)),ke=0;ke=0?_e=ge(_e):_e=oe(this.length)-ge(me(_e)),ve=_e;ve"}},safeToString}var toShortStringRepresentation,hasRequiredToShortStringRepresentation;function requireToShortStringRepresentation(){if(hasRequiredToShortStringRepresentation)return toShortStringRepresentation;hasRequiredToShortStringRepresentation=1;var ne=requireSafeToString(),oe=/[\n\r\u2028\u2029]/g;return toShortStringRepresentation=function(ce){var ue=ne(ce);return ue.length>100&&(ue=ue.slice(0,99)+"…"),ue=ue.replace(oe,function(pe){return JSON.stringify(pe).slice(1,-1)}),ue},toShortStringRepresentation}var isPromise={exports:{}},hasRequiredIsPromise;function requireIsPromise(){if(hasRequiredIsPromise)return isPromise.exports;hasRequiredIsPromise=1,isPromise.exports=ne,isPromise.exports.default=ne;function ne(oe){return!!oe&&(typeof oe=="object"||typeof oe=="function")&&typeof oe.then=="function"}return isPromise.exports}var hasRequiredPromise;function requirePromise(){if(hasRequiredPromise)return promise;hasRequiredPromise=1;var ne=requireMap(),oe=requirePrimitiveSet(),ce=requireValidateStringifiableValue(),ue=requireToShortStringRepresentation(),pe=requireIsPromise(),me=requireNextTick(),ge=Object.create,ye=oe("then","then:finally","done","done:finally");return registeredExtensions.promise=function(ve,xe){var _e=ge(null),Se=ge(null),$e=ge(null);if(ve===!0)ve=null;else if(ve=ce(ve),!ye[ve])throw new TypeError("'"+ue(ve)+"' is not valid promise mode");xe.on("set",function(Re,Ae,Ie){var ke=!1;if(!pe(Ie)){Se[Re]=Ie,xe.emit("setasync",Re,1);return}_e[Re]=1,$e[Re]=Ie;var Be=function(We){var qe=_e[Re];if(ke)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Consider to rely on 'then' or 'done' mode instead.`);qe&&(delete _e[Re],Se[Re]=We,xe.emit("setasync",Re,qe))},Ne=function(){ke=!0,_e[Re]&&(delete _e[Re],delete $e[Re],xe.delete(Re))},Fe=ve;if(Fe||(Fe="then"),Fe==="then"){var Ue=function(){me(Ne)};Ie=Ie.then(function(We){me(Be.bind(this,We))},Ue),typeof Ie.finally=="function"&&Ie.finally(Ue)}else if(Fe==="done"){if(typeof Ie.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");Ie.done(Be,Ne)}else if(Fe==="done:finally"){if(typeof Ie.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof Ie.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");Ie.done(Be),Ie.finally(Ne)}}),xe.on("get",function(Re,Ae,Ie){var ke;if(_e[Re]){++_e[Re];return}ke=$e[Re];var Be=function(){xe.emit("getasync",Re,Ae,Ie)};pe(ke)?typeof ke.done=="function"?ke.done(Be):ke.then(function(){me(Be)}):Be()}),xe.on("delete",function(Re){if(delete $e[Re],_e[Re]){delete _e[Re];return}if(hasOwnProperty.call(Se,Re)){var Ae=Se[Re];delete Se[Re],xe.emit("deleteasync",Re,[Ae])}}),xe.on("clear",function(){var Re=Se;Se=ge(null),_e=ge(null),$e=ge(null),xe.emit("clearasync",ne(Re,function(Ae){return[Ae]}))})},promise}var dispose={},hasRequiredDispose;function requireDispose(){if(hasRequiredDispose)return dispose;hasRequiredDispose=1;var ne=validCallable$1,oe=forEach$2,ce=registeredExtensions,ue=Function.prototype.apply;return ce.dispose=function(pe,me,ge){var ye;if(ne(pe),ge.async&&ce.async||ge.promise&&ce.promise){me.on("deleteasync",ye=function(ve,xe){ue.call(pe,null,xe)}),me.on("clearasync",function(ve){oe(ve,function(xe,_e){ye(_e,xe)})});return}me.on("delete",ye=function(ve,xe){pe(xe)}),me.on("clear",function(ve){oe(ve,function(xe,_e){ye(_e,xe)})})},dispose}var maxAge={},maxTimeout,hasRequiredMaxTimeout;function requireMaxTimeout(){return hasRequiredMaxTimeout||(hasRequiredMaxTimeout=1,maxTimeout=2147483647),maxTimeout}var validTimeout,hasRequiredValidTimeout;function requireValidTimeout(){if(hasRequiredValidTimeout)return validTimeout;hasRequiredValidTimeout=1;var ne=toPosInteger$1,oe=requireMaxTimeout();return validTimeout=function(ce){if(ce=ne(ce),ce>oe)throw new TypeError(ce+" exceeds maximum possible timeout");return ce},validTimeout}var hasRequiredMaxAge;function requireMaxAge(){if(hasRequiredMaxAge)return maxAge;hasRequiredMaxAge=1;var ne=requireFrom$1(),oe=forEach$2,ce=requireNextTick(),ue=requireIsPromise(),pe=requireValidTimeout(),me=registeredExtensions,ge=Function.prototype,ye=Math.max,ve=Math.min,xe=Object.create;return me.maxAge=function(_e,Se,$e){var Re,Ae,Ie,ke;_e=pe(_e),_e&&(Re=xe(null),Ae=$e.async&&me.async||$e.promise&&me.promise?"async":"",Se.on("set"+Ae,function(Be){Re[Be]=setTimeout(function(){Se.delete(Be)},_e),typeof Re[Be].unref=="function"&&Re[Be].unref(),ke&&(ke[Be]&&ke[Be]!=="nextTick"&&clearTimeout(ke[Be]),ke[Be]=setTimeout(function(){delete ke[Be]},Ie),typeof ke[Be].unref=="function"&&ke[Be].unref())}),Se.on("delete"+Ae,function(Be){clearTimeout(Re[Be]),delete Re[Be],ke&&(ke[Be]!=="nextTick"&&clearTimeout(ke[Be]),delete ke[Be])}),$e.preFetch&&($e.preFetch===!0||isNaN($e.preFetch)?Ie=.333:Ie=ye(ve(Number($e.preFetch),1),0),Ie&&(ke={},Ie=(1-Ie)*_e,Se.on("get"+Ae,function(Be,Ne,Fe){ke[Be]||(ke[Be]="nextTick",ce(function(){var Ue;ke[Be]==="nextTick"&&(delete ke[Be],Se.delete(Be),$e.async&&(Ne=ne(Ne),Ne.push(ge)),Ue=Se.memoized.apply(Fe,Ne),$e.promise&&ue(Ue)&&(typeof Ue.done=="function"?Ue.done(ge,ge):Ue.then(ge,ge)))}))}))),Se.on("clear"+Ae,function(){oe(Re,function(Be){clearTimeout(Be)}),Re={},ke&&(oe(ke,function(Be){Be!=="nextTick"&&clearTimeout(Be)}),ke={})}))},maxAge}var max$4={},lruQueue,hasRequiredLruQueue;function requireLruQueue(){if(hasRequiredLruQueue)return lruQueue;hasRequiredLruQueue=1;var ne=toPosInteger$1,oe=Object.create,ce=Object.prototype.hasOwnProperty;return lruQueue=function(ue){var pe=0,me=1,ge=oe(null),ye=oe(null),ve=0,xe;return ue=ne(ue),{hit:function(_e){var Se=ye[_e],$e=++ve;if(ge[$e]=_e,ye[_e]=$e,!Se)return++pe,pe<=ue?void 0:(_e=ge[me],xe(_e),_e);if(delete ge[Se],me===Se)for(;!ce.call(ge,++me););},delete:xe=function(_e){var Se=ye[_e];if(Se&&(delete ge[Se],delete ye[_e],--pe,me===Se)){if(!pe){ve=0,me=1;return}for(;!ce.call(ge,++me););}},clear:function(){pe=0,me=1,ge=oe(null),ye=oe(null),ve=0}}},lruQueue}var hasRequiredMax;function requireMax(){if(hasRequiredMax)return max$4;hasRequiredMax=1;var ne=toPosInteger$1,oe=requireLruQueue(),ce=registeredExtensions;return ce.max=function(ue,pe,me){var ge,ye,ve;ue=ne(ue),ue&&(ye=oe(ue),ge=me.async&&ce.async||me.promise&&ce.promise?"async":"",pe.on("set"+ge,ve=function(xe){xe=ye.hit(xe),xe!==void 0&&pe.delete(xe)}),pe.on("get"+ge,ve),pe.on("delete"+ge,ye.delete),pe.on("clear"+ge,ye.clear))},max$4}var refCounter={},hasRequiredRefCounter;function requireRefCounter(){if(hasRequiredRefCounter)return refCounter;hasRequiredRefCounter=1;var ne=dExports$1,oe=registeredExtensions,ce=Object.create,ue=Object.defineProperties;return oe.refCounter=function(pe,me,ge){var ye,ve;ye=ce(null),ve=ge.async&&oe.async||ge.promise&&oe.promise?"async":"",me.on("set"+ve,function(xe,_e){ye[xe]=_e||1}),me.on("get"+ve,function(xe){++ye[xe]}),me.on("delete"+ve,function(xe){delete ye[xe]}),me.on("clear"+ve,function(){ye={}}),ue(me.memoized,{deleteRef:ne(function(){var xe=me.get(arguments);return xe===null||!ye[xe]?null:--ye[xe]?!1:(me.delete(xe),!0)}),getRefCount:ne(function(){var xe=me.get(arguments);return xe===null||!ye[xe]?0:ye[xe]})})},refCounter}var normalizeOpts$1=normalizeOptions$2,resolveLength=resolveLength$2,plain=plain$1,memoizee=function(ne){var oe=normalizeOpts$1(arguments[1]),ce;return oe.normalizer||(ce=oe.length=resolveLength(oe.length,ne.length,oe.async),ce!==0&&(oe.primitive?ce===!1?oe.normalizer=requirePrimitive():ce>1&&(oe.normalizer=requireGetPrimitiveFixed()(ce)):ce===!1?oe.normalizer=requireGet()():ce===1?oe.normalizer=requireGet1()():oe.normalizer=requireGetFixed()(ce))),oe.async&&requireAsync(),oe.promise&&requirePromise(),oe.dispose&&requireDispose(),oe.maxAge&&requireMaxAge(),oe.max&&requireMax(),oe.refCounter&&requireRefCounter(),plain(ne,oe)};const memoizee$1=getDefaultExportFromCjs(memoizee),usingWorker=ne=>async oe=>{const ce=new ne,ue=await oe(ce);if("error"in ue)throw console.error(ue.error),new Error(ue.error);return ce.terminate(),ue.result},usingWorkerTask=ne=>oe=>usingWorker(ne)(ce=>(ce.postMessage(oe),new Promise((ue,pe)=>{ce.onmessage=me=>{ue(me.data)},ce.onerror=me=>{console.error(me),pe(me)}}))),usingMemoizedWorkerTask=(ne,oe={async:!0,length:1})=>memoizee$1(usingWorkerTask(ne),oe);lodashExports$1.memoize(usingWorkerTask(HashWorker));lodashExports$1.memoize(usingWorkerTask(CompressWorker));const compressBinaryAsync=lodashExports$1.memoize(usingWorkerTask(CompressBinaryWorker)),decompressBinaryAsync=lodashExports$1.memoize(usingWorkerTask(DecompressBinaryWorker)),parseYamlAsync=lodashExports$1.memoize(usingWorkerTask(ParseYamlWorker));function ext$1(ne){return ne.split(".").pop()}function name$2(ne){return ne.split(".").shift()}const customId="internal/custom",custom$1=(ne,oe="resource")=>({name:(ne==null?void 0:ne.id)===customId?`Imported ${lodashExports$1.startCase(oe)} - ${ne==null?void 0:ne.name}`:`Import ${lodashExports$1.startCase(oe)}`,description:"Internal",id:customId}),EXTENSIONS=["json","yaml","yml"],FORMATS$1=EXTENSIONS.map(ne=>`.trace.${ne}`);async function uploadTrace(){const ne=await r$5({accept:EXTENSIONS.map(oe=>`.${oe}`),strict:!0});if(ne)return readUploadedTrace(ne)}function readUploadedTrace(ne){return{file:ne,read:async()=>{if(isTraceFormat(ne)){const oe=await ne.text(),ce=await parseYamlAsync(oe);return{...custom$1(),format:ce==null?void 0:ce.format,content:ce,name:lodashExports$1.startCase(name$2(ne.name)),type:customId,key:nanoid$1()}}else throw new Error(`The file should have one of these extensions: ${FORMATS$1.join(", ")}`)}}}function isTraceFormat(ne){return!!lodashExports$1.find(FORMATS$1,oe=>ne.name.endsWith(oe))}async function uploadMap(ne){const oe=await r$5({accept:ne.map(({id:ce})=>`.${ce}`),strict:!0});if(oe)return readUploadedMap(oe,ne)}function readUploadedMap(ne,oe){return{file:ne,read:async()=>{if(lodashExports$1.find(oe,{id:ext$1(ne.name)}))return{...custom$1(),format:ext$1(ne.name),content:await ne.text(),name:lodashExports$1.startCase(name$2(ne.name))};throw new Error(`The format (${ext$1(ne.name)}) is unsupported.`)}}}function name$1(ne){return ne.split(".").shift()}function MapPicker({onChange:ne,value:oe}){const ce=useSnackbar(),ue=useLoadingState("map"),[{features:pe,connections:me}]=useLoading(),ge=useBusyState("map"),[ye]=useConnections(),[{maps:ve,formats:xe}]=useFeatures();return jsxRuntimeExports.jsx(FeaturePicker,{showTooltip:!0,arrow:!0,paper:!0,disabled:!!pe||!!me,ellipsis:25,icon:jsxRuntimeExports.jsx(FileOpenOutlined,{}),label:"Choose Map",value:oe==null?void 0:oe.id,items:[custom$1(oe,"map"),...ve.map(_e=>{var Se;return{..._e,description:(Se=lodashExports$1.find(ye,{url:_e.source}))==null?void 0:Se.name}})],onChange:async _e=>{switch(_e){case custom$1().id:try{const Se=await uploadMap(xe);Se&&ue(async()=>{ce("Opening map...");const $e=Se.file.size>LARGE_FILE_B?await ge(Se.read,`Opening map (${formatByte(Se.file.size)})`):await Se.read();$e&&(ne==null||ne($e))})}catch(Se){ce(`${Se}`)}break;default:ne==null||ne(lodashExports$1.find(ve,{id:_e}));break}}})}function TracePicker({onChange:ne,value:oe}){const ce=useSnackbar(),ue=useLoadingState("specimen"),pe=useBusyState("specimen"),[me]=useConnections(),[{features:ge,connections:ye}]=useLoading(),[{traces:ve}]=useFeatures();return jsxRuntimeExports.jsx(FeaturePicker,{showTooltip:!0,paper:!0,arrow:!0,ellipsis:25,disabled:!!ge||!!ye,icon:jsxRuntimeExports.jsx(FileOpenOutlined,{}),label:"Choose Trace",value:oe==null?void 0:oe.id,items:[custom$1(oe,"trace"),...ve.map(xe=>{var _e;return{...xe,description:(_e=lodashExports$1.find(me,{url:xe.source}))==null?void 0:_e.name}})],onChange:async xe=>{switch(xe){case custom$1().id:try{const _e=await uploadTrace();_e&&ue(async()=>{ce("Opening trace...");try{const Se=_e.file.size>LARGE_FILE_B?await pe(_e.read,`Opening trace (${formatByte(_e.file.size)})`):await _e.read();Se&&(ne==null||ne(Se))}catch(Se){console.error(Se),ce(`Error opening, ${lodashExports$1.get(Se,"message")}`),ne==null||ne({id:custom$1().id,error:lodashExports$1.get(Se,"message"),name:lodashExports$1.startCase(name$1(_e.file.name))})}})}catch(_e){console.error(_e),ce(`Error opening, ${lodashExports$1.get(_e,"message")}`),ne==null||ne({id:custom$1().id,error:lodashExports$1.get(_e,"message"),name:"File"})}break;default:ne==null||ne(lodashExports$1.find(ve,{id:xe}));break}}})}const Heading=({label:ne})=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",sx:{pt:1},children:ne}),Label=({label:ne})=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",children:ne}),Option=({label:ne,content:oe})=>jsxRuntimeExports.jsxs(Flex,{alignItems:"center",children:[jsxRuntimeExports.jsx(Label,{label:ne}),jsxRuntimeExports.jsx(Space,{flex:1}),oe]});var hexRgb$1=function(ne){if(typeof ne!="string")throw new TypeError("Expected a string");ne=ne.replace(/^#/,""),ne.length===3&&(ne=ne[0]+ne[0]+ne[1]+ne[1]+ne[2]+ne[2]);var oe=parseInt(ne,16);return[oe>>16,oe>>8&255,oe&255]},rgbHex$1=(ne,oe,ce,ue)=>{const pe=(ne+(ue||"")).toString().includes("%");if(typeof ne=="string"){const me=ne.match(/(0?\.?\d{1,3})%?\b/g).map(Number);ne=me[0],oe=me[1],ce=me[2],ue=me[3]}else ue!==void 0&&(ue=parseFloat(ue));if(typeof ne!="number"||typeof oe!="number"||typeof ce!="number"||ne>255||oe>255||ce>255)throw new TypeError("Expected three numbers below 256");if(typeof ue=="number"){if(!pe&&ue>=0&&ue<=1)ue=Math.round(255*ue);else if(pe&&ue>=0&&ue<=100)ue=Math.round(255*ue/100);else throw new TypeError(`Expected alpha value (${ue}) as a fraction or percentage`);ue=(ue|256).toString(16).slice(1)}else ue="";return(ce|oe<<8|ne<<16|1<<24).toString(16).slice(1)+ue},colorDiff={};/** * @author Markus Ekholm * @copyright 2012-2023 (c) Markus Ekholm * @license Copyright (c) 2012-2023, Markus Ekholm @@ -490,17 +491,11 @@ Consider to rely on 'then' or 'done' mode instead.`);qe&&(delete _e[Re],Se[Re]=W * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */function paletteMapKey(ne){return ne=normalize$2(ne),ne.A!==1?`rgba(${ne.R}, ${ne.G}, ${ne.B}, ${ne.A})`:`rgb(${ne.R}, ${ne.G}, ${ne.B})`}function labPaletteMapKey(ne){return`lab(${ne.L}, ${ne.a}, ${ne.b})`}function mapPalette(ne,oe,ce,ue){const pe={};ue=ue||{R:255,G:255,B:255},ce=ce||"closest";for(let me=0;meve){ye=_e,ve=Se;continue}}ye&&(pe[paletteMapKey(ge)]=ye)}return pe}function matchPaletteLab(ne,oe,ce){let ue,pe,me=oe[0],ge=ciede2000(ne,me);for(let ye=1,ve=oe.length;yege)&&(me=ue,ge=pe);return me}function mapPaletteLab(ne,oe,ce){const ue={},pe=ce==="furthest";for(let me=0;me{let oe=hexRgb(ne);return{R:oe[0],G:oe[1],B:oe[2]}},pantoneRGBList=pantones.map(ne=>get_rgbObject(ne.hex));var getClosestColor=ne=>{const oe=get_rgbObject(ne),ce=diff.closest(oe,pantoneRGBList),ue=rgbHex(ce.R,ce.G,ce.B),pe=pantones.findIndex(ge=>ge.hex==`#${ue}`);return pantones[pe]};function u$7(){return(u$7=Object.assign||function(ne){for(var oe=1;oe=0||(pe[ce]=ne[ce]);return pe}function i$7(ne){var oe=reactExports.useRef(ne),ce=reactExports.useRef(function(ue){oe.current&&oe.current(ue)});return oe.current=ne,ce.current}var s$4=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=1),ne>ce?ce:ne0:ke.buttons>0)&&pe.current?me(d$7(pe.current,ke,ye.current)):Ie(!1)},Ae=function(){return Ie(!1)};function Ie(ke){var Be=ve.current,Ne=v$7(pe.current),Fe=ke?Ne.addEventListener:Ne.removeEventListener;Fe(Be?"touchmove":"mousemove",Re),Fe(Be?"touchend":"mouseup",Ae)}return[function(ke){var Be=ke.nativeEvent,Ne=pe.current;if(Ne&&(h$8(Be),!function(Ue,We){return We&&!f$7(Ue)}(Be,ve.current)&&Ne)){if(f$7(Be)){ve.current=!0;var Fe=Be.changedTouches||[];Fe.length&&(ye.current=Fe[0].identifier)}Ne.focus(),me(d$7(Ne,Be,ye.current)),Ie(!0)}},function(ke){var Be=ke.which||ke.keyCode;Be<37||Be>40||(ke.preventDefault(),ge({left:Be===39?.05:Be===37?-.05:0,top:Be===40?.05:Be===38?-.05:0}))},Ie]},[ge,me]),_e=xe[0],Se=xe[1],$e=xe[2];return reactExports.useEffect(function(){return $e},[$e]),React$2.createElement("div",u$7({},ue,{onTouchStart:_e,onMouseDown:_e,className:"react-colorful__interactive",ref:pe,onKeyDown:Se,tabIndex:0,role:"slider"}))}),g$6=function(ne){return ne.filter(Boolean).join(" ")},p$8=function(ne){var oe=ne.color,ce=ne.left,ue=ne.top,pe=ue===void 0?.5:ue,me=g$6(["react-colorful__pointer",ne.className]);return React$2.createElement("div",{className:me,style:{top:100*pe+"%",left:100*ce+"%"}},React$2.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:oe}}))},b$7=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=Math.pow(10,oe)),Math.round(ce*ne)/ce},x$4=function(ne){return L$4(C$5(ne))},C$5=function(ne){return ne[0]==="#"&&(ne=ne.substring(1)),ne.length<6?{r:parseInt(ne[0]+ne[0],16),g:parseInt(ne[1]+ne[1],16),b:parseInt(ne[2]+ne[2],16),a:ne.length===4?b$7(parseInt(ne[3]+ne[3],16)/255,2):1}:{r:parseInt(ne.substring(0,2),16),g:parseInt(ne.substring(2,4),16),b:parseInt(ne.substring(4,6),16),a:ne.length===8?b$7(parseInt(ne.substring(6,8),16)/255,2):1}},w$7=function(ne){return K$4(I$4(ne))},y$5=function(ne){var oe=ne.s,ce=ne.v,ue=ne.a,pe=(200-oe)*ce/100;return{h:b$7(ne.h),s:b$7(pe>0&&pe<200?oe*ce/100/(pe<=100?pe:200-pe)*100:0),l:b$7(pe/2),a:b$7(ue,2)}},q$7=function(ne){var oe=y$5(ne);return"hsl("+oe.h+", "+oe.s+"%, "+oe.l+"%)"},I$4=function(ne){var oe=ne.h,ce=ne.s,ue=ne.v,pe=ne.a;oe=oe/360*6,ce/=100,ue/=100;var me=Math.floor(oe),ge=ue*(1-ce),ye=ue*(1-(oe-me)*ce),ve=ue*(1-(1-oe+me)*ce),xe=me%6;return{r:b$7(255*[ue,ye,ge,ge,ve,ue][xe]),g:b$7(255*[ve,ue,ue,ye,ge,ge][xe]),b:b$7(255*[ge,ge,ve,ue,ue,ye][xe]),a:b$7(pe,2)}},D$4=function(ne){var oe=ne.toString(16);return oe.length<2?"0"+oe:oe},K$4=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=pe<1?D$4(b$7(255*pe)):"";return"#"+D$4(oe)+D$4(ce)+D$4(ue)+me},L$4=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=Math.max(oe,ce,ue),ge=me-Math.min(oe,ce,ue),ye=ge?me===oe?(ce-ue)/ge:me===ce?2+(ue-oe)/ge:4+(oe-ce)/ge:0;return{h:b$7(60*(ye<0?ye+6:ye)),s:b$7(me?ge/me*100:0),v:b$7(me/255*100),a:pe}},S$6=React$2.memo(function(ne){var oe=ne.hue,ce=ne.onChange,ue=g$6(["react-colorful__hue",ne.className]);return React$2.createElement("div",{className:ue},React$2.createElement(m$7,{onMove:function(pe){ce({h:360*pe.left})},onKey:function(pe){ce({h:s$4(oe+360*pe.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$7(oe),"aria-valuemax":"360","aria-valuemin":"0"},React$2.createElement(p$8,{className:"react-colorful__hue-pointer",left:oe/360,color:q$7({h:oe,s:100,v:100,a:1})})))}),T$4=React$2.memo(function(ne){var oe=ne.hsva,ce=ne.onChange,ue={backgroundColor:q$7({h:oe.h,s:100,v:100,a:1})};return React$2.createElement("div",{className:"react-colorful__saturation",style:ue},React$2.createElement(m$7,{onMove:function(pe){ce({s:100*pe.left,v:100-100*pe.top})},onKey:function(pe){ce({s:s$4(oe.s+100*pe.left,0,100),v:s$4(oe.v-100*pe.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$7(oe.s)+"%, Brightness "+b$7(oe.v)+"%"},React$2.createElement(p$8,{className:"react-colorful__saturation-pointer",top:1-oe.v/100,left:oe.s/100,color:q$7(oe)})))}),F$5=function(ne,oe){if(ne===oe)return!0;for(var ce in ne)if(ne[ce]!==oe[ce])return!1;return!0},X$4=function(ne,oe){return ne.toLowerCase()===oe.toLowerCase()||F$5(C$5(ne),C$5(oe))};function Y$4(ne,oe,ce){var ue=i$7(ce),pe=reactExports.useState(function(){return ne.toHsva(oe)}),me=pe[0],ge=pe[1],ye=reactExports.useRef({color:oe,hsva:me});reactExports.useEffect(function(){if(!ne.equal(oe,ye.current.color)){var xe=ne.toHsva(oe);ye.current={hsva:xe,color:oe},ge(xe)}},[oe,ne]),reactExports.useEffect(function(){var xe;F$5(me,ye.current.hsva)||ne.equal(xe=ne.fromHsva(me),ye.current.color)||(ye.current={hsva:me,color:xe},ue(xe))},[me,ne,ue]);var ve=reactExports.useCallback(function(xe){ge(function(_e){return Object.assign({},_e,xe)})},[]);return[me,ve]}var V$4=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$5=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$4=new Map,Q$4=function(ne){V$4(function(){var oe=ne.current?ne.current.ownerDocument:document;if(oe!==void 0&&!J$4.has(oe)){var ce=oe.createElement("style");ce.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$4.set(oe,ce);var ue=$$5();ue&&ce.setAttribute("nonce",ue),oe.head.appendChild(ce)}},[])},U$4=function(ne){var oe=ne.className,ce=ne.colorModel,ue=ne.color,pe=ue===void 0?ce.defaultColor:ue,me=ne.onChange,ge=c$4(ne,["className","colorModel","color","onChange"]),ye=reactExports.useRef(null);Q$4(ye);var ve=Y$4(ce,pe,me),xe=ve[0],_e=ve[1],Se=g$6(["react-colorful",oe]);return React$2.createElement("div",u$7({},ge,{ref:ye,className:Se}),React$2.createElement(T$4,{hsva:xe,onChange:_e}),React$2.createElement(S$6,{hue:xe.h,onChange:_e,className:"react-colorful__last-control"}))},W$4={defaultColor:"000",toHsva:x$4,fromHsva:function(ne){return w$7({h:ne.h,s:ne.s,v:ne.v,a:1})},equal:X$4},Z$4=function(ne){return React$2.createElement(U$4,u$7({},ne,{colorModel:W$4}))};const byPoint=({variables:ne},{x:oe,y:ce})=>(ne==null?void 0:ne.x)===oe&&(ne==null?void 0:ne.y)===ce,getGridSymbolsUrl=""+new URL("getGridSymbols.worker-39c2a9fb.js",import.meta.url).href;class GetGridSymbolsWorker extends Worker{constructor(){super(getGridSymbolsUrl,{type:"module"})}}const getGridSymbolsAsync=usingWorkerTask(GetGridSymbolsWorker),parseGridWorkerUrl=""+new URL("parseGrid.worker-354760d8.js",import.meta.url).href;class ParseGridWorker extends Worker{constructor(){super(parseGridWorkerUrl,{type:"module"})}}const parseGridAsync=usingMemoizedWorkerTask(ParseGridWorker);function useDebouncedState(ne,oe=lodashExports$1.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports$1.now());return[ue,ge=>{const ye=lodashExports$1.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge)}]}function useDebouncedState2(ne,oe=lodashExports$1.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports$1.now());return[ue,ge=>{const ye=lodashExports$1.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge(ue))}]}function between(ne,oe,ce){return ne>=oe&&ne({content:ne,...await parseGridAsync({map:ne,options:oe})}),{normalizer:JSON.stringify});function SymbolColorPicker({onChange:ne,value:oe,autoValue:ce}){const[ue,pe]=useDebouncedState(oe,ne),me=ue??ce;return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ge=>{var ye;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FeaturePickerButton,{...bindTrigger(ge),children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",gap:1,alignItems:"center",children:[jsxRuntimeExports.jsx(Box$1,{sx:{width:16,height:16,backgroundColor:me,outline:ve=>`1px solid ${ve.palette.divider}`,borderRadius:4}}),ue?lodashExports$1.startCase(((ye=getClosestColor(ue))==null?void 0:ye.name)??"Custom"):"Auto"]})}),jsxRuntimeExports.jsxs(Popover$1,{transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},...bindPopover(ge),slotProps:{paper:{sx:{overflow:"visible"}}},children:[jsxRuntimeExports.jsx(Box$1,{sx:{px:2,py:1},children:jsxRuntimeExports.jsx(FormControlLabel$1,{control:jsxRuntimeExports.jsx(Checkbox$1,{defaultChecked:!ue,onChange:(ve,xe)=>pe==null?void 0:pe(xe?void 0:ce)}),label:"Choose Automatically"})}),jsxRuntimeExports.jsx(Box$1,{sx:{p:2,pt:0,...!ue&&{opacity:ve=>ve.palette.action.disabledOpacity,pointerEvents:"none"}},children:jsxRuntimeExports.jsx(Z$4,{color:ue??ce,onChange:pe})})]})]})}})}const editor$3=async ne=>{if(ne){const{symbols:oe}=await getGridSymbolsAsync({map:ne});return withProduce(({produce:ce,value:ue})=>{const{palette:pe}=useTheme$1(),me=lodashExports$1.flow(interpolate$1([pe.background.paper,pe.text.primary]),rgbToHex$1);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:lodashExports$1.sortBy(oe,"value").map(({symbol:ge})=>{var ye,ve;return jsxRuntimeExports.jsx(Option,{label:`Tile color for "${ge}"`,content:jsxRuntimeExports.jsx(SymbolColorPicker,{value:(ye=ue==null?void 0:ue.symbols)==null?void 0:ye[ge],autoValue:me(((ve=lodashExports$1.find(oe,{symbol:ge}))==null?void 0:ve.value)??0),onChange:xe=>ce(_e=>{lodashExports$1.set(_e,`symbols["${ge}"]`,xe)})})},ge)})})})}else return()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},hydrate$3=ne=>{const{width:oe,height:ce}=ne.bounds;return{...ne,snap:({x:ue,y:pe},me=1)=>{const[ge,ye]=[lodashExports$1.round(-1+ue+me/2),lodashExports$1.round(-1+pe+me/2)];if(between(ge,0,oe)&&between(ye,0,ce))return{x:ge,y:ye}},nodeAt:ue=>{const{x:pe,y:me}=ue;return me*oe+pe},pointOf:ue=>({x:ue%oe,y:~~(ue/oe)}),matchNode:byPoint}},grid=Object.freeze(Object.defineProperty({__proto__:null,SymbolColorPicker,editor:editor$3,hydrate:hydrate$3,parse:parse$a},Symbol.toStringTag,{value:"Module"})),parseMeshWorkerUrl=""+new URL("parseMesh.worker-b55f1a2c.js",import.meta.url).href;class ParseMeshWorker extends Worker{constructor(){super(parseMeshWorkerUrl,{type:"module"})}}const parseMeshAsync=usingMemoizedWorkerTask(ParseMeshWorker),parse$9=memoizee$1(async(ne="",oe)=>await parseMeshAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$2=ne=>({...ne,snap:lodashExports$1.identity,nodeAt:lodashExports$1.constant(0),pointOf:lodashExports$1.constant({x:0,y:0}),matchNode:byPoint}),editor$2=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),mesh=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$2,hydrate:hydrate$2,parse:parse$9},Symbol.toStringTag,{value:"Module"})),parseNetworkWorkerUrl=""+new URL("parseNetwork.worker-ea62010a.js",import.meta.url).href;class ParseNetworkWorker extends Worker{constructor(){super(parseNetworkWorkerUrl,{type:"module"})}}const parseNetworkAsync=usingMemoizedWorkerTask(ParseNetworkWorker),parse$8=memoizee$1(async(ne="",oe)=>await parseNetworkAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$1=ne=>({...ne,snap:lodashExports$1.identity,nodeAt:lodashExports$1.constant(0),pointOf:lodashExports$1.constant({x:0,y:0}),matchNode:byPoint}),editor$1=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),xy=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$1,hydrate:hydrate$1,parse:parse$8},Symbol.toStringTag,{value:"Module"})),parsePolyWorkerUrl=""+new URL("parsePoly.worker-e37621e9.js",import.meta.url).href;class ParsePolyWorker extends Worker{constructor(){super(parsePolyWorkerUrl,{type:"module"})}}const parsePolyAsync=usingMemoizedWorkerTask(ParsePolyWorker),parse$7=memoizee$1(async(ne="",oe)=>await parsePolyAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate=ne=>({...ne,snap:lodashExports$1.identity,nodeAt:lodashExports$1.constant(0),pointOf:lodashExports$1.constant({x:0,y:0}),matchNode:byPoint}),editor=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),poly=Object.freeze(Object.defineProperty({__proto__:null,editor,hydrate,parse:parse$7},Symbol.toStringTag,{value:"Module"})),mapParsers={grid,map:grid,xy,mesh,poly};function getParser(ne=""){return mapParsers[ne]}const defaultGuard=lodashExports$1.constant(!0),[useLayers,LayersProvider]=createSlice({layers:[]});function useLayer(ne,oe=defaultGuard){const[ce,ue]=reactExports.useState(ne),[{layers:pe},me]=useLayers(),ge=lodashExports$1.filter(pe,oe),ye=ce?lodashExports$1.find(ge,{key:ce})??lodashExports$1.head(ge):lodashExports$1.head(ge);return reactExports.useEffect(()=>{ue(ne)},[ne]),reactExports.useEffect(()=>{ye&&ye.key!==ce&&ue(ye.key)},[ye,ce,ue]),reactExports.useMemo(()=>({key:ye==null?void 0:ye.key,setKey:ue,layer:ye,setLayer:ve=>{const xe={...ye,...ve};me(({layers:_e})=>({layers:lodashExports$1.map(_e,Se=>Se.key===xe.key?xe:Se)}))},layers:ge,allLayers:pe}),[pe,ye,me,ge])}const fn=memoizee$1((ne,oe)=>new Function("params",`${ne}; return ${oe}.apply(null, params);`));function call$1(ne,oe,ce){try{return fn(ne,oe)(ce)}catch{return templates[oe].defaultReturnValue}}function _extends(){return _extends=Object.assign||function(ne){for(var oe=1;oeawait treeAsync$1(ne),[ne])}function useTreeMemo$1(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree$1(ce)}function useBreakpoints(ne){var xe;const{layer:oe}=useLayer(ne),{monotonicF:ce,monotonicG:ue,breakpoints:pe,code:me,trace:ge}=(oe==null?void 0:oe.source)??{},ye=ge==null?void 0:ge.content,{result:ve}=useTreeMemo$1({trace:ye,step:(xe=ye==null?void 0:ye.events)==null?void 0:xe.length,radius:void 0},[ye]);return reactExports.useMemo(()=>{const _e=(ye==null?void 0:ye.events)??[],Se=treeToDict((ve==null?void 0:ve.tree)??[]);return memoizee$1($e=>{var Ae,Ie;const Re=_e[$e];if(Re)try{for(const{active:ke,condition:Be,type:Ne,property:Fe="",reference:Ue=0}of pe??[]){const We=!Ne||Ne===Re.type;if(ke&&We&&(()=>{var ze;return(ze=Be==null?void 0:Be.apply)==null?void 0:ze.call(Be,{type:Ne,event:Re,property:Fe,value:lodashExports$1.get(Re,Fe),reference:Ue,step:$e,events:_e,node:Se[$e]})})())return Be!=null&&Be.needsReference?{result:`${Fe} ${lodashExports$1.toLower(lodashExports$1.startCase(Be==null?void 0:Be.key))} ${Ue}`}:{result:`${Fe} ${lodashExports$1.toLower(lodashExports$1.startCase(Be==null?void 0:Be.key))}`}}if(call$1(me??"","shouldBreak",[$e,Re,_e,(Ae=Se[$e])==null?void 0:Ae.parent,(Ie=Se[$e])==null?void 0:Ie.children]))return{result:"Script editor"}}catch(ke){return{error:`${ke}`}}return{result:""}})},[me,ye,pe,ce,ue,ve])}function treeToDict(ne=[],oe={}){for(const ce of ne){for(const ue of ce.events)oe[ue.step]=ce;treeToDict(ce.children,oe)}return oe}function cancellable(ne,oe){let ce=!1;return requestAnimationFrame(async()=>{const ue=await ne();ce||oe(ue)}),()=>{ce=!0}}function usePlaybackState(ne){const{layer:oe,setLayer:ce,setKey:ue}=useLayer(ne),pe=useSnackbar(),me=useBreakpoints(ne);reactExports.useEffect(()=>{ne&&ue(ne)},[ne]);const{playback:ge,playbackTo:ye,step:ve=0}=(oe==null?void 0:oe.source)??{},xe=lodashExports$1.min([ye,ve])??0,_e=!!ye,Se=ge==="playing",[$e,Re]=[0,(ye??1)-1];return reactExports.useMemo(()=>{function Ae(qe){ce(produce(oe,ze=>lodashExports$1.set(ze,"source",{...ze==null?void 0:ze.source,...qe})))}const Ie={start:$e,end:Re,step:xe,canPlay:_e&&!Se&&xe0},ke=(qe=0)=>{Ae({playback:"paused",step:Ue(qe)})},Be=(qe=1)=>Ae({playback:"playing",step:Ue(qe)}),Ne=(qe,ze=0)=>cancellable(async()=>{for(const Ge of lodashExports$1.range(ze,qe)){const Ze=me(xe+Ge);if(Ze.result||Ze.error)return{...Ze,offset:Ge}}return{result:"",offset:0,error:void 0}},({result:Ge,offset:Ze,error:Dt})=>{Dt?(pe(`${lodashExports$1.trimEnd(Dt,".")}`,`Step ${xe+Ze}`),ke()):Ge?(pe(`Breakpoint hit: ${Ge}`,`Step ${xe+Ze}`),ke(Ze)):Be(qe)}),Fe=(qe=1)=>{var Ge;let ze;for(ze=xe+qe;ze<=Re&&ze>=0&&!((Ge=me(ze))!=null&&Ge.result);ze+=qe);return ze},Ue=qe=>lodashExports$1.clamp(xe+qe,$e,Re);return{playing:ge==="playing",...Ie,...{play:()=>{Ae({playback:"playing",step:Ue(1)})},pause:ke,stepTo:(qe=0)=>Ae({step:lodashExports$1.clamp(qe,$e,Re)}),stop:()=>Ae({step:$e,playback:"paused"}),stepForward:()=>Ae({step:Ue(1)}),stepBackward:()=>Ae({step:Ue(-1)}),tick:Be,findBreakpoint:Fe,stepWithBreakpointCheck:Ne}}},[Re,ge,Se,_e,$e,xe,ce])}function RenderLayer({layer:ne,index:oe}){var ce;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne&&reactExports.createElement((ce=getController(ne))==null?void 0:ce.renderer,{layer:ne,index:oe})})}const[useRenderers,RendererProvider]=createSlice([],{reduce:replace$1}),removeUndefinedValues=ne=>lodashExports$1.omit(ne,lodashExports$1.filter(lodashExports$1.keys(ne),oe=>lodashExports$1.isUndefined(ne[oe]))),[useScreenshots,ScreenshotsProvider]=createSlice({},{reduce:lodashExports$1.flow(merge$4,removeUndefinedValues)});function Placeholder$2({label:ne,icon:oe=jsxRuntimeExports.jsx(WidgetsOutlined,{}),secondary:ce,...ue}){return jsxRuntimeExports.jsxs(Flex,{justifyContent:"center",alignItems:"center",color:"text.secondary",sx:{gap:2,p:6,pt:12,background:pe=>`repeating-linear-gradient( - 45deg, - ${pe.palette.background.default}, - transparent 1px, - transparent 7px, - ${pe.palette.background.default} 8px - )`},textAlign:"center",vertical:!0,...ue,children:[oe,jsxRuntimeExports.jsx(Type$2,{component:"div",children:ne}),!!ce&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"caption",sx:{px:8,maxWidth:480},children:ce})]})}var events={exports:{}},R$4=typeof Reflect=="object"?Reflect:null,ReflectApply=R$4&&typeof R$4.apply=="function"?R$4.apply:function(oe,ce,ue){return Function.prototype.apply.call(oe,ce,ue)},ReflectOwnKeys;R$4&&typeof R$4.ownKeys=="function"?ReflectOwnKeys=R$4.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe).concat(Object.getOwnPropertySymbols(oe))}:ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe)};function ProcessEmitWarning(ne){console&&console.warn&&console.warn(ne)}var NumberIsNaN=Number.isNaN||function(oe){return oe!==oe};function EventEmitter$3(){EventEmitter$3.init.call(this)}events.exports=EventEmitter$3;events.exports.once=once;EventEmitter$3.EventEmitter=EventEmitter$3;EventEmitter$3.prototype._events=void 0;EventEmitter$3.prototype._eventsCount=0;EventEmitter$3.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(ne){if(typeof ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ne)}Object.defineProperty(EventEmitter$3,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(ne){if(typeof ne!="number"||ne<0||NumberIsNaN(ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ne+".");defaultMaxListeners=ne}});EventEmitter$3.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$3.prototype.setMaxListeners=function(oe){if(typeof oe!="number"||oe<0||NumberIsNaN(oe))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+oe+".");return this._maxListeners=oe,this};function _getMaxListeners(ne){return ne._maxListeners===void 0?EventEmitter$3.defaultMaxListeners:ne._maxListeners}EventEmitter$3.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$3.prototype.emit=function(oe){for(var ce=[],ue=1;ue0&&(ge=ce[0]),ge instanceof Error)throw ge;var ye=new Error("Unhandled error."+(ge?" ("+ge.message+")":""));throw ye.context=ge,ye}var ve=me[oe];if(ve===void 0)return!1;if(typeof ve=="function")ReflectApply(ve,this,ce);else for(var xe=ve.length,_e=arrayClone(ve,xe),ue=0;ue0&&ge.length>pe&&!ge.warned){ge.warned=!0;var ye=new Error("Possible EventEmitter memory leak detected. "+ge.length+" "+String(oe)+" listeners added. Use emitter.setMaxListeners() to increase limit");ye.name="MaxListenersExceededWarning",ye.emitter=ne,ye.type=oe,ye.count=ge.length,ProcessEmitWarning(ye)}return ne}EventEmitter$3.prototype.addListener=function(oe,ce){return _addListener(this,oe,ce,!1)};EventEmitter$3.prototype.on=EventEmitter$3.prototype.addListener;EventEmitter$3.prototype.prependListener=function(oe,ce){return _addListener(this,oe,ce,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(ne,oe,ce){var ue={fired:!1,wrapFn:void 0,target:ne,type:oe,listener:ce},pe=onceWrapper.bind(ue);return pe.listener=ce,ue.wrapFn=pe,pe}EventEmitter$3.prototype.once=function(oe,ce){return checkListener(ce),this.on(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.prependOnceListener=function(oe,ce){return checkListener(ce),this.prependListener(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.removeListener=function(oe,ce){var ue,pe,me,ge,ye;if(checkListener(ce),pe=this._events,pe===void 0)return this;if(ue=pe[oe],ue===void 0)return this;if(ue===ce||ue.listener===ce)--this._eventsCount===0?this._events=Object.create(null):(delete pe[oe],pe.removeListener&&this.emit("removeListener",oe,ue.listener||ce));else if(typeof ue!="function"){for(me=-1,ge=ue.length-1;ge>=0;ge--)if(ue[ge]===ce||ue[ge].listener===ce){ye=ue[ge].listener,me=ge;break}if(me<0)return this;me===0?ue.shift():spliceOne(ue,me),ue.length===1&&(pe[oe]=ue[0]),pe.removeListener!==void 0&&this.emit("removeListener",oe,ye||ce)}return this};EventEmitter$3.prototype.off=EventEmitter$3.prototype.removeListener;EventEmitter$3.prototype.removeAllListeners=function(oe){var ce,ue,pe;if(ue=this._events,ue===void 0)return this;if(ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ue[oe]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ue[oe]),this;if(arguments.length===0){var me=Object.keys(ue),ge;for(pe=0;pe=0;pe--)this.removeListener(oe,ce[pe]);return this};function _listeners(ne,oe,ce){var ue=ne._events;if(ue===void 0)return[];var pe=ue[oe];return pe===void 0?[]:typeof pe=="function"?ce?[pe.listener||pe]:[pe]:ce?unwrapListeners(pe):arrayClone(pe,pe.length)}EventEmitter$3.prototype.listeners=function(oe){return _listeners(this,oe,!0)};EventEmitter$3.prototype.rawListeners=function(oe){return _listeners(this,oe,!1)};EventEmitter$3.listenerCount=function(ne,oe){return typeof ne.listenerCount=="function"?ne.listenerCount(oe):listenerCount.call(ne,oe)};EventEmitter$3.prototype.listenerCount=listenerCount;function listenerCount(ne){var oe=this._events;if(oe!==void 0){var ce=oe[ne];if(typeof ce=="function")return 1;if(ce!==void 0)return ce.length}return 0}EventEmitter$3.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(ne,oe){for(var ce=new Array(oe),ue=0;ue=oe?{done:!0}:{done:!1,value:ne[ce++]}})};Iterator$2.empty=function(){var ne=new Iterator$2(function(){return{done:!0}});return ne};Iterator$2.fromSequence=function(ne){var oe=0,ce=ne.length;return new Iterator$2(function(){return oe>=ce?{done:!0}:{done:!1,value:ne[oe++]}})};Iterator$2.is=function(ne){return ne instanceof Iterator$2?!0:typeof ne=="object"&&ne!==null&&typeof ne.next=="function"};var iterator=Iterator$2;const Iterator$3=getDefaultExportFromCjs(iterator);var support$1={};support$1.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";support$1.SYMBOL_SUPPORT=typeof Symbol<"u";var Iterator$1=iterator,support=support$1,ARRAY_BUFFER_SUPPORT=support.ARRAY_BUFFER_SUPPORT,SYMBOL_SUPPORT=support.SYMBOL_SUPPORT;function iterOrNull(ne){return typeof ne=="string"||Array.isArray(ne)||ARRAY_BUFFER_SUPPORT&&ArrayBuffer.isView(ne)?Iterator$1.fromSequence(ne):typeof ne!="object"||ne===null?null:SYMBOL_SUPPORT&&typeof ne[Symbol.iterator]=="function"?ne[Symbol.iterator]():typeof ne.next=="function"?ne:null}var iter$2=function(oe){var ce=iterOrNull(oe);if(!ce)throw new Error("obliterator: target is not iterable nor a valid iterator.");return ce},iter$1=iter$2,take=function(oe,ce){for(var ue=arguments.length>1?ce:1/0,pe=ue!==1/0?new Array(ue):[],me,ge=0,ye=iter$1(oe);;){if(ge===ue)return pe;if(me=ye.next(),me.done)return ge!==ce&&(pe.length=ge),pe;pe[ge++]=me.value}};const take$1=getDefaultExportFromCjs(take);var Iterator=iterator,iter=iter$2,chain=function(){var oe=arguments,ce=null,ue=-1;return new Iterator(function(){var me=null;do{if(ce===null){if(ue++,ue>=oe.length)return{done:!0};ce=iter(oe[ue])}if(me=ce.next(),me.done===!0){ce=null;continue}break}while(!0);return me})};const chain$1=getDefaultExportFromCjs(chain);function assignPolyfill(){const ne=arguments[0];for(let oe=1,ce=arguments.length;oene++}class GraphError extends Error{constructor(oe){super(),this.name="GraphError",this.message=oe}}class InvalidArgumentsGraphError extends GraphError{constructor(oe){super(oe),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,InvalidArgumentsGraphError.prototype.constructor)}}class NotFoundGraphError extends GraphError{constructor(oe){super(oe),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,NotFoundGraphError.prototype.constructor)}}class UsageGraphError extends GraphError{constructor(oe){super(oe),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,UsageGraphError.prototype.constructor)}}function MixedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}MixedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function DirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}DirectedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function UndirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}UndirectedNodeData.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function EdgeData(ne,oe,ce,ue,pe){this.key=oe,this.attributes=pe,this.undirected=ne,this.source=ce,this.target=ue}EdgeData.prototype.attach=function(){let ne="out",oe="in";this.undirected&&(ne=oe="undirected");const ce=this.source.key,ue=this.target.key;this.source[ne][ue]=this,!(this.undirected&&ce===ue)&&(this.target[oe][ce]=this)};EdgeData.prototype.attachMulti=function(){let ne="out",oe="in";const ce=this.source.key,ue=this.target.key;this.undirected&&(ne=oe="undirected");const pe=this.source[ne],me=pe[ue];if(typeof me>"u"){pe[ue]=this,this.undirected&&ce===ue||(this.target[oe][ce]=this);return}me.previous=this,this.next=me,pe[ue]=this,this.target[oe][ce]=this};EdgeData.prototype.detach=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),delete this.source[ce][oe],delete this.target[ue][ne]};EdgeData.prototype.detachMulti=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[ce][oe],delete this.target[ue][ne]):(this.next.previous=void 0,this.source[ce][oe]=this.next,this.target[ue][ne]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const NODE=0,SOURCE=1,TARGET=2,OPPOSITE=3;function findRelevantNodeData(ne,oe,ce,ue,pe,me,ge){let ye,ve,xe,_e;if(ue=""+ue,ce===NODE){if(ye=ne._nodes.get(ue),!ye)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" node in the graph.`);xe=pe,_e=me}else if(ce===OPPOSITE){if(pe=""+pe,ve=ne._edges.get(pe),!ve)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${pe}" edge in the graph.`);const Se=ve.source.key,$e=ve.target.key;if(ue===Se)ye=ve.target;else if(ue===$e)ye=ve.source;else throw new NotFoundGraphError(`Graph.${oe}: the "${ue}" node is not attached to the "${pe}" edge (${Se}, ${$e}).`);xe=me,_e=ge}else{if(ve=ne._edges.get(ue),!ve)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`);ce===SOURCE?ye=ve.source:ye=ve.target,xe=pe,_e=me}return[ye,xe,_e]}function attachNodeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes[ye]}}function attachNodeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){const[me]=findRelevantNodeData(this,oe,ce,ue,pe);return me.attributes}}function attachNodeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes.hasOwnProperty(ye)}}function attachNodeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,ve,xe]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);return ye.attributes[ve]=xe,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:ve}),this}}function attachNodeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,ve,xe]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);if(typeof xe!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);const _e=ye.attributes,Se=xe(_e[ve]);return _e[ve]=Se,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:ve}),this}}function attachNodeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return delete ge.attributes[ye],this.emit("nodeAttributesUpdated",{key:ge.key,type:"remove",attributes:ge.attributes,name:ye}),this}}function attachNodeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject$2(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return ge.attributes=ye,this.emit("nodeAttributesUpdated",{key:ge.key,type:"replace",attributes:ge.attributes}),this}}function attachNodeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject$2(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$5(ge.attributes,ye),this.emit("nodeAttributesUpdated",{key:ge.key,type:"merge",attributes:ge.attributes,data:ye}),this}}function attachNodeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return ge.attributes=ye(ge.attributes),this.emit("nodeAttributesUpdated",{key:ge.key,type:"update",attributes:ge.attributes}),this}}const NODE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachNodeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachNodeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachNodeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachNodeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachNodeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachNodeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachNodeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachNodeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachNodeAttributesUpdater}];function attachNodeAttributesMethods(ne){NODE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Node"),NODE),ce(ne,oe("Source"),SOURCE),ce(ne,oe("Target"),TARGET),ce(ne,oe("Opposite"),OPPOSITE)})}function attachEdgeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes[pe]}}function attachEdgeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue){let pe;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const me=""+ue,ge=""+arguments[1];if(pe=getMatchingEdge(this,me,ge,ce),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${me}" - "${ge}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,pe=this._edges.get(ue),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return pe.attributes}}function attachEdgeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes.hasOwnProperty(pe)}}function attachEdgeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,ve=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,ve,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${ve}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return ge.attributes[pe]=me,this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,ve=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,ve,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${ve}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof me!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);return ge.attributes[pe]=me(ge.attributes[pe]),this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return delete me.attributes[pe],this.emit("edgeAttributesUpdated",{key:me.key,type:"remove",attributes:me.attributes,name:pe}),this}}function attachEdgeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject$2(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return me.attributes=pe,this.emit("edgeAttributesUpdated",{key:me.key,type:"replace",attributes:me.attributes}),this}}function attachEdgeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject$2(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$5(me.attributes,pe),this.emit("edgeAttributesUpdated",{key:me.key,type:"merge",attributes:me.attributes,data:pe}),this}}function attachEdgeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof pe!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return me.attributes=pe(me.attributes),this.emit("edgeAttributesUpdated",{key:me.key,type:"update",attributes:me.attributes}),this}}const EDGE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachEdgeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachEdgeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachEdgeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachEdgeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachEdgeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachEdgeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachEdgeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachEdgeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachEdgeAttributesUpdater}];function attachEdgeAttributesMethods(ne){EDGE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Edge"),"mixed"),ce(ne,oe("DirectedEdge"),"directed"),ce(ne,oe("UndirectedEdge"),"undirected")})}const EDGES_ITERATION=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function forEachSimple(ne,oe,ce,ue){let pe=!1;for(const me in oe){if(me===ue)continue;const ge=oe[me];if(pe=ce(ge.key,ge.attributes,ge.source.key,ge.target.key,ge.source.attributes,ge.target.attributes,ge.undirected),ne&&pe)return ge.key}}function forEachMulti(ne,oe,ce,ue){let pe,me,ge,ye=!1;for(const ve in oe)if(ve!==ue){pe=oe[ve];do{if(me=pe.source,ge=pe.target,ye=ce(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected),ne&&ye)return pe.key;pe=pe.next}while(pe!==void 0)}}function createIterator(ne,oe){const ce=Object.keys(ne),ue=ce.length;let pe,me=0;return new Iterator$3(function(){do if(pe)pe=pe.next;else{if(me>=ue)return{done:!0};const ye=ce[me++];if(ye===oe){pe=void 0;continue}pe=ne[ye]}while(!pe);return{done:!1,value:{edge:pe.key,attributes:pe.attributes,source:pe.source.key,target:pe.target.key,sourceAttributes:pe.source.attributes,targetAttributes:pe.target.attributes,undirected:pe.undirected}}})}function forEachForKeySimple(ne,oe,ce,ue){const pe=oe[ce];if(!pe)return;const me=pe.source,ge=pe.target;if(ue(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected)&&ne)return pe.key}function forEachForKeyMulti(ne,oe,ce,ue){let pe=oe[ce];if(!pe)return;let me=!1;do{if(me=ue(pe.key,pe.attributes,pe.source.key,pe.target.key,pe.source.attributes,pe.target.attributes,pe.undirected),ne&&me)return pe.key;pe=pe.next}while(pe!==void 0)}function createIteratorForKey(ne,oe){let ce=ne[oe];return ce.next!==void 0?new Iterator$3(function(){if(!ce)return{done:!0};const ue={edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected};return ce=ce.next,{done:!1,value:ue}}):Iterator$3.of({edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected})}function createEdgeArray(ne,oe){if(ne.size===0)return[];if(oe==="mixed"||oe===ne.type)return typeof Array.from=="function"?Array.from(ne._edges.keys()):take$1(ne._edges.keys(),ne._edges.size);const ce=oe==="undirected"?ne.undirectedSize:ne.directedSize,ue=new Array(ce),pe=oe==="undirected",me=ne._edges.values();let ge=0,ye,ve;for(;ye=me.next(),ye.done!==!0;)ve=ye.value,ve.undirected===pe&&(ue[ge++]=ve.key);return ue}function forEachEdge(ne,oe,ce,ue){if(oe.size===0)return;const pe=ce!=="mixed"&&ce!==oe.type,me=ce==="undirected";let ge,ye,ve=!1;const xe=oe._edges.values();for(;ge=xe.next(),ge.done!==!0;){if(ye=ge.value,pe&&ye.undirected!==me)continue;const{key:_e,attributes:Se,source:$e,target:Re}=ye;if(ve=ue(_e,Se,$e.key,Re.key,$e.attributes,Re.attributes,ye.undirected),ne&&ve)return _e}}function createEdgeIterator(ne,oe){if(ne.size===0)return Iterator$3.empty();const ce=oe!=="mixed"&&oe!==ne.type,ue=oe==="undirected",pe=ne._edges.values();return new Iterator$3(function(){let ge,ye;for(;;){if(ge=pe.next(),ge.done)return ge;if(ye=ge.value,!(ce&&ye.undirected!==ue))break}return{value:{edge:ye.key,attributes:ye.attributes,source:ye.source.key,target:ye.target.key,sourceAttributes:ye.source.attributes,targetAttributes:ye.target.attributes,undirected:ye.undirected},done:!1}})}function forEachEdgeForNode(ne,oe,ce,ue,pe,me){const ge=oe?forEachMulti:forEachSimple;let ye;if(ce!=="undirected"&&(ue!=="out"&&(ye=ge(ne,pe.in,me),ne&&ye)||ue!=="in"&&(ye=ge(ne,pe.out,me,ue?void 0:pe.key),ne&&ye))||ce!=="directed"&&(ye=ge(ne,pe.undirected,me),ne&&ye))return ye}function createEdgeArrayForNode(ne,oe,ce,ue){const pe=[];return forEachEdgeForNode(!1,ne,oe,ce,ue,function(me){pe.push(me)}),pe}function createEdgeIteratorForNode(ne,oe,ce){let ue=Iterator$3.empty();return ne!=="undirected"&&(oe!=="out"&&typeof ce.in<"u"&&(ue=chain$1(ue,createIterator(ce.in))),oe!=="in"&&typeof ce.out<"u"&&(ue=chain$1(ue,createIterator(ce.out,oe?void 0:ce.key)))),ne!=="directed"&&typeof ce.undirected<"u"&&(ue=chain$1(ue,createIterator(ce.undirected))),ue}function forEachEdgeForPath(ne,oe,ce,ue,pe,me,ge){const ye=ce?forEachForKeyMulti:forEachForKeySimple;let ve;if(oe!=="undirected"&&(typeof pe.in<"u"&&ue!=="out"&&(ve=ye(ne,pe.in,me,ge),ne&&ve)||typeof pe.out<"u"&&ue!=="in"&&(ue||pe.key!==me)&&(ve=ye(ne,pe.out,me,ge),ne&&ve))||oe!=="directed"&&typeof pe.undirected<"u"&&(ve=ye(ne,pe.undirected,me,ge),ne&&ve))return ve}function createEdgeArrayForPath(ne,oe,ce,ue,pe){const me=[];return forEachEdgeForPath(!1,ne,oe,ce,ue,pe,function(ge){me.push(ge)}),me}function createEdgeIteratorForPath(ne,oe,ce,ue){let pe=Iterator$3.empty();return ne!=="undirected"&&(typeof ce.in<"u"&&oe!=="out"&&ue in ce.in&&(pe=chain$1(pe,createIteratorForKey(ce.in,ue))),typeof ce.out<"u"&&oe!=="in"&&ue in ce.out&&(oe||ce.key!==ue)&&(pe=chain$1(pe,createIteratorForKey(ce.out,ue)))),ne!=="directed"&&typeof ce.undirected<"u"&&ue in ce.undirected&&(pe=chain$1(pe,createIteratorForKey(ce.undirected,ue))),pe}function attachEdgeArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me,ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];if(!arguments.length)return createEdgeArray(this,ue);if(arguments.length===1){me=""+me;const ye=this._nodes.get(me);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createEdgeArrayForNode(this.multi,ue==="mixed"?this.type:ue,pe,ye)}if(arguments.length===2){me=""+me,ge=""+ge;const ye=this._nodes.get(me);if(!ye)throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" source node in the graph.`);if(!this._nodes.has(ge))throw new NotFoundGraphError(`Graph.${ce}: could not find the "${ge}" target node in the graph.`);return createEdgeArrayForPath(ue,this.multi,pe,ye,ge)}throw new InvalidArgumentsGraphError(`Graph.${ce}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachForEachEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(xe,_e,Se){if(!(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)){if(arguments.length===1)return Se=xe,forEachEdge(!1,this,ue,Se);if(arguments.length===2){xe=""+xe,Se=_e;const $e=this._nodes.get(xe);if(typeof $e>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" node in the graph.`);return forEachEdgeForNode(!1,this.multi,ue==="mixed"?this.type:ue,pe,$e,Se)}if(arguments.length===3){xe=""+xe,_e=""+_e;const $e=this._nodes.get(xe);if(!$e)throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" source node in the graph.`);if(!this._nodes.has(_e))throw new NotFoundGraphError(`Graph.${me}: could not find the "${_e}" target node in the graph.`);return forEachEdgeForPath(!1,ue,this.multi,pe,$e,_e,Se)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(){const xe=Array.prototype.slice.call(arguments),_e=xe.pop();let Se;if(xe.length===0){let $e=0;ue!=="directed"&&($e+=this.undirectedSize),ue!=="undirected"&&($e+=this.directedSize),Se=new Array($e);let Re=0;xe.push((Ae,Ie,ke,Be,Ne,Fe,Ue)=>{Se[Re++]=_e(Ae,Ie,ke,Be,Ne,Fe,Ue)})}else Se=[],xe.push(($e,Re,Ae,Ie,ke,Be,Ne)=>{Se.push(_e($e,Re,Ae,Ie,ke,Be,Ne))});return this[me].apply(this,xe),Se};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(){const xe=Array.prototype.slice.call(arguments),_e=xe.pop(),Se=[];return xe.push(($e,Re,Ae,Ie,ke,Be,Ne)=>{_e($e,Re,Ae,Ie,ke,Be,Ne)&&Se.push($e)}),this[me].apply(this,xe),Se};const ve="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ve]=function(){let xe=Array.prototype.slice.call(arguments);if(xe.length<2||xe.length>4)throw new InvalidArgumentsGraphError(`Graph.${ve}: invalid number of arguments (expecting 2, 3 or 4 and got ${xe.length}).`);if(typeof xe[xe.length-1]=="function"&&typeof xe[xe.length-2]!="function")throw new InvalidArgumentsGraphError(`Graph.${ve}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let _e,Se;xe.length===2?(_e=xe[0],Se=xe[1],xe=[]):xe.length===3?(_e=xe[1],Se=xe[2],xe=[xe[0]]):xe.length===4&&(_e=xe[2],Se=xe[3],xe=[xe[0],xe[1]]);let $e=Se;return xe.push((Re,Ae,Ie,ke,Be,Ne,Fe)=>{$e=_e($e,Re,Ae,Ie,ke,Be,Ne,Fe)}),this[me].apply(this,xe),$e}}function attachFindEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="find"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(ve,xe,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return!1;if(arguments.length===1)return _e=ve,forEachEdge(!0,this,ue,_e);if(arguments.length===2){ve=""+ve,_e=xe;const Se=this._nodes.get(ve);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" node in the graph.`);return forEachEdgeForNode(!0,this.multi,ue==="mixed"?this.type:ue,pe,Se,_e)}if(arguments.length===3){ve=""+ve,xe=""+xe;const Se=this._nodes.get(ve);if(!Se)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" source node in the graph.`);if(!this._nodes.has(xe))throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" target node in the graph.`);return forEachEdgeForPath(!0,ue,this.multi,pe,Se,xe,_e)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const ge="some"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ge]=function(){const ve=Array.prototype.slice.call(arguments),xe=ve.pop();return ve.push((Se,$e,Re,Ae,Ie,ke,Be)=>xe(Se,$e,Re,Ae,Ie,ke,Be)),!!this[me].apply(this,ve)};const ye="every"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ye]=function(){const ve=Array.prototype.slice.call(arguments),xe=ve.pop();return ve.push((Se,$e,Re,Ae,Ie,ke,Be)=>!xe(Se,$e,Re,Ae,Ie,ke,Be)),!this[me].apply(this,ve)}}function attachEdgeIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge,ye){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();if(!arguments.length)return createEdgeIterator(this,ue);if(arguments.length===1){ge=""+ge;const ve=this._nodes.get(ge);if(!ve)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createEdgeIteratorForNode(ue,pe,ve)}if(arguments.length===2){ge=""+ge,ye=""+ye;const ve=this._nodes.get(ge);if(!ve)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" source node in the graph.`);if(!this._nodes.has(ye))throw new NotFoundGraphError(`Graph.${me}: could not find the "${ye}" target node in the graph.`);return createEdgeIteratorForPath(ue,pe,ve,ye)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachEdgeIterationMethods(ne){EDGES_ITERATION.forEach(oe=>{attachEdgeArrayCreator(ne,oe),attachForEachEdge(ne,oe),attachFindEdge(ne,oe),attachEdgeIteratorCreator(ne,oe)})}const NEIGHBORS_ITERATION=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function CompositeSetWrapper(){this.A=null,this.B=null}CompositeSetWrapper.prototype.wrap=function(ne){this.A===null?this.A=ne:this.B===null&&(this.B=ne)};CompositeSetWrapper.prototype.has=function(ne){return this.A!==null&&ne in this.A||this.B!==null&&ne in this.B};function forEachInObjectOnce(ne,oe,ce,ue,pe){for(const me in ue){const ge=ue[me],ye=ge.source,ve=ge.target,xe=ye===ce?ve:ye;if(oe&&oe.has(xe.key))continue;const _e=pe(xe.key,xe.attributes);if(ne&&_e)return xe.key}}function forEachNeighbor(ne,oe,ce,ue,pe){if(oe!=="mixed"){if(oe==="undirected")return forEachInObjectOnce(ne,null,ue,ue.undirected,pe);if(typeof ce=="string")return forEachInObjectOnce(ne,null,ue,ue[ce],pe)}const me=new CompositeSetWrapper;let ge;if(oe!=="undirected"){if(ce!=="out"){if(ge=forEachInObjectOnce(ne,null,ue,ue.in,pe),ne&&ge)return ge;me.wrap(ue.in)}if(ce!=="in"){if(ge=forEachInObjectOnce(ne,me,ue,ue.out,pe),ne&&ge)return ge;me.wrap(ue.out)}}if(oe!=="directed"&&(ge=forEachInObjectOnce(ne,me,ue,ue.undirected,pe),ne&&ge))return ge}function createNeighborArrayForNode(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return Object.keys(ce.undirected);if(typeof oe=="string")return Object.keys(ce[oe])}const ue=[];return forEachNeighbor(!1,ne,oe,ce,function(pe){ue.push(pe)}),ue}function createDedupedObjectIterator(ne,oe,ce){const ue=Object.keys(ce),pe=ue.length;let me=0;return new Iterator$3(function(){let ye=null;do{if(me>=pe)return ne&&ne.wrap(ce),{done:!0};const ve=ce[ue[me++]],xe=ve.source,_e=ve.target;if(ye=xe===oe?_e:xe,ne&&ne.has(ye.key)){ye=null;continue}}while(ye===null);return{done:!1,value:{neighbor:ye.key,attributes:ye.attributes}}})}function createNeighborIterator(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return createDedupedObjectIterator(null,ce,ce.undirected);if(typeof oe=="string")return createDedupedObjectIterator(null,ce,ce[oe])}let ue=Iterator$3.empty();const pe=new CompositeSetWrapper;return ne!=="undirected"&&(oe!=="out"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.in))),oe!=="in"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.out)))),ne!=="directed"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.undirected))),ue}function attachNeighborArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];me=""+me;const ge=this._nodes.get(me);if(typeof ge>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createNeighborArrayForNode(ue==="mixed"?this.type:ue,pe,ge)}}function attachForEachNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(xe,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;xe=""+xe;const Se=this._nodes.get(xe);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" node in the graph.`);forEachNeighbor(!1,ue==="mixed"?this.type:ue,pe,Se,_e)};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(xe,_e){const Se=[];return this[me](xe,($e,Re)=>{Se.push(_e($e,Re))}),Se};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(xe,_e){const Se=[];return this[me](xe,($e,Re)=>{_e($e,Re)&&Se.push($e)}),Se};const ve="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ve]=function(xe,_e,Se){if(arguments.length<3)throw new InvalidArgumentsGraphError(`Graph.${ve}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let $e=Se;return this[me](xe,(Re,Ae)=>{$e=_e($e,Re,Ae)}),$e}}function attachFindNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce[0].toUpperCase()+ce.slice(1,-1),ge="find"+me;ne.prototype[ge]=function(xe,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;xe=""+xe;const Se=this._nodes.get(xe);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${ge}: could not find the "${xe}" node in the graph.`);return forEachNeighbor(!0,ue==="mixed"?this.type:ue,pe,Se,_e)};const ye="some"+me;ne.prototype[ye]=function(xe,_e){return!!this[ge](xe,_e)};const ve="every"+me;ne.prototype[ve]=function(xe,_e){return!this[ge](xe,($e,Re)=>!_e($e,Re))}}function attachNeighborIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();ge=""+ge;const ye=this._nodes.get(ge);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createNeighborIterator(ue==="mixed"?this.type:ue,pe,ye)}}function attachNeighborIterationMethods(ne){NEIGHBORS_ITERATION.forEach(oe=>{attachNeighborArrayCreator(ne,oe),attachForEachNeighbor(ne,oe),attachFindNeighbor(ne,oe),attachNeighborIteratorCreator(ne,oe)})}function forEachAdjacency(ne,oe,ce,ue,pe){const me=ue._nodes.values(),ge=ue.type;let ye,ve,xe,_e,Se,$e,Re;for(;ye=me.next(),ye.done!==!0;){let Ae=!1;if(ve=ye.value,ge!=="undirected"){_e=ve.out;for(xe in _e){Se=_e[xe];do{if($e=Se.target,Ae=!0,Re=pe(ve.key,$e.key,ve.attributes,$e.attributes,Se.key,Se.attributes,Se.undirected),ne&&Re)return Se;Se=Se.next}while(Se)}}if(ge!=="directed"){_e=ve.undirected;for(xe in _e)if(!(oe&&ve.key>xe)){Se=_e[xe];do{if($e=Se.target,$e.key!==xe&&($e=Se.source),Ae=!0,Re=pe(ve.key,$e.key,ve.attributes,$e.attributes,Se.key,Se.attributes,Se.undirected),ne&&Re)return Se;Se=Se.next}while(Se)}}if(ce&&!Ae&&(Re=pe(ve.key,null,ve.attributes,null,null,null,null),ne&&Re))return null}}function serializeNode(ne,oe){const ce={key:ne};return isEmpty(oe.attributes)||(ce.attributes=assign$5({},oe.attributes)),ce}function serializeEdge(ne,oe,ce){const ue={key:oe,source:ce.source.key,target:ce.target.key};return isEmpty(ce.attributes)||(ue.attributes=assign$5({},ce.attributes)),ne==="mixed"&&ce.undirected&&(ue.undirected=!0),ue}function validateSerializedNode(ne){if(!isPlainObject$2(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized node is missing its key.");if("attributes"in ne&&(!isPlainObject$2(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function validateSerializedEdge(ne){if(!isPlainObject$2(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its source.");if(!("target"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its target.");if("attributes"in ne&&(!isPlainObject$2(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in ne&&typeof ne.undirected!="boolean")throw new InvalidArgumentsGraphError("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const INSTANCE_ID=incrementalIdStartingFromRandomByte(),TYPES$1=new Set(["directed","undirected","mixed"]),EMITTER_PROPS=new Set(["domain","_events","_eventsCount","_maxListeners"]),EDGE_ADD_METHODS=[{name:ne=>`${ne}Edge`,generateKey:!0},{name:ne=>`${ne}DirectedEdge`,generateKey:!0,type:"directed"},{name:ne=>`${ne}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:ne=>`${ne}EdgeWithKey`},{name:ne=>`${ne}DirectedEdgeWithKey`,type:"directed"},{name:ne=>`${ne}UndirectedEdgeWithKey`,type:"undirected"}],DEFAULTS={allowSelfLoops:!0,multi:!1,type:"mixed"};function addNode(ne,oe,ce){if(ce&&!isPlainObject$2(ce))throw new InvalidArgumentsGraphError(`Graph.addNode: invalid attributes. Expecting an object but got "${ce}"`);if(oe=""+oe,ce=ce||{},ne._nodes.has(oe))throw new UsageGraphError(`Graph.addNode: the "${oe}" node already exist in the graph.`);const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function unsafeAddNode(ne,oe,ce){const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function addEdge(ne,oe,ce,ue,pe,me,ge,ye){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(ye&&!isPlainObject$2(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`);if(me=""+me,ge=""+ge,ye=ye||{},!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const ve=ne._nodes.get(me),xe=ne._nodes.get(ge);if(!ve)throw new NotFoundGraphError(`Graph.${oe}: source node "${me}" not found.`);if(!xe)throw new NotFoundGraphError(`Graph.${oe}: target node "${ge}" not found.`);const _e={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);if(!ne.multi&&(ue?typeof ve.undirected[ge]<"u":typeof ve.out[ge]<"u"))throw new UsageGraphError(`Graph.${oe}: an edge linking "${me}" to "${ge}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const Se=new EdgeData(ue,pe,ve,xe,ye);ne._edges.set(pe,Se);const $e=me===ge;return ue?(ve.undirectedDegree++,xe.undirectedDegree++,$e&&(ve.undirectedLoops++,ne._undirectedSelfLoopCount++)):(ve.outDegree++,xe.inDegree++,$e&&(ve.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?Se.attachMulti():Se.attach(),ue?ne._undirectedSize++:ne._directedSize++,_e.key=pe,ne.emit("edgeAdded",_e),pe}function mergeEdge(ne,oe,ce,ue,pe,me,ge,ye,ve){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(ye){if(ve){if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid updater function. Expecting a function but got "${ye}"`)}else if(!isPlainObject$2(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`)}me=""+me,ge=""+ge;let xe;if(ve&&(xe=ye,ye=void 0),!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let _e=ne._nodes.get(me),Se=ne._nodes.get(ge),$e,Re;if(!ce&&($e=ne._edges.get(pe),$e)){if(($e.source.key!==me||$e.target.key!==ge)&&(!ue||$e.source.key!==ge||$e.target.key!==me))throw new UsageGraphError(`Graph.${oe}: inconsistency detected when attempting to merge the "${pe}" edge with "${me}" source & "${ge}" target vs. ("${$e.source.key}", "${$e.target.key}").`);Re=$e}if(!Re&&!ne.multi&&_e&&(Re=ue?_e.undirected[ge]:_e.out[ge]),Re){const Ne=[Re.key,!1,!1,!1];if(ve?!xe:!ye)return Ne;if(ve){const Fe=Re.attributes;Re.attributes=xe(Fe),ne.emit("edgeAttributesUpdated",{type:"replace",key:Re.key,attributes:Re.attributes})}else assign$5(Re.attributes,ye),ne.emit("edgeAttributesUpdated",{type:"merge",key:Re.key,attributes:Re.attributes,data:ye});return Ne}ye=ye||{},ve&&xe&&(ye=xe(ye));const Ae={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);let Ie=!1,ke=!1;_e||(_e=unsafeAddNode(ne,me,{}),Ie=!0,me===ge&&(Se=_e,ke=!0)),Se||(Se=unsafeAddNode(ne,ge,{}),ke=!0),$e=new EdgeData(ue,pe,_e,Se,ye),ne._edges.set(pe,$e);const Be=me===ge;return ue?(_e.undirectedDegree++,Se.undirectedDegree++,Be&&(_e.undirectedLoops++,ne._undirectedSelfLoopCount++)):(_e.outDegree++,Se.inDegree++,Be&&(_e.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?$e.attachMulti():$e.attach(),ue?ne._undirectedSize++:ne._directedSize++,Ae.key=pe,ne.emit("edgeAdded",Ae),[pe,!0,Ie,ke]}function dropEdgeFromData(ne,oe){ne._edges.delete(oe.key);const{source:ce,target:ue,attributes:pe}=oe,me=oe.undirected,ge=ce===ue;me?(ce.undirectedDegree--,ue.undirectedDegree--,ge&&(ce.undirectedLoops--,ne._undirectedSelfLoopCount--)):(ce.outDegree--,ue.inDegree--,ge&&(ce.directedLoops--,ne._directedSelfLoopCount--)),ne.multi?oe.detachMulti():oe.detach(),me?ne._undirectedSize--:ne._directedSize--,ne.emit("edgeDropped",{key:oe.key,attributes:pe,source:ce.key,target:ue.key,undirected:me})}class Graph extends eventsExports.EventEmitter{constructor(oe){if(super(),oe=assign$5({},DEFAULTS,oe),typeof oe.multi!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${oe.multi}".`);if(!TYPES$1.has(oe.type))throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${oe.type}".`);if(typeof oe.allowSelfLoops!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${oe.allowSelfLoops}".`);const ce=oe.type==="mixed"?MixedNodeData:oe.type==="directed"?DirectedNodeData:UndirectedNodeData;privateProperty(this,"NodeDataClass",ce);const ue="geid_"+INSTANCE_ID()+"_";let pe=0;const me=()=>{let ge;do ge=ue+pe++;while(this._edges.has(ge));return ge};privateProperty(this,"_attributes",{}),privateProperty(this,"_nodes",new Map),privateProperty(this,"_edges",new Map),privateProperty(this,"_directedSize",0),privateProperty(this,"_undirectedSize",0),privateProperty(this,"_directedSelfLoopCount",0),privateProperty(this,"_undirectedSelfLoopCount",0),privateProperty(this,"_edgeKeyGenerator",me),privateProperty(this,"_options",oe),EMITTER_PROPS.forEach(ge=>privateProperty(this,ge,this[ge])),readOnlyProperty(this,"order",()=>this._nodes.size),readOnlyProperty(this,"size",()=>this._edges.size),readOnlyProperty(this,"directedSize",()=>this._directedSize),readOnlyProperty(this,"undirectedSize",()=>this._undirectedSize),readOnlyProperty(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),readOnlyProperty(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),readOnlyProperty(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),readOnlyProperty(this,"multi",this._options.multi),readOnlyProperty(this,"type",this._options.type),readOnlyProperty(this,"allowSelfLoops",this._options.allowSelfLoops),readOnlyProperty(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(oe){return this._nodes.has(""+oe)}hasDirectedEdge(oe,ce){if(this.type==="undirected")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&!pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.out.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(oe,ce){if(this.type==="directed")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(oe,ce){if(arguments.length===1){const ue=""+oe;return this._edges.has(ue)}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?typeof ue.out<"u"&&ue.out.hasOwnProperty(ce)||typeof ue.undirected<"u"&&ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(oe,ce){if(this.type==="undirected")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||void 0;if(pe)return pe.key}undirectedEdge(oe,ce){if(this.type==="directed")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}edge(oe,ce){if(this.multi)throw new UsageGraphError("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.edge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.edge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}areDirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areDirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in||ce in ue.out}areOutNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.out}areInNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in}areUndirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areUndirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="directed"?!1:ce in ue.undirected}areNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&(ce in ue.in||ce in ue.out)||this.type!=="directed"&&ce in ue.undirected}areInboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.in||this.type!=="directed"&&ce in ue.undirected}areOutboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.out||this.type!=="directed"&&ce in ue.undirected}inDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree}outDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree}directedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree}undirectedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegree: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree}inboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree),ue}outboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.outDegree),ue}degree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree),ue}inDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree-ce.directedLoops}outDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree-ce.directedLoops}directedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree-ce.directedLoops*2}undirectedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree-ce.undirectedLoops*2}inboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree,pe+=ce.directedLoops),ue-pe}outboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.outDegree,pe+=ce.directedLoops),ue-pe}degreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree,pe+=ce.directedLoops*2),ue-pe}source(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.source: could not find the "${oe}" edge in the graph.`);return ce.source.key}target(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.target: could not find the "${oe}" edge in the graph.`);return ce.target.key}extremities(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.extremities: could not find the "${oe}" edge in the graph.`);return[ce.source.key,ce.target.key]}opposite(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(ce);if(!ue)throw new NotFoundGraphError(`Graph.opposite: could not find the "${ce}" edge in the graph.`);const pe=ue.source.key,me=ue.target.key;if(oe===pe)return me;if(oe===me)return pe;throw new NotFoundGraphError(`Graph.opposite: the "${oe}" node is not attached to the "${ce}" edge (${pe}, ${me}).`)}hasExtremity(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.hasExtremity: could not find the "${oe}" edge in the graph.`);return ue.source.key===ce||ue.target.key===ce}isUndirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isUndirected: could not find the "${oe}" edge in the graph.`);return ce.undirected}isDirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isDirected: could not find the "${oe}" edge in the graph.`);return!ce.undirected}isSelfLoop(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isSelfLoop: could not find the "${oe}" edge in the graph.`);return ce.source===ce.target}addNode(oe,ce){return addNode(this,oe,ce).key}mergeNode(oe,ce){if(ce&&!isPlainObject$2(ce))throw new InvalidArgumentsGraphError(`Graph.mergeNode: invalid attributes. Expecting an object but got "${ce}"`);oe=""+oe,ce=ce||{};let ue=this._nodes.get(oe);return ue?(ce&&(assign$5(ue.attributes,ce),this.emit("nodeAttributesUpdated",{type:"merge",key:oe,attributes:ue.attributes,data:ce})),[oe,!1]):(ue=new this.NodeDataClass(oe,ce),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:ce}),[oe,!0])}updateNode(oe,ce){if(ce&&typeof ce!="function")throw new InvalidArgumentsGraphError(`Graph.updateNode: invalid updater function. Expecting a function but got "${ce}"`);oe=""+oe;let ue=this._nodes.get(oe);if(ue){if(ce){const me=ue.attributes;ue.attributes=ce(me),this.emit("nodeAttributesUpdated",{type:"replace",key:oe,attributes:ue.attributes})}return[oe,!1]}const pe=ce?ce({}):{};return ue=new this.NodeDataClass(oe,pe),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:pe}),[oe,!0]}dropNode(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.dropNode: could not find the "${oe}" node in the graph.`);let ue;if(this.type!=="undirected"){for(const pe in ce.out){ue=ce.out[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}for(const pe in ce.in){ue=ce.in[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}}if(this.type!=="directed")for(const pe in ce.undirected){ue=ce.undirected[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}this._nodes.delete(oe),this.emit("nodeDropped",{key:oe,attributes:ce.attributes})}dropEdge(oe){let ce;if(arguments.length>1){const ue=""+arguments[0],pe=""+arguments[1];if(ce=getMatchingEdge(this,ue,pe,this.type),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${ue}" -> "${pe}" edge in the graph.`)}else if(oe=""+oe,ce=this._edges.get(oe),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${oe}" edge in the graph.`);return dropEdgeFromData(this,ce),this}dropDirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");oe=""+oe,ce=""+ce;const ue=getMatchingEdge(this,oe,ce,"directed");if(!ue)throw new NotFoundGraphError(`Graph.dropDirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}dropUndirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const ue=getMatchingEdge(this,oe,ce,"undirected");if(!ue)throw new NotFoundGraphError(`Graph.dropUndirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const oe=this._nodes.values();let ce;for(;ce=oe.next(),ce.done!==!0;)ce.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(oe){return this._attributes[oe]}getAttributes(){return this._attributes}hasAttribute(oe){return this._attributes.hasOwnProperty(oe)}setAttribute(oe,ce){return this._attributes[oe]=ce,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}updateAttribute(oe,ce){if(typeof ce!="function")throw new InvalidArgumentsGraphError("Graph.updateAttribute: updater should be a function.");const ue=this._attributes[oe];return this._attributes[oe]=ce(ue),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}removeAttribute(oe){return delete this._attributes[oe],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:oe}),this}replaceAttributes(oe){if(!isPlainObject$2(oe))throw new InvalidArgumentsGraphError("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=oe,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(oe){if(!isPlainObject$2(oe))throw new InvalidArgumentsGraphError("Graph.mergeAttributes: provided attributes are not a plain object.");return assign$5(this._attributes,oe),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:oe}),this}updateAttributes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateAttributes: provided updater is not a function.");return this._attributes=oe(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._nodes.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,me.attributes=oe(me.key,me.attributes);this.emit("eachNodeAttributesUpdated",{hints:ce||null})}updateEachEdgeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._edges.values();let pe,me,ge,ye;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,ge=me.source,ye=me.target,me.attributes=oe(me.key,me.attributes,ge.key,ye.key,ge.attributes,ye.attributes,me.undirected);this.emit("eachEdgeAttributesUpdated",{hints:ce||null})}forEachAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!1,!1,this,oe)}forEachAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!1,!0,this,oe)}forEachAssymetricAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!0,!1,this,oe)}forEachAssymetricAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!0,!0,this,oe)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):take$1(this._nodes.keys(),this._nodes.size)}forEachNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)}findNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.findNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return pe.key}mapNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.mapNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=new Array(this.order);let ge=0;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,me[ge++]=oe(pe.key,pe.attributes);return me}someNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.someNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return!0;return!1}everyNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.everyNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,!oe(pe.key,pe.attributes))return!1;return!0}filterNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.filterNodes: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=[];for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)&&me.push(pe.key);return me}reduceNodes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new InvalidArgumentsGraphError("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let ue=ce;const pe=this._nodes.values();let me,ge;for(;me=pe.next(),me.done!==!0;)ge=me.value,ue=oe(ue,ge.key,ge.attributes);return ue}nodeEntries(){const oe=this._nodes.values();return new Iterator$3(()=>{const ce=oe.next();if(ce.done)return ce;const ue=ce.value;return{value:{node:ue.key,attributes:ue.attributes},done:!1}})}export(){const oe=new Array(this._nodes.size);let ce=0;this._nodes.forEach((pe,me)=>{oe[ce++]=serializeNode(me,pe)});const ue=new Array(this._edges.size);return ce=0,this._edges.forEach((pe,me)=>{ue[ce++]=serializeEdge(this.type,me,pe)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:oe,edges:ue}}import(oe,ce=!1){if(oe instanceof Graph)return oe.forEachNode((ve,xe)=>{ce?this.mergeNode(ve,xe):this.addNode(ve,xe)}),oe.forEachEdge((ve,xe,_e,Se,$e,Re,Ae)=>{ce?Ae?this.mergeUndirectedEdgeWithKey(ve,_e,Se,xe):this.mergeDirectedEdgeWithKey(ve,_e,Se,xe):Ae?this.addUndirectedEdgeWithKey(ve,_e,Se,xe):this.addDirectedEdgeWithKey(ve,_e,Se,xe)}),this;if(!isPlainObject$2(oe))throw new InvalidArgumentsGraphError("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(oe.attributes){if(!isPlainObject$2(oe.attributes))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Expecting a plain object.");ce?this.mergeAttributes(oe.attributes):this.replaceAttributes(oe.attributes)}let ue,pe,me,ge,ye;if(oe.nodes){if(me=oe.nodes,!Array.isArray(me))throw new InvalidArgumentsGraphError("Graph.import: invalid nodes. Expecting an array.");for(ue=0,pe=me.length;ue{const me=assign$5({},ue.attributes);ue=new ce.NodeDataClass(pe,me),ce._nodes.set(pe,ue)}),ce}copy(oe){if(oe=oe||{},typeof oe.type=="string"&&oe.type!==this.type&&oe.type!=="mixed")throw new UsageGraphError(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${oe.type}" because this would mean losing information about the current graph.`);if(typeof oe.multi=="boolean"&&oe.multi!==this.multi&&oe.multi!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof oe.allowSelfLoops=="boolean"&&oe.allowSelfLoops!==this.allowSelfLoops&&oe.allowSelfLoops!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const ce=this.emptyCopy(oe),ue=this._edges.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,addEdge(ce,"copy",!1,me.undirected,me.key,me.source.key,me.target.key,assign$5({},me.attributes));return ce}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const oe={};this._nodes.forEach((me,ge)=>{oe[ge]=me.attributes});const ce={},ue={};this._edges.forEach((me,ge)=>{const ye=me.undirected?"--":"->";let ve="",xe=me.source.key,_e=me.target.key,Se;me.undirected&&xe>_e&&(Se=xe,xe=_e,_e=Se);const $e=`(${xe})${ye}(${_e})`;ge.startsWith("geid_")?this.multi&&(typeof ue[$e]>"u"?ue[$e]=0:ue[$e]++,ve+=`${ue[$e]}. `):ve+=`[${ge}]: `,ve+=$e,ce[ve]=me.attributes});const pe={};for(const me in this)this.hasOwnProperty(me)&&!EMITTER_PROPS.has(me)&&typeof this[me]!="function"&&typeof me!="symbol"&&(pe[me]=this[me]);return pe.attributes=this._attributes,pe.nodes=oe,pe.edges=ce,privateProperty(pe,"constructor",this.constructor),pe}}typeof Symbol<"u"&&(Graph.prototype[Symbol.for("nodejs.util.inspect.custom")]=Graph.prototype.inspect);EDGE_ADD_METHODS.forEach(ne=>{["add","merge","update"].forEach(oe=>{const ce=ne.name(oe),ue=oe==="add"?addEdge:mergeEdge;ne.generateKey?Graph.prototype[ce]=function(pe,me,ge){return ue(this,ce,!0,(ne.type||this.type)==="undirected",null,pe,me,ge,oe==="update")}:Graph.prototype[ce]=function(pe,me,ge,ye){return ue(this,ce,!1,(ne.type||this.type)==="undirected",pe,me,ge,ye,oe==="update")}})});attachNodeAttributesMethods(Graph);attachEdgeAttributesMethods(Graph);attachEdgeIterationMethods(Graph);attachNeighborIterationMethods(Graph);class DirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"directed"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('DirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class UndirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"undirected"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('UndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiGraph extends Graph{constructor(oe){const ce=assign$5({multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(ce)}}class MultiDirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"directed",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('MultiDirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiUndirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"undirected",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('MultiUndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}function attachStaticFromMethod(ne){ne.from=function(oe,ce){const ue=assign$5({},oe.options,ce),pe=new ne(ue);return pe.import(oe),pe}}attachStaticFromMethod(Graph);attachStaticFromMethod(DirectedGraph);attachStaticFromMethod(UndirectedGraph);attachStaticFromMethod(MultiGraph);attachStaticFromMethod(MultiDirectedGraph);attachStaticFromMethod(MultiUndirectedGraph);Graph.Graph=Graph;Graph.DirectedGraph=DirectedGraph;Graph.UndirectedGraph=UndirectedGraph;Graph.MultiGraph=MultiGraph;Graph.MultiDirectedGraph=MultiDirectedGraph;Graph.MultiUndirectedGraph=MultiUndirectedGraph;Graph.InvalidArgumentsGraphError=InvalidArgumentsGraphError;Graph.NotFoundGraphError=NotFoundGraphError;Graph.UsageGraphError=UsageGraphError;function _classCallCheck$2(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function toPrimitive$1(ne,oe){if(typeof ne!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(typeof ue!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function toPropertyKey$1(ne){var oe=toPrimitive$1(ne,"string");return typeof oe=="symbol"?oe:String(oe)}function _defineProperties$2(ne,oe){for(var ce=0;cene.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce>>16,ce=(ne&65280)>>>8,ue=ne&255,pe=255,me=rgbaToFloat(oe,ce,ue,pe,!0);return FLOAT_INDEX_CACHE[ne]=me,me}function colorToIndex(ne,oe,ce,ue){return ce+(oe<<8)+(ne<<16)}function getPixelColor(ne,oe,ce,ue,pe,me){var ge=Math.floor(ce/me*pe),ye=Math.floor(ne.drawingBufferHeight/me-ue/me*pe),ve=new Uint8Array(4);ne.bindFramebuffer(ne.FRAMEBUFFER,oe),ne.readPixels(ge,ye,1,1,ne.RGBA,ne.UNSIGNED_BYTE,ve);var xe=_slicedToArray$1(ve,4),_e=xe[0],Se=xe[1],$e=xe[2],Re=xe[3];return[_e,Se,$e,Re]}function _defineProperty$2(ne,oe,ce){return oe=toPropertyKey$1(oe),oe in ne?Object.defineProperty(ne,oe,{value:ce,enumerable:!0,configurable:!0,writable:!0}):ne[oe]=ce,ne}function ownKeys$1(ne,oe){var ce=Object.keys(ne);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ne);oe&&(ue=ue.filter(function(pe){return Object.getOwnPropertyDescriptor(ne,pe).enumerable})),ce.push.apply(ce,ue)}return ce}function _objectSpread2$1(ne){for(var oe=1;oeve){ye=_e,ve=Se;continue}}ye&&(pe[paletteMapKey(ge)]=ye)}return pe}function matchPaletteLab(ne,oe,ce){let ue,pe,me=oe[0],ge=ciede2000(ne,me);for(let ye=1,ve=oe.length;yege)&&(me=ue,ge=pe);return me}function mapPaletteLab(ne,oe,ce){const ue={},pe=ce==="furthest";for(let me=0;me{let oe=hexRgb(ne);return{R:oe[0],G:oe[1],B:oe[2]}},pantoneRGBList=pantones.map(ne=>get_rgbObject(ne.hex));var getClosestColor=ne=>{const oe=get_rgbObject(ne),ce=diff.closest(oe,pantoneRGBList),ue=rgbHex(ce.R,ce.G,ce.B),pe=pantones.findIndex(ge=>ge.hex==`#${ue}`);return pantones[pe]};function u$6(){return(u$6=Object.assign||function(ne){for(var oe=1;oe=0||(pe[ce]=ne[ce]);return pe}function i$6(ne){var oe=reactExports.useRef(ne),ce=reactExports.useRef(function(ue){oe.current&&oe.current(ue)});return oe.current=ne,ce.current}var s$3=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=1),ne>ce?ce:ne0:ke.buttons>0)&&pe.current?me(d$6(pe.current,ke,ye.current)):Ie(!1)},Ae=function(){return Ie(!1)};function Ie(ke){var Be=ve.current,Ne=v$7(pe.current),Fe=ke?Ne.addEventListener:Ne.removeEventListener;Fe(Be?"touchmove":"mousemove",Re),Fe(Be?"touchend":"mouseup",Ae)}return[function(ke){var Be=ke.nativeEvent,Ne=pe.current;if(Ne&&(h$8(Be),!function(Ue,We){return We&&!f$6(Ue)}(Be,ve.current)&&Ne)){if(f$6(Be)){ve.current=!0;var Fe=Be.changedTouches||[];Fe.length&&(ye.current=Fe[0].identifier)}Ne.focus(),me(d$6(Ne,Be,ye.current)),Ie(!0)}},function(ke){var Be=ke.which||ke.keyCode;Be<37||Be>40||(ke.preventDefault(),ge({left:Be===39?.05:Be===37?-.05:0,top:Be===40?.05:Be===38?-.05:0}))},Ie]},[ge,me]),_e=xe[0],Se=xe[1],$e=xe[2];return reactExports.useEffect(function(){return $e},[$e]),React$2.createElement("div",u$6({},ue,{onTouchStart:_e,onMouseDown:_e,className:"react-colorful__interactive",ref:pe,onKeyDown:Se,tabIndex:0,role:"slider"}))}),g$5=function(ne){return ne.filter(Boolean).join(" ")},p$7=function(ne){var oe=ne.color,ce=ne.left,ue=ne.top,pe=ue===void 0?.5:ue,me=g$5(["react-colorful__pointer",ne.className]);return React$2.createElement("div",{className:me,style:{top:100*pe+"%",left:100*ce+"%"}},React$2.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:oe}}))},b$6=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=Math.pow(10,oe)),Math.round(ce*ne)/ce},x$3=function(ne){return L$3(C$4(ne))},C$4=function(ne){return ne[0]==="#"&&(ne=ne.substring(1)),ne.length<6?{r:parseInt(ne[0]+ne[0],16),g:parseInt(ne[1]+ne[1],16),b:parseInt(ne[2]+ne[2],16),a:ne.length===4?b$6(parseInt(ne[3]+ne[3],16)/255,2):1}:{r:parseInt(ne.substring(0,2),16),g:parseInt(ne.substring(2,4),16),b:parseInt(ne.substring(4,6),16),a:ne.length===8?b$6(parseInt(ne.substring(6,8),16)/255,2):1}},w$6=function(ne){return K$3(I$3(ne))},y$4=function(ne){var oe=ne.s,ce=ne.v,ue=ne.a,pe=(200-oe)*ce/100;return{h:b$6(ne.h),s:b$6(pe>0&&pe<200?oe*ce/100/(pe<=100?pe:200-pe)*100:0),l:b$6(pe/2),a:b$6(ue,2)}},q$6=function(ne){var oe=y$4(ne);return"hsl("+oe.h+", "+oe.s+"%, "+oe.l+"%)"},I$3=function(ne){var oe=ne.h,ce=ne.s,ue=ne.v,pe=ne.a;oe=oe/360*6,ce/=100,ue/=100;var me=Math.floor(oe),ge=ue*(1-ce),ye=ue*(1-(oe-me)*ce),ve=ue*(1-(1-oe+me)*ce),xe=me%6;return{r:b$6(255*[ue,ye,ge,ge,ve,ue][xe]),g:b$6(255*[ve,ue,ue,ye,ge,ge][xe]),b:b$6(255*[ge,ge,ve,ue,ue,ye][xe]),a:b$6(pe,2)}},D$4=function(ne){var oe=ne.toString(16);return oe.length<2?"0"+oe:oe},K$3=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=pe<1?D$4(b$6(255*pe)):"";return"#"+D$4(oe)+D$4(ce)+D$4(ue)+me},L$3=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=Math.max(oe,ce,ue),ge=me-Math.min(oe,ce,ue),ye=ge?me===oe?(ce-ue)/ge:me===ce?2+(ue-oe)/ge:4+(oe-ce)/ge:0;return{h:b$6(60*(ye<0?ye+6:ye)),s:b$6(me?ge/me*100:0),v:b$6(me/255*100),a:pe}},S$4=React$2.memo(function(ne){var oe=ne.hue,ce=ne.onChange,ue=g$5(["react-colorful__hue",ne.className]);return React$2.createElement("div",{className:ue},React$2.createElement(m$6,{onMove:function(pe){ce({h:360*pe.left})},onKey:function(pe){ce({h:s$3(oe+360*pe.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$6(oe),"aria-valuemax":"360","aria-valuemin":"0"},React$2.createElement(p$7,{className:"react-colorful__hue-pointer",left:oe/360,color:q$6({h:oe,s:100,v:100,a:1})})))}),T$3=React$2.memo(function(ne){var oe=ne.hsva,ce=ne.onChange,ue={backgroundColor:q$6({h:oe.h,s:100,v:100,a:1})};return React$2.createElement("div",{className:"react-colorful__saturation",style:ue},React$2.createElement(m$6,{onMove:function(pe){ce({s:100*pe.left,v:100-100*pe.top})},onKey:function(pe){ce({s:s$3(oe.s+100*pe.left,0,100),v:s$3(oe.v-100*pe.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$6(oe.s)+"%, Brightness "+b$6(oe.v)+"%"},React$2.createElement(p$7,{className:"react-colorful__saturation-pointer",top:1-oe.v/100,left:oe.s/100,color:q$6(oe)})))}),F$3=function(ne,oe){if(ne===oe)return!0;for(var ce in ne)if(ne[ce]!==oe[ce])return!1;return!0},X$3=function(ne,oe){return ne.toLowerCase()===oe.toLowerCase()||F$3(C$4(ne),C$4(oe))};function Y$4(ne,oe,ce){var ue=i$6(ce),pe=reactExports.useState(function(){return ne.toHsva(oe)}),me=pe[0],ge=pe[1],ye=reactExports.useRef({color:oe,hsva:me});reactExports.useEffect(function(){if(!ne.equal(oe,ye.current.color)){var xe=ne.toHsva(oe);ye.current={hsva:xe,color:oe},ge(xe)}},[oe,ne]),reactExports.useEffect(function(){var xe;F$3(me,ye.current.hsva)||ne.equal(xe=ne.fromHsva(me),ye.current.color)||(ye.current={hsva:me,color:xe},ue(xe))},[me,ne,ue]);var ve=reactExports.useCallback(function(xe){ge(function(_e){return Object.assign({},_e,xe)})},[]);return[me,ve]}var V$3=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$5=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$3=new Map,Q$3=function(ne){V$3(function(){var oe=ne.current?ne.current.ownerDocument:document;if(oe!==void 0&&!J$3.has(oe)){var ce=oe.createElement("style");ce.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$3.set(oe,ce);var ue=$$5();ue&&ce.setAttribute("nonce",ue),oe.head.appendChild(ce)}},[])},U$3=function(ne){var oe=ne.className,ce=ne.colorModel,ue=ne.color,pe=ue===void 0?ce.defaultColor:ue,me=ne.onChange,ge=c$4(ne,["className","colorModel","color","onChange"]),ye=reactExports.useRef(null);Q$3(ye);var ve=Y$4(ce,pe,me),xe=ve[0],_e=ve[1],Se=g$5(["react-colorful",oe]);return React$2.createElement("div",u$6({},ge,{ref:ye,className:Se}),React$2.createElement(T$3,{hsva:xe,onChange:_e}),React$2.createElement(S$4,{hue:xe.h,onChange:_e,className:"react-colorful__last-control"}))},W$3={defaultColor:"000",toHsva:x$3,fromHsva:function(ne){return w$6({h:ne.h,s:ne.s,v:ne.v,a:1})},equal:X$3},Z$4=function(ne){return React$2.createElement(U$3,u$6({},ne,{colorModel:W$3}))};const byPoint=({variables:ne},{x:oe,y:ce})=>(ne==null?void 0:ne.x)===oe&&(ne==null?void 0:ne.y)===ce,getGridSymbolsUrl=""+new URL("getGridSymbols.worker-39c2a9fb.js",import.meta.url).href;class GetGridSymbolsWorker extends Worker{constructor(){super(getGridSymbolsUrl,{type:"module"})}}const getGridSymbolsAsync=usingWorkerTask(GetGridSymbolsWorker),parseGridWorkerUrl=""+new URL("parseGrid.worker-354760d8.js",import.meta.url).href;class ParseGridWorker extends Worker{constructor(){super(parseGridWorkerUrl,{type:"module"})}}const parseGridAsync=usingMemoizedWorkerTask(ParseGridWorker);function useDebouncedState(ne,oe=lodashExports$1.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports$1.now());return[ue,ge=>{const ye=lodashExports$1.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge)}]}function useDebouncedState2(ne,oe=lodashExports$1.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports$1.now());return[ue,ge=>{const ye=lodashExports$1.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge(ue))}]}function between(ne,oe,ce){return ne>=oe&&ne({content:ne,...await parseGridAsync({map:ne,options:oe})}),{normalizer:JSON.stringify});function SymbolColorPicker({onChange:ne,value:oe,autoValue:ce}){const[ue,pe]=useDebouncedState(oe,ne),me=ue??ce;return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ge=>{var ye;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FeaturePickerButton,{...bindTrigger(ge),children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",gap:1,alignItems:"center",children:[jsxRuntimeExports.jsx(Box$1,{sx:{width:16,height:16,backgroundColor:me,outline:ve=>`1px solid ${ve.palette.divider}`,borderRadius:4}}),ue?lodashExports$1.startCase(((ye=getClosestColor(ue))==null?void 0:ye.name)??"Custom"):"Auto"]})}),jsxRuntimeExports.jsxs(Popover$1,{transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},...bindPopover(ge),slotProps:{paper:{sx:{overflow:"visible"}}},children:[jsxRuntimeExports.jsx(Box$1,{sx:{px:2,py:1},children:jsxRuntimeExports.jsx(FormControlLabel$1,{control:jsxRuntimeExports.jsx(Checkbox$1,{defaultChecked:!ue,onChange:(ve,xe)=>pe==null?void 0:pe(xe?void 0:ce)}),label:"Choose Automatically"})}),jsxRuntimeExports.jsx(Box$1,{sx:{p:2,pt:0,...!ue&&{opacity:ve=>ve.palette.action.disabledOpacity,pointerEvents:"none"}},children:jsxRuntimeExports.jsx(Z$4,{color:ue??ce,onChange:pe})})]})]})}})}const editor$3=async ne=>{if(ne){const{symbols:oe}=await getGridSymbolsAsync({map:ne});return withProduce(({produce:ce,value:ue})=>{const{palette:pe}=useTheme$1(),me=lodashExports$1.flow(interpolate$1([pe.background.paper,pe.text.primary]),rgbToHex$1);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:lodashExports$1.sortBy(oe,"value").map(({symbol:ge})=>{var ye,ve;return jsxRuntimeExports.jsx(Option,{label:`Tile color for "${ge}"`,content:jsxRuntimeExports.jsx(SymbolColorPicker,{value:(ye=ue==null?void 0:ue.symbols)==null?void 0:ye[ge],autoValue:me(((ve=lodashExports$1.find(oe,{symbol:ge}))==null?void 0:ve.value)??0),onChange:xe=>ce(_e=>{lodashExports$1.set(_e,`symbols["${ge}"]`,xe)})})},ge)})})})}else return()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},hydrate$3=ne=>{const{width:oe,height:ce}=ne.bounds;return{...ne,snap:({x:ue,y:pe},me=1)=>{const[ge,ye]=[lodashExports$1.round(-1+ue+me/2),lodashExports$1.round(-1+pe+me/2)];if(between(ge,0,oe)&&between(ye,0,ce))return{x:ge,y:ye}},nodeAt:ue=>{const{x:pe,y:me}=ue;return me*oe+pe},pointOf:ue=>({x:ue%oe,y:~~(ue/oe)}),matchNode:byPoint}},grid=Object.freeze(Object.defineProperty({__proto__:null,SymbolColorPicker,editor:editor$3,hydrate:hydrate$3,parse:parse$a},Symbol.toStringTag,{value:"Module"})),parseMeshWorkerUrl=""+new URL("parseMesh.worker-b55f1a2c.js",import.meta.url).href;class ParseMeshWorker extends Worker{constructor(){super(parseMeshWorkerUrl,{type:"module"})}}const parseMeshAsync=usingMemoizedWorkerTask(ParseMeshWorker),parse$9=memoizee$1(async(ne="",oe)=>await parseMeshAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$2=ne=>({...ne,snap:lodashExports$1.identity,nodeAt:lodashExports$1.constant(0),pointOf:lodashExports$1.constant({x:0,y:0}),matchNode:byPoint}),editor$2=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),mesh=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$2,hydrate:hydrate$2,parse:parse$9},Symbol.toStringTag,{value:"Module"})),parseNetworkWorkerUrl=""+new URL("parseNetwork.worker-ea62010a.js",import.meta.url).href;class ParseNetworkWorker extends Worker{constructor(){super(parseNetworkWorkerUrl,{type:"module"})}}const parseNetworkAsync=usingMemoizedWorkerTask(ParseNetworkWorker),parse$8=memoizee$1(async(ne="",oe)=>await parseNetworkAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$1=ne=>({...ne,snap:lodashExports$1.identity,nodeAt:lodashExports$1.constant(0),pointOf:lodashExports$1.constant({x:0,y:0}),matchNode:byPoint}),editor$1=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),xy=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$1,hydrate:hydrate$1,parse:parse$8},Symbol.toStringTag,{value:"Module"})),parsePolyWorkerUrl=""+new URL("parsePoly.worker-e37621e9.js",import.meta.url).href;class ParsePolyWorker extends Worker{constructor(){super(parsePolyWorkerUrl,{type:"module"})}}const parsePolyAsync=usingMemoizedWorkerTask(ParsePolyWorker),parse$7=memoizee$1(async(ne="",oe)=>await parsePolyAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate=ne=>({...ne,snap:lodashExports$1.identity,nodeAt:lodashExports$1.constant(0),pointOf:lodashExports$1.constant({x:0,y:0}),matchNode:byPoint}),editor=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),poly=Object.freeze(Object.defineProperty({__proto__:null,editor,hydrate,parse:parse$7},Symbol.toStringTag,{value:"Module"})),mapParsers={grid,map:grid,xy,mesh,poly};function getParser(ne=""){return mapParsers[ne]}const defaultGuard=lodashExports$1.constant(!0),[useLayers,LayersProvider]=createSlice({layers:[]});function useLayer(ne,oe=defaultGuard){const[ce,ue]=reactExports.useState(ne),[{layers:pe},me]=useLayers(),ge=lodashExports$1.filter(pe,oe),ye=ce?lodashExports$1.find(ge,{key:ce})??lodashExports$1.head(ge):lodashExports$1.head(ge);return reactExports.useEffect(()=>{ue(ne)},[ne]),reactExports.useEffect(()=>{ye&&ye.key!==ce&&ue(ye.key)},[ye,ce,ue]),reactExports.useMemo(()=>({key:ye==null?void 0:ye.key,setKey:ue,layer:ye,setLayer:ve=>{const xe={...ye,...ve};me(({layers:_e})=>({layers:lodashExports$1.map(_e,Se=>Se.key===xe.key?xe:Se)}))},layers:ge,allLayers:pe}),[pe,ye,me,ge])}const shouldBreak={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"},{name:"parent",type:"any"},{name:"children",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},templates={shouldBreak},fn=memoizee$1((ne,oe)=>new Function("params",`${ne}; return ${oe}.apply(null, params);`));function call$1(ne,oe,ce){try{return fn(ne,oe)(ce)}catch{return templates[oe].defaultReturnValue}}function _extends(){return _extends=Object.assign||function(ne){for(var oe=1;oeawait treeAsync$1(ne),[ne])}function useTreeMemo$1(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree$1(ce)}function useBreakpoints(ne){var _e;const{layer:oe}=useLayer(ne),{isTrusted:ce}=useUntrustedLayers(),{monotonicF:ue,monotonicG:pe,breakpoints:me,code:ge,trace:ye}=(oe==null?void 0:oe.source)??{},ve=ye==null?void 0:ye.content,{result:xe}=useTreeMemo$1({trace:ve,step:(_e=ve==null?void 0:ve.events)==null?void 0:_e.length,radius:void 0},[ve]);return reactExports.useMemo(()=>{const Se=(ve==null?void 0:ve.events)??[],$e=treeToDict((xe==null?void 0:xe.tree)??[]);return memoizee$1(Re=>{var Ie,ke;const Ae=Se[Re];if(Ae)try{for(const{active:Be,condition:Ne,type:Fe,property:Ue="",reference:We=0}of me??[]){const qe=!Fe||Fe===Ae.type;if(Be&&qe&&(()=>{var Ge;return(Ge=Ne==null?void 0:Ne.apply)==null?void 0:Ge.call(Ne,{type:Fe,event:Ae,property:Ue,value:lodashExports$1.get(Ae,Ue),reference:We,step:Re,events:Se,node:$e[Re]})})())return Ne!=null&&Ne.needsReference?{result:`${Ue} ${lodashExports$1.toLower(lodashExports$1.startCase(Ne==null?void 0:Ne.key))} ${We}`}:{result:`${Ue} ${lodashExports$1.toLower(lodashExports$1.startCase(Ne==null?void 0:Ne.key))}`}}if(ce&&call$1(ge??"","shouldBreak",[Re,Ae,Se,(Ie=$e[Re])==null?void 0:Ie.parent,(ke=$e[Re])==null?void 0:ke.children]))return{result:"Script editor"}}catch(Be){return{error:`${Be}`}}return{result:""}})},[ce,ge,ve,me,ue,pe,xe])}function treeToDict(ne=[],oe={}){for(const ce of ne){for(const ue of ce.events)oe[ue.step]=ce;treeToDict(ce.children,oe)}return oe}function cancellable(ne,oe){let ce=!1;return requestAnimationFrame(async()=>{const ue=await ne();ce||oe(ue)}),()=>{ce=!0}}function usePlaybackState(ne){const{layer:oe,setLayer:ce,setKey:ue}=useLayer(ne),pe=useSnackbar(),me=useBreakpoints(ne);reactExports.useEffect(()=>{ne&&ue(ne)},[ne]);const{playback:ge,playbackTo:ye,step:ve=0}=(oe==null?void 0:oe.source)??{},xe=lodashExports$1.min([ye,ve])??0,_e=!!ye,Se=ge==="playing",[$e,Re]=[0,(ye??1)-1];return reactExports.useMemo(()=>{function Ae(qe){ce(produce(oe,ze=>lodashExports$1.set(ze,"source",{...ze==null?void 0:ze.source,...qe})))}const Ie={start:$e,end:Re,step:xe,canPlay:_e&&!Se&&xe0},ke=(qe=0)=>{Ae({playback:"paused",step:Ue(qe)})},Be=(qe=1)=>Ae({playback:"playing",step:Ue(qe)}),Ne=(qe,ze=0)=>cancellable(async()=>{for(const Ge of lodashExports$1.range(ze,qe)){const Ze=me(xe+Ge);if(Ze.result||Ze.error)return{...Ze,offset:Ge}}return{result:"",offset:0,error:void 0}},({result:Ge,offset:Ze,error:Dt})=>{Dt?(pe(`${lodashExports$1.trimEnd(Dt,".")}`,`Step ${xe+Ze}`),ke()):Ge?(pe(`Breakpoint hit: ${Ge}`,`Step ${xe+Ze}`),ke(Ze)):Be(qe)}),Fe=(qe=1)=>{var Ge;let ze;for(ze=xe+qe;ze<=Re&&ze>=0&&!((Ge=me(ze))!=null&&Ge.result);ze+=qe);return ze},Ue=qe=>lodashExports$1.clamp(xe+qe,$e,Re);return{playing:ge==="playing",...Ie,...{play:()=>{Ae({playback:"playing",step:Ue(1)})},pause:ke,stepTo:(qe=0)=>Ae({step:lodashExports$1.clamp(qe,$e,Re)}),stop:()=>Ae({step:$e,playback:"paused"}),stepForward:()=>Ae({step:Ue(1)}),stepBackward:()=>Ae({step:Ue(-1)}),tick:Be,findBreakpoint:Fe,stepWithBreakpointCheck:Ne}}},[Re,ge,Se,_e,$e,xe,ce])}function RenderLayer({layer:ne,index:oe}){var ce;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne&&reactExports.createElement((ce=getController(ne))==null?void 0:ce.renderer,{layer:ne,index:oe})})}const[useRenderers,RendererProvider]=createSlice([],{reduce:replace$1}),removeUndefinedValues=ne=>lodashExports$1.omit(ne,lodashExports$1.filter(lodashExports$1.keys(ne),oe=>lodashExports$1.isUndefined(ne[oe]))),[useScreenshots,ScreenshotsProvider]=createSlice({},{reduce:lodashExports$1.flow(merge$4,removeUndefinedValues)});var events={exports:{}},R$3=typeof Reflect=="object"?Reflect:null,ReflectApply=R$3&&typeof R$3.apply=="function"?R$3.apply:function(oe,ce,ue){return Function.prototype.apply.call(oe,ce,ue)},ReflectOwnKeys;R$3&&typeof R$3.ownKeys=="function"?ReflectOwnKeys=R$3.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe).concat(Object.getOwnPropertySymbols(oe))}:ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe)};function ProcessEmitWarning(ne){console&&console.warn&&console.warn(ne)}var NumberIsNaN=Number.isNaN||function(oe){return oe!==oe};function EventEmitter$3(){EventEmitter$3.init.call(this)}events.exports=EventEmitter$3;events.exports.once=once;EventEmitter$3.EventEmitter=EventEmitter$3;EventEmitter$3.prototype._events=void 0;EventEmitter$3.prototype._eventsCount=0;EventEmitter$3.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(ne){if(typeof ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ne)}Object.defineProperty(EventEmitter$3,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(ne){if(typeof ne!="number"||ne<0||NumberIsNaN(ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ne+".");defaultMaxListeners=ne}});EventEmitter$3.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$3.prototype.setMaxListeners=function(oe){if(typeof oe!="number"||oe<0||NumberIsNaN(oe))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+oe+".");return this._maxListeners=oe,this};function _getMaxListeners(ne){return ne._maxListeners===void 0?EventEmitter$3.defaultMaxListeners:ne._maxListeners}EventEmitter$3.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$3.prototype.emit=function(oe){for(var ce=[],ue=1;ue0&&(ge=ce[0]),ge instanceof Error)throw ge;var ye=new Error("Unhandled error."+(ge?" ("+ge.message+")":""));throw ye.context=ge,ye}var ve=me[oe];if(ve===void 0)return!1;if(typeof ve=="function")ReflectApply(ve,this,ce);else for(var xe=ve.length,_e=arrayClone(ve,xe),ue=0;ue0&&ge.length>pe&&!ge.warned){ge.warned=!0;var ye=new Error("Possible EventEmitter memory leak detected. "+ge.length+" "+String(oe)+" listeners added. Use emitter.setMaxListeners() to increase limit");ye.name="MaxListenersExceededWarning",ye.emitter=ne,ye.type=oe,ye.count=ge.length,ProcessEmitWarning(ye)}return ne}EventEmitter$3.prototype.addListener=function(oe,ce){return _addListener(this,oe,ce,!1)};EventEmitter$3.prototype.on=EventEmitter$3.prototype.addListener;EventEmitter$3.prototype.prependListener=function(oe,ce){return _addListener(this,oe,ce,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(ne,oe,ce){var ue={fired:!1,wrapFn:void 0,target:ne,type:oe,listener:ce},pe=onceWrapper.bind(ue);return pe.listener=ce,ue.wrapFn=pe,pe}EventEmitter$3.prototype.once=function(oe,ce){return checkListener(ce),this.on(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.prependOnceListener=function(oe,ce){return checkListener(ce),this.prependListener(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.removeListener=function(oe,ce){var ue,pe,me,ge,ye;if(checkListener(ce),pe=this._events,pe===void 0)return this;if(ue=pe[oe],ue===void 0)return this;if(ue===ce||ue.listener===ce)--this._eventsCount===0?this._events=Object.create(null):(delete pe[oe],pe.removeListener&&this.emit("removeListener",oe,ue.listener||ce));else if(typeof ue!="function"){for(me=-1,ge=ue.length-1;ge>=0;ge--)if(ue[ge]===ce||ue[ge].listener===ce){ye=ue[ge].listener,me=ge;break}if(me<0)return this;me===0?ue.shift():spliceOne(ue,me),ue.length===1&&(pe[oe]=ue[0]),pe.removeListener!==void 0&&this.emit("removeListener",oe,ye||ce)}return this};EventEmitter$3.prototype.off=EventEmitter$3.prototype.removeListener;EventEmitter$3.prototype.removeAllListeners=function(oe){var ce,ue,pe;if(ue=this._events,ue===void 0)return this;if(ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ue[oe]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ue[oe]),this;if(arguments.length===0){var me=Object.keys(ue),ge;for(pe=0;pe=0;pe--)this.removeListener(oe,ce[pe]);return this};function _listeners(ne,oe,ce){var ue=ne._events;if(ue===void 0)return[];var pe=ue[oe];return pe===void 0?[]:typeof pe=="function"?ce?[pe.listener||pe]:[pe]:ce?unwrapListeners(pe):arrayClone(pe,pe.length)}EventEmitter$3.prototype.listeners=function(oe){return _listeners(this,oe,!0)};EventEmitter$3.prototype.rawListeners=function(oe){return _listeners(this,oe,!1)};EventEmitter$3.listenerCount=function(ne,oe){return typeof ne.listenerCount=="function"?ne.listenerCount(oe):listenerCount.call(ne,oe)};EventEmitter$3.prototype.listenerCount=listenerCount;function listenerCount(ne){var oe=this._events;if(oe!==void 0){var ce=oe[ne];if(typeof ce=="function")return 1;if(ce!==void 0)return ce.length}return 0}EventEmitter$3.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(ne,oe){for(var ce=new Array(oe),ue=0;ue=oe?{done:!0}:{done:!1,value:ne[ce++]}})};Iterator$2.empty=function(){var ne=new Iterator$2(function(){return{done:!0}});return ne};Iterator$2.fromSequence=function(ne){var oe=0,ce=ne.length;return new Iterator$2(function(){return oe>=ce?{done:!0}:{done:!1,value:ne[oe++]}})};Iterator$2.is=function(ne){return ne instanceof Iterator$2?!0:typeof ne=="object"&&ne!==null&&typeof ne.next=="function"};var iterator=Iterator$2;const Iterator$3=getDefaultExportFromCjs(iterator);var support$1={};support$1.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";support$1.SYMBOL_SUPPORT=typeof Symbol<"u";var Iterator$1=iterator,support=support$1,ARRAY_BUFFER_SUPPORT=support.ARRAY_BUFFER_SUPPORT,SYMBOL_SUPPORT=support.SYMBOL_SUPPORT;function iterOrNull(ne){return typeof ne=="string"||Array.isArray(ne)||ARRAY_BUFFER_SUPPORT&&ArrayBuffer.isView(ne)?Iterator$1.fromSequence(ne):typeof ne!="object"||ne===null?null:SYMBOL_SUPPORT&&typeof ne[Symbol.iterator]=="function"?ne[Symbol.iterator]():typeof ne.next=="function"?ne:null}var iter$2=function(oe){var ce=iterOrNull(oe);if(!ce)throw new Error("obliterator: target is not iterable nor a valid iterator.");return ce},iter$1=iter$2,take=function(oe,ce){for(var ue=arguments.length>1?ce:1/0,pe=ue!==1/0?new Array(ue):[],me,ge=0,ye=iter$1(oe);;){if(ge===ue)return pe;if(me=ye.next(),me.done)return ge!==ce&&(pe.length=ge),pe;pe[ge++]=me.value}};const take$1=getDefaultExportFromCjs(take);var Iterator=iterator,iter=iter$2,chain=function(){var oe=arguments,ce=null,ue=-1;return new Iterator(function(){var me=null;do{if(ce===null){if(ue++,ue>=oe.length)return{done:!0};ce=iter(oe[ue])}if(me=ce.next(),me.done===!0){ce=null;continue}break}while(!0);return me})};const chain$1=getDefaultExportFromCjs(chain);function assignPolyfill(){const ne=arguments[0];for(let oe=1,ce=arguments.length;oene++}class GraphError extends Error{constructor(oe){super(),this.name="GraphError",this.message=oe}}class InvalidArgumentsGraphError extends GraphError{constructor(oe){super(oe),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,InvalidArgumentsGraphError.prototype.constructor)}}class NotFoundGraphError extends GraphError{constructor(oe){super(oe),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,NotFoundGraphError.prototype.constructor)}}class UsageGraphError extends GraphError{constructor(oe){super(oe),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,UsageGraphError.prototype.constructor)}}function MixedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}MixedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function DirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}DirectedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function UndirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}UndirectedNodeData.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function EdgeData(ne,oe,ce,ue,pe){this.key=oe,this.attributes=pe,this.undirected=ne,this.source=ce,this.target=ue}EdgeData.prototype.attach=function(){let ne="out",oe="in";this.undirected&&(ne=oe="undirected");const ce=this.source.key,ue=this.target.key;this.source[ne][ue]=this,!(this.undirected&&ce===ue)&&(this.target[oe][ce]=this)};EdgeData.prototype.attachMulti=function(){let ne="out",oe="in";const ce=this.source.key,ue=this.target.key;this.undirected&&(ne=oe="undirected");const pe=this.source[ne],me=pe[ue];if(typeof me>"u"){pe[ue]=this,this.undirected&&ce===ue||(this.target[oe][ce]=this);return}me.previous=this,this.next=me,pe[ue]=this,this.target[oe][ce]=this};EdgeData.prototype.detach=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),delete this.source[ce][oe],delete this.target[ue][ne]};EdgeData.prototype.detachMulti=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[ce][oe],delete this.target[ue][ne]):(this.next.previous=void 0,this.source[ce][oe]=this.next,this.target[ue][ne]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const NODE=0,SOURCE=1,TARGET=2,OPPOSITE=3;function findRelevantNodeData(ne,oe,ce,ue,pe,me,ge){let ye,ve,xe,_e;if(ue=""+ue,ce===NODE){if(ye=ne._nodes.get(ue),!ye)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" node in the graph.`);xe=pe,_e=me}else if(ce===OPPOSITE){if(pe=""+pe,ve=ne._edges.get(pe),!ve)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${pe}" edge in the graph.`);const Se=ve.source.key,$e=ve.target.key;if(ue===Se)ye=ve.target;else if(ue===$e)ye=ve.source;else throw new NotFoundGraphError(`Graph.${oe}: the "${ue}" node is not attached to the "${pe}" edge (${Se}, ${$e}).`);xe=me,_e=ge}else{if(ve=ne._edges.get(ue),!ve)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`);ce===SOURCE?ye=ve.source:ye=ve.target,xe=pe,_e=me}return[ye,xe,_e]}function attachNodeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes[ye]}}function attachNodeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){const[me]=findRelevantNodeData(this,oe,ce,ue,pe);return me.attributes}}function attachNodeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes.hasOwnProperty(ye)}}function attachNodeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,ve,xe]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);return ye.attributes[ve]=xe,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:ve}),this}}function attachNodeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,ve,xe]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);if(typeof xe!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);const _e=ye.attributes,Se=xe(_e[ve]);return _e[ve]=Se,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:ve}),this}}function attachNodeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return delete ge.attributes[ye],this.emit("nodeAttributesUpdated",{key:ge.key,type:"remove",attributes:ge.attributes,name:ye}),this}}function attachNodeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return ge.attributes=ye,this.emit("nodeAttributesUpdated",{key:ge.key,type:"replace",attributes:ge.attributes}),this}}function attachNodeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$5(ge.attributes,ye),this.emit("nodeAttributesUpdated",{key:ge.key,type:"merge",attributes:ge.attributes,data:ye}),this}}function attachNodeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return ge.attributes=ye(ge.attributes),this.emit("nodeAttributesUpdated",{key:ge.key,type:"update",attributes:ge.attributes}),this}}const NODE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachNodeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachNodeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachNodeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachNodeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachNodeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachNodeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachNodeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachNodeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachNodeAttributesUpdater}];function attachNodeAttributesMethods(ne){NODE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Node"),NODE),ce(ne,oe("Source"),SOURCE),ce(ne,oe("Target"),TARGET),ce(ne,oe("Opposite"),OPPOSITE)})}function attachEdgeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes[pe]}}function attachEdgeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue){let pe;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const me=""+ue,ge=""+arguments[1];if(pe=getMatchingEdge(this,me,ge,ce),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${me}" - "${ge}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,pe=this._edges.get(ue),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return pe.attributes}}function attachEdgeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes.hasOwnProperty(pe)}}function attachEdgeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,ve=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,ve,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${ve}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return ge.attributes[pe]=me,this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,ve=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,ve,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${ve}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof me!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);return ge.attributes[pe]=me(ge.attributes[pe]),this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return delete me.attributes[pe],this.emit("edgeAttributesUpdated",{key:me.key,type:"remove",attributes:me.attributes,name:pe}),this}}function attachEdgeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return me.attributes=pe,this.emit("edgeAttributesUpdated",{key:me.key,type:"replace",attributes:me.attributes}),this}}function attachEdgeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$5(me.attributes,pe),this.emit("edgeAttributesUpdated",{key:me.key,type:"merge",attributes:me.attributes,data:pe}),this}}function attachEdgeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof pe!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return me.attributes=pe(me.attributes),this.emit("edgeAttributesUpdated",{key:me.key,type:"update",attributes:me.attributes}),this}}const EDGE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachEdgeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachEdgeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachEdgeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachEdgeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachEdgeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachEdgeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachEdgeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachEdgeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachEdgeAttributesUpdater}];function attachEdgeAttributesMethods(ne){EDGE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Edge"),"mixed"),ce(ne,oe("DirectedEdge"),"directed"),ce(ne,oe("UndirectedEdge"),"undirected")})}const EDGES_ITERATION=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function forEachSimple(ne,oe,ce,ue){let pe=!1;for(const me in oe){if(me===ue)continue;const ge=oe[me];if(pe=ce(ge.key,ge.attributes,ge.source.key,ge.target.key,ge.source.attributes,ge.target.attributes,ge.undirected),ne&&pe)return ge.key}}function forEachMulti(ne,oe,ce,ue){let pe,me,ge,ye=!1;for(const ve in oe)if(ve!==ue){pe=oe[ve];do{if(me=pe.source,ge=pe.target,ye=ce(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected),ne&&ye)return pe.key;pe=pe.next}while(pe!==void 0)}}function createIterator(ne,oe){const ce=Object.keys(ne),ue=ce.length;let pe,me=0;return new Iterator$3(function(){do if(pe)pe=pe.next;else{if(me>=ue)return{done:!0};const ye=ce[me++];if(ye===oe){pe=void 0;continue}pe=ne[ye]}while(!pe);return{done:!1,value:{edge:pe.key,attributes:pe.attributes,source:pe.source.key,target:pe.target.key,sourceAttributes:pe.source.attributes,targetAttributes:pe.target.attributes,undirected:pe.undirected}}})}function forEachForKeySimple(ne,oe,ce,ue){const pe=oe[ce];if(!pe)return;const me=pe.source,ge=pe.target;if(ue(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected)&&ne)return pe.key}function forEachForKeyMulti(ne,oe,ce,ue){let pe=oe[ce];if(!pe)return;let me=!1;do{if(me=ue(pe.key,pe.attributes,pe.source.key,pe.target.key,pe.source.attributes,pe.target.attributes,pe.undirected),ne&&me)return pe.key;pe=pe.next}while(pe!==void 0)}function createIteratorForKey(ne,oe){let ce=ne[oe];return ce.next!==void 0?new Iterator$3(function(){if(!ce)return{done:!0};const ue={edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected};return ce=ce.next,{done:!1,value:ue}}):Iterator$3.of({edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected})}function createEdgeArray(ne,oe){if(ne.size===0)return[];if(oe==="mixed"||oe===ne.type)return typeof Array.from=="function"?Array.from(ne._edges.keys()):take$1(ne._edges.keys(),ne._edges.size);const ce=oe==="undirected"?ne.undirectedSize:ne.directedSize,ue=new Array(ce),pe=oe==="undirected",me=ne._edges.values();let ge=0,ye,ve;for(;ye=me.next(),ye.done!==!0;)ve=ye.value,ve.undirected===pe&&(ue[ge++]=ve.key);return ue}function forEachEdge(ne,oe,ce,ue){if(oe.size===0)return;const pe=ce!=="mixed"&&ce!==oe.type,me=ce==="undirected";let ge,ye,ve=!1;const xe=oe._edges.values();for(;ge=xe.next(),ge.done!==!0;){if(ye=ge.value,pe&&ye.undirected!==me)continue;const{key:_e,attributes:Se,source:$e,target:Re}=ye;if(ve=ue(_e,Se,$e.key,Re.key,$e.attributes,Re.attributes,ye.undirected),ne&&ve)return _e}}function createEdgeIterator(ne,oe){if(ne.size===0)return Iterator$3.empty();const ce=oe!=="mixed"&&oe!==ne.type,ue=oe==="undirected",pe=ne._edges.values();return new Iterator$3(function(){let ge,ye;for(;;){if(ge=pe.next(),ge.done)return ge;if(ye=ge.value,!(ce&&ye.undirected!==ue))break}return{value:{edge:ye.key,attributes:ye.attributes,source:ye.source.key,target:ye.target.key,sourceAttributes:ye.source.attributes,targetAttributes:ye.target.attributes,undirected:ye.undirected},done:!1}})}function forEachEdgeForNode(ne,oe,ce,ue,pe,me){const ge=oe?forEachMulti:forEachSimple;let ye;if(ce!=="undirected"&&(ue!=="out"&&(ye=ge(ne,pe.in,me),ne&&ye)||ue!=="in"&&(ye=ge(ne,pe.out,me,ue?void 0:pe.key),ne&&ye))||ce!=="directed"&&(ye=ge(ne,pe.undirected,me),ne&&ye))return ye}function createEdgeArrayForNode(ne,oe,ce,ue){const pe=[];return forEachEdgeForNode(!1,ne,oe,ce,ue,function(me){pe.push(me)}),pe}function createEdgeIteratorForNode(ne,oe,ce){let ue=Iterator$3.empty();return ne!=="undirected"&&(oe!=="out"&&typeof ce.in<"u"&&(ue=chain$1(ue,createIterator(ce.in))),oe!=="in"&&typeof ce.out<"u"&&(ue=chain$1(ue,createIterator(ce.out,oe?void 0:ce.key)))),ne!=="directed"&&typeof ce.undirected<"u"&&(ue=chain$1(ue,createIterator(ce.undirected))),ue}function forEachEdgeForPath(ne,oe,ce,ue,pe,me,ge){const ye=ce?forEachForKeyMulti:forEachForKeySimple;let ve;if(oe!=="undirected"&&(typeof pe.in<"u"&&ue!=="out"&&(ve=ye(ne,pe.in,me,ge),ne&&ve)||typeof pe.out<"u"&&ue!=="in"&&(ue||pe.key!==me)&&(ve=ye(ne,pe.out,me,ge),ne&&ve))||oe!=="directed"&&typeof pe.undirected<"u"&&(ve=ye(ne,pe.undirected,me,ge),ne&&ve))return ve}function createEdgeArrayForPath(ne,oe,ce,ue,pe){const me=[];return forEachEdgeForPath(!1,ne,oe,ce,ue,pe,function(ge){me.push(ge)}),me}function createEdgeIteratorForPath(ne,oe,ce,ue){let pe=Iterator$3.empty();return ne!=="undirected"&&(typeof ce.in<"u"&&oe!=="out"&&ue in ce.in&&(pe=chain$1(pe,createIteratorForKey(ce.in,ue))),typeof ce.out<"u"&&oe!=="in"&&ue in ce.out&&(oe||ce.key!==ue)&&(pe=chain$1(pe,createIteratorForKey(ce.out,ue)))),ne!=="directed"&&typeof ce.undirected<"u"&&ue in ce.undirected&&(pe=chain$1(pe,createIteratorForKey(ce.undirected,ue))),pe}function attachEdgeArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me,ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];if(!arguments.length)return createEdgeArray(this,ue);if(arguments.length===1){me=""+me;const ye=this._nodes.get(me);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createEdgeArrayForNode(this.multi,ue==="mixed"?this.type:ue,pe,ye)}if(arguments.length===2){me=""+me,ge=""+ge;const ye=this._nodes.get(me);if(!ye)throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" source node in the graph.`);if(!this._nodes.has(ge))throw new NotFoundGraphError(`Graph.${ce}: could not find the "${ge}" target node in the graph.`);return createEdgeArrayForPath(ue,this.multi,pe,ye,ge)}throw new InvalidArgumentsGraphError(`Graph.${ce}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachForEachEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(xe,_e,Se){if(!(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)){if(arguments.length===1)return Se=xe,forEachEdge(!1,this,ue,Se);if(arguments.length===2){xe=""+xe,Se=_e;const $e=this._nodes.get(xe);if(typeof $e>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" node in the graph.`);return forEachEdgeForNode(!1,this.multi,ue==="mixed"?this.type:ue,pe,$e,Se)}if(arguments.length===3){xe=""+xe,_e=""+_e;const $e=this._nodes.get(xe);if(!$e)throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" source node in the graph.`);if(!this._nodes.has(_e))throw new NotFoundGraphError(`Graph.${me}: could not find the "${_e}" target node in the graph.`);return forEachEdgeForPath(!1,ue,this.multi,pe,$e,_e,Se)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(){const xe=Array.prototype.slice.call(arguments),_e=xe.pop();let Se;if(xe.length===0){let $e=0;ue!=="directed"&&($e+=this.undirectedSize),ue!=="undirected"&&($e+=this.directedSize),Se=new Array($e);let Re=0;xe.push((Ae,Ie,ke,Be,Ne,Fe,Ue)=>{Se[Re++]=_e(Ae,Ie,ke,Be,Ne,Fe,Ue)})}else Se=[],xe.push(($e,Re,Ae,Ie,ke,Be,Ne)=>{Se.push(_e($e,Re,Ae,Ie,ke,Be,Ne))});return this[me].apply(this,xe),Se};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(){const xe=Array.prototype.slice.call(arguments),_e=xe.pop(),Se=[];return xe.push(($e,Re,Ae,Ie,ke,Be,Ne)=>{_e($e,Re,Ae,Ie,ke,Be,Ne)&&Se.push($e)}),this[me].apply(this,xe),Se};const ve="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ve]=function(){let xe=Array.prototype.slice.call(arguments);if(xe.length<2||xe.length>4)throw new InvalidArgumentsGraphError(`Graph.${ve}: invalid number of arguments (expecting 2, 3 or 4 and got ${xe.length}).`);if(typeof xe[xe.length-1]=="function"&&typeof xe[xe.length-2]!="function")throw new InvalidArgumentsGraphError(`Graph.${ve}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let _e,Se;xe.length===2?(_e=xe[0],Se=xe[1],xe=[]):xe.length===3?(_e=xe[1],Se=xe[2],xe=[xe[0]]):xe.length===4&&(_e=xe[2],Se=xe[3],xe=[xe[0],xe[1]]);let $e=Se;return xe.push((Re,Ae,Ie,ke,Be,Ne,Fe)=>{$e=_e($e,Re,Ae,Ie,ke,Be,Ne,Fe)}),this[me].apply(this,xe),$e}}function attachFindEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="find"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(ve,xe,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return!1;if(arguments.length===1)return _e=ve,forEachEdge(!0,this,ue,_e);if(arguments.length===2){ve=""+ve,_e=xe;const Se=this._nodes.get(ve);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" node in the graph.`);return forEachEdgeForNode(!0,this.multi,ue==="mixed"?this.type:ue,pe,Se,_e)}if(arguments.length===3){ve=""+ve,xe=""+xe;const Se=this._nodes.get(ve);if(!Se)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" source node in the graph.`);if(!this._nodes.has(xe))throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" target node in the graph.`);return forEachEdgeForPath(!0,ue,this.multi,pe,Se,xe,_e)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const ge="some"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ge]=function(){const ve=Array.prototype.slice.call(arguments),xe=ve.pop();return ve.push((Se,$e,Re,Ae,Ie,ke,Be)=>xe(Se,$e,Re,Ae,Ie,ke,Be)),!!this[me].apply(this,ve)};const ye="every"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ye]=function(){const ve=Array.prototype.slice.call(arguments),xe=ve.pop();return ve.push((Se,$e,Re,Ae,Ie,ke,Be)=>!xe(Se,$e,Re,Ae,Ie,ke,Be)),!this[me].apply(this,ve)}}function attachEdgeIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge,ye){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();if(!arguments.length)return createEdgeIterator(this,ue);if(arguments.length===1){ge=""+ge;const ve=this._nodes.get(ge);if(!ve)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createEdgeIteratorForNode(ue,pe,ve)}if(arguments.length===2){ge=""+ge,ye=""+ye;const ve=this._nodes.get(ge);if(!ve)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" source node in the graph.`);if(!this._nodes.has(ye))throw new NotFoundGraphError(`Graph.${me}: could not find the "${ye}" target node in the graph.`);return createEdgeIteratorForPath(ue,pe,ve,ye)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachEdgeIterationMethods(ne){EDGES_ITERATION.forEach(oe=>{attachEdgeArrayCreator(ne,oe),attachForEachEdge(ne,oe),attachFindEdge(ne,oe),attachEdgeIteratorCreator(ne,oe)})}const NEIGHBORS_ITERATION=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function CompositeSetWrapper(){this.A=null,this.B=null}CompositeSetWrapper.prototype.wrap=function(ne){this.A===null?this.A=ne:this.B===null&&(this.B=ne)};CompositeSetWrapper.prototype.has=function(ne){return this.A!==null&&ne in this.A||this.B!==null&&ne in this.B};function forEachInObjectOnce(ne,oe,ce,ue,pe){for(const me in ue){const ge=ue[me],ye=ge.source,ve=ge.target,xe=ye===ce?ve:ye;if(oe&&oe.has(xe.key))continue;const _e=pe(xe.key,xe.attributes);if(ne&&_e)return xe.key}}function forEachNeighbor(ne,oe,ce,ue,pe){if(oe!=="mixed"){if(oe==="undirected")return forEachInObjectOnce(ne,null,ue,ue.undirected,pe);if(typeof ce=="string")return forEachInObjectOnce(ne,null,ue,ue[ce],pe)}const me=new CompositeSetWrapper;let ge;if(oe!=="undirected"){if(ce!=="out"){if(ge=forEachInObjectOnce(ne,null,ue,ue.in,pe),ne&&ge)return ge;me.wrap(ue.in)}if(ce!=="in"){if(ge=forEachInObjectOnce(ne,me,ue,ue.out,pe),ne&&ge)return ge;me.wrap(ue.out)}}if(oe!=="directed"&&(ge=forEachInObjectOnce(ne,me,ue,ue.undirected,pe),ne&&ge))return ge}function createNeighborArrayForNode(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return Object.keys(ce.undirected);if(typeof oe=="string")return Object.keys(ce[oe])}const ue=[];return forEachNeighbor(!1,ne,oe,ce,function(pe){ue.push(pe)}),ue}function createDedupedObjectIterator(ne,oe,ce){const ue=Object.keys(ce),pe=ue.length;let me=0;return new Iterator$3(function(){let ye=null;do{if(me>=pe)return ne&&ne.wrap(ce),{done:!0};const ve=ce[ue[me++]],xe=ve.source,_e=ve.target;if(ye=xe===oe?_e:xe,ne&&ne.has(ye.key)){ye=null;continue}}while(ye===null);return{done:!1,value:{neighbor:ye.key,attributes:ye.attributes}}})}function createNeighborIterator(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return createDedupedObjectIterator(null,ce,ce.undirected);if(typeof oe=="string")return createDedupedObjectIterator(null,ce,ce[oe])}let ue=Iterator$3.empty();const pe=new CompositeSetWrapper;return ne!=="undirected"&&(oe!=="out"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.in))),oe!=="in"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.out)))),ne!=="directed"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.undirected))),ue}function attachNeighborArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];me=""+me;const ge=this._nodes.get(me);if(typeof ge>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createNeighborArrayForNode(ue==="mixed"?this.type:ue,pe,ge)}}function attachForEachNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(xe,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;xe=""+xe;const Se=this._nodes.get(xe);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" node in the graph.`);forEachNeighbor(!1,ue==="mixed"?this.type:ue,pe,Se,_e)};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(xe,_e){const Se=[];return this[me](xe,($e,Re)=>{Se.push(_e($e,Re))}),Se};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(xe,_e){const Se=[];return this[me](xe,($e,Re)=>{_e($e,Re)&&Se.push($e)}),Se};const ve="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ve]=function(xe,_e,Se){if(arguments.length<3)throw new InvalidArgumentsGraphError(`Graph.${ve}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let $e=Se;return this[me](xe,(Re,Ae)=>{$e=_e($e,Re,Ae)}),$e}}function attachFindNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce[0].toUpperCase()+ce.slice(1,-1),ge="find"+me;ne.prototype[ge]=function(xe,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;xe=""+xe;const Se=this._nodes.get(xe);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${ge}: could not find the "${xe}" node in the graph.`);return forEachNeighbor(!0,ue==="mixed"?this.type:ue,pe,Se,_e)};const ye="some"+me;ne.prototype[ye]=function(xe,_e){return!!this[ge](xe,_e)};const ve="every"+me;ne.prototype[ve]=function(xe,_e){return!this[ge](xe,($e,Re)=>!_e($e,Re))}}function attachNeighborIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();ge=""+ge;const ye=this._nodes.get(ge);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createNeighborIterator(ue==="mixed"?this.type:ue,pe,ye)}}function attachNeighborIterationMethods(ne){NEIGHBORS_ITERATION.forEach(oe=>{attachNeighborArrayCreator(ne,oe),attachForEachNeighbor(ne,oe),attachFindNeighbor(ne,oe),attachNeighborIteratorCreator(ne,oe)})}function forEachAdjacency(ne,oe,ce,ue,pe){const me=ue._nodes.values(),ge=ue.type;let ye,ve,xe,_e,Se,$e,Re;for(;ye=me.next(),ye.done!==!0;){let Ae=!1;if(ve=ye.value,ge!=="undirected"){_e=ve.out;for(xe in _e){Se=_e[xe];do{if($e=Se.target,Ae=!0,Re=pe(ve.key,$e.key,ve.attributes,$e.attributes,Se.key,Se.attributes,Se.undirected),ne&&Re)return Se;Se=Se.next}while(Se)}}if(ge!=="directed"){_e=ve.undirected;for(xe in _e)if(!(oe&&ve.key>xe)){Se=_e[xe];do{if($e=Se.target,$e.key!==xe&&($e=Se.source),Ae=!0,Re=pe(ve.key,$e.key,ve.attributes,$e.attributes,Se.key,Se.attributes,Se.undirected),ne&&Re)return Se;Se=Se.next}while(Se)}}if(ce&&!Ae&&(Re=pe(ve.key,null,ve.attributes,null,null,null,null),ne&&Re))return null}}function serializeNode(ne,oe){const ce={key:ne};return isEmpty$1(oe.attributes)||(ce.attributes=assign$5({},oe.attributes)),ce}function serializeEdge(ne,oe,ce){const ue={key:oe,source:ce.source.key,target:ce.target.key};return isEmpty$1(ce.attributes)||(ue.attributes=assign$5({},ce.attributes)),ne==="mixed"&&ce.undirected&&(ue.undirected=!0),ue}function validateSerializedNode(ne){if(!isPlainObject(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized node is missing its key.");if("attributes"in ne&&(!isPlainObject(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function validateSerializedEdge(ne){if(!isPlainObject(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its source.");if(!("target"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its target.");if("attributes"in ne&&(!isPlainObject(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in ne&&typeof ne.undirected!="boolean")throw new InvalidArgumentsGraphError("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const INSTANCE_ID=incrementalIdStartingFromRandomByte(),TYPES$1=new Set(["directed","undirected","mixed"]),EMITTER_PROPS=new Set(["domain","_events","_eventsCount","_maxListeners"]),EDGE_ADD_METHODS=[{name:ne=>`${ne}Edge`,generateKey:!0},{name:ne=>`${ne}DirectedEdge`,generateKey:!0,type:"directed"},{name:ne=>`${ne}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:ne=>`${ne}EdgeWithKey`},{name:ne=>`${ne}DirectedEdgeWithKey`,type:"directed"},{name:ne=>`${ne}UndirectedEdgeWithKey`,type:"undirected"}],DEFAULTS={allowSelfLoops:!0,multi:!1,type:"mixed"};function addNode(ne,oe,ce){if(ce&&!isPlainObject(ce))throw new InvalidArgumentsGraphError(`Graph.addNode: invalid attributes. Expecting an object but got "${ce}"`);if(oe=""+oe,ce=ce||{},ne._nodes.has(oe))throw new UsageGraphError(`Graph.addNode: the "${oe}" node already exist in the graph.`);const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function unsafeAddNode(ne,oe,ce){const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function addEdge(ne,oe,ce,ue,pe,me,ge,ye){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(ye&&!isPlainObject(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`);if(me=""+me,ge=""+ge,ye=ye||{},!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const ve=ne._nodes.get(me),xe=ne._nodes.get(ge);if(!ve)throw new NotFoundGraphError(`Graph.${oe}: source node "${me}" not found.`);if(!xe)throw new NotFoundGraphError(`Graph.${oe}: target node "${ge}" not found.`);const _e={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);if(!ne.multi&&(ue?typeof ve.undirected[ge]<"u":typeof ve.out[ge]<"u"))throw new UsageGraphError(`Graph.${oe}: an edge linking "${me}" to "${ge}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const Se=new EdgeData(ue,pe,ve,xe,ye);ne._edges.set(pe,Se);const $e=me===ge;return ue?(ve.undirectedDegree++,xe.undirectedDegree++,$e&&(ve.undirectedLoops++,ne._undirectedSelfLoopCount++)):(ve.outDegree++,xe.inDegree++,$e&&(ve.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?Se.attachMulti():Se.attach(),ue?ne._undirectedSize++:ne._directedSize++,_e.key=pe,ne.emit("edgeAdded",_e),pe}function mergeEdge(ne,oe,ce,ue,pe,me,ge,ye,ve){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(ye){if(ve){if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid updater function. Expecting a function but got "${ye}"`)}else if(!isPlainObject(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`)}me=""+me,ge=""+ge;let xe;if(ve&&(xe=ye,ye=void 0),!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let _e=ne._nodes.get(me),Se=ne._nodes.get(ge),$e,Re;if(!ce&&($e=ne._edges.get(pe),$e)){if(($e.source.key!==me||$e.target.key!==ge)&&(!ue||$e.source.key!==ge||$e.target.key!==me))throw new UsageGraphError(`Graph.${oe}: inconsistency detected when attempting to merge the "${pe}" edge with "${me}" source & "${ge}" target vs. ("${$e.source.key}", "${$e.target.key}").`);Re=$e}if(!Re&&!ne.multi&&_e&&(Re=ue?_e.undirected[ge]:_e.out[ge]),Re){const Ne=[Re.key,!1,!1,!1];if(ve?!xe:!ye)return Ne;if(ve){const Fe=Re.attributes;Re.attributes=xe(Fe),ne.emit("edgeAttributesUpdated",{type:"replace",key:Re.key,attributes:Re.attributes})}else assign$5(Re.attributes,ye),ne.emit("edgeAttributesUpdated",{type:"merge",key:Re.key,attributes:Re.attributes,data:ye});return Ne}ye=ye||{},ve&&xe&&(ye=xe(ye));const Ae={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);let Ie=!1,ke=!1;_e||(_e=unsafeAddNode(ne,me,{}),Ie=!0,me===ge&&(Se=_e,ke=!0)),Se||(Se=unsafeAddNode(ne,ge,{}),ke=!0),$e=new EdgeData(ue,pe,_e,Se,ye),ne._edges.set(pe,$e);const Be=me===ge;return ue?(_e.undirectedDegree++,Se.undirectedDegree++,Be&&(_e.undirectedLoops++,ne._undirectedSelfLoopCount++)):(_e.outDegree++,Se.inDegree++,Be&&(_e.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?$e.attachMulti():$e.attach(),ue?ne._undirectedSize++:ne._directedSize++,Ae.key=pe,ne.emit("edgeAdded",Ae),[pe,!0,Ie,ke]}function dropEdgeFromData(ne,oe){ne._edges.delete(oe.key);const{source:ce,target:ue,attributes:pe}=oe,me=oe.undirected,ge=ce===ue;me?(ce.undirectedDegree--,ue.undirectedDegree--,ge&&(ce.undirectedLoops--,ne._undirectedSelfLoopCount--)):(ce.outDegree--,ue.inDegree--,ge&&(ce.directedLoops--,ne._directedSelfLoopCount--)),ne.multi?oe.detachMulti():oe.detach(),me?ne._undirectedSize--:ne._directedSize--,ne.emit("edgeDropped",{key:oe.key,attributes:pe,source:ce.key,target:ue.key,undirected:me})}class Graph extends eventsExports.EventEmitter{constructor(oe){if(super(),oe=assign$5({},DEFAULTS,oe),typeof oe.multi!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${oe.multi}".`);if(!TYPES$1.has(oe.type))throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${oe.type}".`);if(typeof oe.allowSelfLoops!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${oe.allowSelfLoops}".`);const ce=oe.type==="mixed"?MixedNodeData:oe.type==="directed"?DirectedNodeData:UndirectedNodeData;privateProperty(this,"NodeDataClass",ce);const ue="geid_"+INSTANCE_ID()+"_";let pe=0;const me=()=>{let ge;do ge=ue+pe++;while(this._edges.has(ge));return ge};privateProperty(this,"_attributes",{}),privateProperty(this,"_nodes",new Map),privateProperty(this,"_edges",new Map),privateProperty(this,"_directedSize",0),privateProperty(this,"_undirectedSize",0),privateProperty(this,"_directedSelfLoopCount",0),privateProperty(this,"_undirectedSelfLoopCount",0),privateProperty(this,"_edgeKeyGenerator",me),privateProperty(this,"_options",oe),EMITTER_PROPS.forEach(ge=>privateProperty(this,ge,this[ge])),readOnlyProperty(this,"order",()=>this._nodes.size),readOnlyProperty(this,"size",()=>this._edges.size),readOnlyProperty(this,"directedSize",()=>this._directedSize),readOnlyProperty(this,"undirectedSize",()=>this._undirectedSize),readOnlyProperty(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),readOnlyProperty(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),readOnlyProperty(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),readOnlyProperty(this,"multi",this._options.multi),readOnlyProperty(this,"type",this._options.type),readOnlyProperty(this,"allowSelfLoops",this._options.allowSelfLoops),readOnlyProperty(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(oe){return this._nodes.has(""+oe)}hasDirectedEdge(oe,ce){if(this.type==="undirected")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&!pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.out.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(oe,ce){if(this.type==="directed")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(oe,ce){if(arguments.length===1){const ue=""+oe;return this._edges.has(ue)}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?typeof ue.out<"u"&&ue.out.hasOwnProperty(ce)||typeof ue.undirected<"u"&&ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(oe,ce){if(this.type==="undirected")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||void 0;if(pe)return pe.key}undirectedEdge(oe,ce){if(this.type==="directed")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}edge(oe,ce){if(this.multi)throw new UsageGraphError("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.edge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.edge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}areDirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areDirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in||ce in ue.out}areOutNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.out}areInNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in}areUndirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areUndirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="directed"?!1:ce in ue.undirected}areNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&(ce in ue.in||ce in ue.out)||this.type!=="directed"&&ce in ue.undirected}areInboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.in||this.type!=="directed"&&ce in ue.undirected}areOutboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.out||this.type!=="directed"&&ce in ue.undirected}inDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree}outDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree}directedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree}undirectedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegree: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree}inboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree),ue}outboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.outDegree),ue}degree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree),ue}inDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree-ce.directedLoops}outDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree-ce.directedLoops}directedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree-ce.directedLoops*2}undirectedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree-ce.undirectedLoops*2}inboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree,pe+=ce.directedLoops),ue-pe}outboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.outDegree,pe+=ce.directedLoops),ue-pe}degreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree,pe+=ce.directedLoops*2),ue-pe}source(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.source: could not find the "${oe}" edge in the graph.`);return ce.source.key}target(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.target: could not find the "${oe}" edge in the graph.`);return ce.target.key}extremities(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.extremities: could not find the "${oe}" edge in the graph.`);return[ce.source.key,ce.target.key]}opposite(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(ce);if(!ue)throw new NotFoundGraphError(`Graph.opposite: could not find the "${ce}" edge in the graph.`);const pe=ue.source.key,me=ue.target.key;if(oe===pe)return me;if(oe===me)return pe;throw new NotFoundGraphError(`Graph.opposite: the "${oe}" node is not attached to the "${ce}" edge (${pe}, ${me}).`)}hasExtremity(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.hasExtremity: could not find the "${oe}" edge in the graph.`);return ue.source.key===ce||ue.target.key===ce}isUndirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isUndirected: could not find the "${oe}" edge in the graph.`);return ce.undirected}isDirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isDirected: could not find the "${oe}" edge in the graph.`);return!ce.undirected}isSelfLoop(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isSelfLoop: could not find the "${oe}" edge in the graph.`);return ce.source===ce.target}addNode(oe,ce){return addNode(this,oe,ce).key}mergeNode(oe,ce){if(ce&&!isPlainObject(ce))throw new InvalidArgumentsGraphError(`Graph.mergeNode: invalid attributes. Expecting an object but got "${ce}"`);oe=""+oe,ce=ce||{};let ue=this._nodes.get(oe);return ue?(ce&&(assign$5(ue.attributes,ce),this.emit("nodeAttributesUpdated",{type:"merge",key:oe,attributes:ue.attributes,data:ce})),[oe,!1]):(ue=new this.NodeDataClass(oe,ce),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:ce}),[oe,!0])}updateNode(oe,ce){if(ce&&typeof ce!="function")throw new InvalidArgumentsGraphError(`Graph.updateNode: invalid updater function. Expecting a function but got "${ce}"`);oe=""+oe;let ue=this._nodes.get(oe);if(ue){if(ce){const me=ue.attributes;ue.attributes=ce(me),this.emit("nodeAttributesUpdated",{type:"replace",key:oe,attributes:ue.attributes})}return[oe,!1]}const pe=ce?ce({}):{};return ue=new this.NodeDataClass(oe,pe),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:pe}),[oe,!0]}dropNode(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.dropNode: could not find the "${oe}" node in the graph.`);let ue;if(this.type!=="undirected"){for(const pe in ce.out){ue=ce.out[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}for(const pe in ce.in){ue=ce.in[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}}if(this.type!=="directed")for(const pe in ce.undirected){ue=ce.undirected[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}this._nodes.delete(oe),this.emit("nodeDropped",{key:oe,attributes:ce.attributes})}dropEdge(oe){let ce;if(arguments.length>1){const ue=""+arguments[0],pe=""+arguments[1];if(ce=getMatchingEdge(this,ue,pe,this.type),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${ue}" -> "${pe}" edge in the graph.`)}else if(oe=""+oe,ce=this._edges.get(oe),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${oe}" edge in the graph.`);return dropEdgeFromData(this,ce),this}dropDirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");oe=""+oe,ce=""+ce;const ue=getMatchingEdge(this,oe,ce,"directed");if(!ue)throw new NotFoundGraphError(`Graph.dropDirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}dropUndirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const ue=getMatchingEdge(this,oe,ce,"undirected");if(!ue)throw new NotFoundGraphError(`Graph.dropUndirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const oe=this._nodes.values();let ce;for(;ce=oe.next(),ce.done!==!0;)ce.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(oe){return this._attributes[oe]}getAttributes(){return this._attributes}hasAttribute(oe){return this._attributes.hasOwnProperty(oe)}setAttribute(oe,ce){return this._attributes[oe]=ce,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}updateAttribute(oe,ce){if(typeof ce!="function")throw new InvalidArgumentsGraphError("Graph.updateAttribute: updater should be a function.");const ue=this._attributes[oe];return this._attributes[oe]=ce(ue),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}removeAttribute(oe){return delete this._attributes[oe],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:oe}),this}replaceAttributes(oe){if(!isPlainObject(oe))throw new InvalidArgumentsGraphError("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=oe,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(oe){if(!isPlainObject(oe))throw new InvalidArgumentsGraphError("Graph.mergeAttributes: provided attributes are not a plain object.");return assign$5(this._attributes,oe),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:oe}),this}updateAttributes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateAttributes: provided updater is not a function.");return this._attributes=oe(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._nodes.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,me.attributes=oe(me.key,me.attributes);this.emit("eachNodeAttributesUpdated",{hints:ce||null})}updateEachEdgeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._edges.values();let pe,me,ge,ye;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,ge=me.source,ye=me.target,me.attributes=oe(me.key,me.attributes,ge.key,ye.key,ge.attributes,ye.attributes,me.undirected);this.emit("eachEdgeAttributesUpdated",{hints:ce||null})}forEachAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!1,!1,this,oe)}forEachAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!1,!0,this,oe)}forEachAssymetricAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!0,!1,this,oe)}forEachAssymetricAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!0,!0,this,oe)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):take$1(this._nodes.keys(),this._nodes.size)}forEachNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)}findNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.findNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return pe.key}mapNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.mapNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=new Array(this.order);let ge=0;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,me[ge++]=oe(pe.key,pe.attributes);return me}someNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.someNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return!0;return!1}everyNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.everyNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,!oe(pe.key,pe.attributes))return!1;return!0}filterNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.filterNodes: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=[];for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)&&me.push(pe.key);return me}reduceNodes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new InvalidArgumentsGraphError("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let ue=ce;const pe=this._nodes.values();let me,ge;for(;me=pe.next(),me.done!==!0;)ge=me.value,ue=oe(ue,ge.key,ge.attributes);return ue}nodeEntries(){const oe=this._nodes.values();return new Iterator$3(()=>{const ce=oe.next();if(ce.done)return ce;const ue=ce.value;return{value:{node:ue.key,attributes:ue.attributes},done:!1}})}export(){const oe=new Array(this._nodes.size);let ce=0;this._nodes.forEach((pe,me)=>{oe[ce++]=serializeNode(me,pe)});const ue=new Array(this._edges.size);return ce=0,this._edges.forEach((pe,me)=>{ue[ce++]=serializeEdge(this.type,me,pe)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:oe,edges:ue}}import(oe,ce=!1){if(oe instanceof Graph)return oe.forEachNode((ve,xe)=>{ce?this.mergeNode(ve,xe):this.addNode(ve,xe)}),oe.forEachEdge((ve,xe,_e,Se,$e,Re,Ae)=>{ce?Ae?this.mergeUndirectedEdgeWithKey(ve,_e,Se,xe):this.mergeDirectedEdgeWithKey(ve,_e,Se,xe):Ae?this.addUndirectedEdgeWithKey(ve,_e,Se,xe):this.addDirectedEdgeWithKey(ve,_e,Se,xe)}),this;if(!isPlainObject(oe))throw new InvalidArgumentsGraphError("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(oe.attributes){if(!isPlainObject(oe.attributes))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Expecting a plain object.");ce?this.mergeAttributes(oe.attributes):this.replaceAttributes(oe.attributes)}let ue,pe,me,ge,ye;if(oe.nodes){if(me=oe.nodes,!Array.isArray(me))throw new InvalidArgumentsGraphError("Graph.import: invalid nodes. Expecting an array.");for(ue=0,pe=me.length;ue{const me=assign$5({},ue.attributes);ue=new ce.NodeDataClass(pe,me),ce._nodes.set(pe,ue)}),ce}copy(oe){if(oe=oe||{},typeof oe.type=="string"&&oe.type!==this.type&&oe.type!=="mixed")throw new UsageGraphError(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${oe.type}" because this would mean losing information about the current graph.`);if(typeof oe.multi=="boolean"&&oe.multi!==this.multi&&oe.multi!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof oe.allowSelfLoops=="boolean"&&oe.allowSelfLoops!==this.allowSelfLoops&&oe.allowSelfLoops!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const ce=this.emptyCopy(oe),ue=this._edges.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,addEdge(ce,"copy",!1,me.undirected,me.key,me.source.key,me.target.key,assign$5({},me.attributes));return ce}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const oe={};this._nodes.forEach((me,ge)=>{oe[ge]=me.attributes});const ce={},ue={};this._edges.forEach((me,ge)=>{const ye=me.undirected?"--":"->";let ve="",xe=me.source.key,_e=me.target.key,Se;me.undirected&&xe>_e&&(Se=xe,xe=_e,_e=Se);const $e=`(${xe})${ye}(${_e})`;ge.startsWith("geid_")?this.multi&&(typeof ue[$e]>"u"?ue[$e]=0:ue[$e]++,ve+=`${ue[$e]}. `):ve+=`[${ge}]: `,ve+=$e,ce[ve]=me.attributes});const pe={};for(const me in this)this.hasOwnProperty(me)&&!EMITTER_PROPS.has(me)&&typeof this[me]!="function"&&typeof me!="symbol"&&(pe[me]=this[me]);return pe.attributes=this._attributes,pe.nodes=oe,pe.edges=ce,privateProperty(pe,"constructor",this.constructor),pe}}typeof Symbol<"u"&&(Graph.prototype[Symbol.for("nodejs.util.inspect.custom")]=Graph.prototype.inspect);EDGE_ADD_METHODS.forEach(ne=>{["add","merge","update"].forEach(oe=>{const ce=ne.name(oe),ue=oe==="add"?addEdge:mergeEdge;ne.generateKey?Graph.prototype[ce]=function(pe,me,ge){return ue(this,ce,!0,(ne.type||this.type)==="undirected",null,pe,me,ge,oe==="update")}:Graph.prototype[ce]=function(pe,me,ge,ye){return ue(this,ce,!1,(ne.type||this.type)==="undirected",pe,me,ge,ye,oe==="update")}})});attachNodeAttributesMethods(Graph);attachEdgeAttributesMethods(Graph);attachEdgeIterationMethods(Graph);attachNeighborIterationMethods(Graph);class DirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"directed"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('DirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class UndirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"undirected"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('UndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiGraph extends Graph{constructor(oe){const ce=assign$5({multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(ce)}}class MultiDirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"directed",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('MultiDirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiUndirectedGraph extends Graph{constructor(oe){const ce=assign$5({type:"undirected",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('MultiUndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}function attachStaticFromMethod(ne){ne.from=function(oe,ce){const ue=assign$5({},oe.options,ce),pe=new ne(ue);return pe.import(oe),pe}}attachStaticFromMethod(Graph);attachStaticFromMethod(DirectedGraph);attachStaticFromMethod(UndirectedGraph);attachStaticFromMethod(MultiGraph);attachStaticFromMethod(MultiDirectedGraph);attachStaticFromMethod(MultiUndirectedGraph);Graph.Graph=Graph;Graph.DirectedGraph=DirectedGraph;Graph.UndirectedGraph=UndirectedGraph;Graph.MultiGraph=MultiGraph;Graph.MultiDirectedGraph=MultiDirectedGraph;Graph.MultiUndirectedGraph=MultiUndirectedGraph;Graph.InvalidArgumentsGraphError=InvalidArgumentsGraphError;Graph.NotFoundGraphError=NotFoundGraphError;Graph.UsageGraphError=UsageGraphError;function _classCallCheck$2(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function toPrimitive$1(ne,oe){if(typeof ne!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(typeof ue!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function toPropertyKey$1(ne){var oe=toPrimitive$1(ne,"string");return typeof oe=="symbol"?oe:String(oe)}function _defineProperties$2(ne,oe){for(var ce=0;cene.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce>>16,ce=(ne&65280)>>>8,ue=ne&255,pe=255,me=rgbaToFloat(oe,ce,ue,pe,!0);return FLOAT_INDEX_CACHE[ne]=me,me}function colorToIndex(ne,oe,ce,ue){return ce+(oe<<8)+(ne<<16)}function getPixelColor(ne,oe,ce,ue,pe,me){var ge=Math.floor(ce/me*pe),ye=Math.floor(ne.drawingBufferHeight/me-ue/me*pe),ve=new Uint8Array(4);ne.bindFramebuffer(ne.FRAMEBUFFER,oe),ne.readPixels(ge,ye,1,1,ne.RGBA,ne.UNSIGNED_BYTE,ve);var xe=_slicedToArray$2(ve,4),_e=xe[0],Se=xe[1],$e=xe[2],Re=xe[3];return[_e,Se,$e,Re]}function _defineProperty$4(ne,oe,ce){return oe=toPropertyKey$1(oe),oe in ne?Object.defineProperty(ne,oe,{value:ce,enumerable:!0,configurable:!0,writable:!0}):ne[oe]=ce,ne}function ownKeys$3(ne,oe){var ce=Object.keys(ne);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ne);oe&&(ue=ue.filter(function(pe){return Object.getOwnPropertyDescriptor(ne,pe).enumerable})),ce.push.apply(ce,ue)}return ce}function _objectSpread2$3(ne){for(var oe=1;oeUe){var qe="…";for(xe=xe+qe,We=ne.measureText(xe).width;We>Ue&&xe.length>1;)xe=xe.slice(0,-2)+qe,We=ne.measureText(xe).width;if(xe.length<4)return}var ze;Ne>0?Fe>0?ze=Math.acos(Ne/Ue):ze=Math.asin(Fe/Ue):Fe>0?ze=Math.acos(Ne/Ue)+Math.PI:ze=Math.asin(Ne/Ue)+Math.PI/2,ne.save(),ne.translate(ke,Be),ne.rotate(ze),ne.fillText(xe,-We/2,oe.size/2+me),ne.restore()}}}function drawDiscNodeLabel(ne,oe,ce){if(oe.label){var ue=ce.labelSize,pe=ce.labelFont,me=ce.labelWeight,ge=ce.labelColor.attribute?oe[ce.labelColor.attribute]||ce.labelColor.color||"#000":ce.labelColor.color;ne.fillStyle=ge,ne.font="".concat(me," ").concat(ue,"px ").concat(pe),ne.fillText(oe.label,oe.x+oe.size+3,oe.y+ue/3)}}function drawDiscNodeHover(ne,oe,ce){var ue=ce.labelSize,pe=ce.labelFont,me=ce.labelWeight;ne.font="".concat(me," ").concat(ue,"px ").concat(pe),ne.fillStyle="#FFF",ne.shadowOffsetX=0,ne.shadowOffsetY=0,ne.shadowBlur=8,ne.shadowColor="#000";var ge=2;if(typeof oe.label=="string"){var ye=ne.measureText(oe.label).width,ve=Math.round(ye+5),xe=Math.round(ue+2*ge),_e=Math.max(oe.size,ue/2)+ge,Se=Math.asin(xe/2/_e),$e=Math.sqrt(Math.abs(Math.pow(_e,2)-Math.pow(xe/2,2)));ne.beginPath(),ne.moveTo(oe.x+$e,oe.y+xe/2),ne.lineTo(oe.x+_e+ve,oe.y+xe/2),ne.lineTo(oe.x+_e+ve,oe.y-xe/2),ne.lineTo(oe.x+$e,oe.y-xe/2),ne.arc(oe.x,oe.y,_e,Se,-Se),ne.closePath(),ne.fill()}else ne.beginPath(),ne.arc(oe.x,oe.y,oe.size+ge,0,Math.PI*2),ne.closePath(),ne.fill();ne.shadowOffsetX=0,ne.shadowOffsetY=0,ne.shadowBlur=0,drawDiscNodeLabel(ne,oe,ce)}var SHADER_SOURCE$6=` +`,SIZE_FACTOR_PER_ATTRIBUTE_TYPE=_defineProperty$4(_defineProperty$4(_defineProperty$4(_defineProperty$4(_defineProperty$4(_defineProperty$4(_defineProperty$4(_defineProperty$4({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4);function getAttributeItemsCount(ne){return ne.normalized?1:ne.size}function getAttributesItemsCount(ne){var oe=0;return ne.forEach(function(ce){return oe+=getAttributeItemsCount(ce)}),oe}var Program$1=function(){function ne(oe,ce,ue){_classCallCheck$2(this,ne),_defineProperty$4(this,"array",new Float32Array),_defineProperty$4(this,"constantArray",new Float32Array),_defineProperty$4(this,"capacity",0),_defineProperty$4(this,"verticesCount",0);var pe=this.getDefinition();if(this.VERTICES=pe.VERTICES,this.VERTEX_SHADER_SOURCE=pe.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=pe.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=pe.UNIFORMS,this.ATTRIBUTES=pe.ATTRIBUTES,this.METHOD=pe.METHOD,this.CONSTANT_ATTRIBUTES="CONSTANT_ATTRIBUTES"in pe?pe.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA="CONSTANT_DATA"in pe?pe.CONSTANT_DATA:[],this.isInstanced="CONSTANT_ATTRIBUTES"in pe,this.ATTRIBUTES_ITEMS_COUNT=getAttributesItemsCount(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=ue,this.normalProgram=this.getProgramInfo("normal",oe,pe.VERTEX_SHADER_SOURCE,pe.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=ce?this.getProgramInfo("pick",oe,PICKING_PREFIX+pe.VERTEX_SHADER_SOURCE,PICKING_PREFIX+pe.FRAGMENT_SHADER_SOURCE,ce):null,this.isInstanced){var me=getAttributesItemsCount(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw new Error("Program: error while getting constant data (expected ".concat(this.VERTICES," items, received ").concat(this.CONSTANT_DATA.length," instead)"));this.constantArray=new Float32Array(this.CONSTANT_DATA.length*me);for(var ge=0;geUe){var qe="…";for(xe=xe+qe,We=ne.measureText(xe).width;We>Ue&&xe.length>1;)xe=xe.slice(0,-2)+qe,We=ne.measureText(xe).width;if(xe.length<4)return}var ze;Ne>0?Fe>0?ze=Math.acos(Ne/Ue):ze=Math.asin(Fe/Ue):Fe>0?ze=Math.acos(Ne/Ue)+Math.PI:ze=Math.asin(Ne/Ue)+Math.PI/2,ne.save(),ne.translate(ke,Be),ne.rotate(ze),ne.fillText(xe,-We/2,oe.size/2+me),ne.restore()}}}function drawDiscNodeLabel(ne,oe,ce){if(oe.label){var ue=ce.labelSize,pe=ce.labelFont,me=ce.labelWeight,ge=ce.labelColor.attribute?oe[ce.labelColor.attribute]||ce.labelColor.color||"#000":ce.labelColor.color;ne.fillStyle=ge,ne.font="".concat(me," ").concat(ue,"px ").concat(pe),ne.fillText(oe.label,oe.x+oe.size+3,oe.y+ue/3)}}function drawDiscNodeHover(ne,oe,ce){var ue=ce.labelSize,pe=ce.labelFont,me=ce.labelWeight;ne.font="".concat(me," ").concat(ue,"px ").concat(pe),ne.fillStyle="#FFF",ne.shadowOffsetX=0,ne.shadowOffsetY=0,ne.shadowBlur=8,ne.shadowColor="#000";var ge=2;if(typeof oe.label=="string"){var ye=ne.measureText(oe.label).width,ve=Math.round(ye+5),xe=Math.round(ue+2*ge),_e=Math.max(oe.size,ue/2)+ge,Se=Math.asin(xe/2/_e),$e=Math.sqrt(Math.abs(Math.pow(_e,2)-Math.pow(xe/2,2)));ne.beginPath(),ne.moveTo(oe.x+$e,oe.y+xe/2),ne.lineTo(oe.x+_e+ve,oe.y+xe/2),ne.lineTo(oe.x+_e+ve,oe.y-xe/2),ne.lineTo(oe.x+$e,oe.y-xe/2),ne.arc(oe.x,oe.y,_e,Se,-Se),ne.closePath(),ne.fill()}else ne.beginPath(),ne.arc(oe.x,oe.y,oe.size+ge,0,Math.PI*2),ne.closePath(),ne.fill();ne.shadowOffsetX=0,ne.shadowOffsetY=0,ne.shadowBlur=0,drawDiscNodeLabel(ne,oe,ce)}var SHADER_SOURCE$6=` precision highp float; varying vec4 v_color; @@ -573,7 +568,7 @@ void main() { v_color.a *= bias; } -`,VERTEX_SHADER_SOURCE$3=SHADER_SOURCE$5,_WebGLRenderingContex$3=WebGLRenderingContext,UNSIGNED_BYTE$3=_WebGLRenderingContex$3.UNSIGNED_BYTE,FLOAT$3=_WebGLRenderingContex$3.FLOAT,UNIFORMS$2=["u_sizeRatio","u_correctionRatio","u_matrix"],NodeCircleProgram=function(ne){_inherits$2(oe,ne);function oe(){return _classCallCheck$2(this,oe),_callSuper$1(this,oe,arguments)}return _createClass$2(oe,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:VERTEX_SHADER_SOURCE$3,FRAGMENT_SHADER_SOURCE:FRAGMENT_SHADER_SOURCE$2,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:UNIFORMS$2,ATTRIBUTES:[{name:"a_position",size:2,type:FLOAT$3},{name:"a_size",size:1,type:FLOAT$3},{name:"a_color",size:4,type:UNSIGNED_BYTE$3,normalized:!0},{name:"a_id",size:4,type:UNSIGNED_BYTE$3,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:FLOAT$3}],CONSTANT_DATA:[[oe.ANGLE_1],[oe.ANGLE_2],[oe.ANGLE_3]]}}},{key:"processVisibleItem",value:function(ue,pe,me){var ge=this.array,ye=floatColor(me.color);ge[pe++]=me.x,ge[pe++]=me.y,ge[pe++]=me.size,ge[pe++]=ye,ge[pe++]=ue}},{key:"setUniforms",value:function(ue,pe){var me=pe.gl,ge=pe.uniformLocations,ye=ge.u_sizeRatio,ve=ge.u_correctionRatio,xe=ge.u_matrix;me.uniform1f(ve,ue.correctionRatio),me.uniform1f(ye,ue.sizeRatio),me.uniformMatrix3fv(xe,!1,ue.matrix)}}]),oe}(NodeProgram);_defineProperty$2(NodeCircleProgram,"ANGLE_1",0);_defineProperty$2(NodeCircleProgram,"ANGLE_2",2*Math.PI/3);_defineProperty$2(NodeCircleProgram,"ANGLE_3",4*Math.PI/3);var SHADER_SOURCE$4=` +`,VERTEX_SHADER_SOURCE$3=SHADER_SOURCE$5,_WebGLRenderingContex$3=WebGLRenderingContext,UNSIGNED_BYTE$3=_WebGLRenderingContex$3.UNSIGNED_BYTE,FLOAT$3=_WebGLRenderingContex$3.FLOAT,UNIFORMS$2=["u_sizeRatio","u_correctionRatio","u_matrix"],NodeCircleProgram=function(ne){_inherits$2(oe,ne);function oe(){return _classCallCheck$2(this,oe),_callSuper$1(this,oe,arguments)}return _createClass$2(oe,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:VERTEX_SHADER_SOURCE$3,FRAGMENT_SHADER_SOURCE:FRAGMENT_SHADER_SOURCE$2,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:UNIFORMS$2,ATTRIBUTES:[{name:"a_position",size:2,type:FLOAT$3},{name:"a_size",size:1,type:FLOAT$3},{name:"a_color",size:4,type:UNSIGNED_BYTE$3,normalized:!0},{name:"a_id",size:4,type:UNSIGNED_BYTE$3,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:FLOAT$3}],CONSTANT_DATA:[[oe.ANGLE_1],[oe.ANGLE_2],[oe.ANGLE_3]]}}},{key:"processVisibleItem",value:function(ue,pe,me){var ge=this.array,ye=floatColor(me.color);ge[pe++]=me.x,ge[pe++]=me.y,ge[pe++]=me.size,ge[pe++]=ye,ge[pe++]=ue}},{key:"setUniforms",value:function(ue,pe){var me=pe.gl,ge=pe.uniformLocations,ye=ge.u_sizeRatio,ve=ge.u_correctionRatio,xe=ge.u_matrix;me.uniform1f(ve,ue.correctionRatio),me.uniform1f(ye,ue.sizeRatio),me.uniformMatrix3fv(xe,!1,ue.matrix)}}]),oe}(NodeProgram);_defineProperty$4(NodeCircleProgram,"ANGLE_1",0);_defineProperty$4(NodeCircleProgram,"ANGLE_2",2*Math.PI/3);_defineProperty$4(NodeCircleProgram,"ANGLE_3",4*Math.PI/3);var SHADER_SOURCE$4=` precision mediump float; varying vec4 v_color; @@ -790,9 +785,9 @@ void main() { v_color.a *= bias; } -`,VERTEX_SHADER_SOURCE=SHADER_SOURCE,_WebGLRenderingContex$4=WebGLRenderingContext,UNSIGNED_BYTE$4=_WebGLRenderingContex$4.UNSIGNED_BYTE,FLOAT$4=_WebGLRenderingContex$4.FLOAT,EdgeClampedProgram=function(ne){_inherits$2(oe,ne);function oe(){return _classCallCheck$2(this,oe),_callSuper$1(this,oe,arguments)}return _createClass$2(oe,[{key:"getDefinition",value:function(){return _objectSpread2$1(_objectSpread2$1({},_get$1(_getPrototypeOf$2(oe.prototype),"getDefinition",this).call(this)),{},{VERTEX_SHADER_SOURCE,ATTRIBUTES:[{name:"a_positionStart",size:2,type:FLOAT$4},{name:"a_positionEnd",size:2,type:FLOAT$4},{name:"a_normal",size:2,type:FLOAT$4},{name:"a_color",size:4,type:UNSIGNED_BYTE$4,normalized:!0},{name:"a_id",size:4,type:UNSIGNED_BYTE$4,normalized:!0},{name:"a_radius",size:1,type:FLOAT$4}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:FLOAT$4},{name:"a_normalCoef",size:1,type:FLOAT$4},{name:"a_radiusCoef",size:1,type:FLOAT$4}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]})}},{key:"processVisibleItem",value:function(ue,pe,me,ge,ye){var ve=ye.size||1,xe=me.x,_e=me.y,Se=ge.x,$e=ge.y,Re=floatColor(ye.color),Ae=Se-xe,Ie=$e-_e,ke=ge.size||1,Be=Ae*Ae+Ie*Ie,Ne=0,Fe=0;Be&&(Be=1/Math.sqrt(Be),Ne=-Ie*Be*ve,Fe=Ae*Be*ve);var Ue=this.array;Ue[pe++]=xe,Ue[pe++]=_e,Ue[pe++]=Se,Ue[pe++]=$e,Ue[pe++]=Ne,Ue[pe++]=Fe,Ue[pe++]=Re,Ue[pe++]=ue,Ue[pe++]=ke}}]),oe}(EdgeRectangleProgram),EdgeArrowProgram=createEdgeCompoundProgram([EdgeClampedProgram,EdgeArrowHeadProgram]),EdgeArrowProgram$1=EdgeArrowProgram,TypedEventEmitter=function(ne){_inherits$2(oe,ne);function oe(){var ce;return _classCallCheck$2(this,oe),ce=_callSuper$1(this,oe),ce.rawEmitter=_assertThisInitialized$2(ce),ce}return _createClass$2(oe)}(eventsExports.EventEmitter),isGraph=function(oe){return oe!==null&&typeof oe=="object"&&typeof oe.addUndirectedEdgeWithKey=="function"&&typeof oe.dropNode=="function"&&typeof oe.multi=="boolean"};const isGraph$1=getDefaultExportFromCjs(isGraph);var linear=function(oe){return oe},quadraticIn=function(oe){return oe*oe},quadraticOut=function(oe){return oe*(2-oe)},quadraticInOut=function(oe){return(oe*=2)<1?.5*oe*oe:-.5*(--oe*(oe-2)-1)},cubicIn=function(oe){return oe*oe*oe},cubicOut=function(oe){return--oe*oe*oe+1},cubicInOut=function(oe){return(oe*=2)<1?.5*oe*oe*oe:.5*((oe-=2)*oe*oe+2)},easings={linear,quadraticIn,quadraticOut,quadraticInOut,cubicIn,cubicOut,cubicInOut},ANIMATE_DEFAULTS={easing:"quadraticInOut",duration:150};function identity$2(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function scale(ne,oe,ce){return ne[0]=oe,ne[4]=typeof ce=="number"?ce:oe,ne}function rotate(ne,oe){var ce=Math.sin(oe),ue=Math.cos(oe);return ne[0]=ue,ne[1]=ce,ne[3]=-ce,ne[4]=ue,ne}function translate(ne,oe,ce){return ne[6]=oe,ne[7]=ce,ne}function multiply(ne,oe){var ce=ne[0],ue=ne[1],pe=ne[2],me=ne[3],ge=ne[4],ye=ne[5],ve=ne[6],xe=ne[7],_e=ne[8],Se=oe[0],$e=oe[1],Re=oe[2],Ae=oe[3],Ie=oe[4],ke=oe[5],Be=oe[6],Ne=oe[7],Fe=oe[8];return ne[0]=Se*ce+$e*me+Re*ve,ne[1]=Se*ue+$e*ge+Re*xe,ne[2]=Se*pe+$e*ye+Re*_e,ne[3]=Ae*ce+Ie*me+ke*ve,ne[4]=Ae*ue+Ie*ge+ke*xe,ne[5]=Ae*pe+Ie*ye+ke*_e,ne[6]=Be*ce+Ne*me+Fe*ve,ne[7]=Be*ue+Ne*ge+Fe*xe,ne[8]=Be*pe+Ne*ye+Fe*_e,ne}function multiplyVec2(ne,oe){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ue=ne[0],pe=ne[1],me=ne[3],ge=ne[4],ye=ne[6],ve=ne[7],xe=oe.x,_e=oe.y;return{x:xe*ue+_e*me+ye*ce,y:xe*pe+_e*ge+ve*ce}}function getCorrectionRatio(ne,oe){var ce=ne.height/ne.width,ue=oe.height/oe.width;return ce<1&&ue>1||ce>1&&ue<1?1:Math.min(Math.max(ue,1/ue),Math.max(1/ce,ce))}function matrixFromCamera(ne,oe,ce,ue,pe){var me=ne.angle,ge=ne.ratio,ye=ne.x,ve=ne.y,xe=oe.width,_e=oe.height,Se=identity$2(),$e=Math.min(xe,_e)-2*ue,Re=getCorrectionRatio(oe,ce);return pe?(multiply(Se,translate(identity$2(),ye,ve)),multiply(Se,scale(identity$2(),ge)),multiply(Se,rotate(identity$2(),me)),multiply(Se,scale(identity$2(),xe/$e/2/Re,_e/$e/2/Re))):(multiply(Se,scale(identity$2(),2*($e/xe)*Re,2*($e/_e)*Re)),multiply(Se,rotate(identity$2(),-me)),multiply(Se,scale(identity$2(),1/ge)),multiply(Se,translate(identity$2(),-ye,-ve))),Se}function getMatrixImpact(ne,oe,ce){var ue=multiplyVec2(ne,{x:Math.cos(oe.angle),y:Math.sin(oe.angle)},0),pe=ue.x,me=ue.y;return 1/Math.sqrt(Math.pow(pe,2)+Math.pow(me,2))/ce.width}function graphExtent(ne){if(!ne.order)return{x:[0,1],y:[0,1]};var oe=1/0,ce=-1/0,ue=1/0,pe=-1/0;return ne.forEachNode(function(me,ge){var ye=ge.x,ve=ge.y;yece&&(ce=ye),vepe&&(pe=ve)}),{x:[oe,ce],y:[ue,pe]}}function validateGraph(ne){if(!isGraph$1(ne))throw new Error("Sigma: invalid graph instance.");ne.forEachNode(function(oe,ce){if(!Number.isFinite(ce.x)||!Number.isFinite(ce.y))throw new Error("Sigma: Coordinates of node ".concat(oe," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function createElement(ne,oe,ce){var ue=document.createElement(ne);if(oe)for(var pe in oe)ue.style[pe]=oe[pe];if(ce)for(var me in ce)ue.setAttribute(me,ce[me]);return ue}function getPixelRatio(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function zIndexOrdering(ne,oe,ce){return ce.sort(function(ue,pe){var me=oe(ue)||0,ge=oe(pe)||0;return mege?1:0})}function createNormalizationFunction(ne){var oe=_slicedToArray$1(ne.x,2),ce=oe[0],ue=oe[1],pe=_slicedToArray$1(ne.y,2),me=pe[0],ge=pe[1],ye=Math.max(ue-ce,ge-me),ve=(ue+ce)/2,xe=(ge+me)/2;(ye===0||Math.abs(ye)===1/0||isNaN(ye))&&(ye=1),isNaN(ve)&&(ve=0),isNaN(xe)&&(xe=0);var _e=function($e){return{x:.5+($e.x-ve)/ye,y:.5+($e.y-xe)/ye}};return _e.applyTo=function(Se){Se.x=.5+(Se.x-ve)/ye,Se.y=.5+(Se.y-xe)/ye},_e.inverse=function(Se){return{x:ve+ye*(Se.x-.5),y:xe+ye*(Se.y-.5)}},_e.ratio=ye,_e}function extend$3(ne,oe){var ce=oe.size;if(ce!==0){var ue=ne.length;ne.length+=ce;var pe=0;oe.forEach(function(me){ne[ue+pe]=me,pe++})}}function assign$4(ne){ne=ne||{};for(var oe=0,ce=arguments.length<=1?0:arguments.length-1;oe=1){ge.nextFrame=null,ge.setState(ve),ge.animationCallback&&(ge.animationCallback.call(null),ge.animationCallback=void 0);return}var Ie=xe(Ae),ke={};typeof ve.x=="number"&&(ke.x=Se.x+(ve.x-Se.x)*Ie),typeof ve.y=="number"&&(ke.y=Se.y+(ve.y-Se.y)*Ie),typeof ve.angle=="number"&&(ke.angle=Se.angle+(ve.angle-Se.angle)*Ie),typeof ve.ratio=="number"&&(ke.ratio=Se.ratio+(ve.ratio-Se.ratio)*Ie),ge.setState(ke),ge.nextFrame=requestAnimationFrame(Re)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame($e)):$e(),this.animationCallback=me}}},{key:"animatedZoom",value:function(ue){if(!ue)this.animate({ratio:this.ratio/DEFAULT_ZOOMING_RATIO});else{if(typeof ue=="number")return this.animate({ratio:this.ratio/ue});this.animate({ratio:this.ratio/(ue.factor||DEFAULT_ZOOMING_RATIO)},ue)}}},{key:"animatedUnzoom",value:function(ue){if(!ue)this.animate({ratio:this.ratio*DEFAULT_ZOOMING_RATIO});else{if(typeof ue=="number")return this.animate({ratio:this.ratio*ue});this.animate({ratio:this.ratio*(ue.factor||DEFAULT_ZOOMING_RATIO)},ue)}}},{key:"animatedReset",value:function(ue){this.animate({x:.5,y:.5,ratio:1,angle:0},ue)}},{key:"copy",value:function(){return oe.from(this.getState())}}],[{key:"from",value:function(ue){var pe=new oe;return pe.setState(ue)}}]),oe}(TypedEventEmitter);function getPosition(ne,oe){var ce=oe.getBoundingClientRect();return{x:ne.clientX-ce.left,y:ne.clientY-ce.top}}function getMouseCoords(ne,oe){var ce=_objectSpread2$1(_objectSpread2$1({},getPosition(ne,oe)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){ce.sigmaDefaultPrevented=!0},original:ne});return ce}function getWheelCoords(ne,oe){return _objectSpread2$1(_objectSpread2$1({},getMouseCoords(ne,oe)),{},{delta:getWheelDelta(ne)})}var MAX_TOUCHES=2;function getTouchesArray(ne){for(var oe=[],ce=0,ue=Math.min(ne.length,MAX_TOUCHES);ce0;pe.draggedEvents=0,Se&&pe.renderer.refresh()},0),this.emit("mouseup",getMouseCoords(ue,this.container))}}},{key:"handleMove",value:function(ue){var pe=this;if(this.enabled){var me=getMouseCoords(ue,this.container);if(this.emit("mousemovebody",me),ue.target===this.container&&this.emit("mousemove",me),!me.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){pe.movingTimeout=null,pe.isMoving=!1},DRAG_TIMEOUT$1);var ge=this.renderer.getCamera(),ye=getPosition(ue,this.container),ve=ye.x,xe=ye.y,_e=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),Se=this.renderer.viewportToFramedGraph({x:ve,y:xe}),$e=_e.x-Se.x,Re=_e.y-Se.y,Ae=ge.getState(),Ie=Ae.x+$e,ke=Ae.y+Re;ge.setState({x:Ie,y:ke}),this.lastMouseX=ve,this.lastMouseY=xe,ue.preventDefault(),ue.stopPropagation()}}}},{key:"handleLeave",value:function(ue){this.emit("mouseleave",getMouseCoords(ue,this.container))}},{key:"handleEnter",value:function(ue){this.emit("mouseenter",getMouseCoords(ue,this.container))}},{key:"handleWheel",value:function(ue){var pe=this;if(this.enabled){ue.preventDefault(),ue.stopPropagation();var me=getWheelDelta(ue);if(me){var ge=getWheelCoords(ue,this.container);if(this.emit("wheel",ge),!ge.sigmaDefaultPrevented){var ye=me>0?1/ZOOMING_RATIO:ZOOMING_RATIO,ve=this.renderer.getCamera(),xe=ve.getBoundedRatio(ve.getState().ratio*ye),_e=me>0?1:-1,Se=Date.now();this.currentWheelDirection===_e&&this.lastWheelTriggerTime&&Se-this.lastWheelTriggerTimeue.size?-1:ce.sizeue.key?1:-1}}]),ne}(),LabelGrid=function(){function ne(){_classCallCheck$2(this,ne),_defineProperty$2(this,"width",0),_defineProperty$2(this,"height",0),_defineProperty$2(this,"cellSize",0),_defineProperty$2(this,"columns",0),_defineProperty$2(this,"rows",0),_defineProperty$2(this,"cells",{})}return _createClass$2(ne,[{key:"resizeAndClear",value:function(ce,ue){this.width=ce.width,this.height=ce.height,this.cellSize=ue,this.columns=Math.ceil(ce.width/ue),this.rows=Math.ceil(ce.height/ue),this.cells={}}},{key:"getIndex",value:function(ce){var ue=Math.floor(ce.x/this.cellSize),pe=Math.floor(ce.y/this.cellSize);return pe*this.columns+ue}},{key:"add",value:function(ce,ue,pe){var me=new LabelCandidate(ce,ue),ge=this.getIndex(pe),ye=this.cells[ge];ye||(ye=[],this.cells[ge]=ye),ye.push(me)}},{key:"organize",value:function(){for(var ce in this.cells){var ue=this.cells[ce];ue.sort(LabelCandidate.compare)}}},{key:"getLabelsToDisplay",value:function(ce,ue){var pe=this.cellSize*this.cellSize,me=pe/ce/ce,ge=me*ue/pe,ye=Math.ceil(ge),ve=[];for(var xe in this.cells)for(var _e=this.cells[xe],Se=0;Se2&&arguments[2]!==void 0?arguments[2]:{};if(_classCallCheck$2(this,oe),pe=_callSuper$1(this,oe),_defineProperty$2(_assertThisInitialized$2(pe),"elements",{}),_defineProperty$2(_assertThisInitialized$2(pe),"canvasContexts",{}),_defineProperty$2(_assertThisInitialized$2(pe),"webGLContexts",{}),_defineProperty$2(_assertThisInitialized$2(pe),"pickingLayers",new Set),_defineProperty$2(_assertThisInitialized$2(pe),"textures",{}),_defineProperty$2(_assertThisInitialized$2(pe),"frameBuffers",{}),_defineProperty$2(_assertThisInitialized$2(pe),"activeListeners",{}),_defineProperty$2(_assertThisInitialized$2(pe),"labelGrid",new LabelGrid),_defineProperty$2(_assertThisInitialized$2(pe),"nodeDataCache",{}),_defineProperty$2(_assertThisInitialized$2(pe),"edgeDataCache",{}),_defineProperty$2(_assertThisInitialized$2(pe),"nodeProgramIndex",{}),_defineProperty$2(_assertThisInitialized$2(pe),"edgeProgramIndex",{}),_defineProperty$2(_assertThisInitialized$2(pe),"nodesWithForcedLabels",new Set),_defineProperty$2(_assertThisInitialized$2(pe),"edgesWithForcedLabels",new Set),_defineProperty$2(_assertThisInitialized$2(pe),"nodeExtent",{x:[0,1],y:[0,1]}),_defineProperty$2(_assertThisInitialized$2(pe),"nodeZExtent",[1/0,-1/0]),_defineProperty$2(_assertThisInitialized$2(pe),"edgeZExtent",[1/0,-1/0]),_defineProperty$2(_assertThisInitialized$2(pe),"matrix",identity$2()),_defineProperty$2(_assertThisInitialized$2(pe),"invMatrix",identity$2()),_defineProperty$2(_assertThisInitialized$2(pe),"correctionRatio",1),_defineProperty$2(_assertThisInitialized$2(pe),"customBBox",null),_defineProperty$2(_assertThisInitialized$2(pe),"normalizationFunction",createNormalizationFunction({x:[0,1],y:[0,1]})),_defineProperty$2(_assertThisInitialized$2(pe),"graphToViewportRatio",1),_defineProperty$2(_assertThisInitialized$2(pe),"itemIDsIndex",{}),_defineProperty$2(_assertThisInitialized$2(pe),"nodeIndices",{}),_defineProperty$2(_assertThisInitialized$2(pe),"edgeIndices",{}),_defineProperty$2(_assertThisInitialized$2(pe),"width",0),_defineProperty$2(_assertThisInitialized$2(pe),"height",0),_defineProperty$2(_assertThisInitialized$2(pe),"pixelRatio",getPixelRatio()),_defineProperty$2(_assertThisInitialized$2(pe),"pickingDownSizingRatio",2*pe.pixelRatio),_defineProperty$2(_assertThisInitialized$2(pe),"displayedNodeLabels",new Set),_defineProperty$2(_assertThisInitialized$2(pe),"displayedEdgeLabels",new Set),_defineProperty$2(_assertThisInitialized$2(pe),"highlightedNodes",new Set),_defineProperty$2(_assertThisInitialized$2(pe),"hoveredNode",null),_defineProperty$2(_assertThisInitialized$2(pe),"hoveredEdge",null),_defineProperty$2(_assertThisInitialized$2(pe),"renderFrame",null),_defineProperty$2(_assertThisInitialized$2(pe),"renderHighlightedNodesFrame",null),_defineProperty$2(_assertThisInitialized$2(pe),"needToProcess",!1),_defineProperty$2(_assertThisInitialized$2(pe),"checkEdgesEventsFrame",null),_defineProperty$2(_assertThisInitialized$2(pe),"nodePrograms",{}),_defineProperty$2(_assertThisInitialized$2(pe),"nodeHoverPrograms",{}),_defineProperty$2(_assertThisInitialized$2(pe),"edgePrograms",{}),pe.settings=resolveSettings(me),validateSettings(pe.settings),validateGraph(ce),!(ue instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");pe.graph=ce,pe.container=ue,pe.createWebGLContext("edges",{picking:me.enableEdgeEvents}),pe.createCanvasContext("edgeLabels"),pe.createWebGLContext("nodes",{picking:!0}),pe.createCanvasContext("labels"),pe.createCanvasContext("hovers"),pe.createWebGLContext("hoverNodes"),pe.createCanvasContext("mouse"),pe.resize();for(var ge in pe.settings.nodeProgramClasses){var ye=pe.settings.nodeProgramClasses[ge];pe.nodePrograms[ge]=new ye(pe.webGLContexts.nodes,pe.frameBuffers.nodes,_assertThisInitialized$2(pe));var ve=ye;ge in pe.settings.nodeHoverProgramClasses&&(ve=pe.settings.nodeHoverProgramClasses[ge]),pe.nodeHoverPrograms[ge]=new ve(pe.webGLContexts.hoverNodes,null,_assertThisInitialized$2(pe))}for(var xe in pe.settings.edgeProgramClasses){var _e=pe.settings.edgeProgramClasses[xe];pe.edgePrograms[xe]=new _e(pe.webGLContexts.edges,pe.frameBuffers.edges,_assertThisInitialized$2(pe))}return pe.camera=new Camera,pe.bindCameraHandlers(),pe.mouseCaptor=new MouseCaptor(pe.elements.mouse,_assertThisInitialized$2(pe)),pe.touchCaptor=new TouchCaptor(pe.elements.mouse,_assertThisInitialized$2(pe)),pe.bindEventHandlers(),pe.bindGraphHandlers(),pe.handleSettingsUpdate(),pe.refresh(),pe}return _createClass$2(oe,[{key:"createCanvas",value:function(ue){var pe=createElement("canvas",{position:"absolute"},{class:"sigma-".concat(ue)});return this.elements[ue]=pe,this.container.appendChild(pe),pe}},{key:"createCanvasContext",value:function(ue){var pe=this.createCanvas(ue),me={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[ue]=pe.getContext("2d",me),this}},{key:"createWebGLContext",value:function(ue,pe){var me=this.createCanvas(ue);pe!=null&&pe.hidden&&me.remove();var ge=_objectSpread2$1({preserveDrawingBuffer:!1,antialias:!1},pe||{}),ye;ye=me.getContext("webgl2",ge),ye||(ye=me.getContext("webgl",ge)),ye||(ye=me.getContext("experimental-webgl",ge));var ve=ye;if(this.webGLContexts[ue]=ve,ve.blendFunc(ve.ONE,ve.ONE_MINUS_SRC_ALPHA),pe!=null&&pe.picking){this.pickingLayers.add(ue);var xe=ve.createFramebuffer();if(!xe)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(ue));this.frameBuffers[ue]=xe}return this}},{key:"resetWebGLTexture",value:function(ue){var pe=this.webGLContexts[ue],me=this.frameBuffers[ue],ge=this.textures[ue];ge&&pe.deleteTexture(ge);var ye=pe.createTexture();return pe.bindFramebuffer(pe.FRAMEBUFFER,me),pe.bindTexture(pe.TEXTURE_2D,ye),pe.texImage2D(pe.TEXTURE_2D,0,pe.RGBA,this.width,this.height,0,pe.RGBA,pe.UNSIGNED_BYTE,null),pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_2D,ye,0),this.textures[ue]=ye,this}},{key:"bindCameraHandlers",value:function(){var ue=this;return this.activeListeners.camera=function(){ue.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(ue){var pe=ue.x,me=ue.y,ge=getPixelColor(this.webGLContexts.nodes,this.frameBuffers.nodes,pe,me,this.pixelRatio,this.pickingDownSizingRatio),ye=colorToIndex.apply(void 0,_toConsumableArray$1(ge)),ve=this.itemIDsIndex[ye];return ve&&ve.type==="node"?ve.id:null}},{key:"bindEventHandlers",value:function(){var ue=this;this.activeListeners.handleResize=function(){ue.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(me){var ge={event:me,preventSigmaDefault:function(){me.preventSigmaDefault()}},ye=ue.getNodeAtPosition(me);if(ye&&ue.hoveredNode!==ye&&!ue.nodeDataCache[ye].hidden){ue.hoveredNode&&ue.emit("leaveNode",_objectSpread2$1(_objectSpread2$1({},ge),{},{node:ue.hoveredNode})),ue.hoveredNode=ye,ue.emit("enterNode",_objectSpread2$1(_objectSpread2$1({},ge),{},{node:ye})),ue.scheduleHighlightedNodesRender();return}if(ue.hoveredNode&&ue.getNodeAtPosition(me)!==ue.hoveredNode){var ve=ue.hoveredNode;ue.hoveredNode=null,ue.emit("leaveNode",_objectSpread2$1(_objectSpread2$1({},ge),{},{node:ve})),ue.scheduleHighlightedNodesRender();return}if(ue.settings.enableEdgeEvents){var xe=ue.hoveredNode?null:ue.getEdgeAtPoint(ge.event.x,ge.event.y);xe!==ue.hoveredEdge&&(ue.hoveredEdge&&ue.emit("leaveEdge",_objectSpread2$1(_objectSpread2$1({},ge),{},{edge:ue.hoveredEdge})),xe&&ue.emit("enterEdge",_objectSpread2$1(_objectSpread2$1({},ge),{},{edge:xe})),ue.hoveredEdge=xe)}},this.activeListeners.handleLeave=function(me){var ge={event:me,preventSigmaDefault:function(){me.preventSigmaDefault()}};ue.hoveredNode&&(ue.emit("leaveNode",_objectSpread2$1(_objectSpread2$1({},ge),{},{node:ue.hoveredNode})),ue.scheduleHighlightedNodesRender()),ue.settings.enableEdgeEvents&&ue.hoveredEdge&&(ue.emit("leaveEdge",_objectSpread2$1(_objectSpread2$1({},ge),{},{edge:ue.hoveredEdge})),ue.scheduleHighlightedNodesRender()),ue.emit("leaveStage",_objectSpread2$1({},ge))},this.activeListeners.handleEnter=function(me){var ge={event:me,preventSigmaDefault:function(){me.preventSigmaDefault()}};ue.emit("enterStage",_objectSpread2$1({},ge))};var pe=function(ge){return function(ye){var ve={event:ye,preventSigmaDefault:function(){ye.preventSigmaDefault()}},xe=ye.original.isFakeSigmaMouseEvent,_e=xe?ue.getNodeAtPosition(ye):ue.hoveredNode;if(_e)return ue.emit("".concat(ge,"Node"),_objectSpread2$1(_objectSpread2$1({},ve),{},{node:_e}));if(ue.settings.enableEdgeEvents){var Se=ue.getEdgeAtPoint(ye.x,ye.y);if(Se)return ue.emit("".concat(ge,"Edge"),_objectSpread2$1(_objectSpread2$1({},ve),{},{edge:Se}))}return ue.emit("".concat(ge,"Stage"),ve)}};return this.activeListeners.handleClick=pe("click"),this.activeListeners.handleRightClick=pe("rightClick"),this.activeListeners.handleDoubleClick=pe("doubleClick"),this.activeListeners.handleWheel=pe("wheel"),this.activeListeners.handleDown=pe("down"),this.activeListeners.handleUp=pe("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this}},{key:"bindGraphHandlers",value:function(){var ue=this,pe=this.graph,me=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(ge){var ye,ve=(ye=ge.hints)===null||ye===void 0?void 0:ye.attributes;ue.graph.forEachNode(function(_e){return ue.updateNode(_e)});var xe=!ve||ve.some(function(_e){return me.has(_e)});ue.refresh({partialGraph:{nodes:pe.nodes()},skipIndexation:!xe,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(ge){var ye,ve=(ye=ge.hints)===null||ye===void 0?void 0:ye.attributes;ue.graph.forEachEdge(function(_e){return ue.updateEdge(_e)});var xe=ve&&["zIndex","type"].some(function(_e){return ve==null?void 0:ve.includes(_e)});ue.refresh({partialGraph:{edges:pe.edges()},skipIndexation:!xe,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(ge){var ye=ge.key;ue.addNode(ye),ue.refresh({partialGraph:{nodes:[ye]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(ge){var ye=ge.key;ue.refresh({partialGraph:{nodes:[ye]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(ge){var ye=ge.key;ue.removeNode(ye),ue.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(ge){var ye=ge.key;ue.addEdge(ye),ue.refresh({partialGraph:{edges:[ye]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(ge){var ye=ge.key;ue.refresh({partialGraph:{edges:[ye]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(ge){var ye=ge.key;ue.removeEdge(ye),ue.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){ue.clearEdgeState(),ue.clearEdgeIndices(),ue.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){ue.clearEdgeState(),ue.clearNodeState(),ue.clearEdgeIndices(),ue.clearNodeIndices(),ue.refresh({schedule:!0})},pe.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),pe.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),pe.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),pe.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),pe.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),pe.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),pe.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),pe.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),pe.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),pe.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var ue=this.graph;ue.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),ue.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),ue.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),ue.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),ue.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),ue.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),ue.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),ue.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),ue.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),ue.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(ue,pe){var me=getPixelColor(this.webGLContexts.edges,this.frameBuffers.edges,ue,pe,this.pixelRatio,this.pickingDownSizingRatio),ge=colorToIndex.apply(void 0,_toConsumableArray$1(me)),ye=this.itemIDsIndex[ge];return ye&&ye.type==="edge"?ye.id:null}},{key:"process",value:function(){var ue=this,pe=this.graph,me=this.settings,ge=this.getDimensions();this.nodeExtent=graphExtent(this.graph),this.normalizationFunction=createNormalizationFunction(this.customBBox||this.nodeExtent);var ye=new Camera,ve=matrixFromCamera(ye.getState(),ge,this.getGraphDimensions(),this.getSetting("stagePadding")||0);this.labelGrid.resizeAndClear(ge,me.labelGridCellSize);for(var xe={},_e={},Se={},$e={},Re=1,Ae=pe.nodes(),Ie=0,ke=Ae.length;Iethis.width+X_LABEL_MARGIN||$e<-Y_LABEL_MARGIN||$e>this.height+Y_LABEL_MARGIN)){this.displayedNodeLabels.add(ve);var Ae=this.settings.defaultDrawNodeLabel,Ie=this.nodePrograms[xe.type],ke=(Ie==null?void 0:Ie.drawLabel)||Ae;ke(me,_objectSpread2$1(_objectSpread2$1({key:ve},xe),{},{size:Re,x:Se,y:$e}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var ue=this.canvasContexts.edgeLabels;ue.clearRect(0,0,this.width,this.height);var pe=edgeLabelsToDisplayFromNodes({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});extend$3(pe,this.edgesWithForcedLabels);for(var me=new Set,ge=0,ye=pe.length;gethis.nodeZExtent[1]&&(this.nodeZExtent[1]=me.zIndex))}},{key:"updateNode",value:function(ue){this.addNode(ue);var pe=this.nodeDataCache[ue];this.normalizationFunction.applyTo(pe)}},{key:"removeNode",value:function(ue){delete this.nodeDataCache[ue],delete this.nodeProgramIndex[ue],this.highlightedNodes.delete(ue),this.hoveredNode===ue&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(ue)}},{key:"addEdge",value:function(ue){var pe=Object.assign({},this.graph.getEdgeAttributes(ue));this.settings.edgeReducer&&(pe=this.settings.edgeReducer(ue,pe));var me=applyEdgeDefaults(this.settings,ue,pe);this.edgeDataCache[ue]=me,this.edgesWithForcedLabels.delete(ue),me.forceLabel&&!me.hidden&&this.edgesWithForcedLabels.add(ue),this.settings.zIndex&&(me.zIndexthis.edgeZExtent[1]&&(this.edgeZExtent[1]=me.zIndex))}},{key:"updateEdge",value:function(ue){this.addEdge(ue)}},{key:"removeEdge",value:function(ue){delete this.edgeDataCache[ue],delete this.edgeProgramIndex[ue],this.hoveredEdge===ue&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(ue)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new LabelGrid,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0]}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(ue,pe,me){var ge=this.nodeDataCache[ue],ye=this.nodePrograms[ge.type];if(!ye)throw new Error('Sigma: could not find a suitable program for node type "'.concat(ge.type,'"!'));ye.process(pe,me,ge),this.nodeProgramIndex[ue]=me}},{key:"addEdgeToProgram",value:function(ue,pe,me){var ge=this.edgeDataCache[ue],ye=this.edgePrograms[ge.type];if(!ye)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(ge.type,'"!'));var ve=this.graph.extremities(ue),xe=this.nodeDataCache[ve[0]],_e=this.nodeDataCache[ve[1]];ye.process(pe,me,xe,_e,ge),this.edgeProgramIndex[ue]=me}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(ue){this.unbindCameraHandlers(),this.camera=ue,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(ue){ue!==this.graph&&(this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=ue,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var ue=this.customBBox||this.nodeExtent;return{width:ue.x[1]-ue.x[0]||1,height:ue.y[1]-ue.y[0]||1}}},{key:"getNodeDisplayData",value:function(ue){var pe=this.nodeDataCache[ue];return pe?Object.assign({},pe):void 0}},{key:"getEdgeDisplayData",value:function(ue){var pe=this.edgeDataCache[ue];return pe?Object.assign({},pe):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return _objectSpread2$1({},this.settings)}},{key:"getSetting",value:function(ue){return this.settings[ue]}},{key:"setSetting",value:function(ue,pe){return this.settings[ue]=pe,validateSettings(this.settings),this.handleSettingsUpdate(),this.refresh(),this}},{key:"updateSetting",value:function(ue,pe){return this.settings[ue]=pe(this.settings[ue]),validateSettings(this.settings),this.handleSettingsUpdate(),this.scheduleRefresh(),this}},{key:"resize",value:function(){var ue=this.width,pe=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=getPixelRatio(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(ue===this.width&&pe===this.height)return this;this.emit("resize");for(var me in this.elements){var ge=this.elements[me];ge.style.width=this.width+"px",ge.style.height=this.height+"px"}for(var ye in this.canvasContexts)this.elements[ye].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[ye].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[ye].scale(this.pixelRatio,this.pixelRatio);for(var ve in this.webGLContexts){this.elements[ve].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[ve].setAttribute("height",this.height*this.pixelRatio+"px");var xe=this.webGLContexts[ve];if(xe.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(ve)){var _e=this.textures[ve];_e&&xe.deleteTexture(_e)}}return this}},{key:"clear",value:function(){return this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this}},{key:"refresh",value:function(ue){var pe=this,me=(ue==null?void 0:ue.skipIndexation)!==void 0?ue==null?void 0:ue.skipIndexation:!1,ge=(ue==null?void 0:ue.schedule)!==void 0?ue.schedule:!1,ye=!ue||!ue.partialGraph;if(ye)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(Ue){return pe.addNode(Ue)}),this.graph.forEachEdge(function(Ue){return pe.addEdge(Ue)});else{for(var ve,xe,_e=((ve=ue.partialGraph)===null||ve===void 0?void 0:ve.nodes)||[],Se=0,$e=(_e==null?void 0:_e.length)||0;Se<$e;Se++){var Re=_e[Se];if(this.updateNode(Re),me){var Ae=this.nodeProgramIndex[Re];if(Ae===void 0)throw new Error('Sigma: node "'.concat(Re,`" can't be repaint`));this.addNodeToProgram(Re,this.nodeIndices[Re],Ae)}}for(var Ie=(ue==null||(xe=ue.partialGraph)===null||xe===void 0?void 0:xe.edges)||[],ke=0,Be=Ie.length;ke1&&arguments[1]!==void 0?arguments[1]:{},me=!!pe.cameraState||!!pe.viewportDimensions||!!pe.graphDimensions,ge=pe.matrix?pe.matrix:me?matrixFromCamera(pe.cameraState||this.camera.getState(),pe.viewportDimensions||this.getDimensions(),pe.graphDimensions||this.getGraphDimensions(),pe.padding||this.getSetting("stagePadding")||0):this.matrix,ye=multiplyVec2(ge,ue);return{x:(1+ye.x)*this.width/2,y:(1-ye.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(ue){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=!!pe.cameraState||!!pe.viewportDimensions||!pe.graphDimensions,ge=pe.matrix?pe.matrix:me?matrixFromCamera(pe.cameraState||this.camera.getState(),pe.viewportDimensions||this.getDimensions(),pe.graphDimensions||this.getGraphDimensions(),pe.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix,ye=multiplyVec2(ge,{x:ue.x/this.width*2-1,y:1-ue.y/this.height*2});return isNaN(ye.x)&&(ye.x=0),isNaN(ye.y)&&(ye.y=0),ye}},{key:"viewportToGraph",value:function(ue){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(ue,pe))}},{key:"graphToViewport",value:function(ue){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(ue),pe)}},{key:"getGraphToViewportRatio",value:function(){var ue={x:0,y:0},pe={x:1,y:1},me=Math.sqrt(Math.pow(ue.x-pe.x,2)+Math.pow(ue.y-pe.y,2)),ge=this.graphToViewport(ue),ye=this.graphToViewport(pe),ve=Math.sqrt(Math.pow(ge.x-ye.x,2)+Math.pow(ge.y-ye.y,2));return ve/me}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(ue){return this.customBBox=ue,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var ue in this.webGLContexts){var pe,me=this.webGLContexts[ue];(pe=me.getExtension("WEBGL_lose_context"))===null||pe===void 0||pe.loseContext()}for(var ge=this.container;ge.firstChild;)ge.removeChild(ge.firstChild);this.canvasContexts={},this.webGLContexts={},this.elements={};for(var ye in this.nodePrograms)this.nodePrograms[ye].kill();for(var ve in this.nodeHoverPrograms)this.nodeHoverPrograms[ve].kill();for(var xe in this.edgePrograms)this.edgePrograms[xe].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={}}},{key:"scaleSize",value:function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return ue/this.settings.zoomToSizeRatioFunction(pe)*(this.getSetting("itemSizesReference")==="positions"?pe*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){return _objectSpread2$1({},this.elements)}}]),oe}(TypedEventEmitter);const m$6=reactExports.createContext(null),h$7=m$6.Provider;function f$6(){const ne=reactExports.useContext(m$6);if(ne==null)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of ");return ne}function v$6(){return f$6().sigma}function p$7(){const{sigma:ne,container:oe}=f$6(),[ce,ue]=reactExports.useState({});return reactExports.useEffect(()=>{if(!ne||!ce)return;const pe={};return Object.keys(ce).forEach(me=>{pe[me]=ce[me],ne.setSetting(me,ce[me])}),()=>{ne&&oe&&oe.offsetWidth>0&&oe.offsetHeight>0&&Object.keys(pe).forEach(me=>{ne.setSetting(me,pe[me])})}},[ne,ce,oe]),ue}const b$6=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","beforeRender","afterRender","kill"],w$6=["click","rightClick","mouseup","mousedown","mousemove","mousemovebody","doubleClick","wheel"],E$4=["touchup","touchdown","touchmove"],O$4=["updated"];function y$4(){const ne=v$6(),oe=p$7(),[ce,ue]=reactExports.useState({});return reactExports.useEffect(()=>{if(!ne||!ce)return;const pe=ce,me=Object.keys(pe);return me.forEach(ge=>{const ye=pe[ge];b$6.find(ve=>ve===ge)&&ne.on(ge,ye),w$6.find(ve=>ve===ge)&&ne.getMouseCaptor().on(ge,ye),E$4.find(ve=>ve===ge)&&ne.getTouchCaptor().on(ge,ye),O$4.find(ve=>ve===ge)&&ne.getCamera().on(ge,ye)}),()=>{ne&&me.forEach(ge=>{const ye=pe[ge];b$6.find(ve=>ve===ge)&&ne.off(ge,ye),w$6.find(ve=>ve===ge)&&ne.getMouseCaptor().off(ge,ye),E$4.find(ve=>ve===ge)&&ne.getTouchCaptor().off(ge,ye),O$4.find(ve=>ve===ge)&&ne.getCamera().off(ge,ye)})}},[ne,ce,oe]),ue}function _$4(){const ne=v$6();return reactExports.useCallback((oe,ce=!0)=>{ne&&oe&&(ce&&ne.getGraph().order>0&&ne.getGraph().clear(),ne.getGraph().import(oe),ne.refresh())},[ne])}function C$4(ne,oe){if(ne===oe)return!0;if(typeof ne=="object"&&ne!=null&&typeof oe=="object"&&oe!=null){if(Object.keys(ne).length!=Object.keys(oe).length)return!1;for(const ce in ne)if(!Object.hasOwn(oe,ce)||!C$4(ne[ce],oe[ce]))return!1;return!0}return!1}const k$7=reactExports.forwardRef(({graph:ne,id:oe,className:ce,style:ue,settings:pe={},children:me},ge)=>{const ye=reactExports.useRef(null),ve=reactExports.useRef(null),xe={className:`react-sigma ${ce||""}`,id:oe,style:ue},[_e,Se]=reactExports.useState(null),[$e,Re]=reactExports.useState(pe);reactExports.useEffect(()=>{C$4($e,pe)||Re(pe)},[pe]),reactExports.useEffect(()=>{let ke=null;if(ve.current!==null){let Be=new Graph;ne&&(Be=typeof ne=="function"?new ne:ne),ke=new Sigma$1(Be,ve.current,$e),_e&&ke.getCamera().setState(_e.getCamera().getState())}return Se(ke),()=>{ke&&ke.kill(),Se(null)}},[ve,ne,$e]),reactExports.useImperativeHandle(ge,()=>_e,[_e]);const Ae=reactExports.useMemo(()=>_e&&ye.current?{sigma:_e,container:ye.current}:null,[_e,ye.current]),Ie=Ae!==null?React$2.createElement(h$7,{value:Ae},me):null;return React$2.createElement("div",Object.assign({},xe,{ref:ye}),React$2.createElement("div",{className:"sigma-container",ref:ve}),Ie)}),reactSigma_min="";function _classCallCheck$1(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function toPrimitive(ne,oe){if(typeof ne!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(typeof ue!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function toPropertyKey(ne){var oe=toPrimitive(ne,"string");return typeof oe=="symbol"?oe:String(oe)}function _defineProperties$1(ne,oe){for(var ce=0;cene.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ceWt){var un="…";for(Re=Re+un,Kt=ue.measureText(Re).width;Kt>Wt&&Re.length>1;)Re=Re.slice(0,-2)+un,Kt=ue.measureText(Re).width;if(Re.length<4)return}for(var Xt={},nn=0,vn=Re.length;nn2&&arguments[2]!==void 0?arguments[2]:1,ue=ne[0],pe=ne[1],me=ne[3],ge=ne[4],ye=ne[6],ve=ne[7],xe=oe.x,_e=oe.y;return{x:xe*ue+_e*me+ye*ce,y:xe*pe+_e*ge+ve*ce}}function getCorrectionRatio(ne,oe){var ce=ne.height/ne.width,ue=oe.height/oe.width;return ce<1&&ue>1||ce>1&&ue<1?1:Math.min(Math.max(ue,1/ue),Math.max(1/ce,ce))}function matrixFromCamera(ne,oe,ce,ue,pe){var me=ne.angle,ge=ne.ratio,ye=ne.x,ve=ne.y,xe=oe.width,_e=oe.height,Se=identity$2(),$e=Math.min(xe,_e)-2*ue,Re=getCorrectionRatio(oe,ce);return pe?(multiply(Se,translate(identity$2(),ye,ve)),multiply(Se,scale(identity$2(),ge)),multiply(Se,rotate(identity$2(),me)),multiply(Se,scale(identity$2(),xe/$e/2/Re,_e/$e/2/Re))):(multiply(Se,scale(identity$2(),2*($e/xe)*Re,2*($e/_e)*Re)),multiply(Se,rotate(identity$2(),-me)),multiply(Se,scale(identity$2(),1/ge)),multiply(Se,translate(identity$2(),-ye,-ve))),Se}function getMatrixImpact(ne,oe,ce){var ue=multiplyVec2(ne,{x:Math.cos(oe.angle),y:Math.sin(oe.angle)},0),pe=ue.x,me=ue.y;return 1/Math.sqrt(Math.pow(pe,2)+Math.pow(me,2))/ce.width}function graphExtent(ne){if(!ne.order)return{x:[0,1],y:[0,1]};var oe=1/0,ce=-1/0,ue=1/0,pe=-1/0;return ne.forEachNode(function(me,ge){var ye=ge.x,ve=ge.y;yece&&(ce=ye),vepe&&(pe=ve)}),{x:[oe,ce],y:[ue,pe]}}function validateGraph(ne){if(!isGraph$1(ne))throw new Error("Sigma: invalid graph instance.");ne.forEachNode(function(oe,ce){if(!Number.isFinite(ce.x)||!Number.isFinite(ce.y))throw new Error("Sigma: Coordinates of node ".concat(oe," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function createElement(ne,oe,ce){var ue=document.createElement(ne);if(oe)for(var pe in oe)ue.style[pe]=oe[pe];if(ce)for(var me in ce)ue.setAttribute(me,ce[me]);return ue}function getPixelRatio(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function zIndexOrdering(ne,oe,ce){return ce.sort(function(ue,pe){var me=oe(ue)||0,ge=oe(pe)||0;return mege?1:0})}function createNormalizationFunction(ne){var oe=_slicedToArray$2(ne.x,2),ce=oe[0],ue=oe[1],pe=_slicedToArray$2(ne.y,2),me=pe[0],ge=pe[1],ye=Math.max(ue-ce,ge-me),ve=(ue+ce)/2,xe=(ge+me)/2;(ye===0||Math.abs(ye)===1/0||isNaN(ye))&&(ye=1),isNaN(ve)&&(ve=0),isNaN(xe)&&(xe=0);var _e=function($e){return{x:.5+($e.x-ve)/ye,y:.5+($e.y-xe)/ye}};return _e.applyTo=function(Se){Se.x=.5+(Se.x-ve)/ye,Se.y=.5+(Se.y-xe)/ye},_e.inverse=function(Se){return{x:ve+ye*(Se.x-.5),y:xe+ye*(Se.y-.5)}},_e.ratio=ye,_e}function extend$3(ne,oe){var ce=oe.size;if(ce!==0){var ue=ne.length;ne.length+=ce;var pe=0;oe.forEach(function(me){ne[ue+pe]=me,pe++})}}function assign$4(ne){ne=ne||{};for(var oe=0,ce=arguments.length<=1?0:arguments.length-1;oe=1){ge.nextFrame=null,ge.setState(ve),ge.animationCallback&&(ge.animationCallback.call(null),ge.animationCallback=void 0);return}var Ie=xe(Ae),ke={};typeof ve.x=="number"&&(ke.x=Se.x+(ve.x-Se.x)*Ie),typeof ve.y=="number"&&(ke.y=Se.y+(ve.y-Se.y)*Ie),typeof ve.angle=="number"&&(ke.angle=Se.angle+(ve.angle-Se.angle)*Ie),typeof ve.ratio=="number"&&(ke.ratio=Se.ratio+(ve.ratio-Se.ratio)*Ie),ge.setState(ke),ge.nextFrame=requestAnimationFrame(Re)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame($e)):$e(),this.animationCallback=me}}},{key:"animatedZoom",value:function(ue){if(!ue)this.animate({ratio:this.ratio/DEFAULT_ZOOMING_RATIO});else{if(typeof ue=="number")return this.animate({ratio:this.ratio/ue});this.animate({ratio:this.ratio/(ue.factor||DEFAULT_ZOOMING_RATIO)},ue)}}},{key:"animatedUnzoom",value:function(ue){if(!ue)this.animate({ratio:this.ratio*DEFAULT_ZOOMING_RATIO});else{if(typeof ue=="number")return this.animate({ratio:this.ratio*ue});this.animate({ratio:this.ratio*(ue.factor||DEFAULT_ZOOMING_RATIO)},ue)}}},{key:"animatedReset",value:function(ue){this.animate({x:.5,y:.5,ratio:1,angle:0},ue)}},{key:"copy",value:function(){return oe.from(this.getState())}}],[{key:"from",value:function(ue){var pe=new oe;return pe.setState(ue)}}]),oe}(TypedEventEmitter);function getPosition(ne,oe){var ce=oe.getBoundingClientRect();return{x:ne.clientX-ce.left,y:ne.clientY-ce.top}}function getMouseCoords(ne,oe){var ce=_objectSpread2$3(_objectSpread2$3({},getPosition(ne,oe)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){ce.sigmaDefaultPrevented=!0},original:ne});return ce}function getWheelCoords(ne,oe){return _objectSpread2$3(_objectSpread2$3({},getMouseCoords(ne,oe)),{},{delta:getWheelDelta(ne)})}var MAX_TOUCHES=2;function getTouchesArray(ne){for(var oe=[],ce=0,ue=Math.min(ne.length,MAX_TOUCHES);ce0;pe.draggedEvents=0,Se&&pe.renderer.refresh()},0),this.emit("mouseup",getMouseCoords(ue,this.container))}}},{key:"handleMove",value:function(ue){var pe=this;if(this.enabled){var me=getMouseCoords(ue,this.container);if(this.emit("mousemovebody",me),ue.target===this.container&&this.emit("mousemove",me),!me.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){pe.movingTimeout=null,pe.isMoving=!1},DRAG_TIMEOUT$1);var ge=this.renderer.getCamera(),ye=getPosition(ue,this.container),ve=ye.x,xe=ye.y,_e=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),Se=this.renderer.viewportToFramedGraph({x:ve,y:xe}),$e=_e.x-Se.x,Re=_e.y-Se.y,Ae=ge.getState(),Ie=Ae.x+$e,ke=Ae.y+Re;ge.setState({x:Ie,y:ke}),this.lastMouseX=ve,this.lastMouseY=xe,ue.preventDefault(),ue.stopPropagation()}}}},{key:"handleLeave",value:function(ue){this.emit("mouseleave",getMouseCoords(ue,this.container))}},{key:"handleEnter",value:function(ue){this.emit("mouseenter",getMouseCoords(ue,this.container))}},{key:"handleWheel",value:function(ue){var pe=this;if(this.enabled){ue.preventDefault(),ue.stopPropagation();var me=getWheelDelta(ue);if(me){var ge=getWheelCoords(ue,this.container);if(this.emit("wheel",ge),!ge.sigmaDefaultPrevented){var ye=me>0?1/ZOOMING_RATIO:ZOOMING_RATIO,ve=this.renderer.getCamera(),xe=ve.getBoundedRatio(ve.getState().ratio*ye),_e=me>0?1:-1,Se=Date.now();this.currentWheelDirection===_e&&this.lastWheelTriggerTime&&Se-this.lastWheelTriggerTimeue.size?-1:ce.sizeue.key?1:-1}}]),ne}(),LabelGrid=function(){function ne(){_classCallCheck$2(this,ne),_defineProperty$4(this,"width",0),_defineProperty$4(this,"height",0),_defineProperty$4(this,"cellSize",0),_defineProperty$4(this,"columns",0),_defineProperty$4(this,"rows",0),_defineProperty$4(this,"cells",{})}return _createClass$2(ne,[{key:"resizeAndClear",value:function(ce,ue){this.width=ce.width,this.height=ce.height,this.cellSize=ue,this.columns=Math.ceil(ce.width/ue),this.rows=Math.ceil(ce.height/ue),this.cells={}}},{key:"getIndex",value:function(ce){var ue=Math.floor(ce.x/this.cellSize),pe=Math.floor(ce.y/this.cellSize);return pe*this.columns+ue}},{key:"add",value:function(ce,ue,pe){var me=new LabelCandidate(ce,ue),ge=this.getIndex(pe),ye=this.cells[ge];ye||(ye=[],this.cells[ge]=ye),ye.push(me)}},{key:"organize",value:function(){for(var ce in this.cells){var ue=this.cells[ce];ue.sort(LabelCandidate.compare)}}},{key:"getLabelsToDisplay",value:function(ce,ue){var pe=this.cellSize*this.cellSize,me=pe/ce/ce,ge=me*ue/pe,ye=Math.ceil(ge),ve=[];for(var xe in this.cells)for(var _e=this.cells[xe],Se=0;Se2&&arguments[2]!==void 0?arguments[2]:{};if(_classCallCheck$2(this,oe),pe=_callSuper$1(this,oe),_defineProperty$4(_assertThisInitialized$2(pe),"elements",{}),_defineProperty$4(_assertThisInitialized$2(pe),"canvasContexts",{}),_defineProperty$4(_assertThisInitialized$2(pe),"webGLContexts",{}),_defineProperty$4(_assertThisInitialized$2(pe),"pickingLayers",new Set),_defineProperty$4(_assertThisInitialized$2(pe),"textures",{}),_defineProperty$4(_assertThisInitialized$2(pe),"frameBuffers",{}),_defineProperty$4(_assertThisInitialized$2(pe),"activeListeners",{}),_defineProperty$4(_assertThisInitialized$2(pe),"labelGrid",new LabelGrid),_defineProperty$4(_assertThisInitialized$2(pe),"nodeDataCache",{}),_defineProperty$4(_assertThisInitialized$2(pe),"edgeDataCache",{}),_defineProperty$4(_assertThisInitialized$2(pe),"nodeProgramIndex",{}),_defineProperty$4(_assertThisInitialized$2(pe),"edgeProgramIndex",{}),_defineProperty$4(_assertThisInitialized$2(pe),"nodesWithForcedLabels",new Set),_defineProperty$4(_assertThisInitialized$2(pe),"edgesWithForcedLabels",new Set),_defineProperty$4(_assertThisInitialized$2(pe),"nodeExtent",{x:[0,1],y:[0,1]}),_defineProperty$4(_assertThisInitialized$2(pe),"nodeZExtent",[1/0,-1/0]),_defineProperty$4(_assertThisInitialized$2(pe),"edgeZExtent",[1/0,-1/0]),_defineProperty$4(_assertThisInitialized$2(pe),"matrix",identity$2()),_defineProperty$4(_assertThisInitialized$2(pe),"invMatrix",identity$2()),_defineProperty$4(_assertThisInitialized$2(pe),"correctionRatio",1),_defineProperty$4(_assertThisInitialized$2(pe),"customBBox",null),_defineProperty$4(_assertThisInitialized$2(pe),"normalizationFunction",createNormalizationFunction({x:[0,1],y:[0,1]})),_defineProperty$4(_assertThisInitialized$2(pe),"graphToViewportRatio",1),_defineProperty$4(_assertThisInitialized$2(pe),"itemIDsIndex",{}),_defineProperty$4(_assertThisInitialized$2(pe),"nodeIndices",{}),_defineProperty$4(_assertThisInitialized$2(pe),"edgeIndices",{}),_defineProperty$4(_assertThisInitialized$2(pe),"width",0),_defineProperty$4(_assertThisInitialized$2(pe),"height",0),_defineProperty$4(_assertThisInitialized$2(pe),"pixelRatio",getPixelRatio()),_defineProperty$4(_assertThisInitialized$2(pe),"pickingDownSizingRatio",2*pe.pixelRatio),_defineProperty$4(_assertThisInitialized$2(pe),"displayedNodeLabels",new Set),_defineProperty$4(_assertThisInitialized$2(pe),"displayedEdgeLabels",new Set),_defineProperty$4(_assertThisInitialized$2(pe),"highlightedNodes",new Set),_defineProperty$4(_assertThisInitialized$2(pe),"hoveredNode",null),_defineProperty$4(_assertThisInitialized$2(pe),"hoveredEdge",null),_defineProperty$4(_assertThisInitialized$2(pe),"renderFrame",null),_defineProperty$4(_assertThisInitialized$2(pe),"renderHighlightedNodesFrame",null),_defineProperty$4(_assertThisInitialized$2(pe),"needToProcess",!1),_defineProperty$4(_assertThisInitialized$2(pe),"checkEdgesEventsFrame",null),_defineProperty$4(_assertThisInitialized$2(pe),"nodePrograms",{}),_defineProperty$4(_assertThisInitialized$2(pe),"nodeHoverPrograms",{}),_defineProperty$4(_assertThisInitialized$2(pe),"edgePrograms",{}),pe.settings=resolveSettings(me),validateSettings(pe.settings),validateGraph(ce),!(ue instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");pe.graph=ce,pe.container=ue,pe.createWebGLContext("edges",{picking:me.enableEdgeEvents}),pe.createCanvasContext("edgeLabels"),pe.createWebGLContext("nodes",{picking:!0}),pe.createCanvasContext("labels"),pe.createCanvasContext("hovers"),pe.createWebGLContext("hoverNodes"),pe.createCanvasContext("mouse"),pe.resize();for(var ge in pe.settings.nodeProgramClasses){var ye=pe.settings.nodeProgramClasses[ge];pe.nodePrograms[ge]=new ye(pe.webGLContexts.nodes,pe.frameBuffers.nodes,_assertThisInitialized$2(pe));var ve=ye;ge in pe.settings.nodeHoverProgramClasses&&(ve=pe.settings.nodeHoverProgramClasses[ge]),pe.nodeHoverPrograms[ge]=new ve(pe.webGLContexts.hoverNodes,null,_assertThisInitialized$2(pe))}for(var xe in pe.settings.edgeProgramClasses){var _e=pe.settings.edgeProgramClasses[xe];pe.edgePrograms[xe]=new _e(pe.webGLContexts.edges,pe.frameBuffers.edges,_assertThisInitialized$2(pe))}return pe.camera=new Camera,pe.bindCameraHandlers(),pe.mouseCaptor=new MouseCaptor(pe.elements.mouse,_assertThisInitialized$2(pe)),pe.touchCaptor=new TouchCaptor(pe.elements.mouse,_assertThisInitialized$2(pe)),pe.bindEventHandlers(),pe.bindGraphHandlers(),pe.handleSettingsUpdate(),pe.refresh(),pe}return _createClass$2(oe,[{key:"createCanvas",value:function(ue){var pe=createElement("canvas",{position:"absolute"},{class:"sigma-".concat(ue)});return this.elements[ue]=pe,this.container.appendChild(pe),pe}},{key:"createCanvasContext",value:function(ue){var pe=this.createCanvas(ue),me={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[ue]=pe.getContext("2d",me),this}},{key:"createWebGLContext",value:function(ue,pe){var me=this.createCanvas(ue);pe!=null&&pe.hidden&&me.remove();var ge=_objectSpread2$3({preserveDrawingBuffer:!1,antialias:!1},pe||{}),ye;ye=me.getContext("webgl2",ge),ye||(ye=me.getContext("webgl",ge)),ye||(ye=me.getContext("experimental-webgl",ge));var ve=ye;if(this.webGLContexts[ue]=ve,ve.blendFunc(ve.ONE,ve.ONE_MINUS_SRC_ALPHA),pe!=null&&pe.picking){this.pickingLayers.add(ue);var xe=ve.createFramebuffer();if(!xe)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(ue));this.frameBuffers[ue]=xe}return this}},{key:"resetWebGLTexture",value:function(ue){var pe=this.webGLContexts[ue],me=this.frameBuffers[ue],ge=this.textures[ue];ge&&pe.deleteTexture(ge);var ye=pe.createTexture();return pe.bindFramebuffer(pe.FRAMEBUFFER,me),pe.bindTexture(pe.TEXTURE_2D,ye),pe.texImage2D(pe.TEXTURE_2D,0,pe.RGBA,this.width,this.height,0,pe.RGBA,pe.UNSIGNED_BYTE,null),pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_2D,ye,0),this.textures[ue]=ye,this}},{key:"bindCameraHandlers",value:function(){var ue=this;return this.activeListeners.camera=function(){ue.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(ue){var pe=ue.x,me=ue.y,ge=getPixelColor(this.webGLContexts.nodes,this.frameBuffers.nodes,pe,me,this.pixelRatio,this.pickingDownSizingRatio),ye=colorToIndex.apply(void 0,_toConsumableArray$1(ge)),ve=this.itemIDsIndex[ye];return ve&&ve.type==="node"?ve.id:null}},{key:"bindEventHandlers",value:function(){var ue=this;this.activeListeners.handleResize=function(){ue.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(me){var ge={event:me,preventSigmaDefault:function(){me.preventSigmaDefault()}},ye=ue.getNodeAtPosition(me);if(ye&&ue.hoveredNode!==ye&&!ue.nodeDataCache[ye].hidden){ue.hoveredNode&&ue.emit("leaveNode",_objectSpread2$3(_objectSpread2$3({},ge),{},{node:ue.hoveredNode})),ue.hoveredNode=ye,ue.emit("enterNode",_objectSpread2$3(_objectSpread2$3({},ge),{},{node:ye})),ue.scheduleHighlightedNodesRender();return}if(ue.hoveredNode&&ue.getNodeAtPosition(me)!==ue.hoveredNode){var ve=ue.hoveredNode;ue.hoveredNode=null,ue.emit("leaveNode",_objectSpread2$3(_objectSpread2$3({},ge),{},{node:ve})),ue.scheduleHighlightedNodesRender();return}if(ue.settings.enableEdgeEvents){var xe=ue.hoveredNode?null:ue.getEdgeAtPoint(ge.event.x,ge.event.y);xe!==ue.hoveredEdge&&(ue.hoveredEdge&&ue.emit("leaveEdge",_objectSpread2$3(_objectSpread2$3({},ge),{},{edge:ue.hoveredEdge})),xe&&ue.emit("enterEdge",_objectSpread2$3(_objectSpread2$3({},ge),{},{edge:xe})),ue.hoveredEdge=xe)}},this.activeListeners.handleLeave=function(me){var ge={event:me,preventSigmaDefault:function(){me.preventSigmaDefault()}};ue.hoveredNode&&(ue.emit("leaveNode",_objectSpread2$3(_objectSpread2$3({},ge),{},{node:ue.hoveredNode})),ue.scheduleHighlightedNodesRender()),ue.settings.enableEdgeEvents&&ue.hoveredEdge&&(ue.emit("leaveEdge",_objectSpread2$3(_objectSpread2$3({},ge),{},{edge:ue.hoveredEdge})),ue.scheduleHighlightedNodesRender()),ue.emit("leaveStage",_objectSpread2$3({},ge))},this.activeListeners.handleEnter=function(me){var ge={event:me,preventSigmaDefault:function(){me.preventSigmaDefault()}};ue.emit("enterStage",_objectSpread2$3({},ge))};var pe=function(ge){return function(ye){var ve={event:ye,preventSigmaDefault:function(){ye.preventSigmaDefault()}},xe=ye.original.isFakeSigmaMouseEvent,_e=xe?ue.getNodeAtPosition(ye):ue.hoveredNode;if(_e)return ue.emit("".concat(ge,"Node"),_objectSpread2$3(_objectSpread2$3({},ve),{},{node:_e}));if(ue.settings.enableEdgeEvents){var Se=ue.getEdgeAtPoint(ye.x,ye.y);if(Se)return ue.emit("".concat(ge,"Edge"),_objectSpread2$3(_objectSpread2$3({},ve),{},{edge:Se}))}return ue.emit("".concat(ge,"Stage"),ve)}};return this.activeListeners.handleClick=pe("click"),this.activeListeners.handleRightClick=pe("rightClick"),this.activeListeners.handleDoubleClick=pe("doubleClick"),this.activeListeners.handleWheel=pe("wheel"),this.activeListeners.handleDown=pe("down"),this.activeListeners.handleUp=pe("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this}},{key:"bindGraphHandlers",value:function(){var ue=this,pe=this.graph,me=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(ge){var ye,ve=(ye=ge.hints)===null||ye===void 0?void 0:ye.attributes;ue.graph.forEachNode(function(_e){return ue.updateNode(_e)});var xe=!ve||ve.some(function(_e){return me.has(_e)});ue.refresh({partialGraph:{nodes:pe.nodes()},skipIndexation:!xe,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(ge){var ye,ve=(ye=ge.hints)===null||ye===void 0?void 0:ye.attributes;ue.graph.forEachEdge(function(_e){return ue.updateEdge(_e)});var xe=ve&&["zIndex","type"].some(function(_e){return ve==null?void 0:ve.includes(_e)});ue.refresh({partialGraph:{edges:pe.edges()},skipIndexation:!xe,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(ge){var ye=ge.key;ue.addNode(ye),ue.refresh({partialGraph:{nodes:[ye]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(ge){var ye=ge.key;ue.refresh({partialGraph:{nodes:[ye]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(ge){var ye=ge.key;ue.removeNode(ye),ue.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(ge){var ye=ge.key;ue.addEdge(ye),ue.refresh({partialGraph:{edges:[ye]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(ge){var ye=ge.key;ue.refresh({partialGraph:{edges:[ye]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(ge){var ye=ge.key;ue.removeEdge(ye),ue.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){ue.clearEdgeState(),ue.clearEdgeIndices(),ue.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){ue.clearEdgeState(),ue.clearNodeState(),ue.clearEdgeIndices(),ue.clearNodeIndices(),ue.refresh({schedule:!0})},pe.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),pe.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),pe.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),pe.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),pe.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),pe.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),pe.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),pe.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),pe.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),pe.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var ue=this.graph;ue.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),ue.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),ue.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),ue.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),ue.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),ue.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),ue.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),ue.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),ue.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),ue.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(ue,pe){var me=getPixelColor(this.webGLContexts.edges,this.frameBuffers.edges,ue,pe,this.pixelRatio,this.pickingDownSizingRatio),ge=colorToIndex.apply(void 0,_toConsumableArray$1(me)),ye=this.itemIDsIndex[ge];return ye&&ye.type==="edge"?ye.id:null}},{key:"process",value:function(){var ue=this,pe=this.graph,me=this.settings,ge=this.getDimensions();this.nodeExtent=graphExtent(this.graph),this.normalizationFunction=createNormalizationFunction(this.customBBox||this.nodeExtent);var ye=new Camera,ve=matrixFromCamera(ye.getState(),ge,this.getGraphDimensions(),this.getSetting("stagePadding")||0);this.labelGrid.resizeAndClear(ge,me.labelGridCellSize);for(var xe={},_e={},Se={},$e={},Re=1,Ae=pe.nodes(),Ie=0,ke=Ae.length;Iethis.width+X_LABEL_MARGIN||$e<-Y_LABEL_MARGIN||$e>this.height+Y_LABEL_MARGIN)){this.displayedNodeLabels.add(ve);var Ae=this.settings.defaultDrawNodeLabel,Ie=this.nodePrograms[xe.type],ke=(Ie==null?void 0:Ie.drawLabel)||Ae;ke(me,_objectSpread2$3(_objectSpread2$3({key:ve},xe),{},{size:Re,x:Se,y:$e}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var ue=this.canvasContexts.edgeLabels;ue.clearRect(0,0,this.width,this.height);var pe=edgeLabelsToDisplayFromNodes({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});extend$3(pe,this.edgesWithForcedLabels);for(var me=new Set,ge=0,ye=pe.length;gethis.nodeZExtent[1]&&(this.nodeZExtent[1]=me.zIndex))}},{key:"updateNode",value:function(ue){this.addNode(ue);var pe=this.nodeDataCache[ue];this.normalizationFunction.applyTo(pe)}},{key:"removeNode",value:function(ue){delete this.nodeDataCache[ue],delete this.nodeProgramIndex[ue],this.highlightedNodes.delete(ue),this.hoveredNode===ue&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(ue)}},{key:"addEdge",value:function(ue){var pe=Object.assign({},this.graph.getEdgeAttributes(ue));this.settings.edgeReducer&&(pe=this.settings.edgeReducer(ue,pe));var me=applyEdgeDefaults(this.settings,ue,pe);this.edgeDataCache[ue]=me,this.edgesWithForcedLabels.delete(ue),me.forceLabel&&!me.hidden&&this.edgesWithForcedLabels.add(ue),this.settings.zIndex&&(me.zIndexthis.edgeZExtent[1]&&(this.edgeZExtent[1]=me.zIndex))}},{key:"updateEdge",value:function(ue){this.addEdge(ue)}},{key:"removeEdge",value:function(ue){delete this.edgeDataCache[ue],delete this.edgeProgramIndex[ue],this.hoveredEdge===ue&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(ue)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new LabelGrid,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0]}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(ue,pe,me){var ge=this.nodeDataCache[ue],ye=this.nodePrograms[ge.type];if(!ye)throw new Error('Sigma: could not find a suitable program for node type "'.concat(ge.type,'"!'));ye.process(pe,me,ge),this.nodeProgramIndex[ue]=me}},{key:"addEdgeToProgram",value:function(ue,pe,me){var ge=this.edgeDataCache[ue],ye=this.edgePrograms[ge.type];if(!ye)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(ge.type,'"!'));var ve=this.graph.extremities(ue),xe=this.nodeDataCache[ve[0]],_e=this.nodeDataCache[ve[1]];ye.process(pe,me,xe,_e,ge),this.edgeProgramIndex[ue]=me}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(ue){this.unbindCameraHandlers(),this.camera=ue,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(ue){ue!==this.graph&&(this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=ue,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var ue=this.customBBox||this.nodeExtent;return{width:ue.x[1]-ue.x[0]||1,height:ue.y[1]-ue.y[0]||1}}},{key:"getNodeDisplayData",value:function(ue){var pe=this.nodeDataCache[ue];return pe?Object.assign({},pe):void 0}},{key:"getEdgeDisplayData",value:function(ue){var pe=this.edgeDataCache[ue];return pe?Object.assign({},pe):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return _objectSpread2$3({},this.settings)}},{key:"getSetting",value:function(ue){return this.settings[ue]}},{key:"setSetting",value:function(ue,pe){return this.settings[ue]=pe,validateSettings(this.settings),this.handleSettingsUpdate(),this.refresh(),this}},{key:"updateSetting",value:function(ue,pe){return this.settings[ue]=pe(this.settings[ue]),validateSettings(this.settings),this.handleSettingsUpdate(),this.scheduleRefresh(),this}},{key:"resize",value:function(){var ue=this.width,pe=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=getPixelRatio(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(ue===this.width&&pe===this.height)return this;this.emit("resize");for(var me in this.elements){var ge=this.elements[me];ge.style.width=this.width+"px",ge.style.height=this.height+"px"}for(var ye in this.canvasContexts)this.elements[ye].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[ye].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[ye].scale(this.pixelRatio,this.pixelRatio);for(var ve in this.webGLContexts){this.elements[ve].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[ve].setAttribute("height",this.height*this.pixelRatio+"px");var xe=this.webGLContexts[ve];if(xe.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(ve)){var _e=this.textures[ve];_e&&xe.deleteTexture(_e)}}return this}},{key:"clear",value:function(){return this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this}},{key:"refresh",value:function(ue){var pe=this,me=(ue==null?void 0:ue.skipIndexation)!==void 0?ue==null?void 0:ue.skipIndexation:!1,ge=(ue==null?void 0:ue.schedule)!==void 0?ue.schedule:!1,ye=!ue||!ue.partialGraph;if(ye)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(Ue){return pe.addNode(Ue)}),this.graph.forEachEdge(function(Ue){return pe.addEdge(Ue)});else{for(var ve,xe,_e=((ve=ue.partialGraph)===null||ve===void 0?void 0:ve.nodes)||[],Se=0,$e=(_e==null?void 0:_e.length)||0;Se<$e;Se++){var Re=_e[Se];if(this.updateNode(Re),me){var Ae=this.nodeProgramIndex[Re];if(Ae===void 0)throw new Error('Sigma: node "'.concat(Re,`" can't be repaint`));this.addNodeToProgram(Re,this.nodeIndices[Re],Ae)}}for(var Ie=(ue==null||(xe=ue.partialGraph)===null||xe===void 0?void 0:xe.edges)||[],ke=0,Be=Ie.length;ke1&&arguments[1]!==void 0?arguments[1]:{},me=!!pe.cameraState||!!pe.viewportDimensions||!!pe.graphDimensions,ge=pe.matrix?pe.matrix:me?matrixFromCamera(pe.cameraState||this.camera.getState(),pe.viewportDimensions||this.getDimensions(),pe.graphDimensions||this.getGraphDimensions(),pe.padding||this.getSetting("stagePadding")||0):this.matrix,ye=multiplyVec2(ge,ue);return{x:(1+ye.x)*this.width/2,y:(1-ye.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(ue){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=!!pe.cameraState||!!pe.viewportDimensions||!pe.graphDimensions,ge=pe.matrix?pe.matrix:me?matrixFromCamera(pe.cameraState||this.camera.getState(),pe.viewportDimensions||this.getDimensions(),pe.graphDimensions||this.getGraphDimensions(),pe.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix,ye=multiplyVec2(ge,{x:ue.x/this.width*2-1,y:1-ue.y/this.height*2});return isNaN(ye.x)&&(ye.x=0),isNaN(ye.y)&&(ye.y=0),ye}},{key:"viewportToGraph",value:function(ue){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(ue,pe))}},{key:"graphToViewport",value:function(ue){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(ue),pe)}},{key:"getGraphToViewportRatio",value:function(){var ue={x:0,y:0},pe={x:1,y:1},me=Math.sqrt(Math.pow(ue.x-pe.x,2)+Math.pow(ue.y-pe.y,2)),ge=this.graphToViewport(ue),ye=this.graphToViewport(pe),ve=Math.sqrt(Math.pow(ge.x-ye.x,2)+Math.pow(ge.y-ye.y,2));return ve/me}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(ue){return this.customBBox=ue,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var ue in this.webGLContexts){var pe,me=this.webGLContexts[ue];(pe=me.getExtension("WEBGL_lose_context"))===null||pe===void 0||pe.loseContext()}for(var ge=this.container;ge.firstChild;)ge.removeChild(ge.firstChild);this.canvasContexts={},this.webGLContexts={},this.elements={};for(var ye in this.nodePrograms)this.nodePrograms[ye].kill();for(var ve in this.nodeHoverPrograms)this.nodeHoverPrograms[ve].kill();for(var xe in this.edgePrograms)this.edgePrograms[xe].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={}}},{key:"scaleSize",value:function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return ue/this.settings.zoomToSizeRatioFunction(pe)*(this.getSetting("itemSizesReference")==="positions"?pe*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){return _objectSpread2$3({},this.elements)}}]),oe}(TypedEventEmitter);const m$5=reactExports.createContext(null),h$7=m$5.Provider;function f$5(){const ne=reactExports.useContext(m$5);if(ne==null)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of ");return ne}function v$6(){return f$5().sigma}function p$6(){const{sigma:ne,container:oe}=f$5(),[ce,ue]=reactExports.useState({});return reactExports.useEffect(()=>{if(!ne||!ce)return;const pe={};return Object.keys(ce).forEach(me=>{pe[me]=ce[me],ne.setSetting(me,ce[me])}),()=>{ne&&oe&&oe.offsetWidth>0&&oe.offsetHeight>0&&Object.keys(pe).forEach(me=>{ne.setSetting(me,pe[me])})}},[ne,ce,oe]),ue}const b$5=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","beforeRender","afterRender","kill"],w$5=["click","rightClick","mouseup","mousedown","mousemove","mousemovebody","doubleClick","wheel"],E$3=["touchup","touchdown","touchmove"],O$2=["updated"];function y$3(){const ne=v$6(),oe=p$6(),[ce,ue]=reactExports.useState({});return reactExports.useEffect(()=>{if(!ne||!ce)return;const pe=ce,me=Object.keys(pe);return me.forEach(ge=>{const ye=pe[ge];b$5.find(ve=>ve===ge)&&ne.on(ge,ye),w$5.find(ve=>ve===ge)&&ne.getMouseCaptor().on(ge,ye),E$3.find(ve=>ve===ge)&&ne.getTouchCaptor().on(ge,ye),O$2.find(ve=>ve===ge)&&ne.getCamera().on(ge,ye)}),()=>{ne&&me.forEach(ge=>{const ye=pe[ge];b$5.find(ve=>ve===ge)&&ne.off(ge,ye),w$5.find(ve=>ve===ge)&&ne.getMouseCaptor().off(ge,ye),E$3.find(ve=>ve===ge)&&ne.getTouchCaptor().off(ge,ye),O$2.find(ve=>ve===ge)&&ne.getCamera().off(ge,ye)})}},[ne,ce,oe]),ue}function _$4(){const ne=v$6();return reactExports.useCallback((oe,ce=!0)=>{ne&&oe&&(ce&&ne.getGraph().order>0&&ne.getGraph().clear(),ne.getGraph().import(oe),ne.refresh())},[ne])}function C$3(ne,oe){if(ne===oe)return!0;if(typeof ne=="object"&&ne!=null&&typeof oe=="object"&&oe!=null){if(Object.keys(ne).length!=Object.keys(oe).length)return!1;for(const ce in ne)if(!Object.hasOwn(oe,ce)||!C$3(ne[ce],oe[ce]))return!1;return!0}return!1}const k$7=reactExports.forwardRef(({graph:ne,id:oe,className:ce,style:ue,settings:pe={},children:me},ge)=>{const ye=reactExports.useRef(null),ve=reactExports.useRef(null),xe={className:`react-sigma ${ce||""}`,id:oe,style:ue},[_e,Se]=reactExports.useState(null),[$e,Re]=reactExports.useState(pe);reactExports.useEffect(()=>{C$3($e,pe)||Re(pe)},[pe]),reactExports.useEffect(()=>{let ke=null;if(ve.current!==null){let Be=new Graph;ne&&(Be=typeof ne=="function"?new ne:ne),ke=new Sigma$1(Be,ve.current,$e),_e&&ke.getCamera().setState(_e.getCamera().getState())}return Se(ke),()=>{ke&&ke.kill(),Se(null)}},[ve,ne,$e]),reactExports.useImperativeHandle(ge,()=>_e,[_e]);const Ae=reactExports.useMemo(()=>_e&&ye.current?{sigma:_e,container:ye.current}:null,[_e,ye.current]),Ie=Ae!==null?React$2.createElement(h$7,{value:Ae},me):null;return React$2.createElement("div",Object.assign({},xe,{ref:ye}),React$2.createElement("div",{className:"sigma-container",ref:ve}),Ie)}),reactSigma_min="";function _classCallCheck$1(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function toPrimitive(ne,oe){if(typeof ne!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(typeof ue!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function toPropertyKey(ne){var oe=toPrimitive(ne,"string");return typeof oe=="symbol"?oe:String(oe)}function _defineProperties$1(ne,oe){for(var ce=0;cene.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ceWt){var un="…";for(Re=Re+un,Kt=ue.measureText(Re).width;Kt>Wt&&Re.length>1;)Re=Re.slice(0,-2)+un,Kt=ue.measureText(Re).width;if(Re.length<4)return}for(var Xt={},nn=0,vn=Re.length;nn{if(pe){let ve=!1,xe=lodashExports$1.noop,_e=Date.now();const Se=()=>{if(!ve){const $e=Date.now(),Re=lodashExports$1.ceil(ye*($e-_e)/FRAME_TIME_MS);ce{xe(),ve=!0}}},[ge,pe,ue,ce,me,ye]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne})}const centered={horizontal:"center",vertical:"center"};function Playback({layer:ne}){const oe=usePaper(),{playing:ce,canPause:ue,canPlay:pe,canStepBackward:me,canStepForward:ge,canStop:ye,pause:ve,play:xe,stepBackward:_e,stepForward:Se,findBreakpoint:$e,step:Re,stepTo:Ae}=usePlaybackState(ne==null?void 0:ne.key),[Ie,ke]=reactExports.useState(""),Be=parseInt(Ie),Ne=!isNaN(Be);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"previous-breakpoint",icon:jsxRuntimeExports.jsx(StopIcon,{}),onClick:()=>{Ae($e(-1))},disabled:!ye||!me}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"step-backward",icon:jsxRuntimeExports.jsx(PreviousIcon,{}),onClick:_e,disabled:!me}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{...ce?{label:"pause",icon:jsxRuntimeExports.jsx(PauseIcon,{}),onClick:()=>ve(),disabled:!ue}:{label:"play",icon:jsxRuntimeExports.jsx(PlayIcon,{}),onClick:()=>xe(),disabled:!pe,color:"primary"}}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"step-forward",icon:jsxRuntimeExports.jsx(NextIcon,{}),onClick:Se,disabled:!ge}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"next-breakpoint",icon:jsxRuntimeExports.jsx(SkipIcon,{}),onClick:()=>{Ae($e())},disabled:!ge}),divider$5,jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:Fe=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(MuiButton,{sx:{minWidth:0},...bindTrigger(Fe),children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{px:.25,py:.25,textAlign:"center",...oe(0),borderRadius:1},children:Re})}),jsxRuntimeExports.jsx(Popover$1,{...bindPopover(Fe),anchorOrigin:centered,transformOrigin:centered,children:jsxRuntimeExports.jsx(TextField$1,{autoFocus:!0,onChange:Ue=>ke(Ue.target.value),defaultValue:Re,placeholder:"0",InputProps:{sx:{fontSize:"0.875rem"},startAdornment:jsxRuntimeExports.jsx(InputAdornment$1,{position:"start",children:"Step"}),endAdornment:jsxRuntimeExports.jsx(InputAdornment$1,{position:"end",children:jsxRuntimeExports.jsx(IconButtonWithTooltip,{icon:jsxRuntimeExports.jsx(ArrowForwardOutlined,{}),label:"Go",size:"small",color:"inherit",disabled:!Ne||Be===Re,onClick:()=>{Ae(Be),Fe.close()}})})},sx:{width:180,border:"none"}})})]})})]})}function MinimisedPlaybackControls({layer:ne}){return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:oe=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Collapse$1,{in:oe.isOpen,orientation:"horizontal",children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{minWidth:"max-content"},children:[jsxRuntimeExports.jsx(Playback,{layer:ne}),divider$5]})}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{size:"small",onClick:oe.toggle,label:oe.isOpen?"Hide Playback Controls":"Show Playback Controls",sx:{mx:-1,color:ce=>ce.palette.text.secondary,transform:oe.isOpen?"rotate(180deg)":void 0,transition:ce=>ce.transitions.create("transform")},icon:jsxRuntimeExports.jsx(NavigateNextOutlined,{})})]})})}var ResizeSensor={exports:{}};(function(ne,oe){(function(ce,ue){ne.exports=ue()})(typeof window<"u"?window:commonjsGlobal,function(){if(typeof window>"u")return null;var ce=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),ue=ce.requestAnimationFrame||ce.mozRequestAnimationFrame||ce.webkitRequestAnimationFrame||function(_e){return ce.setTimeout(_e,20)},pe=ce.cancelAnimationFrame||ce.mozCancelAnimationFrame||ce.webkitCancelAnimationFrame||function(_e){ce.clearTimeout(_e)};function me(_e,Se){var $e=Object.prototype.toString.call(_e),Re=$e==="[object Array]"||$e==="[object NodeList]"||$e==="[object HTMLCollection]"||$e==="[object Object]"||typeof jQuery<"u"&&_e instanceof jQuery||typeof Elements<"u"&&_e instanceof Elements,Ae=0,Ie=_e.length;if(Re)for(;Ae=Ut&&(an+=Dt.value),Dt.mode==="max"&&jt<=Ut&&(an+=Dt.value),Ke[Zt]||(Ke[Zt]=""),an&&(" "+Ke[Zt]+" ").indexOf(" "+an+" ")===-1&&(Ke[Zt]+=" "+an));for(var Kt in en)en.hasOwnProperty(Kt)&&(Ke[en[Kt]]?this.element.setAttribute(en[Kt],Ke[en[Kt]].substr(1)):this.element.removeAttribute(en[Kt]))}}function $e(ze,Ge){ze.elementQueriesSetupInformation||(ze.elementQueriesSetupInformation=new Se(ze,Ge)),ze.elementQueriesSensor||(ze.elementQueriesSensor=new ce(ze,function(){ze.elementQueriesSetupInformation.call()}))}function Re(ze,Ge,Ze,Dt){if(typeof ge[ze]>"u"){ge[ze]=[];var Je=ye.length;me.innerHTML+=` +`);return ce}var DEFAULT_EDGE_CURVATURE=.25,DEFAULT_EDGE_CURVE_PROGRAM_OPTIONS={arrowHead:null,curvatureAttribute:"curvature",defaultCurvature:DEFAULT_EDGE_CURVATURE},_WebGLRenderingContex=WebGLRenderingContext,UNSIGNED_BYTE=_WebGLRenderingContex.UNSIGNED_BYTE,FLOAT=_WebGLRenderingContex.FLOAT;function createEdgeCurveProgram(ne){var oe=_objectSpread2$2(_objectSpread2$2({},DEFAULT_EDGE_CURVE_PROGRAM_OPTIONS),ne||{}),ce=oe.arrowHead,ue=oe.curvatureAttribute,pe=["u_matrix","u_sizeRatio","u_dimensions","u_pixelRatio"].concat(_toConsumableArray(ce?["u_lengthToThicknessRatio","u_widenessToThicknessRatio"]:[]));return function(me){_inherits$1(ge,me);function ge(){var ye;_classCallCheck$1(this,ge);for(var ve=arguments.length,xe=new Array(ve),_e=0;_e{if(pe){let ve=!1,xe=lodashExports$1.noop,_e=Date.now();const Se=()=>{if(!ve){const $e=Date.now(),Re=lodashExports$1.ceil(ye*($e-_e)/FRAME_TIME_MS);ce{xe(),ve=!0}}},[ge,pe,ue,ce,me,ye]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne})}const centered={horizontal:"center",vertical:"center"};function Playback({layer:ne}){const oe=usePaper(),{playing:ce,canPause:ue,canPlay:pe,canStepBackward:me,canStepForward:ge,canStop:ye,pause:ve,play:xe,stepBackward:_e,stepForward:Se,findBreakpoint:$e,step:Re,stepTo:Ae}=usePlaybackState(ne==null?void 0:ne.key),[Ie,ke]=reactExports.useState(""),Be=parseInt(Ie),Ne=!isNaN(Be);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"previous-breakpoint",icon:jsxRuntimeExports.jsx(StopIcon,{}),onClick:()=>{Ae($e(-1))},disabled:!ye||!me}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"step-backward",icon:jsxRuntimeExports.jsx(PreviousIcon,{}),onClick:_e,disabled:!me}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{...ce?{label:"pause",icon:jsxRuntimeExports.jsx(PauseIcon,{}),onClick:()=>ve(),disabled:!ue}:{label:"play",icon:jsxRuntimeExports.jsx(PlayIcon,{}),onClick:()=>xe(),disabled:!pe,color:"primary"}}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"step-forward",icon:jsxRuntimeExports.jsx(NextIcon,{}),onClick:Se,disabled:!ge}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{label:"next-breakpoint",icon:jsxRuntimeExports.jsx(SkipIcon,{}),onClick:()=>{Ae($e())},disabled:!ge}),divider$5,jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:Fe=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$2,{sx:{minWidth:0},...bindTrigger(Fe),children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{px:.25,py:.25,textAlign:"center",...oe(0),borderRadius:1},children:Re})}),jsxRuntimeExports.jsx(Popover$1,{...bindPopover(Fe),anchorOrigin:centered,transformOrigin:centered,children:jsxRuntimeExports.jsx(TextField$1,{autoFocus:!0,onChange:Ue=>ke(Ue.target.value),defaultValue:Re,placeholder:"0",InputProps:{sx:{fontSize:"0.875rem"},startAdornment:jsxRuntimeExports.jsx(InputAdornment$1,{position:"start",children:"Step"}),endAdornment:jsxRuntimeExports.jsx(InputAdornment$1,{position:"end",children:jsxRuntimeExports.jsx(IconButtonWithTooltip,{icon:jsxRuntimeExports.jsx(ArrowForwardOutlined,{}),label:"Go",size:"small",color:"inherit",disabled:!Ne||Be===Re,onClick:()=>{Ae(Be),Fe.close()}})})},sx:{width:180,border:"none"}})})]})})]})}function MinimisedPlaybackControls({layer:ne}){return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:oe=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Collapse$1,{in:oe.isOpen,orientation:"horizontal",children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{minWidth:"max-content"},children:[jsxRuntimeExports.jsx(Playback,{layer:ne}),divider$5]})}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{size:"small",onClick:oe.toggle,label:oe.isOpen?"Hide Playback Controls":"Show Playback Controls",sx:{mx:-1,color:ce=>ce.palette.text.secondary,transform:oe.isOpen?"rotate(180deg)":void 0,transition:ce=>ce.transitions.create("transform")},icon:jsxRuntimeExports.jsx(NavigateNextOutlined,{})})]})})}var ResizeSensor={exports:{}};(function(ne,oe){(function(ce,ue){ne.exports=ue()})(typeof window<"u"?window:commonjsGlobal,function(){if(typeof window>"u")return null;var ce=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),ue=ce.requestAnimationFrame||ce.mozRequestAnimationFrame||ce.webkitRequestAnimationFrame||function(_e){return ce.setTimeout(_e,20)},pe=ce.cancelAnimationFrame||ce.mozCancelAnimationFrame||ce.webkitCancelAnimationFrame||function(_e){ce.clearTimeout(_e)};function me(_e,Se){var $e=Object.prototype.toString.call(_e),Re=$e==="[object Array]"||$e==="[object NodeList]"||$e==="[object HTMLCollection]"||$e==="[object Object]"||typeof jQuery<"u"&&_e instanceof jQuery||typeof Elements<"u"&&_e instanceof Elements,Ae=0,Ie=_e.length;if(Re)for(;Ae=Ut&&(an+=Dt.value),Dt.mode==="max"&&jt<=Ut&&(an+=Dt.value),Ke[Zt]||(Ke[Zt]=""),an&&(" "+Ke[Zt]+" ").indexOf(" "+an+" ")===-1&&(Ke[Zt]+=" "+an));for(var Kt in en)en.hasOwnProperty(Kt)&&(Ke[en[Kt]]?this.element.setAttribute(en[Kt],Ke[en[Kt]].substr(1)):this.element.removeAttribute(en[Kt]))}}function $e(ze,Ge){ze.elementQueriesSetupInformation||(ze.elementQueriesSetupInformation=new Se(ze,Ge)),ze.elementQueriesSensor||(ze.elementQueriesSensor=new ce(ze,function(){ze.elementQueriesSetupInformation.call()}))}function Re(ze,Ge,Ze,Dt){if(typeof ge[ze]>"u"){ge[ze]=[];var Je=ye.length;me.innerHTML+=` `+ze+" {animation: 0.1s element-queries;}",me.innerHTML+=` `+ze+" > .resize-sensor {min-width: "+Je+"px;}",ye.push(ze)}ge[ze].push({mode:Ge,property:Ze,value:Dt})}function Ae(ze){var Ge;if(document.querySelectorAll&&(Ge=ze?ze.querySelectorAll.bind(ze):document.querySelectorAll.bind(document)),!Ge&&typeof $$<"u"&&(Ge=$$),!Ge&&typeof jQuery<"u"&&(Ge=jQuery),!Ge)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return Ge}function Ie(ze){var Ge=Ae(ze);for(var Ze in ge)if(ge.hasOwnProperty(Ze))for(var Dt=Ge(Ze,ze),Je=0,Ut=Dt.length;JeZe[un].minWidth&&(Wt=un);if(Wt||(Wt=Je),Ut!==Wt)if(jt[Wt])Ge[Ut].style.display="none",Ge[Wt].style.display="block",Ut=Wt;else{var Xt=new Image;Xt.onload=function(){Ge[Wt].src=Dt[Wt],Ge[Ut].style.display="none",Ge[Wt].style.display="block",jt[Wt]=!0,Ut=Wt},Xt.src=Dt[Wt]}else Ge[Wt].src=Dt[Wt]}ze.resizeSensorInstance=new ce(ze,Kt),Kt()}function Be(){for(var ze=Ae(),Ge=ze("[data-responsive-image],[responsive-image]"),Ze=0,Dt=Ge.length;Ze img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",me.innerHTML+=` -@keyframes element-queries { 0% { visibility: inherit; } }`,document.getElementsByTagName("head")[0].appendChild(me),qe=!0);for(var Ge=0,Ze=document.styleSheets.length;Ge{if(ye){const _e=()=>{{const Se=ye.scrollTop<=ne;Se!==me&&ge(Se)}{const Se=ye.scrollTop<=1;Se!==ue&&pe(Se)}xe.current-ye.scrollTop&&(Math.abs(xe.current-ye.scrollTop)>2&&xe.current>=0&&ce(xe.current>ye.scrollTop),xe.current=ye.scrollTop)};return ye.addEventListener("scroll",_e,{passive:!0}),()=>{ye.removeEventListener("scroll",_e)}}},[ye,me,ue,xe,ne]),[oe||me,me,ue,ye,ve]}const PanelContext=reactExports.createContext(null);function usePanel(){return reactExports.useContext(PanelContext)}const[useUIState,UIStateProvider]=createSlice({sidebarOpen:!1,busy:{},depth:0,fullscreenModal:void 0,workspaceMeta:{id:nanoid$1(),name:"",description:"",screenshots:[],author:"",size:0}});/*! - * OverlayScrollbars - * Version: 2.5.0 - * - * Copyright (c) Rene Haas | KingSora. - * https://github.com/KingSora - * - * Released under the MIT license. - */const createCache$1=(ne,oe)=>{const{o:ce,u:ue,_:pe}=ne;let me=ce,ge;const ye=(_e,Se)=>{const $e=me,Re=_e,Ae=Se||(ue?!ue($e,Re):$e!==Re);return(Ae||pe)&&(me=Re,ge=$e),[me,Ae,ge]};return[oe?_e=>ye(oe(me,ge),_e):ye,_e=>[me,!!_e,ge]]},t$6=typeof window<"u",n$6=t$6?window:{},o$4=Math.max,s$3=Math.min,e$5=Math.round,r$5=n$6.cancelAnimationFrame,l$5=n$6.requestAnimationFrame,i$6=n$6.setTimeout,a$4=n$6.clearTimeout,getApi=ne=>typeof n$6[ne]<"u"?n$6[ne]:void 0,u$6=getApi("MutationObserver"),f$5=getApi("IntersectionObserver"),_$3=getApi("ResizeObserver"),d$6=getApi("ScrollTimeline"),v$5=t$6&&Node.ELEMENT_NODE,{toString:h$6,hasOwnProperty:p$6}=Object.prototype,g$5=/^\[object (.+)\]$/,isUndefined=ne=>ne===void 0,isNull$1=ne=>ne===null,type$1=ne=>isUndefined(ne)||isNull$1(ne)?`${ne}`:h$6.call(ne).replace(g$5,"$1").toLowerCase(),isNumber$2=ne=>typeof ne=="number",isString$2=ne=>typeof ne=="string",isBoolean$2=ne=>typeof ne=="boolean",isFunction$2=ne=>typeof ne=="function",isArray$4=ne=>Array.isArray(ne),isObject$4=ne=>typeof ne=="object"&&!isArray$4(ne)&&!isNull$1(ne),isArrayLike=ne=>{const oe=!!ne&&ne.length,ce=isNumber$2(oe)&&oe>-1&&oe%1==0;return isArray$4(ne)||!isFunction$2(ne)&&ce?oe>0&&isObject$4(ne)?oe-1 in ne:!0:!1},isPlainObject$1=ne=>{if(!ne||!isObject$4(ne)||type$1(ne)!=="object")return!1;let oe;const ce="constructor",ue=ne[ce],pe=ue&&ue.prototype,me=p$6.call(ne,ce),ge=pe&&p$6.call(pe,"isPrototypeOf");if(ue&&!me&&!ge)return!1;for(oe in ne);return isUndefined(oe)||p$6.call(ne,oe)},isHTMLElement=ne=>{const oe=HTMLElement;return ne?oe?ne instanceof oe:ne.nodeType===v$5:!1},isElement$2=ne=>{const oe=Element;return ne?oe?ne instanceof oe:ne.nodeType===v$5:!1};function each(ne,oe){if(isArrayLike(ne))for(let ce=0;ceoe(ne[ce],ce,ne));return ne}const inArray=(ne,oe)=>ne.indexOf(oe)>=0,concat=(ne,oe)=>ne.concat(oe),push$2=(ne,oe,ce)=>(!ce&&!isString$2(oe)&&isArrayLike(oe)?Array.prototype.push.apply(ne,oe):ne.push(oe),ne),from$1=ne=>Array.from(ne||[]),createOrKeepArray=ne=>isArray$4(ne)?ne:[ne],isEmptyArray=ne=>!!ne&&!ne.length,deduplicateArray=ne=>from$1(new Set(ne)),runEachAndClear=(ne,oe,ce)=>{each(ne,pe=>pe&&pe.apply(void 0,oe||[])),!ce&&(ne.length=0)},b$5="paddingTop",w$5="paddingRight",S$5="paddingLeft",y$3="paddingBottom",m$5="marginLeft",O$3="marginRight",$$4="marginBottom",C$3="overflowX",x$3="overflowY",H$4="width",I$3="height",z$4="hidden",E$3="visible",equal=(ne,oe,ce,ue)=>{if(ne&&oe){let pe=!0;return each(ce,me=>{const ge=ue?ue(ne[me]):ne[me],ye=ue?ue(oe[me]):oe[me];ge!==ye&&(pe=!1)}),pe}return!1},equalWH=(ne,oe)=>equal(ne,oe,["w","h"]),equalXY=(ne,oe)=>equal(ne,oe,["x","y"]),equalTRBL=(ne,oe)=>equal(ne,oe,["t","r","b","l"]),noop$8=()=>{},bind$2=(ne,...oe)=>ne.bind(0,...oe),selfClearTimeout=ne=>{let oe;const ce=ne?i$6:l$5,ue=ne?a$4:r$5;return[pe=>{ue(oe),oe=ce(pe,isFunction$2(ne)?ne():ne)},()=>ue(oe)]},debounce=(ne,oe)=>{let ce,ue,pe,me=noop$8;const{v:ge,p:ye,S:ve}=oe||{},xe=function(Ae){me(),a$4(ce),ce=ue=void 0,me=noop$8,ne.apply(this,Ae)},_e=Re=>ve&&ue?ve(ue,Re):Re,Se=()=>{me!==noop$8&&xe(_e(pe)||pe)},$e=function(){const Ae=from$1(arguments),Ie=isFunction$2(ge)?ge():ge;if(isNumber$2(Ie)&&Ie>=0){const Be=isFunction$2(ye)?ye():ye,Ne=isNumber$2(Be)&&Be>=0,Fe=Ie>0?i$6:l$5,Ue=Ie>0?a$4:r$5,qe=_e(Ae)||Ae,ze=xe.bind(0,qe);me();const Ge=Fe(ze,Ie);me=()=>Ue(Ge),Ne&&!ce&&(ce=i$6(Se,Be)),ue=pe=qe}else xe(Ae)};return $e.m=Se,$e},hasOwnProperty$2=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),keys$1=ne=>ne?Object.keys(ne):[],assignDeep=(ne,oe,ce,ue,pe,me,ge)=>{const ye=[oe,ce,ue,pe,me,ge];return(typeof ne!="object"||isNull$1(ne))&&!isFunction$2(ne)&&(ne={}),each(ye,ve=>{each(ve,(xe,_e)=>{const Se=ve[_e];if(ne===Se)return!0;const $e=isArray$4(Se);if(Se&&isPlainObject$1(Se)){const Re=ne[_e];let Ae=Re;$e&&!isArray$4(Re)?Ae=[]:!$e&&!isPlainObject$1(Re)&&(Ae={}),ne[_e]=assignDeep(Ae,Se)}else ne[_e]=$e?Se.slice():Se})}),ne},removeUndefinedProperties=(ne,oe)=>each(assignDeep({},ne),(ce,ue,pe)=>{ce===void 0?delete pe[ue]:oe&&ce&&isPlainObject$1(ce)&&(pe[ue]=removeUndefinedProperties(ce,oe))}),isEmptyObject=ne=>{for(const oe in ne)return!1;return!0},capNumber=(ne,oe,ce)=>o$4(ne,s$3(oe,ce)),getDomTokensArray=ne=>from$1(new Set((isArray$4(ne)?ne:(ne||"").split(" ")).filter(oe=>oe))),getAttr=(ne,oe)=>ne&&ne.getAttribute(oe),setAttrs=(ne,oe,ce)=>{each(getDomTokensArray(oe),ue=>{ne&&ne.setAttribute(ue,ce||"")})},removeAttrs=(ne,oe)=>{each(getDomTokensArray(oe),ce=>ne&&ne.removeAttribute(ce))},domTokenListAttr=(ne,oe)=>{const ce=getDomTokensArray(getAttr(ne,oe)),ue=bind$2(setAttrs,ne,oe),pe=(me,ge)=>{const ye=new Set(ce);return each(getDomTokensArray(me),ve=>ye[ge](ve)),from$1(ye).join(" ")};return{O:me=>ue(pe(me,"delete")),$:me=>ue(pe(me,"add")),C:me=>{const ge=getDomTokensArray(me);return ge.reduce((ye,ve)=>ye&&ce.includes(ve),ge.length>0)}}},removeAttrClass=(ne,oe,ce)=>{domTokenListAttr(ne,oe).O(ce)},addAttrClass=(ne,oe,ce)=>(domTokenListAttr(ne,oe).$(ce),bind$2(removeAttrClass,ne,oe,ce)),addRemoveAttrClass=(ne,oe,ce,ue)=>{(ue?addAttrClass:removeAttrClass)(ne,oe,ce)},hasAttrClass=(ne,oe,ce)=>domTokenListAttr(ne,oe).C(ce),createDomTokenListClass=ne=>domTokenListAttr(ne,"class"),removeClass=(ne,oe)=>{createDomTokenListClass(ne).O(oe)},addClass=(ne,oe)=>(createDomTokenListClass(ne).$(oe),bind$2(removeClass,ne,oe)),A$5=t$6&&Element.prototype,find$1=(ne,oe)=>{const ce=[],ue=oe?isElement$2(oe)&&oe:document;return ue?push$2(ce,ue.querySelectorAll(ne)):ce},findFirst=(ne,oe)=>{const ce=oe?isElement$2(oe)&&oe:document;return ce?ce.querySelector(ne):null},is$7=(ne,oe)=>isElement$2(ne)?(A$5.matches||A$5.msMatchesSelector).call(ne,oe):!1,contents=ne=>ne?from$1(ne.childNodes):[],parent=ne=>ne&&ne.parentElement,closest$2=(ne,oe)=>isElement$2(ne)&&ne.closest(oe),liesBetween=(ne,oe,ce)=>{const ue=closest$2(ne,oe),pe=ne&&findFirst(ce,ue),me=closest$2(pe,oe)===ue;return ue&&pe?ue===ne||pe===ne||me&&closest$2(closest$2(ne,ce),oe)!==ue:!1},removeElements=ne=>{if(isArrayLike(ne))each(from$1(ne),oe=>removeElements(oe));else if(ne){const oe=parent(ne);oe&&oe.removeChild(ne)}},before=(ne,oe,ce)=>{if(ce&&ne){let ue=oe,pe;return isArrayLike(ce)?(pe=document.createDocumentFragment(),each(ce,me=>{me===ue&&(ue=me.previousSibling),pe.appendChild(me)})):pe=ce,oe&&(ue?ue!==oe&&(ue=ue.nextSibling):ue=ne.firstChild),ne.insertBefore(pe,ue||null),()=>removeElements(ce)}return noop$8},appendChildren=(ne,oe)=>before(ne,null,oe),insertAfter=(ne,oe)=>before(parent(ne),ne&&ne.nextSibling,oe),createDiv=ne=>{const oe=document.createElement("div");return setAttrs(oe,"class",ne),oe},createDOM=ne=>{const oe=createDiv();return oe.innerHTML=ne.trim(),each(contents(oe),ce=>removeElements(ce))},T$3=/^--/,getCSSVal=(ne,oe)=>ne.getPropertyValue(oe)||ne[oe]||"",validFiniteNumber=ne=>{const oe=ne||0;return isFinite(oe)?oe:0},parseToZeroOrNumber=ne=>validFiniteNumber(parseFloat(ne||"")),ratioToCssPercent=ne=>`${(validFiniteNumber(ne)*100).toFixed(3)}%`,numberToCssPx=ne=>`${validFiniteNumber(ne)}px`;function setStyles(ne,oe){ne&&each(oe,(ce,ue)=>{try{const pe=ne.style,me=isNumber$2(ce)?numberToCssPx(ce):(ce||"")+"";T$3.test(ue)?pe.setProperty(ue,me):pe[ue]=me}catch{}})}function getStyles$2(ne,oe,ce){const ue=isString$2(oe);let pe=ue?"":{};if(ne){const me=n$6.getComputedStyle(ne,ce)||ne.style;pe=ue?getCSSVal(me,oe):oe.reduce((ge,ye)=>(ge[ye]=getCSSVal(me,ye),ge),pe)}return pe}const getDirectionIsRTL=ne=>getStyles$2(ne,"direction")==="rtl",topRightBottomLeft=(ne,oe,ce)=>{const ue=oe?`${oe}-`:"",pe=ce?`-${ce}`:"",me=`${ue}top${pe}`,ge=`${ue}right${pe}`,ye=`${ue}bottom${pe}`,ve=`${ue}left${pe}`,xe=getStyles$2(ne,[me,ge,ye,ve]);return{t:parseToZeroOrNumber(xe[me]),r:parseToZeroOrNumber(xe[ge]),b:parseToZeroOrNumber(xe[ye]),l:parseToZeroOrNumber(xe[ve])}},getTrasformTranslateValue=(ne,oe)=>`translate${isObject$4(ne)?`(${ne.x},${ne.y})`:`${oe?"X":"Y"}(${ne})`}`,D$3={w:0,h:0},getElmWidthHeightProperty=(ne,oe)=>oe?{w:oe[`${ne}Width`],h:oe[`${ne}Height`]}:D$3,windowSize=ne=>getElmWidthHeightProperty("inner",ne||n$6),k$6=bind$2(getElmWidthHeightProperty,"offset"),R$3=bind$2(getElmWidthHeightProperty,"client"),M$4=bind$2(getElmWidthHeightProperty,"scroll"),fractionalSize=ne=>{const oe=parseFloat(getStyles$2(ne,H$4))||0,ce=parseFloat(getStyles$2(ne,I$3))||0;return{w:oe-e$5(oe),h:ce-e$5(ce)}},getBoundingClientRect=ne=>ne.getBoundingClientRect(),domRectHasDimensions=ne=>!!(ne&&(ne[I$3]||ne[H$4])),domRectAppeared=(ne,oe)=>{const ce=domRectHasDimensions(ne);return!domRectHasDimensions(oe)&&ce},removeEventListener$1=(ne,oe,ce,ue)=>{each(getDomTokensArray(oe),pe=>{ne.removeEventListener(pe,ce,ue)})},addEventListener$1=(ne,oe,ce,ue)=>{var pe;const me=(pe=ue&&ue.H)!=null?pe:!0,ge=ue&&ue.I||!1,ye=ue&&ue.A||!1,ve={passive:me,capture:ge};return bind$2(runEachAndClear,getDomTokensArray(oe).map(xe=>{const _e=ye?Se=>{removeEventListener$1(ne,xe,_e,ge),ce(Se)}:ce;return ne.addEventListener(xe,_e,ve),bind$2(removeEventListener$1,ne,xe,_e,ge)}))},stopPropagation=ne=>ne.stopPropagation(),preventDefault$1=ne=>ne.preventDefault(),V$3={x:0,y:0},absoluteCoordinates=ne=>{const oe=ne&&getBoundingClientRect(ne);return oe?{x:oe.left+n$6.scrollX,y:oe.top+n$6.scrollY}:V$3},convertScrollPosition=(ne,oe,ce)=>ce?ce.n?-ne+0:ce.i?oe-ne:ne:ne,getRawScrollBounds=(ne,oe)=>[convertScrollPosition(0,ne,oe),convertScrollPosition(ne,ne,oe)],getRawScrollRatio=(ne,oe,ce)=>capNumber(0,1,convertScrollPosition(ne,oe,ce)/oe||0),scrollElementTo=(ne,oe)=>{const{x:ce,y:ue}=isNumber$2(oe)?{x:oe,y:oe}:oe||{};isNumber$2(ce)&&(ne.scrollLeft=ce),isNumber$2(ue)&&(ne.scrollTop=ue)},getElmentScroll=ne=>({x:ne.scrollLeft,y:ne.scrollTop}),manageListener=(ne,oe)=>{each(createOrKeepArray(oe),ne)},createEventListenerHub=ne=>{const oe=new Map,ce=(me,ge)=>{if(me){const ye=oe.get(me);manageListener(ve=>{ye&&ye[ve?"delete":"clear"](ve)},ge)}else oe.forEach(ye=>{ye.clear()}),oe.clear()},ue=(me,ge)=>{if(isString$2(me)){const xe=oe.get(me)||new Set;return oe.set(me,xe),manageListener(_e=>{isFunction$2(_e)&&xe.add(_e)},ge),bind$2(ce,me,ge)}isBoolean$2(ge)&&ge&&ce();const ye=keys$1(me),ve=[];return each(ye,xe=>{const _e=me[xe];_e&&push$2(ve,ue(xe,_e))}),bind$2(runEachAndClear,ve)},pe=(me,ge)=>{each(from$1(oe.get(me)),ye=>{ge&&!isEmptyArray(ge)?ye.apply(0,ge):ye()})};return ue(ne||{}),[ue,ce,pe]},opsStringify=ne=>JSON.stringify(ne,(oe,ce)=>{if(isFunction$2(ce))throw 0;return ce}),getPropByPath=(ne,oe)=>ne?`${oe}`.split(".").reduce((ce,ue)=>ce&&hasOwnProperty$2(ce,ue)?ce[ue]:void 0,ne):void 0,L$3={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},getOptionsDiff=(ne,oe)=>{const ce={},ue=concat(keys$1(oe),keys$1(ne));return each(ue,pe=>{const me=ne[pe],ge=oe[pe];if(isObject$4(me)&&isObject$4(ge))assignDeep(ce[pe]={},getOptionsDiff(me,ge)),isEmptyObject(ce[pe])&&delete ce[pe];else if(hasOwnProperty$2(oe,pe)&&ge!==me){let ye=!0;if(isArray$4(me)||isArray$4(ge))try{opsStringify(me)===opsStringify(ge)&&(ye=!1)}catch{}ye&&(ce[pe]=ge)}}),ce},createOptionCheck=(ne,oe,ce)=>ue=>[getPropByPath(ne,ue),ce||getPropByPath(oe,ue)!==void 0],P$2="data-overlayscrollbars",U$3="os-environment",B$3=`${U$3}-scrollbar-hidden`,N$4=`${P$2}-initialize`,j$4=P$2,F$4=`${j$4}-overflow-x`,q$6=`${j$4}-overflow-y`,W$3="overflowVisible",X$3="scrollbarPressed",Y$3="updating",J$3="body",K$3=`${P$2}-viewport`,Z$3="arrange",G$3="scrollbarHidden",Q$3=W$3,tt$3=`${P$2}-padding`,nt$2=Q$3,ot$2=`${P$2}-content`,st$2="os-size-observer",et$3=`${st$2}-appear`,ct$2=`${st$2}-listener`,at$2="os-trinsic-observer",ut$2="os-theme-none",ft="os-scrollbar",_t=`${ft}-rtl`,dt$2=`${ft}-horizontal`,vt=`${ft}-vertical`,ht$2=`${ft}-track`,pt$1=`${ft}-handle`,gt$1=`${ft}-visible`,bt$1=`${ft}-cornerless`,wt=`${ft}-transitionless`,St=`${ft}-interaction`,yt=`${ft}-unusable`,mt$1=`${ft}-auto-hide`,Ot=`${mt$1}-hidden`,$t=`${ft}-wheel`,Ct$1=`${ht$2}-interactive`,xt=`${pt$1}-interactive`,Ht$1={},It={},addPlugins=ne=>{each(ne,oe=>each(oe,(ce,ue)=>{Ht$1[ue]=oe[ue]}))},registerPluginModuleInstances=(ne,oe,ce)=>keys$1(ne).map(ue=>{const{static:pe,instance:me}=ne[ue],[ge,ye,ve]=ce||[],xe=ce?me:pe;if(xe){const _e=ce?xe(ge,ye,oe):xe(oe);return(ve||It)[ue]=_e}}),getStaticPluginModuleInstance=ne=>It[ne],zt="__osOptionsValidationPlugin",Et$1="__osSizeObserverPlugin",getShowNativeOverlaidScrollbars=(ne,oe)=>{const{T:ce}=oe,[ue,pe]=ne("showNativeOverlaidScrollbars");return[ue&&ce.x&&ce.y,pe]},overflowIsVisible=ne=>ne.indexOf(E$3)===0,getViewportOverflowState=(ne,oe)=>{const{D:ce}=ne,ue=ve=>{const xe=getStyles$2(ce,ve),Se=(oe?oe[ve]:xe)==="scroll";return[xe,Se]},[pe,me]=ue(C$3),[ge,ye]=ue(x$3);return{k:{x:pe,y:ge},R:{x:me,y:ye}}},setViewportOverflowState=(ne,oe,ce,ue)=>{const pe=oe.x||oe.y,me=(_e,Se)=>{const $e=overflowIsVisible(_e),Re=$e&&pe?"hidden":"",Ae=Se&&$e&&_e.replace(`${E$3}-`,"")||Re;return[Se&&!$e?_e:"",overflowIsVisible(Ae)?"hidden":Ae]},[ge,ye]=me(ce.x,oe.x),[ve,xe]=me(ce.y,oe.y);return ue[C$3]=ye&&ve?ye:ge,ue[x$3]=xe&&ge?xe:ve,getViewportOverflowState(ne,ue)},Tt="__osScrollbarsHidingPlugin",kt="__osClickScrollPlugin";let Mt;const createEnvironment=()=>{const ne=(Fe,Ue,We,qe)=>{appendChildren(Fe,Ue);const ze=R$3(Ue),Ge=k$6(Ue),Ze=fractionalSize(We);return qe&&removeElements(Ue),{x:Ge.h-ze.h+Ze.h,y:Ge.w-ze.w+Ze.w}},oe=Fe=>{let Ue=!1;const We=addClass(Fe,B$3);try{Ue=getStyles$2(Fe,"scrollbar-width")==="none"||getStyles$2(Fe,"display","::-webkit-scrollbar")==="none"}catch{}return We(),Ue},ce=(Fe,Ue)=>{setStyles(Fe,{[C$3]:z$4,[x$3]:z$4,direction:"rtl"}),scrollElementTo(Fe,{x:0});const We=absoluteCoordinates(Fe),qe=absoluteCoordinates(Ue);scrollElementTo(Fe,{x:-999});const ze=absoluteCoordinates(Ue);return{i:We.x===qe.x,n:qe.x!==ze.x}},{body:ue}=document,me=createDOM(`
`)[0],ge=me.firstChild,[ye,,ve]=createEventListenerHub(),[xe,_e]=createCache$1({o:ne(ue,me,ge),u:equalXY},bind$2(ne,ue,me,ge,!0)),[Se]=_e(),$e=oe(me),Re={x:Se.x===0,y:Se.y===0},Ae={elements:{host:null,padding:!$e,viewport:Fe=>$e&&Fe===Fe.ownerDocument.body&&Fe,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},Ie=assignDeep({},L$3),ke=bind$2(assignDeep,{},Ie),Be=bind$2(assignDeep,{},Ae),Ne={P:Se,T:Re,L:$e,J:!!d$6,K:ce(me,ge),Z:bind$2(ye,"r"),G:Be,tt:Fe=>assignDeep(Ae,Fe)&&Be(),nt:ke,ot:Fe=>assignDeep(Ie,Fe)&&ke(),st:assignDeep({},Ae),et:assignDeep({},Ie)};return removeAttrs(me,"style"),removeElements(me),n$6.addEventListener("resize",()=>{let Fe;if(!$e&&(!Re.x||!Re.y)){const Ue=getStaticPluginModuleInstance(Tt);Fe=!!(Ue?Ue.Y():noop$8)(Ne,xe)}ve("r",[Fe])}),Ne},getEnvironment=()=>(Mt||(Mt=createEnvironment()),Mt),resolveInitialization=(ne,oe)=>isFunction$2(oe)?oe.apply(0,ne):oe,staticInitializationElement=(ne,oe,ce,ue)=>{const pe=isUndefined(ue)?ce:ue;return resolveInitialization(ne,pe)||oe.apply(0,ne)},dynamicInitializationElement=(ne,oe,ce,ue)=>{const pe=isUndefined(ue)?ce:ue,me=resolveInitialization(ne,pe);return!!me&&(isHTMLElement(me)?me:oe.apply(0,ne))},cancelInitialization=(ne,oe)=>{const{nativeScrollbarsOverlaid:ce,body:ue}=oe||{},{T:pe,L:me,G:ge}=getEnvironment(),{nativeScrollbarsOverlaid:ye,body:ve}=ge().cancel,xe=ce??ye,_e=isUndefined(ue)?ve:ue,Se=(pe.x||pe.y)&&xe,$e=ne&&(isNull$1(_e)?!me:_e);return!!Se||!!$e},Vt=new WeakMap,addInstance=(ne,oe)=>{Vt.set(ne,oe)},removeInstance=ne=>{Vt.delete(ne)},getInstance=ne=>Vt.get(ne),createEventContentChange=(ne,oe,ce)=>{let ue=!1;const pe=ce?new WeakMap:!1,me=()=>{ue=!0},ge=ye=>{if(pe&&ce){const ve=ce.map(xe=>{const[_e,Se]=xe||[];return[Se&&_e?(ye||find$1)(_e,ne):[],Se]});each(ve,xe=>each(xe[0],_e=>{const Se=xe[1],$e=pe.get(_e)||[];if(ne.contains(_e)&&Se){const Ae=addEventListener$1(_e,Se,Ie=>{ue?(Ae(),pe.delete(_e)):oe(Ie)});pe.set(_e,push$2($e,Ae))}else runEachAndClear($e),pe.delete(_e)}))}};return ge(),[me,ge]},createDOMObserver=(ne,oe,ce,ue)=>{let pe=!1;const{ct:me,rt:ge,lt:ye,it:ve,ut:xe,ft:_e}=ue||{},Se=debounce(()=>pe&&ce(!0),{v:33,p:99}),[$e,Re]=createEventContentChange(ne,Se,ye),Ae=me||[],Ie=ge||[],ke=concat(Ae,Ie),Be=(Fe,Ue)=>{if(!isEmptyArray(Ue)){const We=xe||noop$8,qe=_e||noop$8,ze=[],Ge=[];let Ze=!1,Dt=!1;if(each(Ue,Je=>{const{attributeName:Ut,target:jt,type:Ke,oldValue:an,addedNodes:Zt,removedNodes:en}=Je,Kt=Ke==="attributes",Wt=Ke==="childList",un=ne===jt,Xt=Kt&&Ut,nn=Xt&&getAttr(jt,Ut||"")||null,vn=Xt&&an!==nn,Sn=inArray(Ie,Ut)&&vn;if(oe&&(Wt||!un)){const Cn=Kt&&vn,Nt=Cn&&ve&&is$7(jt,ve),Jt=(Nt?!We(jt,Ut,an,nn):!Kt||Cn)&&!qe(Je,!!Nt,ne,ue);each(Zt,hn=>push$2(ze,hn)),each(en,hn=>push$2(ze,hn)),Dt=Dt||Jt}!oe&&un&&vn&&!We(jt,Ut,an,nn)&&(push$2(Ge,Ut),Ze=Ze||Sn)}),Re(Je=>deduplicateArray(ze).reduce((Ut,jt)=>(push$2(Ut,find$1(Je,jt)),is$7(jt,Je)?push$2(Ut,jt):Ut),[])),oe)return!Fe&&Dt&&ce(!1),[!1];if(!isEmptyArray(Ge)||Ze){const Je=[deduplicateArray(Ge),Ze];return!Fe&&ce.apply(0,Je),Je}}},Ne=new u$6(bind$2(Be,!1));return[()=>(Ne.observe(ne,{attributes:!0,attributeOldValue:!0,attributeFilter:ke,subtree:oe,childList:oe,characterData:oe}),pe=!0,()=>{pe&&($e(),Ne.disconnect(),pe=!1)}),()=>{if(pe)return Se.m(),Be(!0,Ne.takeRecords())}]},createSizeObserver=(ne,oe,ce)=>{const{_t:pe,dt:me}=ce||{},ge=getStaticPluginModuleInstance(Et$1),{K:ye}=getEnvironment(),ve=bind$2(getDirectionIsRTL,ne),[xe]=createCache$1({o:!1,_:!0});return()=>{const _e=[],$e=createDOM(`
`)[0],Re=$e.firstChild,Ae=Ie=>{const ke=Ie instanceof ResizeObserverEntry,Be=!ke&&isArray$4(Ie);let Ne=!1,Fe=!1,Ue=!0;if(ke){const[We,,qe]=xe(Ie.contentRect),ze=domRectHasDimensions(We),Ge=domRectAppeared(We,qe);Fe=!qe||Ge,Ne=!Fe&&!ze,Ue=!Ne}else Be?[,Ue]=Ie:Fe=Ie===!0;if(pe&&Ue){const We=Be?Ie[0]:getDirectionIsRTL($e);scrollElementTo($e,{x:convertScrollPosition(3333333,3333333,We&&ye),y:3333333})}Ne||oe({vt:Be?Ie:void 0,ht:!Be,dt:Fe})};if(_$3){const Ie=new _$3(ke=>Ae(ke.pop()));Ie.observe(Re),push$2(_e,()=>{Ie.disconnect()})}else if(ge){const[Ie,ke]=ge(Re,Ae,me);push$2(_e,concat([addClass($e,et$3),addEventListener$1($e,"animationstart",Ie)],ke))}else return noop$8;if(pe){const[Ie]=createCache$1({o:void 0},ve);push$2(_e,addEventListener$1($e,"scroll",ke=>{const Be=Ie(),[Ne,Fe,Ue]=Be;Fe&&(removeClass(Re,"ltr rtl"),addClass(Re,Ne?"rtl":"ltr"),Ae([!!Ne,Fe,Ue])),stopPropagation(ke)}))}return bind$2(runEachAndClear,push$2(_e,appendChildren(ne,$e)))}},createTrinsicObserver=(ne,oe)=>{let ce;const ue=ve=>ve.h===0||ve.isIntersecting||ve.intersectionRatio>0,pe=createDiv(at$2),[me]=createCache$1({o:!1}),ge=(ve,xe)=>{if(ve){const _e=me(ue(ve)),[,Se]=_e;return Se&&!xe&&oe(_e)&&[_e]}},ye=(ve,xe)=>ge(xe.pop(),ve);return[()=>{const ve=[];if(f$5)ce=new f$5(bind$2(ye,!1),{root:ne}),ce.observe(pe),push$2(ve,()=>{ce.disconnect()});else{const xe=()=>{const _e=k$6(pe);ge(_e)};push$2(ve,createSizeObserver(pe,xe)()),xe()}return bind$2(runEachAndClear,push$2(ve,appendChildren(ne,pe)))},()=>ce&&ye(!0,ce.takeRecords())]},createObserversSetup=(ne,oe,ce,ue)=>{let pe,me,ge,ye,ve,xe;const{L:_e}=getEnvironment(),Se=`[${j$4}]`,$e=`[${K$3}]`,Re=["tabindex"],Ae=["wrap","cols","rows"],Ie=["id","class","style","open"],{gt:ke,bt:Be,D:Ne,wt:Fe,St:Ue,V:We,yt:qe,Ot:ze}=ne,Ge={$t:!1,N:getDirectionIsRTL(ke)},Ze=getEnvironment(),Dt=getStaticPluginModuleInstance(Tt),[Je]=createCache$1({u:equalWH,o:{w:0,h:0}},()=>{const Yt=Dt&&Dt.M(ne,oe,Ge,Ze,ce).W,Jt=qe(Q$3),hn=!We&&qe(Z$3),Ye=hn&&getElmentScroll(Ne);ze(Q$3),We&&ze(Y$3,!0);const Xe=hn&&Yt&&Yt()[0],Pt=M$4(Fe),sn=M$4(Ne),yn=fractionalSize(Ne);return ze(Q$3,Jt),We&&ze(Y$3),Xe&&Xe(),scrollElementTo(Ne,Ye),{w:sn.w+Pt.w+yn.w,h:sn.h+Pt.h+yn.h}}),Ut=Ue?Ae:concat(Ie,Ae),jt=debounce(ue,{v:()=>pe,p:()=>me,S(Yt,Jt){const[hn]=Yt,[Ye]=Jt;return[concat(keys$1(hn),keys$1(Ye)).reduce((Xe,Pt)=>(Xe[Pt]=hn[Pt]||Ye[Pt],Xe),{})]}}),Ke=Yt=>{if(We){const Jt=getDirectionIsRTL(ke);assignDeep(Yt,{Ct:xe!==Jt}),assignDeep(Ge,{N:Jt}),xe=Jt}},an=Yt=>{each(Yt||Re,Jt=>{if(inArray(Re,Jt)){const hn=getAttr(Be,Jt);isString$2(hn)?setAttrs(Ne,Jt,hn):removeAttrs(Ne,Jt)}})},Zt=(Yt,Jt)=>{const[hn,Ye]=Yt,Xe={xt:Ye};return assignDeep(Ge,{$t:hn}),!Jt&&ue(Xe),Xe},en=({ht:Yt,vt:Jt,dt:hn})=>{const Xe=!(Yt&&!hn&&!Jt)&&_e?jt:ue,[Pt,sn]=Jt||[],yn={ht:Yt||hn,dt:hn,Ct:sn};Ke(yn),Jt&&assignDeep(Ge,{N:Pt}),Xe(yn)},Kt=(Yt,Jt)=>{const[,hn]=Je(),Ye={Ht:hn};return Ke(Ye),hn&&!Jt&&(Yt?ue:jt)(Ye),Ye},Wt=(Yt,Jt,hn)=>{const Ye={It:Jt};return Ke(Ye),Jt&&!hn?jt(Ye):We||an(Yt),Ye},{Z:un}=Ze,[Xt,nn]=Fe?createTrinsicObserver(Be,Zt):[],vn=!We&&createSizeObserver(Be,en,{dt:!0,_t:!0}),[Sn,Cn]=createDOMObserver(Be,!1,Wt,{rt:Ie,ct:concat(Ie,Re)}),Nt=We&&_$3&&new _$3(Yt=>{const Jt=Yt[Yt.length-1].contentRect;en({ht:!0,dt:domRectAppeared(Jt,ve)}),ve=Jt});return[()=>{an(),Nt&&Nt.observe(Be);const Yt=vn&&vn(),Jt=Xt&&Xt(),hn=Sn(),Ye=un(Xe=>{const[,Pt]=Je();jt({zt:Xe,Ht:Pt})});return()=>{Nt&&Nt.disconnect(),Yt&&Yt(),Jt&&Jt(),ye&&ye(),hn(),Ye()}},({Et:Yt,At:Jt,Tt:hn})=>{const Ye={},[Xe]=Yt("update.ignoreMutation"),[Pt,sn]=Yt("update.attributes"),[yn,qt]=Yt("update.elementEvents"),[wn,Tn]=Yt("update.debounce"),xn=qt||sn,Nn=Jt||hn,zn=Yn=>isFunction$2(Xe)&&Xe(Yn);if(xn){ge&&ge(),ye&&ye();const[Yn,Kn]=createDOMObserver(Fe||Ne,!0,Kt,{ct:concat(Ut,Pt||[]),lt:yn,it:Se,ft:(Rn,Mn)=>{const{target:Xn,attributeName:Jn}=Rn;return(!Mn&&Jn&&!We?liesBetween(Xn,Se,$e):!1)||!!closest$2(Xn,`.${ft}`)||!!zn(Rn)}});ye=Yn(),ge=Kn}if(Tn)if(jt.m(),isArray$4(wn)){const Yn=wn[0],Kn=wn[1];pe=isNumber$2(Yn)&&Yn,me=isNumber$2(Kn)&&Kn}else isNumber$2(wn)?(pe=wn,me=!1):(pe=!1,me=!1);if(Nn){const Yn=Cn(),Kn=nn&&nn(),Rn=ge&&ge();Yn&&assignDeep(Ye,Wt(Yn[0],Yn[1],Nn)),Kn&&assignDeep(Ye,Zt(Kn[0],Nn)),Rn&&assignDeep(Ye,Kt(Rn[0],Nn))}return Ke(Ye),Ye},Ge]},createScrollbarsSetupElements=(ne,oe,ce,ue)=>{const{G:pe,K:me}=getEnvironment(),{scrollbars:ge}=pe(),{slot:ye}=ge,{gt:ve,bt:xe,D:_e,Dt:Se,kt:$e,Rt:Re,V:Ae}=oe,{scrollbars:Ie}=Se?{}:ne,{slot:ke}=Ie||{},Be=new Map,Ne=Yt=>d$6&&new d$6({source:$e,axis:Yt}),Fe=Ne("x"),Ue=Ne("y"),We=dynamicInitializationElement([ve,xe,_e],()=>Ae&&Re?ve:xe,ye,ke),qe=(Yt,Jt)=>{if(Jt){const yn=Yt?H$4:I$3,{Mt:qt,Vt:wn}=Jt,Tn=getBoundingClientRect(wn)[yn],xn=getBoundingClientRect(qt)[yn];return capNumber(0,1,Tn/xn||0)}const hn=Yt?"x":"y",{Lt:Ye,Pt:Xe}=ce,Pt=Xe[hn],sn=Ye[hn];return capNumber(0,1,Pt/(Pt+sn)||0)},ze=(Yt,Jt,hn,Ye)=>{const Xe=qe(hn,Yt);return 1/Xe*(1-Xe)*(Ye?1-Jt:Jt)||0},Ge=(Yt,Jt)=>assignDeep(Yt,Jt?{clear:["left"]}:{}),Ze=Yt=>{Be.forEach((Jt,hn)=>{(Yt?inArray(createOrKeepArray(Yt),hn):!0)&&(each(Jt||[],Xe=>{Xe&&Xe.cancel()}),Be.delete(hn))})},Dt=(Yt,Jt,hn,Ye)=>{const Xe=Be.get(Yt)||[],Pt=Xe.find(sn=>sn&&sn.timeline===Jt);Pt?Pt.effect=new KeyframeEffect(Yt,hn,{composite:Ye}):Be.set(Yt,concat(Xe,[Yt.animate(hn,{timeline:Jt,composite:Ye})]))},Je=(Yt,Jt,hn)=>{const Ye=hn?addClass:removeClass;each(Yt,Xe=>{Ye(Xe.Ut,Jt)})},Ut=(Yt,Jt)=>{each(Yt,hn=>{const[Ye,Xe]=Jt(hn);setStyles(Ye,Xe)})},jt=(Yt,Jt)=>{Ut(Yt,hn=>{const{Vt:Ye}=hn;return[Ye,{[Jt?H$4:I$3]:ratioToCssPercent(qe(Jt))}]})},Ke=(Yt,Jt)=>{const{Lt:hn}=ce,Ye=Jt?hn.x:hn.y,Xe=(Pt,sn,yn)=>getTrasformTranslateValue(ratioToCssPercent(ze(Pt,getRawScrollRatio(sn,Ye,yn),Jt,yn)),Jt);if(Fe&&Ue)each(Yt,Pt=>{const{Ut:sn,Vt:yn}=Pt,qt=Jt&&getDirectionIsRTL(sn)&&me;Dt(yn,Jt?Fe:Ue,Ge({transform:getRawScrollBounds(Ye,qt).map(wn=>Xe(Pt,wn,qt))},qt))});else{const Pt=getElmentScroll($e);Ut(Yt,sn=>{const{Vt:yn,Ut:qt}=sn;return[yn,{transform:Xe(sn,Jt?Pt.x:Pt.y,Jt&&getDirectionIsRTL(qt)&&me)}]})}},an=Yt=>Ae&&!Re&&parent(Yt)===_e,Zt=[],en=[],Kt=[],Wt=(Yt,Jt,hn)=>{const Ye=isBoolean$2(hn),Xe=Ye?hn:!0,Pt=Ye?!hn:!0;Xe&&Je(en,Yt,Jt),Pt&&Je(Kt,Yt,Jt)},un=()=>{jt(en,!0),jt(Kt)},Xt=()=>{Ke(en,!0),Ke(Kt)},nn=()=>{if(Ae){const{Lt:Yt}=ce,Jt=.5;if(Fe&&Ue)each(concat(Kt,en),({Ut:hn})=>{if(an(hn)){const Ye=(Xe,Pt,sn)=>{const yn=sn&&getDirectionIsRTL(hn)&&me;Dt(hn,Xe,Ge({transform:getRawScrollBounds(Pt-Jt,yn).map(qt=>getTrasformTranslateValue(numberToCssPx(qt),sn))},yn),"add")};Ye(Fe,Yt.x,!0),Ye(Ue,Yt.y)}else Ze(hn)});else{const hn=getElmentScroll($e),Ye=Xe=>{const{Ut:Pt}=Xe,sn=an(Pt)&&Pt,yn=(qt,wn,Tn)=>{const xn=getRawScrollRatio(qt,wn,Tn),Nn=wn*xn;return numberToCssPx(Tn?-Nn:Nn)};return[sn,{transform:sn?getTrasformTranslateValue({x:yn(hn.x,Yt.x,getDirectionIsRTL(Pt)&&me),y:yn(hn.y,Yt.y)}):""}]};Ut(en,Ye),Ut(Kt,Ye)}}},vn=Yt=>{const Jt=Yt?dt$2:vt,hn=Yt?en:Kt,Ye=isEmptyArray(hn)?wt:"",Xe=createDiv(`${ft} ${Jt} ${Ye}`),Pt=createDiv(ht$2),sn=createDiv(pt$1),yn={Ut:Xe,Mt:Pt,Vt:sn};return push$2(hn,yn),push$2(Zt,[appendChildren(Xe,Pt),appendChildren(Pt,sn),bind$2(removeElements,Xe),Ze,ue(yn,Wt,Ke,Yt)]),yn},Sn=bind$2(vn,!0),Cn=bind$2(vn,!1),Nt=()=>(appendChildren(We,en[0].Ut),appendChildren(We,Kt[0].Ut),i$6(()=>{Wt(wt)},300),bind$2(runEachAndClear,Zt));return Sn(),Cn(),[{Bt:un,Nt:Xt,jt:nn,Ft:Wt,qt:{J:Fe,Wt:en,Xt:Sn,Yt:bind$2(Ut,en)},Jt:{J:Ue,Wt:Kt,Xt:Cn,Yt:bind$2(Ut,Kt)}},Nt]},createScrollbarsSetupEvents=(ne,oe,ce)=>{const{bt:ue,kt:pe,Kt:me}=oe;return(ge,ye,ve,xe)=>{const{Ut:_e,Mt:Se,Vt:$e}=ge,[Re,Ae]=selfClearTimeout(333),[Ie,ke]=selfClearTimeout(),Be=bind$2(ve,[ge],xe),Ne=!!pe.scrollBy,Fe=`client${xe?"X":"Y"}`,Ue=xe?H$4:I$3,We=xe?"left":"top",qe=xe?"w":"h",ze=xe?"x":"y",Ge=Je=>Je.propertyName.indexOf(Ue)>-1,Ze=()=>{const Je="pointerup pointerleave pointercancel lostpointercapture",Ut=(jt,Ke)=>an=>{const{Lt:Zt}=ce,en=k$6(Se)[qe]-k$6($e)[qe],Wt=Ke*an/en*Zt[ze];scrollElementTo(pe,{[ze]:jt+Wt})};return addEventListener$1(Se,"pointerdown",jt=>{const Ke=closest$2(jt.target,`.${pt$1}`)===$e,an=Ke?$e:Se,Zt=ne.scrollbars,{button:en,isPrimary:Kt,pointerType:Wt}=jt,{pointers:un}=Zt;if(en===0&&Kt&&Zt[Ke?"dragScroll":"clickScroll"]&&(un||[]).includes(Wt)){const nn=!Ke&&jt.shiftKey,vn=bind$2(getBoundingClientRect,$e),Sn=bind$2(getBoundingClientRect,Se),Cn=(xn,Nn)=>(xn||vn())[We]-(Nn||Sn())[We],Nt=e$5(getBoundingClientRect(pe)[Ue])/k$6(pe)[qe]||1,Yt=Ut(getElmentScroll(pe)[ze]||0,1/Nt),Jt=jt[Fe],hn=vn(),Ye=Sn(),Xe=hn[Ue],Pt=Cn(hn,Ye)+Xe/2,sn=Jt-Ye[We],yn=Ke?0:sn-Pt,qt=xn=>{runEachAndClear(Tn),an.releasePointerCapture(xn.pointerId)},Tn=[addAttrClass(ue,j$4,X$3),addEventListener$1(me,Je,qt),addEventListener$1(me,"selectstart",xn=>preventDefault$1(xn),{H:!1}),addEventListener$1(Se,Je,qt),addEventListener$1(Se,"pointermove",xn=>{const Nn=xn[Fe]-Jt;(Ke||nn)&&Yt(yn+Nn)})];if(an.setPointerCapture(jt.pointerId),nn)Yt(yn);else if(!Ke){const xn=getStaticPluginModuleInstance(kt);xn&&push$2(Tn,xn(Yt,Cn,yn,Xe,sn))}}})};let Dt=!0;return bind$2(runEachAndClear,[addEventListener$1(_e,"pointerenter",()=>{ye(St,!0)}),addEventListener$1(_e,"pointerleave pointercancel",()=>{ye(St,!1)}),addEventListener$1(_e,"wheel",Je=>{const{deltaX:Ut,deltaY:jt,deltaMode:Ke}=Je;Ne&&Dt&&Ke===0&&parent(_e)===ue&&pe.scrollBy({left:Ut,top:jt,behavior:"smooth"}),Dt=!1,ye($t,!0),Re(()=>{Dt=!0,ye($t)}),preventDefault$1(Je)},{H:!1,I:!0}),addEventListener$1($e,"transitionstart",Je=>{if(Ge(Je)){const Ut=()=>{Be(),Ie(Ut)};Ut()}}),addEventListener$1($e,"transitionend transitioncancel",Je=>{Ge(Je)&&(ke(),Be())}),addEventListener$1(_e,"mousedown",bind$2(addEventListener$1,me,"click",stopPropagation,{A:!0,I:!0}),{I:!0}),Ze(),Ae,ke])}},createScrollbarsSetup=(ne,oe,ce,ue,pe,me)=>{let ge,ye,ve,xe,_e,Se=noop$8,$e=0;const[Re,Ae]=selfClearTimeout(),[Ie,ke]=selfClearTimeout(),[Be,Ne]=selfClearTimeout(100),[Fe,Ue]=selfClearTimeout(100),[We,qe]=selfClearTimeout(100),[ze,Ge]=selfClearTimeout(()=>$e),[Ze,Dt]=createScrollbarsSetupElements(ne,pe,ue,createScrollbarsSetupEvents(oe,pe,ue)),{bt:Je,Zt:Ut,Rt:jt}=pe,{Ft:Ke,Bt:an,Nt:Zt,jt:en}=Ze,Kt=vn=>{Ke(mt$1,vn,!0),Ke(mt$1,vn,!1)},Wt=(vn,Sn)=>{if(Ge(),vn)Ke(Ot);else{const Cn=bind$2(Ke,Ot,!0);$e>0&&!Sn?ze(Cn):Cn()}},un=vn=>vn.pointerType==="mouse",Xt=vn=>{un(vn)&&(xe=ye,xe&&Wt(!0))},nn=[Ne,Ge,Ue,qe,ke,Ae,()=>Se(),addEventListener$1(Je,"pointerover",Xt,{A:!0}),addEventListener$1(Je,"pointerenter",Xt),addEventListener$1(Je,"pointerleave",vn=>{un(vn)&&(xe=!1,ye&&Wt(!1))}),addEventListener$1(Je,"pointermove",vn=>{un(vn)&&ge&&Re(()=>{Ne(),Wt(!0),Fe(()=>{ge&&Wt(!1)})})}),addEventListener$1(Ut,"scroll",vn=>{Ie(()=>{Zt(),ve&&Wt(!0),Be(()=>{ve&&!xe&&Wt(!1)})}),me(vn),en()})];return[()=>bind$2(runEachAndClear,push$2(nn,Dt())),({Et:vn,Tt:Sn,Gt:Cn,Qt:Nt})=>{const{tn:Yt,nn:Jt,sn:hn}=Nt||{},{Ct:Ye,dt:Xe}=Cn||{},{N:Pt}=ce,{T:sn}=getEnvironment(),{Lt:yn,k:qt,en:wn}=ue,[Tn,xn]=vn("showNativeOverlaidScrollbars"),[Nn,zn]=vn("scrollbars.theme"),[Yn,Kn]=vn("scrollbars.visibility"),[Rn,Mn]=vn("scrollbars.autoHide"),[Xn,Jn]=vn("scrollbars.autoHideSuspend"),[pn]=vn("scrollbars.autoHideDelay"),[tn,Gt]=vn("scrollbars.dragScroll"),[bn,kn]=vn("scrollbars.clickScroll"),jn=Xe&&!Sn,Wn=wn.x||wn.y,dn=Yt||Jt||Ye||Sn,Bn=hn||Kn,mn=Tn&&sn.x&&sn.y,Pn=(ur,er)=>{const _r=Yn==="visible"||Yn==="auto"&&ur==="scroll";return Ke(gt$1,_r,er),_r};if($e=pn,jn&&(Xn&&Wn?(Kt(!1),Se(),We(()=>{Se=addEventListener$1(Ut,"scroll",bind$2(Kt,!0),{A:!0})})):Kt(!0)),xn&&Ke(ut$2,mn),zn&&(Ke(_e),Ke(Nn,!0),_e=Nn),Jn&&!Xn&&Kt(!0),Mn&&(ge=Rn==="move",ye=Rn==="leave",ve=Rn!=="never",Wt(!ve,!0)),Gt&&Ke(xt,tn),kn&&Ke(Ct$1,bn),Bn){const ur=Pn(qt.x,!0),er=Pn(qt.y,!1);Ke(bt$1,!(ur&&er))}dn&&(an(),Zt(),en(),Ke(yt,!yn.x,!0),Ke(yt,!yn.y,!1),Ke(_t,Pt&&!jt))},{},Ze]},createStructureSetupElements=ne=>{const oe=getEnvironment(),{G:ce,L:ue}=oe,{elements:pe}=ce(),{host:me,padding:ge,viewport:ye,content:ve}=pe,xe=isHTMLElement(ne),_e=xe?{}:ne,{elements:Se}=_e,{host:$e,padding:Re,viewport:Ae,content:Ie}=Se||{},ke=xe?ne:_e.target,Be=is$7(ke,"textarea"),Ne=ke.ownerDocument,Fe=Ne.documentElement,Ue=ke===Ne.body,We=Ne.defaultView,qe=()=>Ne.activeElement,ze=Yn=>{Yn&&Yn.focus&&Yn.focus()},Ge=bind$2(staticInitializationElement,[ke]),Ze=bind$2(dynamicInitializationElement,[ke]),Dt=bind$2(resolveInitialization,[ke]),Je=bind$2(createDiv,""),Ut=bind$2(Ge,Je,ye),jt=bind$2(Ze,Je,ve),Ke=Ut(Ae),an=Ke===ke,Zt=an&&Ue,en=!an&&jt(Ie),Kt=!an&&isHTMLElement(Ke)&&Ke===en,Wt=Kt&&!!Dt(ve),un=Wt?Ut():Ke,Xt=Wt?en:jt(),vn=Zt?Fe:Kt?un:Ke,Sn=Be?Ge(Je,me,$e):ke,Cn=Zt?vn:Sn,Nt=Kt?Xt:en,Yt={gt:ke,bt:Cn,D:vn,cn:!an&&Ze(Je,ge,Re),wt:Nt,kt:Zt?Fe:vn,Zt:Zt?Ne:vn,rn:Ue?Fe:ke,ln:We,Kt:Ne,St:Be,Rt:Ue,Dt:xe,V:an,an:Kt,yt:Yn=>hasAttrClass(vn,an?j$4:K$3,Yn),Ot:(Yn,Kn)=>addRemoveAttrClass(vn,an?j$4:K$3,Yn,Kn)},Jt=keys$1(Yt).reduce((Yn,Kn)=>{const Rn=Yt[Kn];return push$2(Yn,Rn&&isHTMLElement(Rn)&&!parent(Rn)?Rn:!1)},[]),hn=Yn=>Yn?inArray(Jt,Yn):null,{gt:Ye,bt:Xe,cn:Pt,D:sn,wt:yn}=Yt,qt=[()=>{removeAttrs(Xe,[j$4,N$4]),removeAttrs(Ye,N$4),Ue&&removeAttrs(Fe,[N$4,j$4])}],wn=Be&&hn(Xe);let Tn=Be?Ye:contents([yn,sn,Pt,Xe,Ye].find(Yn=>hn(Yn)===!1));const xn=Zt?Ye:yn||sn,Nn=bind$2(runEachAndClear,qt);return[Yt,()=>{const Yn=qe(),Kn=Xn=>{appendChildren(parent(Xn),contents(Xn)),removeElements(Xn)},Rn=Xn=>Xn?addEventListener$1(Xn,"focus blur",Jn=>{stopPropagation(Jn),Jn.stopImmediatePropagation()},{I:!0,H:!1}):noop$8,Mn=Rn(Yn);if(setAttrs(Xe,j$4,an?"viewport":"host"),setAttrs(Pt,tt$3,""),setAttrs(yn,ot$2,""),an||(setAttrs(sn,K$3,""),Ue&&addAttrClass(Fe,j$4,J$3)),wn&&(insertAfter(Ye,Xe),push$2(qt,()=>{insertAfter(Xe,Ye),removeElements(Xe)})),appendChildren(xn,Tn),appendChildren(Xe,Pt),appendChildren(Pt||Xe,!an&&sn),appendChildren(sn,yn),push$2(qt,[Mn,()=>{const Xn=qe(),Jn=Rn(Xn);removeAttrs(Pt,tt$3),removeAttrs(yn,ot$2),removeAttrs(sn,[F$4,q$6,K$3]),hn(yn)&&Kn(yn),hn(sn)&&Kn(sn),hn(Pt)&&Kn(Pt),ze(Xn),Jn()}]),ue&&!an&&(addAttrClass(sn,K$3,G$3),push$2(qt,bind$2(removeAttrs,sn,K$3))),!an&&We.top===We&&Yn===ke){const Xn="tabindex",Jn=getAttr(sn,Xn);setAttrs(sn,Xn,"-1"),ze(sn);const pn=()=>Jn?setAttrs(sn,Xn,Jn):removeAttrs(sn,Xn),tn=addEventListener$1(Ne,"pointerdown keydown",()=>{pn(),tn()});push$2(qt,[pn,tn])}else ze(Yn);return Mn(),Tn=0,Nn},Nn]},createTrinsicUpdateSegment=({wt:ne})=>({Gt:oe,un:ce,Tt:ue})=>{const{xt:pe}=oe||{},{$t:me}=ce;ne&&(pe||ue)&&setStyles(ne,{[I$3]:me&&"100%"})},createPaddingUpdateSegment=({bt:ne,cn:oe,D:ce,V:ue},pe)=>{const[me,ge]=createCache$1({u:equalTRBL,o:topRightBottomLeft()},bind$2(topRightBottomLeft,ne,"padding",""));return({Et:ye,Gt:ve,un:xe,Tt:_e})=>{let[Se,$e]=ge(_e);const{L:Re}=getEnvironment(),{ht:Ae,Ht:Ie,Ct:ke}=ve||{},{N:Be}=xe,[Ne,Fe]=ye("paddingAbsolute");(Ae||$e||(_e||Ie))&&([Se,$e]=me(_e));const We=!ue&&(Fe||ke||$e);if(We){const qe=!Ne||!oe&&!Re,ze=Se.r+Se.l,Ge=Se.t+Se.b,Ze={[O$3]:qe&&!Be?-ze:0,[$$4]:qe?-Ge:0,[m$5]:qe&&Be?-ze:0,top:qe?-Se.t:0,right:qe?Be?-Se.r:"auto":0,left:qe?Be?"auto":-Se.l:0,[H$4]:qe&&`calc(100% + ${ze}px)`},Dt={[b$5]:qe?Se.t:0,[w$5]:qe?Se.r:0,[y$3]:qe?Se.b:0,[S$5]:qe?Se.l:0};setStyles(oe||ce,Ze),setStyles(ce,Dt),assignDeep(pe,{cn:Se,fn:!qe,j:oe?Dt:assignDeep({},Ze,Dt)})}return{_n:We}}},createOverflowUpdateSegment=(ne,oe)=>{const ce=getEnvironment(),{bt:ue,cn:pe,D:me,V:ge,Ot:ye,Rt:ve,ln:xe}=ne,{L:_e,T:Se}=ce,$e=ve&&ge,Re=bind$2(o$4,0),Ae={u:equalWH,o:{w:0,h:0}},Ie={u:equalXY,o:{x:z$4,y:z$4}},ke=(Je,Ut)=>{const jt=n$6.devicePixelRatio%1!==0?1:0,Ke={w:Re(Je.w-Ut.w),h:Re(Je.h-Ut.h)};return{w:Ke.w>jt?Ke.w:0,h:Ke.h>jt?Ke.h:0}},[Be,Ne]=createCache$1(Ae,bind$2(fractionalSize,me)),[Fe,Ue]=createCache$1(Ae,bind$2(M$4,me)),[We,qe]=createCache$1(Ae),[ze,Ge]=createCache$1(Ae),[Ze]=createCache$1(Ie),Dt=getStaticPluginModuleInstance(Tt);return({Et:Je,Gt:Ut,un:jt,Tt:Ke},{_n:an})=>{const{ht:Zt,It:en,Ht:Kt,xt:Wt,Ct:un,zt:Xt}=Ut||{},{$t:nn}=jt,vn=Dt&&Dt.M(ne,oe,jt,ce,Je),{q:Sn,W:Cn,X:Nt,F:Yt}=vn||{},Jt=(mn,Pn)=>{if(setStyles(me,{[I$3]:""}),Pn){const{fn:ur,cn:er}=oe,{R:_r}=mn,dr=fractionalSize(ue),Sr=R$3(ue),sr=getStyles$2(me,"boxSizing")==="content-box",nr=ur||sr?er.b+er.t:0,kr=!(Se.x&&sr);setStyles(me,{[I$3]:Sr.h+dr.h+(_r.x&&kr&&Yt?Yt(mn).U.x:0)-nr})}},[hn,Ye]=getShowNativeOverlaidScrollbars(Je,ce),[Xe,Pt]=Je("overflow"),sn=!ge&&(Zt||Kt||en||Ye||Wt),yn=Zt||an||Kt||un||Xt||Ye,qt=overflowIsVisible(Xe.x),wn=overflowIsVisible(Xe.y),Tn=qt||wn;let xn=Ne(Ke),Nn=Ue(Ke),zn=qe(Ke),Yn=Ge(Ke),Kn;if(Ye&&_e&&ye(G$3,!hn),sn&&(Kn=getViewportOverflowState(ne),Jt(Kn,nn)),yn){Tn&&ye(Q$3,!1);const[mn,Pn]=Cn?Cn(Kn):[],[ur,er]=xn=Be(Ke),[_r,dr]=Nn=Fe(Ke),Sr=R$3(me),sr=_r,nr=Sr;mn&&mn(),(dr||er||Ye)&&Pn&&!hn&&Sn&&Sn(Pn,_r,ur);const kr=windowSize(xe),Mr={w:Re(o$4(_r.w,sr.w)+ur.w),h:Re(o$4(_r.h,sr.h)+ur.h)},Rr={w:Re(($e?kr.w:nr.w+Re(Sr.w-_r.w))+ur.w),h:Re(($e?kr.h:nr.h+Re(Sr.h-_r.h))+ur.h)};Yn=ze(Rr),zn=We(ke(Mr,Rr),Ke)}const[Rn,Mn]=Yn,[Xn,Jn]=zn,[pn,tn]=Nn,[Gt,bn]=xn,kn={x:Xn.w>0,y:Xn.h>0},jn=qt&&wn&&(kn.x||kn.y)||qt&&kn.x&&!kn.y||wn&&kn.y&&!kn.x;if(an||un||Xt||bn||tn||Mn||Jn||Pt||Ye||sn||yn){const mn={},Pn=setViewportOverflowState(ne,kn,Xe,mn);Nt&&Nt(Pn,jt,!!Sn&&Sn(Pn,pn,Gt),mn),sn&&Jt(Pn,nn),ge?(setAttrs(ue,F$4,mn[C$3]),setAttrs(ue,q$6,mn[x$3])):setStyles(me,mn)}addRemoveAttrClass(ue,j$4,W$3,jn),addRemoveAttrClass(pe,tt$3,nt$2,jn),ge||addRemoveAttrClass(me,K$3,Q$3,Tn);const[dn,Bn]=Ze(getViewportOverflowState(ne).k);return assignDeep(oe,{k:dn,Pt:{x:Rn.w,y:Rn.h},Lt:{x:Xn.w,y:Xn.h},en:kn}),{sn:Bn,tn:Mn,nn:Jn}}},createStructureSetup=ne=>{const[oe,ce,ue]=createStructureSetupElements(ne),pe={cn:{t:0,r:0,b:0,l:0},fn:!1,j:{[O$3]:0,[$$4]:0,[m$5]:0,[b$5]:0,[w$5]:0,[y$3]:0,[S$5]:0},Pt:{x:0,y:0},Lt:{x:0,y:0},k:{x:z$4,y:z$4},en:{x:!1,y:!1}},{gt:me,D:ge,V:ye}=oe,{L:ve,T:xe}=getEnvironment(),_e=!ve&&(xe.x||xe.y),Se=[createTrinsicUpdateSegment(oe),createPaddingUpdateSegment(oe,pe),createOverflowUpdateSegment(oe,pe)];return[ce,$e=>{const Re={},Ie=_e&&getElmentScroll(ge),ke=ye?addAttrClass(ge,j$4,Y$3):noop$8;return each(Se,Be=>{assignDeep(Re,Be($e,Re)||{})}),ke(),scrollElementTo(ge,Ie),!ye&&scrollElementTo(me,0),Re},pe,oe,ue]},createSetups=(ne,oe,ce,ue)=>{const pe=createOptionCheck(oe,{}),[me,ge,ye,ve,xe]=createStructureSetup(ne),[_e,Se,$e]=createObserversSetup(ve,ye,pe,Ne=>{Be({},Ne)}),[Re,Ae,,Ie]=createScrollbarsSetup(ne,oe,$e,ye,ve,ue),ke=Ne=>keys$1(Ne).some(Fe=>!!Ne[Fe]),Be=(Ne,Fe)=>{const{dn:Ue,Tt:We,At:qe,vn:ze}=Ne,Ge=Ue||{},Ze=!!We,Dt={Et:createOptionCheck(oe,Ge,Ze),dn:Ge,Tt:Ze};if(ze)return Ae(Dt),!1;const Je=Fe||Se(assignDeep({},Dt,{At:qe})),Ut=ge(assignDeep({},Dt,{un:$e,Gt:Je}));Ae(assignDeep({},Dt,{Gt:Je,Qt:Ut}));const jt=ke(Je),Ke=ke(Ut),an=jt||Ke||!isEmptyObject(Ge)||Ze;return an&&ce(Ne,{Gt:Je,Qt:Ut}),an};return[()=>{const{rn:Ne,D:Fe}=ve,Ue=getElmentScroll(Ne),We=[_e(),me(),Re()];return scrollElementTo(Fe,Ue),bind$2(runEachAndClear,We)},Be,()=>({hn:$e,pn:ye}),{gn:ve,bn:Ie},xe]},OverlayScrollbars=(ne,oe,ce)=>{const{nt:ue}=getEnvironment(),pe=isHTMLElement(ne),me=pe?ne:ne.target,ge=getInstance(me);if(oe&&!ge){let ye=!1;const ve=[],xe={},_e=Dt=>{const Je=removeUndefinedProperties(Dt,!0),Ut=getStaticPluginModuleInstance(zt);return Ut?Ut(Je,!0):Je},Se=assignDeep({},ue(),_e(oe)),[$e,Re,Ae]=createEventListenerHub(),[Ie,ke,Be]=createEventListenerHub(ce),Ne=(Dt,Je)=>{Be(Dt,Je),Ae(Dt,Je)},[Fe,Ue,We,qe,ze]=createSetups(ne,Se,({dn:Dt,Tt:Je},{Gt:Ut,Qt:jt})=>{const{ht:Ke,Ct:an,xt:Zt,Ht:en,It:Kt,dt:Wt}=Ut,{tn:un,nn:Xt,sn:nn}=jt;Ne("updated",[Ze,{updateHints:{sizeChanged:!!Ke,directionChanged:!!an,heightIntrinsicChanged:!!Zt,overflowEdgeChanged:!!un,overflowAmountChanged:!!Xt,overflowStyleChanged:!!nn,contentMutation:!!en,hostMutation:!!Kt,appear:!!Wt},changedOptions:Dt||{},force:!!Je}])},Dt=>Ne("scroll",[Ze,Dt])),Ge=Dt=>{removeInstance(me),runEachAndClear(ve),ye=!0,Ne("destroyed",[Ze,Dt]),Re(),ke()},Ze={options(Dt,Je){if(Dt){const Ut=Je?ue():{},jt=getOptionsDiff(Se,assignDeep(Ut,_e(Dt)));isEmptyObject(jt)||(assignDeep(Se,jt),Ue({dn:jt}))}return assignDeep({},Se)},on:Ie,off:(Dt,Je)=>{Dt&&Je&&ke(Dt,Je)},state(){const{hn:Dt,pn:Je}=We(),{N:Ut}=Dt,{Pt:jt,Lt:Ke,k:an,en:Zt,cn:en,fn:Kt}=Je;return assignDeep({},{overflowEdge:jt,overflowAmount:Ke,overflowStyle:an,hasOverflow:Zt,padding:en,paddingAbsolute:Kt,directionRTL:Ut,destroyed:ye})},elements(){const{gt:Dt,bt:Je,cn:Ut,D:jt,wt:Ke,kt:an,Zt}=qe.gn,{qt:en,Jt:Kt}=qe.bn,Wt=Xt=>{const{Vt:nn,Mt:vn,Ut:Sn}=Xt;return{scrollbar:Sn,track:vn,handle:nn}},un=Xt=>{const{Wt:nn,Xt:vn}=Xt,Sn=Wt(nn[0]);return assignDeep({},Sn,{clone:()=>{const Cn=Wt(vn());return Ue({vn:!0}),Cn}})};return assignDeep({},{target:Dt,host:Je,padding:Ut||jt,viewport:jt,content:Ke||jt,scrollOffsetElement:an,scrollEventElement:Zt,scrollbarHorizontal:un(en),scrollbarVertical:un(Kt)})},update:Dt=>Ue({Tt:Dt,At:!0}),destroy:bind$2(Ge,!1),plugin:Dt=>xe[keys$1(Dt)[0]]};return push$2(ve,[ze]),addInstance(me,Ze),registerPluginModuleInstances(Ht$1,OverlayScrollbars,[Ze,$e,xe]),cancelInitialization(qe.gn.Rt,!pe&&ne.cancel)?(Ge(!0),Ze):(push$2(ve,Fe()),Ne("initialized",[Ze]),Ze.update(!0),Ze)}return ge};OverlayScrollbars.plugin=ne=>{const oe=isArray$4(ne),ce=oe?ne:[ne],ue=ce.map(pe=>registerPluginModuleInstances(pe,OverlayScrollbars)[0]);return addPlugins(ce),oe?ue:ue[0]};OverlayScrollbars.valid=ne=>{const oe=ne&&ne.elements,ce=isFunction$2(oe)&&oe();return isPlainObject$1(ce)&&!!getInstance(ce.target)};OverlayScrollbars.env=()=>{const{P:ne,T:oe,L:ce,K:ue,J:pe,st:me,et:ge,G:ye,tt:ve,nt:xe,ot:_e}=getEnvironment();return assignDeep({},{scrollbarsSize:ne,scrollbarsOverlaid:oe,scrollbarsHiding:ce,rtlScrollBehavior:ue,scrollTimeline:pe,staticDefaultInitialization:me,staticDefaultOptions:ge,getDefaultInitialization:ye,setDefaultInitialization:ve,getDefaultOptions:xe,setDefaultOptions:_e})};const O$2=()=>{if(typeof window>"u"){const xe=()=>{};return[xe,xe]}let ne,oe;const ce=window,ue=typeof ce.requestIdleCallback=="function",pe=ce.requestAnimationFrame,me=ce.cancelAnimationFrame,ge=ue?ce.requestIdleCallback:pe,ye=ue?ce.cancelIdleCallback:me,ve=()=>{ye(ne),me(oe)};return[(xe,_e)=>{ve(),ne=ge(ue?()=>{ve(),oe=pe(xe)}:xe,typeof _e=="object"?_e:{timeout:2233})},ve]},S$4=ne=>{const{options:oe,events:ce,defer:ue}=ne||{},[pe,me]=reactExports.useMemo(O$2,[]),ge=reactExports.useRef(null),ye=reactExports.useRef(ue),ve=reactExports.useRef(oe),xe=reactExports.useRef(ce);return reactExports.useEffect(()=>{ye.current=ue},[ue]),reactExports.useEffect(()=>{const{current:_e}=ge;ve.current=oe,OverlayScrollbars.valid(_e)&&_e.options(oe||{},!0)},[oe]),reactExports.useEffect(()=>{const{current:_e}=ge;xe.current=ce,OverlayScrollbars.valid(_e)&&_e.on(ce||{},!0)},[ce]),reactExports.useEffect(()=>()=>{var _e;me(),(_e=ge.current)==null||_e.destroy()},[]),reactExports.useMemo(()=>[_e=>{const Se=ge.current;if(OverlayScrollbars.valid(Se))return;const $e=ye.current,Re=ve.current||{},Ae=xe.current||{},Ie=()=>ge.current=OverlayScrollbars(_e,Re,Ae);$e?pe(Ie,$e):Ie()},()=>ge.current],[])},F$3=(ne,oe)=>{const{element:ce="div",options:ue,events:pe,defer:me,children:ge,...ye}=ne,ve=ce,xe=reactExports.useRef(null),_e=reactExports.useRef(null),[Se,$e]=S$4({options:ue,events:pe,defer:me});return reactExports.useEffect(()=>{const{current:Re}=xe,{current:Ae}=_e;return Re&&Ae&&Se({target:Re,elements:{viewport:Ae,content:Ae}}),()=>{var Ie;return(Ie=$e())==null?void 0:Ie.destroy()}},[Se,ce]),reactExports.useImperativeHandle(oe,()=>({osInstance:$e,getElement:()=>xe.current}),[]),React$2.createElement(ve,{"data-overlayscrollbars-initialize":"",ref:xe,...ye},React$2.createElement("div",{"data-overlayscrollbars-contents":"",ref:_e},ge))},A$4=reactExports.forwardRef(F$3),Scroll=reactExports.forwardRef(({children:ne,x:oe,y:ce,px:ue=6,py:pe=0,...me},ge)=>{const{palette:ye,spacing:ve}=useTheme$1(),xe=useCss$1({"--os-padding-perpendicular":"2px","div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${ve(ue)})`,marginTop:ve(ue)},"div.os-scrollbar-horizontal > div.os-scrollbar-track":{width:`calc(100% - ${ve(pe*2)})`,marginLeft:ve(pe)},"div > div.os-scrollbar-track":{"--os-handle-perpendicular-size":"2px","--os-handle-perpendicular-size-hover":"6px","--os-handle-perpendicular-size-active":"6px","> div.os-scrollbar-handle":{borderRadius:0,opacity:.5,"&:hover":{opacity:.8}}}}),_e=reactExports.useCallback(Se=>{if(ge&&Se){const $e=Se.elements().viewport;$e&&(typeof ge=="function"?ge==null||ge($e):ge.current=$e)}},[ge]);return jsxRuntimeExports.jsx(A$4,{options:{overflow:{x:oe?"scroll":"hidden",y:ce?"scroll":"hidden"},scrollbars:{autoHide:"leave",theme:ye.mode==="dark"?"os-theme-light":"os-theme-dark"}},...me,style:{width:"100%",height:"100%",...me.style},className:`${xe} ${me.className}`,events:{initialized:_e},children:ne})}),reflow=ne=>ne.scrollTop;function getTransitionProps(ne,oe){const{timeout:ce,easing:ue,style:pe={}}=ne;return{duration:pe.transitionDuration??(typeof ce=="number"?ce:ce[oe.mode]||0),easing:pe.transitionTimingFunction??(typeof ue=="object"?ue[oe.mode]:ue),delay:pe.transitionDelay}}const styles={entering:{transform:"translateY(0)",opacity:1},entered:{transform:"translateY(0)",opacity:1},exiting:{},exited:{},unmounted:{}},Swipe=reactExports.forwardRef((ne,oe)=>{const ce=useTheme$1(),ue={enter:ce.transitions.duration.enteringScreen,exit:ce.transitions.duration.leavingScreen},{addEndListener:pe,appear:me=!0,children:ge,easing:ye,in:ve,onEnter:xe,onEntered:_e,onEntering:Se,onExit:$e,onExited:Re,onExiting:Ae,style:Ie,timeout:ke=ue,TransitionComponent:Be=Transition$1,...Ne}=ne,Fe=reactExports.useRef(null),Ue=useForkRef(Fe,ge.ref,oe),We=jt=>Ke=>{if(jt){const an=Fe.current;Ke===void 0?jt(an):jt(an,Ke)}},qe=We(Se),ze=We((jt,Ke)=>{reflow(jt);const an=getTransitionProps({style:Ie,timeout:ke,easing:ye},{mode:"enter"});jt.style.webkitTransition=ce.transitions.create(["opacity","transform"],an),jt.style.transition=ce.transitions.create(["opacity","transform"],an),xe&&xe(jt,Ke)}),Ge=We(_e),Ze=We(Ae),Dt=We(jt=>{const Ke=getTransitionProps({style:Ie,timeout:ke,easing:ye},{mode:"exit"});jt.style.webkitTransition=ce.transitions.create(["opacity","transform"],Ke),jt.style.transition=ce.transitions.create(["opacity","transform"],Ke),$e&&$e(jt)}),Je=We(Re),Ut=jt=>{pe&&pe(Fe.current,jt)};return jsxRuntimeExports.jsx(Be,{appear:me,in:ve,nodeRef:Fe,onEnter:ze,onEntered:Ge,onEntering:qe,onExit:Dt,onExited:Je,onExiting:Ze,addEndListener:Ut,timeout:ke,...Ne,children:(jt,Ke)=>reactExports.cloneElement(ge,{style:{transform:"translateY(16px)",opacity:0,visibility:jt==="exited"&&!ve?"hidden":void 0,...styles[jt],...Ie,...ge.props.style},ref:Ue,...Ke})})});function AppBarTitle({children:ne}){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:ne})}function ModalAppBar({onClose:ne=()=>{},style:oe,elevatedStyle:ce,children:ue,transitionProperties:pe=["box-shadow","background","border-bottom"],elevatedChildren:me,simple:ge,position:ye="sticky"}){const ve=useSmallDisplay(),xe=usePanel(),_e=useTheme$1(),[,,Se,,$e]=useScrollState();reactExports.useEffect(()=>{$e(xe)},[xe,$e]);const Re=Se?{background:_e.palette.background.paper,...!ge&&{boxShadow:_e.shadows[0]},...oe}:{background:_e.palette.background.paper,...!ge&&{boxShadow:_e.shadows[4]},...ce};function Ae(Ie){return typeof Ie=="string"?jsxRuntimeExports.jsx(AppBarTitle,{children:Ie}):Ie}return jsxRuntimeExports.jsx(AppBar$1,{elevation:0,position:ye,style:{color:_e.palette.text.primary,transition:_e.transitions.create(pe),...Re},children:jsxRuntimeExports.jsxs(Toolbar$1,{children:[jsxRuntimeExports.jsx(IconButton$1,{style:{marginRight:_e.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>ne(),children:jsxRuntimeExports.jsx(ArrowBack,{})}),ue&&jsxRuntimeExports.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:jsxRuntimeExports.jsx(Fade$1,{in:!!(!me||Se),mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsx(Box$1,{style:{width:"100%"},children:Ae(ue)})})}),me&&jsxRuntimeExports.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:jsxRuntimeExports.jsx(Fade$1,{in:!!(me&&!Se),mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsx(Box$1,{style:{width:"100%"},children:Ae(me)})})})]})})}function Modal({children:ne,actions:oe,width:ce=480,height:ue,variant:pe="default",scrollable:me=!0,...ge}){var Ze;const[ye,ve]=useUIState(),[xe,_e]=reactExports.useState(void 0);reactExports.useEffect(()=>{ne&&_e(ne)},[ne]);const Se=useTheme$1(),$e=useSmallDisplay(),[Re,Ae]=reactExports.useState(null),[Ie,ke]=reactExports.useState(null),[Be,Ne]=reactExports.useState(!1),[Fe,Ue]=reactExports.useState(0),[We,qe]=reactExports.useState(0);reactExports.useEffect(()=>{if(ge.open){let Dt=0;return ve(Je=>(Dt=Je.depth,{depth:Je.depth+1})),qe(Dt+1),()=>{ve(Je=>({depth:Je.depth-1}))}}},[ve,qe,ge.open]);const ze=95-5*We;reactExports.useEffect(()=>{if(Re&&Ie&&!$e&&!ue){const Dt=()=>{const Ut=window.innerHeight-64{window.removeEventListener("resize",Dt),Je.detach()}}},[Re,Ie,$e,ue]);const Ge=pe==="submodal"&&$e;return jsxRuntimeExports.jsxs(Dialog$1,{fullScreen:$e,...ge,open:$e?ge.open&&!!We:ge.open,keepMounted:!1,TransitionComponent:$e?Swipe:void 0,TransitionProps:{unmountOnExit:!0,mountOnEnter:!0},style:{...Ge&&{paddingTop:Se.spacing(8)},...ge.style},PaperProps:{ref:Dt=>Ae(Dt),style:{...$e&&{borderRadius:`${Se.shape.borderRadius*2}px ${Se.shape.borderRadius*2}px 0 0`},background:Se.palette.background.paper,overflow:"hidden",height:ue&&!$e?ue:$e?`${ze}dvh`:Be?"100%":Fe||"fit-content",position:"relative",maxWidth:"none",marginTop:$e?`${100-ze}dvh`:0,...(Ze=ge.PaperProps)==null?void 0:Ze.style},...ge.PaperProps},children:[jsxRuntimeExports.jsx(Scroll,{y:!0,style:{height:"100%",width:$e?void 0:ce,maxWidth:"100%",overflow:me?void 0:"hidden"},children:jsxRuntimeExports.jsx("div",{ref:Dt=>ke(Dt),style:{width:"100%",height:$e?"100%":void 0},children:xe})}),oe]})}function ManagedModal({appBar:ne,trigger:oe=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),children:ce,popover:ue,slotProps:pe}){var _e;const me=usePaper(),ge=useAcrylic(),ye=useSmallDisplay(),ve=ue&&!ye,xe=ce??((_e=pe==null?void 0:pe.modal)==null?void 0:_e.children);return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:Se=>{const{open:$e,close:Re,isOpen:Ae}=Se,Ie=typeof xe=="function"?xe(Se):xe;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[reactExports.cloneElement(oe($e,Ae)),ve?jsxRuntimeExports.jsx(Popover$1,{onMouseDown:ke=>{ke.stopPropagation()},onTouchStart:ke=>{ke.stopPropagation()},...lodashExports$1.merge(bindPopover(Se),{slotProps:{paper:{sx:{...ge}}}},pe==null?void 0:pe.popover),children:jsxRuntimeExports.jsx(Box$1,{...lodashExports$1.merge({sx:{width:360,...ge,...me(1)}},pe==null?void 0:pe.paper),children:Ie})}):jsxRuntimeExports.jsxs(Modal,{open:Ae,onClose:Re,...pe==null?void 0:pe.modal,children:[jsxRuntimeExports.jsx(ModalAppBar,{onClose:Re,...ne}),Ie]})]})}})}var rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote$1(ne){return rx_escapable.lastIndex=0,rx_escapable.test(ne)?'"'+ne.replace(rx_escapable,function(oe){var ce=meta[oe];return typeof ce=="string"?ce:"\\u"+("0000"+oe.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+ne+'"'}function str$2(ne,oe,ce){var ue,pe,me,ge,ye=gap,ve,xe=oe[ne];switch(xe&&typeof xe=="object"&&typeof xe.toJSON=="function"&&(xe=xe.toJSON(ne)),typeof rep=="function"&&(xe=rep.call(oe,ne,xe)),typeof xe){case"string":return quote$1(xe);case"number":return isFinite(xe)?String(xe):"null";case"boolean":case"null":return String(xe);case"object":if(!xe)return"null";if(gap+=indent,ve=[],Object.prototype.toString.apply(xe)==="[object Array]"){for(ge=xe.length,ue=0;uece?`[ +@keyframes element-queries { 0% { visibility: inherit; } }`,document.getElementsByTagName("head")[0].appendChild(me),qe=!0);for(var Ge=0,Ze=document.styleSheets.length;Ge{if(ye){const _e=()=>{{const Se=ye.scrollTop<=ne;Se!==me&&ge(Se)}{const Se=ye.scrollTop<=1;Se!==ue&&pe(Se)}xe.current-ye.scrollTop&&(Math.abs(xe.current-ye.scrollTop)>2&&xe.current>=0&&ce(xe.current>ye.scrollTop),xe.current=ye.scrollTop)};return ye.addEventListener("scroll",_e,{passive:!0}),()=>{ye.removeEventListener("scroll",_e)}}},[ye,me,ue,xe,ne]),[oe||me,me,ue,ye,ve]}const PanelContext=reactExports.createContext(null);function usePanel(){return reactExports.useContext(PanelContext)}const[useUIState,UIStateProvider]=createSlice({sidebarOpen:!1,busy:{},depth:0,fullscreenModal:void 0,workspaceMeta:{id:nanoid$1(),name:"",description:"",screenshots:[],author:"",size:0},isTrusted:!1,origin:void 0}),reflow=ne=>ne.scrollTop;function getTransitionProps(ne,oe){const{timeout:ce,easing:ue,style:pe={}}=ne;return{duration:pe.transitionDuration??(typeof ce=="number"?ce:ce[oe.mode]||0),easing:pe.transitionTimingFunction??(typeof ue=="object"?ue[oe.mode]:ue),delay:pe.transitionDelay}}const styles={entering:{transform:"translateY(0)",opacity:1},entered:{transform:"translateY(0)",opacity:1},exiting:{},exited:{},unmounted:{}},Swipe=reactExports.forwardRef((ne,oe)=>{const ce=useTheme$1(),ue={enter:ce.transitions.duration.enteringScreen,exit:ce.transitions.duration.leavingScreen},{addEndListener:pe,appear:me=!0,children:ge,easing:ye,in:ve,onEnter:xe,onEntered:_e,onEntering:Se,onExit:$e,onExited:Re,onExiting:Ae,style:Ie,timeout:ke=ue,TransitionComponent:Be=Transition$1,...Ne}=ne,Fe=reactExports.useRef(null),Ue=useForkRef(Fe,ge.ref,oe),We=jt=>Ke=>{if(jt){const an=Fe.current;Ke===void 0?jt(an):jt(an,Ke)}},qe=We(Se),ze=We((jt,Ke)=>{reflow(jt);const an=getTransitionProps({style:Ie,timeout:ke,easing:ye},{mode:"enter"});jt.style.webkitTransition=ce.transitions.create(["opacity","transform"],an),jt.style.transition=ce.transitions.create(["opacity","transform"],an),xe&&xe(jt,Ke)}),Ge=We(_e),Ze=We(Ae),Dt=We(jt=>{const Ke=getTransitionProps({style:Ie,timeout:ke,easing:ye},{mode:"exit"});jt.style.webkitTransition=ce.transitions.create(["opacity","transform"],Ke),jt.style.transition=ce.transitions.create(["opacity","transform"],Ke),$e&&$e(jt)}),Je=We(Re),Ut=jt=>{pe&&pe(Fe.current,jt)};return jsxRuntimeExports.jsx(Be,{appear:me,in:ve,nodeRef:Fe,onEnter:ze,onEntered:Ge,onEntering:qe,onExit:Dt,onExited:Je,onExiting:Ze,addEndListener:Ut,timeout:ke,...Ne,children:(jt,Ke)=>reactExports.cloneElement(ge,{style:{transform:"translateY(16px)",opacity:0,visibility:jt==="exited"&&!ve?"hidden":void 0,...styles[jt],...Ie,...ge.props.style},ref:Ue,...Ke})})});function AppBarTitle({children:ne}){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:ne})}function ModalAppBar({onClose:ne=()=>{},style:oe,elevatedStyle:ce,children:ue,transitionProperties:pe=["box-shadow","background","border-bottom"],elevatedChildren:me,simple:ge,position:ye="sticky"}){const ve=useSmallDisplay(),xe=usePanel(),_e=useTheme$1(),[,,Se,,$e]=useScrollState();reactExports.useEffect(()=>{$e(xe)},[xe,$e]);const Re=Se?{background:_e.palette.background.paper,...!ge&&{boxShadow:_e.shadows[0]},...oe}:{background:_e.palette.background.paper,...!ge&&{boxShadow:_e.shadows[4]},...ce};function Ae(Ie){return typeof Ie=="string"?jsxRuntimeExports.jsx(AppBarTitle,{children:Ie}):Ie}return jsxRuntimeExports.jsx(AppBar$1,{elevation:0,position:ye,style:{color:_e.palette.text.primary,transition:_e.transitions.create(pe),...Re},children:jsxRuntimeExports.jsxs(Toolbar$1,{children:[jsxRuntimeExports.jsx(IconButton$1,{style:{marginRight:_e.spacing(1)},"aria-label":"open drawer",edge:"start",onClick:()=>ne(),children:jsxRuntimeExports.jsx(ArrowBack,{})}),ue&&jsxRuntimeExports.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:jsxRuntimeExports.jsx(Fade$1,{in:!!(!me||Se),mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsx(Box$1,{style:{width:"100%"},children:Ae(ue)})})}),me&&jsxRuntimeExports.jsx("div",{style:{gridColumn:1,gridRow:1,flex:1,overflow:"auto"},children:jsxRuntimeExports.jsx(Fade$1,{in:!!(me&&!Se),mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsx(Box$1,{style:{width:"100%"},children:Ae(me)})})})]})})}function Modal({children:ne,actions:oe,width:ce=480,height:ue,variant:pe="default",scrollable:me=!0,...ge}){var Ze;const[ye,ve]=useUIState(),[xe,_e]=reactExports.useState(void 0);reactExports.useEffect(()=>{ne&&_e(ne)},[ne]);const Se=useTheme$1(),$e=useSmallDisplay(),[Re,Ae]=reactExports.useState(null),[Ie,ke]=reactExports.useState(null),[Be,Ne]=reactExports.useState(!1),[Fe,Ue]=reactExports.useState(0),[We,qe]=reactExports.useState(0);reactExports.useEffect(()=>{if(ge.open){let Dt=0;return ve(Je=>(Dt=Je.depth,{depth:Je.depth+1})),qe(Dt+1),()=>{ve(Je=>({depth:Je.depth-1}))}}},[ve,qe,ge.open]);const ze=95-5*We;reactExports.useEffect(()=>{if(Re&&Ie&&!$e&&!ue){const Dt=()=>{const Ut=window.innerHeight-64{window.removeEventListener("resize",Dt),Je.detach()}}},[Re,Ie,$e,ue]);const Ge=pe==="submodal"&&$e;return jsxRuntimeExports.jsxs(Dialog$1,{fullScreen:$e,...ge,open:$e?ge.open&&!!We:ge.open,keepMounted:!1,TransitionComponent:$e?Swipe:void 0,TransitionProps:{unmountOnExit:!0,mountOnEnter:!0},style:{...Ge&&{paddingTop:Se.spacing(8)},...ge.style},PaperProps:{ref:Dt=>Ae(Dt),style:{...$e&&{borderRadius:`${Se.shape.borderRadius*2}px ${Se.shape.borderRadius*2}px 0 0`},background:Se.palette.background.paper,overflow:"hidden",height:ue&&!$e?ue:$e?`${ze}dvh`:Be?"100%":Fe||"fit-content",position:"relative",maxWidth:"none",marginTop:$e?`${100-ze}dvh`:0,...(Ze=ge.PaperProps)==null?void 0:Ze.style},...ge.PaperProps},children:[jsxRuntimeExports.jsx(Scroll,{y:!0,style:{height:"100%",width:$e?void 0:ce,maxWidth:"100%",overflow:me?void 0:"hidden"},children:jsxRuntimeExports.jsx("div",{ref:Dt=>ke(Dt),style:{width:"100%",height:$e?"100%":void 0},children:xe})}),oe]})}function ManagedModal({appBar:ne,trigger:oe=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),children:ce,popover:ue,slotProps:pe}){var _e;const me=usePaper(),ge=useAcrylic(),ye=useSmallDisplay(),ve=ue&&!ye,xe=ce??((_e=pe==null?void 0:pe.modal)==null?void 0:_e.children);return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:Se=>{const{open:$e,close:Re,isOpen:Ae}=Se,Ie=typeof xe=="function"?xe(Se):xe;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[reactExports.cloneElement(oe($e,Ae)),ve?jsxRuntimeExports.jsx(Popover$1,{onMouseDown:ke=>{ke.stopPropagation()},onTouchStart:ke=>{ke.stopPropagation()},...lodashExports$1.merge(bindPopover(Se),{slotProps:{paper:{sx:{...ge}}}},pe==null?void 0:pe.popover),children:jsxRuntimeExports.jsx(Box$1,{...lodashExports$1.merge({sx:{width:360,...ge,...me(1)}},pe==null?void 0:pe.paper),children:Ie})}):jsxRuntimeExports.jsxs(Modal,{open:Ae,onClose:Re,...pe==null?void 0:pe.modal,children:[jsxRuntimeExports.jsx(ModalAppBar,{onClose:Re,...ne}),Ie]})]})}})}var rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote$1(ne){return rx_escapable.lastIndex=0,rx_escapable.test(ne)?'"'+ne.replace(rx_escapable,function(oe){var ce=meta[oe];return typeof ce=="string"?ce:"\\u"+("0000"+oe.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+ne+'"'}function str$2(ne,oe,ce){var ue,pe,me,ge,ye=gap,ve,xe=oe[ne];switch(xe&&typeof xe=="object"&&typeof xe.toJSON=="function"&&(xe=xe.toJSON(ne)),typeof rep=="function"&&(xe=rep.call(oe,ne,xe)),typeof xe){case"string":return quote$1(xe);case"number":return isFinite(xe)?String(xe):"null";case"boolean":case"null":return String(xe);case"object":if(!xe)return"null";if(gap+=indent,ve=[],Object.prototype.toString.apply(xe)==="[object Array]"){for(ge=xe.length,ue=0;uece?`[ `+gap+ve.join(`, `+gap)+` `+ye+"]":"[ "+ve.join(", ")+" ]":"["+ve.join(",")+"]",gap=ye,me}if(rep&&typeof rep=="object")for(ge=rep.length,ue=0;uece?`{ `+gap+ve.join(`, `+gap)+` -`+ye+"}":"{ "+ve.join(", ")+" }":"{"+ve.join(",")+"}",gap=ye,me}}function beautify(ne,oe,ce,ue){var pe;if(gap="",indent="",ue||(ue=0),typeof ue!="number")throw new Error("beaufifier: limit must be a number");if(typeof ce=="number")for(pe=0;pe+pe);return ue<-2||ue>4?jsxRuntimeExports.jsxs("span",{children:[ce,"x10",jsxRuntimeExports.jsx("sup",{style:supProps,children:ue})]}):lodashExports$1.round(ne,2)}else return ne;case"string":return`${ne}`;case"undefined":return"null";default:return oe?jsxRuntimeExports.jsx("code",{children:lodashExports$1.isNull(ne)?"null":lodashExports$1.get(ne,"constructor.name")??typeof ne}):jsxRuntimeExports.jsx("code",{style:{whiteSpace:"pre"},children:lodashExports$1.truncate(beautify$1(ne,void 0,2),{length:100})})}}function Property({label:ne,value:oe,type:ce,simple:ue}){return jsxRuntimeExports.jsxs(Flex,{width:"auto",mr:2,mb:.5,alignItems:"baseline",children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",...ce,sx:{opacity:.54,...ce==null?void 0:ce.sx},children:ne}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",...ce,children:renderProperty(oe,ue)??"none"})]},`${ne}::${renderProperty(oe)}`)}const COMMON_PROPS=["type"],OMIT_PROPS=[...COMMON_PROPS,"id"],ESSENTIAL_PROPS=["id"],GRAPH_PROPS=[...ESSENTIAL_PROPS,"pId"],HEURISTIC_PROPS=["f","g"],ALL_PROPS=[...OMIT_PROPS,...GRAPH_PROPS,...HEURISTIC_PROPS],sortEventKeys=ne=>lodashExports$1.chain(ne).entries().filter(([,oe])=>!lodashExports$1.isUndefined(oe)).sortBy(([oe])=>lodashExports$1.indexOf(ALL_PROPS,oe)+1||Number.MAX_SAFE_INTEGER).value();function PropertyDialog({event:ne,max:oe=10,simple:ce,variant:ue,...pe}){const me=sortEventKeys(ne);return jsxRuntimeExports.jsx(ManagedModal,{...lodashExports$1.merge({appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Event Properties"})},trigger:ge=>jsxRuntimeExports.jsxs(MuiButton,{variant:"text",sx:{mx:-1,minWidth:0,width:"fit-content",color:ye=>ye.palette.text.secondary,justifyContent:"left"},onClick:ye=>{ye.stopPropagation(),ye.preventDefault(),ge(ye)},children:[me.length-oe," more"]})},pe),children:[{name:"common",props:lodashExports$1.filter(me,([ge])=>COMMON_PROPS.includes(ge))},{name:"Graph",props:lodashExports$1.filter(me,([ge])=>GRAPH_PROPS.includes(ge))},{name:"Heuristic",props:lodashExports$1.filter(me,([ge])=>HEURISTIC_PROPS.includes(ge))},{name:"other",props:lodashExports$1.filter(me,([ge])=>!ALL_PROPS.includes(ge))}].map(({name:ge,props:ye},ve)=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!!ve&&jsxRuntimeExports.jsx(Divider$1,{sx:{mb:1}}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",sx:{px:3},children:lodashExports$1.startCase(ge)}),jsxRuntimeExports.jsx(Box$1,{sx:{p:1,pt:0,display:"grid",gridAutoFlow:"row",gridTemplateColumns:"repeat(2, 1fr)"},children:lodashExports$1.map(ye,([xe,_e])=>jsxRuntimeExports.jsx(ListItem$1,{sx:{py:.5},children:jsxRuntimeExports.jsx(ListItemText$1,{secondary:xe,primary:renderProperty(_e)})},`${xe}::${_e}`))},ge)]},ge))})}function PropertyList(ne){const{event:oe,variant:ce="body2",max:ue=10,simple:pe,primitives:me,...ge}=ne,ye=sortEventKeys(oe);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Flex,{...ge,children:[lodashExports$1.chain(ye).filter(me?([,ve])=>isPrimitive(ve):lodashExports$1.constant(!0)).slice(0,ue).map(([ve,xe],_e)=>jsxRuntimeExports.jsx(Property,{label:ve,value:xe,type:{variant:ce},simple:pe},_e)).value(),ye.length>ue&&!pe&&jsxRuntimeExports.jsx(PropertyDialog,{...ne})]})})}function isPrimitive(ne){return lodashExports$1.isString(ne)||lodashExports$1.isNumber(ne)}var t$5,e$4,s$2,i$5;(function(ne){ne.HEX="HEX",ne.RGB="RGB",ne.HSL="HSL",ne.CIELab="CIELab",ne.CMYK="CMYK"})(t$5||(t$5={})),function(ne){ne.ANALOGOUS="ANALOGOUS",ne.COMPLEMENTARY="COMPLEMENTARY",ne.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",ne.TRIADIC="TRIADIC",ne.TETRADIC="TETRADIC",ne.SQUARE="SQUARE"}(e$4||(e$4={})),function(ne){ne.ADDITIVE="ADDITIVE",ne.SUBTRACTIVE="SUBTRACTIVE"}(s$2||(s$2={})),function(ne){ne.black="#000000",ne.silver="#C0C0C0",ne.gray="#808080",ne.white="#FFFFFF",ne.maroon="#800000",ne.red="#FF0000",ne.purple="#800080",ne.fuchsia="#FF00FF",ne.green="#008000",ne.lime="#00FF00",ne.olive="#808000",ne.yellow="#FFFF00",ne.navy="#000080",ne.blue="#0000FF",ne.teal="#008080",ne.aqua="#00FFFF",ne.orange="#FFA500",ne.aliceblue="#F0F8FF",ne.antiquewhite="#FAEBD7",ne.aquamarine="#7FFFD4",ne.azure="#F0FFFF",ne.beige="#F5F5DC",ne.bisque="#FFE4C4",ne.blanchedalmond="#FFEBCD",ne.blueviolet="#8A2BE2",ne.brown="#A52A2A",ne.burlywood="#DEB887",ne.cadetblue="#5F9EA0",ne.chartreuse="#7FFF00",ne.chocolate="#D2691E",ne.coral="#FF7F50",ne.cornflowerblue="#6495ED",ne.cornsilk="#FFF8DC",ne.crimson="#DC143C",ne.cyan="#00FFFF",ne.darkblue="#00008B",ne.darkcyan="#008B8B",ne.darkgoldenrod="#B8860B",ne.darkgray="#A9A9A9",ne.darkgreen="#006400",ne.darkgrey="#A9A9A9",ne.darkkhaki="#BDB76B",ne.darkmagenta="#8B008B",ne.darkolivegreen="#556B2F",ne.darkorange="#FF8C00",ne.darkorchid="#9932CC",ne.darkred="#8B0000",ne.darksalmon="#E9967A",ne.darkseagreen="#8FBC8F",ne.darkslateblue="#483D8B",ne.darkslategray="#2F4F4F",ne.darkslategrey="#2F4F4F",ne.darkturquoise="#00CED1",ne.darkviolet="#9400D3",ne.deeppink="#FF1493",ne.deepskyblue="#00BFFF",ne.dimgray="#696969",ne.dimgrey="#696969",ne.dodgerblue="#1E90FF",ne.firebrick="#B22222",ne.floralwhite="#FFFAF0",ne.forestgreen="#228B22",ne.gainsboro="#DCDCDC",ne.ghostwhite="#F8F8FF",ne.gold="#FFD700",ne.goldenrod="#DAA520",ne.greenyellow="#ADFF2F",ne.grey="#808080",ne.honeydew="#F0FFF0",ne.hotpink="#FF69B4",ne.indianred="#CD5C5C",ne.indigo="#4B0082",ne.ivory="#FFFFF0",ne.khaki="#F0E68C",ne.lavender="#E6E6FA",ne.lavenderblush="#FFF0F5",ne.lawngreen="#7CFC00",ne.lemonchiffon="#FFFACD",ne.lightblue="#ADD8E6",ne.lightcoral="#F08080",ne.lightcyan="#E0FFFF",ne.lightgoldenrodyellow="#FAFAD2",ne.lightgray="#D3D3D3",ne.lightgreen="#90EE90",ne.lightgrey="#D3D3D3",ne.lightpink="#FFB6C1",ne.lightsalmon="#FFA07A",ne.lightseagreen="#20B2AA",ne.lightskyblue="#87CEFA",ne.lightslategray="#778899",ne.lightslategrey="#778899",ne.lightsteelblue="#B0C4DE",ne.lightyellow="#FFFFE0",ne.limegreen="#32CD32",ne.linen="#FAF0E6",ne.magenta="#FF00FF",ne.mediumaquamarine="#66CDAA",ne.mediumblue="#0000CD",ne.mediumorchid="#BA55D3",ne.mediumpurple="#9370DB",ne.mediumseagreen="#3CB371",ne.mediumslateblue="#7B68EE",ne.mediumspringgreen="#00FA9A",ne.mediumturquoise="#48D1CC",ne.mediumvioletred="#C71585",ne.midnightblue="#191970",ne.mintcream="#F5FFFA",ne.mistyrose="#FFE4E1",ne.moccasin="#FFE4B5",ne.navajowhite="#FFDEAD",ne.oldlace="#FDF5E6",ne.olivedrab="#6B8E23",ne.orangered="#FF4500",ne.orchid="#DA70D6",ne.palegoldenrod="#EEE8AA",ne.palegreen="#98FB98",ne.paleturquoise="#AFEEEE",ne.palevioletred="#DB7093",ne.papayawhip="#FFEFD5",ne.peachpuff="#FFDAB9",ne.peru="#CD853F",ne.pink="#FFC0CB",ne.plum="#DDA0DD",ne.powderblue="#B0E0E6",ne.rosybrown="#BC8F8F",ne.royalblue="#4169E1",ne.saddlebrown="#8B4513",ne.salmon="#FA8072",ne.sandybrown="#F4A460",ne.seagreen="#2E8B57",ne.seashell="#FFF5EE",ne.sienna="#A0522D",ne.skyblue="#87CEEB",ne.slateblue="#6A5ACD",ne.slategray="#708090",ne.slategrey="#708090",ne.snow="#FFFAFA",ne.springgreen="#00FF7F",ne.steelblue="#4682B4",ne.tan="#D2B48C",ne.thistle="#D8BFD8",ne.tomato="#FF6347",ne.turquoise="#40E0D0",ne.violet="#EE82EE",ne.wheat="#F5DEB3",ne.whitesmoke="#F5F5F5",ne.yellowgreen="#9ACD32",ne.rebeccapurple="#663399"}(i$5||(i$5={}));const a$3=Object.keys(i$5),r$4={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},n$5={BGR:t$5.RGB,ABGR:t$5.RGB,HLS:t$5.HSL,AHLS:t$5.HSL,LAB:t$5.CIELab,ALAB:t$5.CIELab,CKMY:t$5.CMYK,ACKMY:t$5.CMYK};var c$3;(function(ne){ne.NUMBER="number",ne.BOOLEAN="boolean"})(c$3||(c$3={}));const o$3={[t$5.HEX]:/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,[t$5.RGB]:/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$5.HSL]:/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$5.CIELab]:/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$5.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/},A$3=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,h$5=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,u$5=/^0x([a-f\d]{1,2})$/i,d$5=/\{(\d+)\}/g,l$4=/,( +|\d+)/g,E$2=/ +/,m$4="The provided string color doesn't have a correct format",b$4="The provided color object doesn't have the proper keys or format";var C$2,L$2,g$4;(function(ne){ne.NONE="none",ne.DEGREES="deg",ne.GRADIANS="grad",ne.RADIANS="rad",ne.TURNS="turn"})(C$2||(C$2={})),function(ne){ne.NONE="none",ne.PERCENT="percent"}(L$2||(L$2={})),function(ne){ne.DEVICE_CMYK="device-cmyk",ne.CMYK="cmyk"}(g$4||(g$4={}));const B$2={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:C$2.NONE,rgbUnit:L$2.NONE,labUnit:L$2.NONE,cmykUnit:L$2.PERCENT,alphaUnit:L$2.NONE,cmykFunction:g$4.DEVICE_CMYK},p$5=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),H$3=ne=>+`${ne}`.replace(h$5,"$1"),F$2=ne=>h$5.test(`${ne}`)?H$3(ne):Math.min(+ne,100),R$2=ne=>(ne.length===1&&(ne+=ne),parseInt(ne,16)),S$3=ne=>{const oe=D$2(ne,0).toString(16).toUpperCase();return oe.length===1?`0x0${oe}`:`0x${oe}`},I$2=(ne,oe=!1)=>!oe&&h$5.test(ne)?Math.min(255*H$3(ne)/100,255):u$5.test(ne)?(ne.length===3&&(ne+=ne.slice(-1)),oe?D$2(ne)/255:D$2(ne)):Math.min(+ne,oe?1:255),G$2=ne=>h$5.test(ne)?f$4(125*H$3(ne)/100,-125,125):f$4(+ne,-125,125),M$3=ne=>Math.min(h$5.test(ne)?H$3(ne)/100:+ne,1),y$2=ne=>[...ne].sort().join("").toUpperCase(),D$2=(ne,oe=6)=>{const ce=Math.pow(10,oe);return Math.round(+ne*ce)/ce},f$4=(ne,oe,ce)=>Math.max(oe,Math.min(ne,ce)),O$1=ne=>{if(typeof ne=="string"){const oe=ne.match(A$3),ce=+oe[1];switch(oe[2]){case C$2.RADIANS:ne=D$2(180*ce/Math.PI);break;case C$2.TURNS:ne=D$2(360*ce);break;case C$2.GRADIANS:ne=D$2(.9*ce);break;case C$2.DEGREES:default:ne=ce}}return(ne>360||ne<0)&&(ne-=360*Math.floor(ne/360)),ne},Y$2=(ne,oe)=>{let ce;switch(oe){case C$2.RADIANS:ce=D$2((ue=>ue*Math.PI/180)(ne));break;case C$2.TURNS:ce=D$2(ne/360);break;case C$2.GRADIANS:ce=D$2(10/9*ne);break;case C$2.DEGREES:case C$2.NONE:default:ce=ne}return ce},k$5=(ne,...oe)=>{const ce=[],ue=[],pe=[],me=[],ge=[],ye=[],ve=Object.values(C$2),xe=Object.values(L$2),_e=Object.values(g$4),Se={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const $e of oe)if(typeof $e=="string"){if(ce.push($e),$e.includes(",")){Se.legacyCSS++;const Re=$e.match(l$4);new Set(Re).size===1&&E$2.test(Re[0].slice(1))&&Se.spacesAfterCommas++}if($e.match(o$3.HSL)){const Re=$e.match(o$3.HSL),Ae=Re[1]||Re[5],Ie=Re[8],ke=Ae.match(A$3)[2];ue.push(ke===""?C$2.NONE:ke),ye.push(h$5.test(Ie));continue}if(o$3.RGB.test($e)){const Re=$e.match(o$3.RGB),Ae=Re[1]||Re[5],Ie=Re[2]||Re[6],ke=Re[3]||Re[7],Be=Re[8];pe.push(h$5.test(Ae)&&h$5.test(Ie)&&h$5.test(ke)),ye.push(h$5.test(Be));continue}if(o$3.CIELab.test($e)){const Re=$e.match(o$3.CIELab),Ae=Re[1],Ie=Re[2],ke=Re[3],Be=Re[4];me.push(h$5.test(Ae)&&h$5.test(Ie)&&h$5.test(ke)),ye.push(h$5.test(Be));continue}if($e.match(o$3.CMYK)){const Re=$e.match(o$3.CMYK),Ae=Re[1]||Re[6],Ie=Re[2]||Re[7],ke=Re[3]||Re[8],Be=Re[4]||Re[9],Ne=Re[10];ge.push(h$5.test(Ae)&&h$5.test(Ie)&&h$5.test(ke)&&h$5.test(Be)),$e.startsWith("cmyk")&&Se.cmykFunction++,ye.push(h$5.test(Ne))}}return{decimals:typeof ne.decimals===c$3.NUMBER?ne.decimals:B$2.decimals,legacyCSS:typeof ne.legacyCSS===c$3.BOOLEAN?ne.legacyCSS:!!(ce.length&&Se.legacyCSS===ce.length)||B$2.legacyCSS,spacesAfterCommas:typeof ne.spacesAfterCommas===c$3.BOOLEAN?ne.spacesAfterCommas:!!(ce.length&&Se.spacesAfterCommas===ce.length)||B$2.spacesAfterCommas,anglesUnit:ne.anglesUnit&&ve.includes(ne.anglesUnit)?ne.anglesUnit:new Set(ue).size===1?ue[0]:B$2.anglesUnit,rgbUnit:ne.rgbUnit&&xe.includes(ne.rgbUnit)?ne.rgbUnit:new Set(pe).size===1&&pe[0]?L$2.PERCENT:B$2.rgbUnit,labUnit:ne.labUnit&&xe.includes(ne.labUnit)?ne.labUnit:new Set(me).size===1&&me[0]?L$2.PERCENT:B$2.labUnit,cmykUnit:ne.cmykUnit&&xe.includes(ne.cmykUnit)?ne.cmykUnit:new Set(ge).size!==1||ge[0]?B$2.cmykUnit:L$2.NONE,alphaUnit:ne.alphaUnit&&xe.includes(ne.alphaUnit)?ne.alphaUnit:new Set(ye).size===1&&ye[0]?L$2.PERCENT:B$2.alphaUnit,cmykFunction:ne.cmykFunction&&_e.includes(ne.cmykFunction)?ne.cmykFunction:ge.length&&ge.length===Se.cmykFunction?g$4.CMYK:B$2.cmykFunction}},K$2=ne=>`${ne}`in s$2,X$2=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],T$2=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],N$3=X$2.map(ne=>ne.reduce((oe,ce)=>oe+ce,0)),$$3=(ne,oe,ce)=>(ce<0&&(ce+=6),ce>=6&&(ce-=6),D$2(ce<1?255*((oe-ne)*ce+ne):ce<3?255*oe:ce<4?255*((oe-ne)*(4-ce)+ne):255*ne)),j$3=ne=>ne<=.04045?ne/12.92:((ne+.055)/1.055)**2.4,U$2=ne=>ne<=.0031308?12.92*ne:1.055*ne**(1/2.4)-.055,w$4=(ne,oe,ce,ue)=>{const pe=[0,0,0],me=[ne,oe,ce];return ue.forEach((ge,ye)=>{ge.forEach((ve,xe)=>{pe[ye]+=ve*me[xe]})}),pe},x$2=(ne,oe,ce)=>{oe/=100;const ue=(ce/=100)<=.5?ce*(oe+1):ce+oe-ce*oe,pe=2*ce-ue;return{R:$$3(pe,ue,(ne/=60)+2),G:$$3(pe,ue,ne),B:$$3(pe,ue,ne-2)}},v$4=(ne,oe,ce,ue=1)=>{ne/=255,oe/=255,ce/=255,ue=Math.min(ue,1);const pe=Math.max(ne,oe,ce),me=Math.min(ne,oe,ce),ge=pe-me;let ye=0,ve=0;const xe=(pe+me)/2;if(ge!==0){switch(pe){case ne:ye=(oe-ce)/ge%6;break;case oe:ye=(ce-ne)/ge+2;break;case ce:ye=(ne-oe)/ge+4}ye=D$2(60*ye),ye<0&&(ye+=360),ve=ge/(1-Math.abs(2*xe-1))}return{H:ye,S:D$2(100*ve),L:D$2(100*xe),A:ue}},V$2=(ne,oe,ce)=>{const ue=[ne/255,oe/255,ce/255].map(j$3),pe=w$4(ue[0],ue[1],ue[2],X$2),me=((ge,ye,ve)=>{const xe=$e=>$e>.008856451679035631?Math.cbrt($e):$e/.12841854934601665+.13793103448275862,_e=xe(ge/N$3[0]),Se=xe(ye/N$3[1]);return[116*Se-16,500*(_e-Se),200*(Se-xe(ve/N$3[2]))]})(pe[0],pe[1],pe[2]);return{L:me[0],a:me[1],b:me[2]}},P$1=(ne,oe,ce)=>{const ue=((me,ge,ye)=>{const ve=$e=>$e>.20689655172413793?$e**3:.12841854934601665*($e-.13793103448275862),xe=(me+16)/116,_e=ge/500,Se=ye/200;return[N$3[0]*ve(xe+_e),N$3[1]*ve(xe),N$3[2]*ve(xe-Se)]})(ne,oe,ce),pe=w$4(ue[0],ue[1],ue[2],T$2).map(U$2);return{R:f$4(255*pe[0],0,255),G:f$4(255*pe[1],0,255),B:f$4(255*pe[2],0,255)}},q$5=(ne,oe,ce,ue)=>({R:D$2(255*(1-ne)*(ue=1-ue)),G:D$2(255*(1-oe)*ue),B:D$2(255*(1-ce)*ue)}),_$2=(ne,oe,ce)=>{ne/=255,oe/=255,ce/=255;const ue=1-Math.max(ne,oe,ce),pe=1-ue,me=pe&&(pe-oe)/pe,ge=pe&&(pe-ce)/pe;return{C:D$2(100*(pe&&(pe-ne)/pe)),M:D$2(100*me),Y:D$2(100*ge),K:D$2(100*ue)}},z$3=(ne,oe)=>{if(ne<0&&(ne+=360),ne>360&&(ne-=360),ne===360||ne===0)return ne;const ce=[[0,120],[120,180],[180,240],[240,360]],ue=[[0,60],[60,120],[120,240],[240,360]],pe=oe?ue:ce;let me=0,ge=0,ye=0,ve=0;return(oe?ce:ue).find((xe,_e)=>ne>=xe[0]&&nene?", ":",",W$2=(ne,oe)=>{const ce=y$2(Object.keys(ne));return r$4[n$5[ce]].reduce((ue,pe,me)=>{const ge=ne[pe];return ge!==void 0&&ue.push(oe(ge,me)),ue},[])},J$2=(ne,oe)=>ne.replace(d$5,(ce,ue)=>`${oe[+ue-1]}`),Z$2=(ne,oe,ce=!1)=>{const{alphaUnit:ue,legacyCSS:pe,decimals:me}=oe;return ue!==L$2.PERCENT||pe&&!ce?D$2(ne,me):`${D$2(100*ne,me)}%`},tt$2={[t$5.HEX]:ne=>{const oe=W$2(ne,ue=>(pe=>{let me=D$2(pe,0).toString(16).toUpperCase();return me.length===1&&(me=`0${me}`),me})(D$2(ue))),ce=oe.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return J$2(ce,oe)},[t$5.RGB]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,rgbUnit:me}=oe,ge=Q$2(pe),ye=W$2(ne,(xe,_e)=>me===L$2.PERCENT&&_e<3?`${((Se,$e)=>D$2(Se/255*100,$e))(xe,ce)}%`:_e===3?Z$2(xe,oe):D$2(xe,ce)),ve=ue?ye.length===4?`rgba({1}${ge}{2}${ge}{3}${ge}{4})`:`rgb({1}${ge}{2}${ge}{3})`:ye.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return J$2(ve,ye)},[t$5.HSL]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,anglesUnit:me}=oe,ge=Q$2(pe),ye=W$2(ne,(xe,_e)=>_e===0&&me!==C$2.NONE?`${D$2(Y$2(xe,me),ce)}${me}`:_e===3?Z$2(xe,oe):D$2(xe,ce)),ve=ue?ye.length===4?`hsla({1}${ge}{2}%${ge}{3}%${ge}{4})`:`hsl({1}${ge}{2}%${ge}{3}%)`:ye.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return J$2(ve,ye)},[t$5.CIELab]:(ne,oe)=>{const{decimals:ce,labUnit:ue}=oe,pe=W$2(ne,(ge,ye)=>{if(ye===0){const ve=D$2(F$2(ge),ce);return ue===L$2.PERCENT?`${ve}%`:`${ve}`}return ye<3?ue===L$2.PERCENT?`${((ve,xe)=>D$2(ve/125*100,xe))(ge,ce)}%`:D$2(ge,ce):Z$2(ge,oe,!0)}),me=pe.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return J$2(me,pe)},[t$5.CMYK]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,cmykUnit:me,cmykFunction:ge}=oe,ye=Q$2(pe),ve=W$2(ne,(_e,Se)=>me===L$2.PERCENT&&Se<4?`${D$2(_e,ce)}%`:Se===4?Z$2(_e,oe):D$2(_e/100,ce)),xe=ue?ve.length===5?`${ge}({1}${ye}{2}${ye}{3}${ye}{4}${ye}{5})`:`${ge}({1}${ye}{2}${ye}{3}${ye}{4})`:ve.length===5?`${ge}({1} {2} {3} {4} / {5})`:`${ge}({1} {2} {3} {4})`;return J$2(xe,ve)}},et$2=ne=>(typeof ne=="string"&&(ne=h$5.test(ne)?H$3(ne)/100:+ne),isNaN(+ne)||ne>1?1:D$2(ne)),st$1=(ne,oe,ce)=>oe.reduce((ue,pe)=>[...ue,{...ne,H:ce===s$2.ADDITIVE?O$1(ne.H+pe):O$1(z$3(z$3(ne.H,!1)+pe,!0))}],[{...ne}]),it$1=(ne,oe)=>st$1(ne,[30,-30],oe),at$1=(ne,oe)=>st$1(ne,[180],oe),rt$1=(ne,oe)=>st$1(ne,[150,-150],oe),nt$1=(ne,oe)=>st$1(ne,[120,-120],oe),ct$1=(ne,oe)=>st$1(ne,[60,-120,180],oe),ot$1=(ne,oe)=>st$1(ne,[90,-90,180],oe),At=ne=>typeof ne=="string"?(oe=>{let ce;if(Object.keys(t$5).some(ue=>{if(o$3[ue].test(oe))return ce=ue,!0}),!ce&&~a$3.indexOf(oe)&&(ce=t$5.HEX),!ce)throw new Error(m$4);return ce})(ne):(oe=>{let ce,ue=!1;const pe=y$2(Object.keys(oe));if(n$5[pe]&&(ce=n$5[pe]),ce&&ce===t$5.RGB){const me=Object.entries(oe).some(ye=>!u$5.test(`${ye[1]}`)),ge=Object.entries(oe).some(ye=>!(h$5.test(`${ye[1]}`)||!u$5.test(`${ye[1]}`)&&!isNaN(+ye[1])&&+ye[1]<=255));me&&ge&&(ue=!0),me||(ce=t$5.HEX)}if(!ce||ue)throw new Error(b$4);return ce})(ne),ht$1={[t$5.HEX](ne){const oe=(~a$3.indexOf(ne)?i$5[ne]:ne).match(o$3.HEX),ce={R:R$2(oe[1]||oe[5]),G:R$2(oe[2]||oe[6]),B:R$2(oe[3]||oe[7])},ue=oe[4]||oe[8];return ue!==void 0&&(ce.A=R$2(ue)/255),ce},[t$5.RGB](ne){const oe=ne.match(o$3.RGB),ce=I$2(oe[1]||oe[5]),ue=I$2(oe[2]||oe[6]),pe=I$2(oe[3]||oe[7]),me=oe[4]||oe[8],ge={R:Math.min(ce,255),G:Math.min(ue,255),B:Math.min(pe,255)};return me!==void 0&&(ge.A=et$2(me)),ge},[t$5.HSL](ne){const oe=ne.match(o$3.HSL),ce=O$1(oe[1]||oe[5]),ue=F$2(oe[2]||oe[6]),pe=F$2(oe[3]||oe[7]),me=oe[4]||oe[8],ge=x$2(ce,ue,pe);return me!==void 0&&(ge.A=et$2(me)),ge},[t$5.CIELab](ne){const oe=ne.match(o$3.CIELab),ce=F$2(oe[1]),ue=G$2(oe[2]),pe=G$2(oe[3]),me=oe[4],ge=P$1(ce,ue,pe);return me!==void 0&&(ge.A=et$2(me)),ge},[t$5.CMYK](ne){const oe=ne.match(o$3.CMYK),ce=M$3(oe[1]||oe[6]),ue=M$3(oe[2]||oe[7]),pe=M$3(oe[3]||oe[8]),me=M$3(oe[4]||oe[9]),ge=oe[5]||oe[10],ye=q$5(ce,ue,pe,me);return ge!==void 0&&(ye.A=et$2(ge)),ye}},ut$1={[t$5.HEX](ne){const oe={R:I$2(`${ne.R}`),G:I$2(`${ne.G}`),B:I$2(`${ne.B}`)};return p$5(ne,"A")&&(oe.A=Math.min(I$2(`${ne.A}`,!0),1)),oe},[t$5.RGB](ne){return this.HEX(ne)},[t$5.HSL](ne){const oe=F$2(`${ne.S}`),ce=F$2(`${ne.L}`),ue=x$2(O$1(ne.H),oe,ce);return p$5(ne,"A")&&(ue.A=et$2(ne.A)),ue},[t$5.CIELab](ne){const oe=F$2(`${ne.L}`),ce=G$2(`${ne.a}`),ue=G$2(`${ne.b}`),pe=P$1(oe,ce,ue);return p$5(ne,"A")&&(pe.A=et$2(ne.A)),pe},[t$5.CMYK](ne){const oe=M$3(`${ne.C}`),ce=M$3(`${ne.M}`),ue=M$3(`${ne.Y}`),pe=M$3(`${ne.K}`),me=q$5(oe,ce,ue,pe);return p$5(ne,"A")&&(me.A=et$2(ne.A)),me}},dt$1=(ne,oe=At(ne))=>typeof ne=="string"?ht$1[oe](ne):ut$1[oe](ne),lt={[t$5.HEX]:ne=>({R:S$3(ne.R),G:S$3(ne.G),B:S$3(ne.B)}),HEXA(ne){const oe=lt.HEX(ne);return oe.A=p$5(ne,"A")?S$3(255*ne.A):"0xFF",oe},[t$5.RGB](ne,oe){const ce=Ct(ne,oe);return p$5(ce,"A")&&delete ce.A,ce},RGBA(ne,oe){const ce=lt.RGB(ne,oe);return ce.A=p$5(ne,"A")?D$2(ne.A):1,ce},[t$5.HSL](ne,oe){const ce=v$4(ne.R,ne.G,ne.B);return delete ce.A,Lt(ce,oe)},HSLA(ne,oe){const ce=lt.HSL(ne,oe);return ce.A=p$5(ne,"A")?D$2(ne.A,oe):1,ce},[t$5.CIELab](ne,oe){const ce=V$2(ne.R,ne.G,ne.B);return gt(ce,oe)},CIELabA(ne,oe){const ce=lt.CIELab(ne,oe);return ce.A=p$5(ne,"A")?D$2(ne.A,oe):1,ce},[t$5.CMYK]:(ne,oe)=>Bt(_$2(ne.R,ne.G,ne.B),oe),CMYKA(ne,oe){const ce=lt.CMYK(ne,oe);return ce.A=p$5(ne,"A")?D$2(ne.A,oe):1,ce}},Et=(ne,oe,ce,ue)=>{const pe=At(ne),me=typeof ne=="string",ge=dt$1(ne,pe),ye=typeof ne=="string"&&p$5(ge,"A")||typeof ne!="string"&&p$5(ne,"A"),ve=v$4(ge.R,ge.G,ge.B,ge.A);ye||delete ve.A;const xe=ce?ve.L/(oe+1):(100-ve.L)/(oe+1),_e=Array(oe).fill(null).map((Se,$e)=>({...ve,L:ve.L+xe*($e+1)*(1-2*+ce)}));switch(pe){case t$5.HEX:default:return _e.map(Se=>{const $e=x$2(Se.H,Se.S,Se.L);return ye&&($e.A=Se.A),me?ye?tt$2.HEX({...$e,A:D$2(255*$e.A)}):tt$2.HEX($e):ye?lt.HEXA($e):lt.HEX($e)});case t$5.RGB:return _e.map(Se=>{const $e=x$2(Se.H,Se.S,Se.L);return ye&&($e.A=Se.A),me?tt$2.RGB($e,ue):ye?lt.RGBA($e,ue.decimals):lt.RGB($e,ue.decimals)});case t$5.HSL:return _e.map(Se=>me?tt$2.HSL(Se,ue):ye?lt.HSLA({...x$2(Se.H,Se.S,Se.L),A:Se.A},ue.decimals):lt.HSL(x$2(Se.H,Se.S,Se.L),ue.decimals));case t$5.CIELab:return _e.map(Se=>{const $e=x$2(Se.H,Se.S,Se.L);return me?tt$2.CIELab(ye?lt.CIELabA($e,ue.decimals):lt.CIELab($e,ue.decimals),ue):ye?lt.CIELabA({...$e,A:Se.A},ue.decimals):lt.CIELab($e,ue.decimals)})}},mt={buildHarmony(ne,oe,ce,ue){const pe=At(ne),me=dt$1(ne,pe),ge=v$4(me.R,me.G,me.B,me.A),ye=typeof ne=="string"&&p$5(me,"A")||typeof ne!="string"&&p$5(ne,"A"),ve=typeof ne=="string";switch(pe){case t$5.HEX:default:return ye?this.HEXA(Lt(ge,0),oe,ce,ve):this.HEX(Lt(ge,0),oe,ce,ve);case t$5.HSL:return ye?this.HSLA(ge,oe,ce,ve,ue):this.HSL(ge,oe,ce,ve,ue);case t$5.RGB:return ye?this.RGBA(ge,oe,ce,ve,ue):this.RGB(ge,oe,ce,ve,ue);case t$5.CIELab:return ye?this.CIELabA(ge,oe,ce,ve,ue):this.CIELab(ge,oe,ce,ve,ue)}},[t$5.HEX]:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$2.HEX(x$2(pe.H,pe.S,pe.L)):lt.HEX(x$2(pe.H,pe.S,pe.L))),HEXA:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$2.HEX({...x$2(pe.H,pe.S,pe.L),A:255*et$2(pe.A)}):lt.HEXA({...x$2(pe.H,pe.S,pe.L),A:et$2(pe.A)})),[t$5.RGB]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.RGB(x$2(me.H,me.S,me.L),pe):lt.RGB(x$2(me.H,me.S,me.L),pe.decimals)),RGBA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.RGB({...x$2(me.H,me.S,me.L),A:et$2(me.A)},pe):lt.RGBA({...x$2(me.H,me.S,me.L),A:et$2(me.A)},pe.decimals)),[t$5.HSL]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.HSL({H:me.H,S:me.S,L:me.L},pe):lt.HSL(x$2(me.H,me.S,me.L),pe.decimals)),HSLA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.HSL({...me,A:et$2(me.A)},pe):lt.HSLA({...x$2(me.H,me.S,me.L),A:et$2(me.A)},pe.decimals)),[t$5.CIELab]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$2(me.H,me.S,me.L);return ue?tt$2.CIELab(V$2(ge.R,ge.G,ge.B),pe):lt.CIELab(ge,pe.decimals)}),CIELabA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$2(me.H,me.S,me.L);return ue?tt$2.CIELab({...V$2(ge.R,ge.G,ge.B),A:et$2(me.A)},pe):lt.CIELabA({...ge,A:et$2(me.A)},pe.decimals)})},bt={mix(ne,oe){const ce=ne.map(ge=>{const ye=At(ge);return dt$1(ge,ye)}),ue=oe===s$2.SUBTRACTIVE?ce.map(ge=>{const ye=((ve,xe,_e)=>{const Se=Math.min(ve,xe,_e),$e=Math.min(255-ve,255-xe,255-_e),Re=ve-Se,Ae=xe-Se,Ie=_e-Se,ke=Math.min(Re,Ae),Be=Re-ke,Ne=(Ae+ke)/2,Fe=(Ie+Ae-ke)/2,Ue=Math.max(Be,Ne,Fe)/Math.max(Re,Ae,Ie),We=isNaN(Ue)||Ue===1/0||Ue<=0?1:Ue;return{R:Be/We+$e,Y:Ne/We+$e,B:Fe/We+$e}})(ge.R,ge.G,ge.B);return p$5(ge,"A")&&(ye.A=ge.A),ye}):null;function pe(ge){const ye=oe===s$2.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return ge.reduce((ve,xe)=>{const _e=p$5(xe,"A")?xe.A:1,Se={R:Math.min(ve.R+xe.R*_e,255),B:Math.min(ve.B+xe.B*_e,255),A:1-(1-_e)*(1-ve.A)},$e="G"in ve?ve.G:ve.Y,Re="G"in xe?xe.G:xe.Y;return{...Se,...oe===s$2.ADDITIVE?{G:Math.min($e+Re*_e,255)}:{Y:Math.min($e+Re*_e,255)}}},ye)}let me;if(oe===s$2.ADDITIVE)me=pe(ce);else{const ge=pe(ue);me=((ye,ve,xe)=>{const _e=Math.min(ye,ve,xe),Se=Math.min(255-ye,255-ve,255-xe),$e=ye-_e,Re=ve-_e,Ae=xe-_e,Ie=Math.min(Re,Ae),ke=$e+Re-Ie,Be=Re+Ie,Ne=2*(Ae-Ie),Fe=Math.max(ke,Be,Ne)/Math.max($e,Re,Ae),Ue=isNaN(Fe)||Fe===1/0||Fe<=0?1:Fe;return{R:ke/Ue+Se,G:Be/Ue+Se,B:Ne/Ue+Se}})(ge.R,ge.Y,ge.B),me.A=ge.A}return{R:D$2(me.R),G:D$2(me.G),B:D$2(me.B),A:f$4(me.A,0,1)}},[t$5.HEX](ne,oe,ce){const ue=this.mix(ne,oe);return delete ue.A,ce?tt$2.HEX(ue):lt.HEX(ue)},HEXA(ne,oe,ce){const ue=this.mix(ne,oe);return ue.A=ce?255*et$2(ue.A):et$2(ue.A),ce?tt$2.HEX(ue):lt.HEXA(ue)},[t$5.RGB](ne,oe,ce,ue){const pe=this.mix(ne,oe);return delete pe.A,ce?tt$2.RGB(pe,ue):lt.RGB(pe,ue.decimals)},RGBA(ne,oe,ce,ue){const pe=this.mix(ne,oe);return ce?tt$2.RGB(pe,ue):lt.RGBA(pe,ue.decimals)},[t$5.HSL](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$4(pe.R,pe.G,pe.B);return delete pe.A,delete me.A,ce?tt$2.HSL(me,ue):lt.HSL(pe,ue.decimals)},HSLA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$4(pe.R,pe.G,pe.B,pe.A);return ce?tt$2.HSL(me,ue):lt.HSLA(pe,ue.decimals)},[t$5.CIELab](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$2(pe.R,pe.G,pe.B);return delete pe.A,ce?tt$2.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)},CIELabA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$2(pe.R,pe.G,pe.B);return p$5(pe,"A")&&(me.A=pe.A),ce?tt$2.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)}},Ct=(ne,oe)=>({R:D$2(ne.R,oe),G:D$2(ne.G,oe),B:D$2(ne.B,oe),...p$5(ne,"A")?{A:D$2(ne.A,oe)}:{}}),Lt=(ne,oe)=>({H:D$2(ne.H,oe),S:D$2(ne.S,oe),L:D$2(ne.L,oe),...p$5(ne,"A")?{A:D$2(ne.A,oe)}:{}}),gt=(ne,oe)=>({L:D$2(ne.L,oe),a:D$2(ne.a,oe),b:D$2(ne.b,oe)}),Bt=(ne,oe)=>({C:D$2(ne.C,oe),M:D$2(ne.M,oe),Y:D$2(ne.Y,oe),K:D$2(ne.K,oe)}),pt=(ne,oe,ce,ue)=>ue(dt$1(ne,oe),ce),Ht=(ne,oe,ce,ue,pe)=>(ce<1&&(ce=5),((ge,ye,ve)=>{const xe=ve-1,_e=(ye.R-ge.R)/xe,Se=(ye.G-ge.G)/xe,$e=(ye.B-ge.B)/xe,Re=et$2(ge.A),Ae=(et$2(ye.A)-Re)/xe;return Array(ve).fill(null).map((Ie,ke)=>ke===0?ge:ke===xe?ye:{R:D$2(ge.R+_e*ke),G:D$2(ge.G+Se*ke),B:D$2(ge.B+$e*ke),A:D$2(Re+Ae*ke)})})(dt$1(ne),dt$1(oe),ce).map(ge=>pe(ge,ue))),Ft=(ne,oe,ce,ue)=>({[e$4.ANALOGOUS]:mt.buildHarmony(oe,it$1,ce,ue),[e$4.COMPLEMENTARY]:mt.buildHarmony(oe,at$1,ce,ue),[e$4.SPLIT_COMPLEMENTARY]:mt.buildHarmony(oe,rt$1,ce,ue),[e$4.TRIADIC]:mt.buildHarmony(oe,nt$1,ce,ue),[e$4.TETRADIC]:mt.buildHarmony(oe,ct$1,ce,ue),[e$4.SQUARE]:mt.buildHarmony(oe,ot$1,ce,ue)})[ne];class Rt{constructor(oe,ce={}){this._options=k$5(ce,oe),this.rgb=dt$1(oe),this.updateHSL(),this.updateLab(),this.updateCMYK()}updateRGB(){this.rgb={...x$2(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateRGBFromCMYK(){this.rgb={...q$5(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLab(){this.rgb={...P$1(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateHSL(){this.hsl=v$4(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLab(){this.lab={...V$2(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=_$2(this.rgb.R,this.rgb.G,this.rgb.B)}setOptions(oe={}){return this._options={...this._options,...oe},this}setH(oe){return this.hsl.H=O$1(oe),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setS(oe){return this.hsl.S=f$4(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setL(oe){return this.hsl.L=f$4(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setR(oe){this.rgb.R=f$4(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()}setG(oe){return this.rgb.G=f$4(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setB(oe){return this.rgb.B=f$4(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setCIEL(oe){return this.lab.L=f$4(oe,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEa(oe){return this.lab.a=f$4(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEb(oe){return this.lab.b=f$4(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setA(oe){return this.hsl.A=this.rgb.A=f$4(oe,0,1),this}setC(oe){return this.cmyk.C=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setM(oe){return this.cmyk.M=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setY(oe){return this.cmyk.Y=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setK(oe){return this.cmyk.K=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}get options(){return this._options}get H(){return D$2(this.hsl.H,this.options.decimals)}get S(){return D$2(this.hsl.S,this.options.decimals)}get L(){return D$2(this.hsl.L,this.options.decimals)}get CIEL(){return D$2(this.lab.L,this.options.decimals)}get CIEa(){return D$2(this.lab.a,this.options.decimals)}get CIEb(){return D$2(this.lab.b,this.options.decimals)}get R(){return D$2(this.rgb.R,this.options.decimals)}get G(){return D$2(this.rgb.G,this.options.decimals)}get B(){return D$2(this.rgb.B,this.options.decimals)}get A(){return D$2(this.hsl.A,this.options.decimals)}get C(){return D$2(this.cmyk.C,this.options.decimals)}get M(){return D$2(this.cmyk.M,this.options.decimals)}get Y(){return D$2(this.cmyk.Y,this.options.decimals)}get K(){return D$2(this.cmyk.K,this.options.decimals)}get HEXObject(){return lt.HEX(this.rgb)}get HEXAObject(){return lt.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return tt$2.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return tt$2.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})}get RGB(){return tt$2.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return tt$2.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return tt$2.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return tt$2.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get CIELab(){return tt$2.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return tt$2.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get CMYK(){return tt$2.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return tt$2.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEX)}static toHEX(oe){return tt$2.HEX(Rt.toHEXObject(oe))}static toHEXAObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEXA)}static toHEXA(oe){return tt$2.HEX(Rt.toHEXAObject(oe))}static toRGBObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGB)}static toRGB(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGB);return tt$2.RGB(me,pe)}static toRGBAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGBA)}static toRGBA(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGBA);return tt$2.RGB(me,pe)}static toHSLObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSL)}static toHSL(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSL);return tt$2.HSL(me,pe)}static toHSLAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSLA)}static toHSLA(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSLA);return tt$2.HSL(me,pe)}static toCIELabObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELab)}static toCIELab(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELab);return tt$2.CIELab(me,pe)}static toCIELabAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELabA)}static toCIELabA(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELabA);return tt$2.CIELab(me,pe)}static toCMYKObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYK)}static toCMYK(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYK);return tt$2.CMYK(me,pe)}static toCMYKAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYKA)}static toCMYKA(oe,ce={}){const ue=At(oe),pe=k$5(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYKA);return tt$2.CMYK(me,pe)}static getBlendHEXObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEX)}static getBlendHEX(oe,ce,ue=5){return Rt.getBlendHEXObject(oe,ce,ue).map(pe=>tt$2.HEX(pe))}static getBlendHEXAObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEXA)}static getBlendHEXA(oe,ce,ue=5){return Rt.getBlendHEXAObject(oe,ce,ue).map(pe=>tt$2.HEX(pe))}static getBlendRGBObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB)}static getBlendRGB(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB).map(me=>tt$2.RGB(me,k$5(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB).map(me=>tt$2.RGB(me,k$5(ue||{},oe,ce)))}static getBlendRGBAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA)}static getBlendRGBA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA).map(me=>tt$2.RGB(me,k$5(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA).map(me=>tt$2.RGB(me,k$5(ue||{},oe,ce)))}static getBlendHSLObject(oe,ce,ue,pe){return Ht(oe,ce,typeof ue=="number"?ue:5,pe==null?void 0:pe.decimals,lt.HSL)}static getBlendHSL(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSL).map(me=>tt$2.HSL(me,k$5(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSL).map(me=>tt$2.HSL(me,k$5(ue||{},oe,ce)))}static getBlendHSLAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA)}static getBlendHSLA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA).map(me=>tt$2.HSL(me,k$5(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA).map(me=>tt$2.HSL(me,k$5(ue||{},oe,ce)))}static getBlendCIELabObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab)}static getBlendCIELab(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab).map(me=>tt$2.CIELab(me,k$5(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab).map(me=>tt$2.CIELab(me,k$5(ue||{},oe,ce)))}static getBlendCIELabAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA)}static getBlendCIELabA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA).map(me=>tt$2.CIELab(me,k$5(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA).map(me=>tt$2.CIELab(me,k$5(ue||{},oe,ce)))}static getMixHEXObject(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!1)}static getMixHEX(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!0)}static getMixHEXAObject(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!1)}static getMixHEXA(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!0)}static getMixRGBObject(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!1,k$5(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!1,k$5(ce||{},...oe))}static getMixRGB(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!0,k$5(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!0,k$5(ce||{},...oe))}static getMixRGBAObject(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!1,k$5(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!1,k$5(ce||{},...oe))}static getMixRGBA(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!0,k$5(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!0,k$5(ce||{},...oe))}static getMixHSLObject(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!1,k$5(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!1,k$5(ce||{},...oe))}static getMixHSL(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!0,k$5(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!0,k$5(ce||{},...oe))}static getMixHSLAObject(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!1,k$5(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!1,k$5(ce||{},...oe))}static getMixHSLA(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!0,k$5(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!0,k$5(ce||{},...oe))}static getMixCIELabObject(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!1,k$5(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!1,k$5(ce||{},...oe))}static getMixCIELab(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!0,k$5(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!0,k$5(ce||{},...oe))}static getMixCIELabAObject(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!1,k$5(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!1,k$5(ce||{},...oe))}static getMixCIELabA(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!0,k$5(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!0,k$5(ce||{},...oe))}static getShades(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!0,k$5(ue||{},oe)):Et(oe,5,!0,k$5(ce||{},oe))}static getTints(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!1,k$5(ue||{},oe)):Et(oe,5,!1,k$5(ce||{},oe))}static getHarmony(oe,ce,ue,pe){return`${ce}`in e$4?Ft(ce,oe,K$2(ue)?ue:s$2.ADDITIVE,k$5(K$2(ue)?pe||{}:ue||{},oe)):K$2(ce)?Ft(e$4.COMPLEMENTARY,oe,ce,k$5(ue||{},oe)):Ft(e$4.COMPLEMENTARY,oe,s$2.ADDITIVE,k$5(ce||{},oe))}}function hash(ne){let oe=5381,ce=ne.length;for(;ce;)oe=oe*33^ne.charCodeAt(--ce);return oe>>>0}const tint="500";function hex(ne){return parseInt(ne.replace("#","0x"))}const searchEventAliases=lodashExports$1.thru({source:["source","start"],destination:["destination","goal","finish"],updating:["update","updating"],expanding:["expanding","expanding"],generating:["generate","generating","open","opening"],closing:["close","closing"],end:["finish","end"]},ne=>{const oe={};for(const[ce,ue]of lodashExports$1.entries(ne))for(const pe of ue)oe[pe]=ce;return oe}),colorsHex={source:green$1.A400,destination:red$1.A400,updating:orange$1[tint],expanding:deepPurple$1[tint],generating:amber$1[tint],closing:pink$1[tint],end:blue$1.A400};lodashExports$1.mapValues(colorsHex,hex);const shades=lodashExports$1.sortBy(lodashExports$1.keys(accentColors),ne=>new Rt(getShade(ne,"dark")).H);function getColorHex(ne="",oe){if(searchEventAliases[lodashExports$1.lowerCase(ne)])return colorsHex[ne];if(oe)return oe;{const ue=hash(lodashExports$1.lowerCase(ne)),pe=lodashExports$1.values(accentColors);return pe[ue%pe.length][tint]}}const treeWorkerUrl=""+new URL("tree.worker-62add194.js",import.meta.url).href;class TreeWorkerUrl extends Worker{constructor(){super(treeWorkerUrl,{type:"module"})}}const treeAsync=usingMemoizedWorkerTask(TreeWorkerUrl);function useTree(ne){return useAsync(async()=>await treeAsync(ne),[ne])}function useTreeMemo(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree(ce)}const isDefined$1=ne=>!lodashExports$1.isUndefined(ne)&&!lodashExports$1.isNull(ne),divider$4=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1}});function useCache(ne,oe=!1){const[ce,ue]=reactExports.useState();return reactExports.useEffect(()=>{oe||ne&&ue(ne)},[ne,oe]),ce}const layoutModes={"directed-graph":{value:"directed-graph",name:"Directed Graph",description:"Show all edges",showAllEdges:!0},tree:{value:"tree",name:"Tree",description:"Show only edges between each node and their final parents",showAllEdges:!1}};function GraphEvents({onSelection:ne,layer:oe}){const ce=v$6(),ue=y$4();return reactExports.useEffect(()=>{ue({clickNode:pe=>{ne==null||ne({event:pe.event.original,node:pe.node})},enterNode:()=>{document.body.style.cursor="pointer"},leaveNode:()=>{document.body.style.cursor=""}})},[oe,ue,ce]),null}const SEVEN_CLASS_GNBU=["#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"];function TreeGraph({trace:ne,tree:oe,step:ce=0,layer:ue,showAllEdges:pe,trackedProperty:me}){const ge=v$6(),[ye,ve]=reactExports.useState("vertical"),xe=usePaper(),_e=useAcrylic(),Se=useTheme$1(),$e=interpolate$1([Se.palette.background.paper,Se.palette.text.primary]),Re=_$4(),Ae=reactExports.useMemo(()=>getFinalParents(ne),[ne]),Ie=reactExports.useMemo(()=>{const ke=ye==="vertical",Be=new MultiDirectedGraph;lodashExports$1.forEach(oe,Fe=>{Be.addNode(Fe.label,{x:ke?Fe.x:-Fe.y,y:ke?Fe.y:-Fe.x,label:Fe.label,size:Math.log(Fe.size)+2,color:Se.palette.action.disabledBackground})});const Ne={};return lodashExports$1.forEach(ne==null?void 0:ne.events,({id:Fe,pId:Ue})=>{Fe&&Ue&&(Ne[Fe]=Ne[Fe]??new Set,Ne[Fe].add(Ue))}),lodashExports$1.forEach(ne==null?void 0:ne.events,({id:Fe,pId:Ue})=>{if(isDefined$1(Ue)&&Be.hasNode(`${Ue}`)){const We=makeEdgeKey(Fe,Ue);!Be.hasEdge(We)&&Be.hasNode(`${Fe}`)&&Be.addDirectedEdgeWithKey(We,`${Ue}`,`${Fe}`,{label:"",color:"white",size:2,final:Ae[Fe]===Ue}),Be.hasDirectedEdge(We)&&Be.updateEdgeAttribute(We,"size",qe=>Math.log(Math.E**(qe-.5)+.5)+.5)}}),Be},[Re,ne,oe,Ae,ye]);return reactExports.useEffect(()=>{const ke=memoizee$1(We=>interpolate$1([Se.palette.background.paper,We])),Be=400,Ne=$e(.1);Ie.forEachNode(We=>{Ie.setNodeAttribute(We,"color",Ne),Ie.setNodeAttribute(We,"forceLabel",!1),Ie.setNodeAttribute(We,"label",lodashExports$1.truncate(We,{length:15}))}),Ie.forEachEdge(We=>{const qe=Ie.getEdgeAttribute(We,"final");Ie.setEdgeAttribute(We,"color",Ne),Ie.setEdgeAttribute(We,"hidden",!pe&&!qe),Ie.setEdgeAttribute(We,"forceLabel",!1),Ie.setEdgeAttribute(We,"label","")});const Fe={},Ue={};if((pe?lodashExports$1.forEach:lodashExports$1.forEachRight)(lodashExports$1.slice(ne==null?void 0:ne.events,0,ce+1),({id:We,type:qe,pId:ze},Ge)=>{const Ze=getColorHex(qe),Dt=ke(Ze)(lodashExports$1.max([1-(ce-Ge)/Be,.2]));if(Ie.hasNode(`${We}`)&&!Fe[We]){Ie.setNodeAttribute(`${We}`,"color",Dt),Ie.setNodeAttribute(`${We}`,"label",lodashExports$1.truncate(`${lodashExports$1.startCase(qe)} ${We}`,{length:15})),Ie.setNodeAttribute(`${We}`,"forceLabel",ce===Ge);const Je=makeEdgeKey(We,ze);isDefined$1(ze)&&Ie.hasNode(`${ze}`)&&Ie.hasEdge(Je)&&!Ue[Je]&&(Ie.setEdgeAttribute(Je,"forceLabel",ce===Ge),Ie.setEdgeAttribute(Je,"color",Dt),Ie.setEdgeAttribute(Je,"label",`Step ${Ge}`),Ie.setEdgeAttribute(Je,"hidden",!1),pe||(Ue[Je]=!0)),pe||(Fe[We]=!0)}}),me){const We=lodashExports$1.min(lodashExports$1.map(ne==null?void 0:ne.events,Ze=>lodashExports$1.get(Ze,me))),qe=lodashExports$1.max(lodashExports$1.map(ne==null?void 0:ne.events,Ze=>lodashExports$1.get(Ze,me))),ze=Ze=>isNaN(We)||isNaN(qe)||isNaN(Ze)?0:(Ze-We)/(qe-We),Ge=interpolate$1(SEVEN_CLASS_GNBU);lodashExports$1.forEach(lodashExports$1.slice(ne==null?void 0:ne.events,0,ce+1),Ze=>{if(Ie.hasNode(`${Ze.id}`)){const Dt=Ge(ze(lodashExports$1.get(Ze,me)));if(Ie.setNodeAttribute(`${Ze.id}`,"color",Dt),isDefined$1(Ze.pId)){const Je=makeEdgeKey(`${Ze.id}`,`${Ze.pId}`);Ie.hasDirectedEdge(Je)&&Ie.setEdgeAttribute(Je,"color",Dt)}}})}Re(Ie)},[Ie,ce,ne,pe,me,Se]),jsxRuntimeExports.jsx(Stack$1,{sx:{pt:6,position:"absolute",top:0,left:0},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{...xe(1),..._e,alignItems:"center",height:ke=>ke.spacing(6),px:1,m:1},children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{var ke,Be,Ne;(Ne=(Be=(ke=ge==null?void 0:ge.getCamera)==null?void 0:ke.call(ge))==null?void 0:Be.animatedReset)==null||Ne.call(Be)},label:"Fit",icon:jsxRuntimeExports.jsx(CenterFocusWeakOutlined,{})}),divider$4,jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{ve(ye==="vertical"?"horizontal":"vertical")},label:"Rotate",icon:jsxRuntimeExports.jsx(RotateIcon,{})}),divider$4,jsxRuntimeExports.jsx(MinimisedPlaybackControls,{layer:ue})]})})}function makeEdgeKey(ne,oe){return`${ne}::${oe}`}const stepsLayerGuard$2=ne=>!!getController(ne).steps;function TreePage({template:ne}){var Je,Ut,jt,Ke,an,Zt;const{key:oe,setKey:ce,layer:ue,layers:pe,allLayers:me}=useLayer(void 0,stepsLayerGuard$2),ge=useTheme$1(),{controls:ye,onChange:ve,state:xe,dragHandle:_e}=useViewTreeContext(),Se=useThrottle$1(((Je=ue==null?void 0:ue.source)==null?void 0:Je.step)??0,1e3/24),{stepTo:$e}=usePlaybackState(oe),Re=reactExports.useMemo(()=>{var en,Kt,Wt;return lodashExports$1.chain((Wt=(Kt=(en=ue==null?void 0:ue.source)==null?void 0:en.trace)==null?void 0:Kt.content)==null?void 0:Wt.events).flatMap(lodashExports$1.keys).uniq().filter(un=>un!=="type").value()},[(Ke=(jt=(Ut=ue==null?void 0:ue.source)==null?void 0:Ut.trace)==null?void 0:jt.content)==null?void 0:Ke.events]),[Ae,Ie]=reactExports.useState(""),ke=(Zt=(an=ue==null?void 0:ue.source)==null?void 0:an.trace)==null?void 0:Zt.content;reactExports.useEffect(()=>{Ie("")},[ke,Ie]);const[Be,Ne]=reactExports.useState(),[Fe,Ue]=reactExports.useState(!1),[We,qe]=reactExports.useState("tree"),ze=reactExports.useMemo(()=>{const en=lodashExports$1.filter(lodashExports$1.map(ke==null?void 0:ke.events,(Kt,Wt)=>({event:Kt,step:Wt})),Kt=>`${Kt.event.id}`===(Be==null?void 0:Be.node));return{events:en,current:lodashExports$1.findLast(en,Kt=>Kt.step<=Se)}},[Be,Se]),{result:Ge,loading:Ze}=useTreeMemo({trace:ke,mode:We},[oe,We]),Dt=reactExports.useMemo(()=>({stagePadding:8*8,allowInvalidContainer:!0,edgeLabelColor:{color:ge.palette.text.secondary},labelFont:"Inter",labelSize:14,labelDensity:.1,renderEdgeLabels:!0,edgeLabelFont:"Inter",edgeLabelSize:12,defaultDrawNodeHover:()=>{},labelColor:{color:ge.palette.text.primary},edgeLabelWeight:"500",defaultEdgeType:"arrow",edgeProgramClasses:{straight:EdgeArrowProgram$1,curvedArrow:EdgeCurvedArrowProgram}}),[ge]);return jsxRuntimeExports.jsxs(ne,{onChange:ve,stack:xe,children:[jsxRuntimeExports.jsx(ne.Key,{children:"tree"}),jsxRuntimeExports.jsx(ne.Title,{children:"Tree"}),jsxRuntimeExports.jsx(ne.Handle,{children:_e}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:ke?Ze?jsxRuntimeExports.jsxs(Flex,{sx:{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(CircularProgress$1,{}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",sx:{px:8,maxWidth:480},children:"Generating layout"})]}):Ge!=null&&Ge.length?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AutoSizer,{children:en=>jsxRuntimeExports.jsxs(k$7,{style:{...en,background:ge.palette.background.paper},graph:MultiDirectedGraph,settings:Dt,children:[jsxRuntimeExports.jsx(TreeGraph,{step:Se,tree:Ge,trace:ke,layer:ue,showAllEdges:layoutModes[We].showAllEdges,trackedProperty:Ae}),jsxRuntimeExports.jsx(GraphEvents,{layer:oe,onSelection:Kt=>{Ne(Kt),Ue(!0)}})]})}),jsxRuntimeExports.jsx(Menu$1,{onClose:()=>Ue(!1),anchorReference:"anchorPosition",anchorPosition:{left:(Be==null?void 0:Be.event.clientX)??0,top:(Be==null?void 0:Be.event.clientY)??0},transformOrigin:{horizontal:"left",vertical:"top"},open:Fe,children:jsxRuntimeExports.jsxs(MenuList$1,{dense:!0,sx:{p:0},children:[!!ze.current&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItem$1,{sx:{py:0},children:jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",variant:"overline",children:["Step ",ze.current.step]})}),jsxRuntimeExports.jsx(Box$1,{px:2,py:1,children:jsxRuntimeExports.jsx(PropertyList,{event:ze.current.event,vertical:!0,simple:!0,primitives:!0})}),jsxRuntimeExports.jsx(Divider$1,{sx:{my:1,mx:2}})]}),jsxRuntimeExports.jsx(ListItem$1,{sx:{py:0},children:jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",variant:"overline",children:["Events at ",Be==null?void 0:Be.node]})}),lodashExports$1.map(ze.events,(en,Kt,Wt)=>{var Xt;const un=((Xt=lodashExports$1.findLast(Wt,nn=>nn.step<=Se))==null?void 0:Xt.step)===en.step;return jsxRuntimeExports.jsxs(Stack$1,{direction:"row",children:[jsxRuntimeExports.jsx(MenuItem$1,{selected:un,sx:{height:32,flex:1,borderLeft:`4px solid ${getColorHex(en.event.type)}`},onClick:()=>{$e(en.step)},children:jsxRuntimeExports.jsx(Tooltip$1,{title:`Go to step ${en.step}`,children:jsxRuntimeExports.jsx(Box$1,{sx:{ml:-.5,pr:4},children:jsxRuntimeExports.jsx(Label$1,{primary:lodashExports$1.startCase(en.event.type),secondary:isDefined$1(en.event.pId)?`Step ${en.step}, from ${en.event.pId}`:`Step ${en.step}`})})})}),jsxRuntimeExports.jsx(Box$1,{sx:{flex:0},children:jsxRuntimeExports.jsx(PropertyDialog,{event:en.event,trigger:nn=>jsxRuntimeExports.jsx(MenuItem$1,{selected:un,onClick:nn,sx:{pr:0},children:jsxRuntimeExports.jsx(Tooltip$1,{title:"See all properties",children:jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(DataObjectOutlined,{})})})})})})]})})]})})]}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(TreeIcon,{}),label:"Graph",secondary:`${inferLayerName(ue)} is not a graph.`}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(TreeIcon,{}),label:"Graph",secondary:"When you load a trace that has tree-like data, you'll see it here as a decision tree."})})}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:oe,items:lodashExports$1.map(me,en=>({id:en.key,hidden:!lodashExports$1.find(pe,{key:en.key}),name:inferLayerName(en)})),onChange:ce,arrow:!0,ellipsis:12}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(ModeStandbyOutlined,{}),label:"Layout",value:We,onChange:qe,items:lodashExports$1.map(lodashExports$1.entries(layoutModes),([en,Kt])=>({id:en,...Kt})),arrow:!0}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(TimelineOutlined,{}),label:"Tracked Property",value:Ae,onChange:Ie,items:[{id:"",name:"Off"},...lodashExports$1.map(Re,en=>({id:en,name:`$.${en}`}))],arrow:!0})]}),jsxRuntimeExports.jsx(ne.Extras,{children:ye})]})}function getFinalParents(ne){const oe={};return lodashExports$1.forEach(ne==null?void 0:ne.events,({id:ce,pId:ue})=>{oe[ce]=ue}),oe}function SelectionMenu({selection:ne,onClose:oe}){const ce=useSelectionMenu(),ue=useCache(ne),{client:pe}=ne??{};return jsxRuntimeExports.jsx(Menu$1,{open:!!ne,anchorReference:"anchorPosition",anchorPosition:{top:(pe==null?void 0:pe.y)??0,left:(pe==null?void 0:pe.x)??0},onClose:oe,keepMounted:!0,children:jsxRuntimeExports.jsx(MenuList$1,{dense:!0,sx:{py:0},children:jsxRuntimeExports.jsx(ce,{event:ue,children:me=>{const ge=lodashExports$1.entries(me);return ge.length?lodashExports$1.chain(ge).sortBy(([,ye])=>ye.index).map(([,{items:ye,primary:ve}],xe)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!xe&&jsxRuntimeExports.jsx(Divider$1,{sx:{my:1,mx:2}}),ve&&jsxRuntimeExports.jsx(ListItem$1,{sx:{py:0},children:jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",variant:"overline",children:ve})}),lodashExports$1.chain(ye).entries().sortBy(([,_e])=>_e.index).map(([_e,{action:Se,icon:$e,primary:Re,secondary:Ae,extras:Ie}])=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!(Se||Re||Ae)&&(Se?jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{Se==null||Se(),oe==null||oe()},children:[$e&&jsxRuntimeExports.jsx(ListItemIcon$1,{children:$e}),jsxRuntimeExports.jsx(ListItemText$1,{primary:Re,sx:{mr:4}}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Ae})]},_e):jsxRuntimeExports.jsxs(ListItem$1,{children:[$e&&jsxRuntimeExports.jsx(ListItemIcon$1,{children:$e}),jsxRuntimeExports.jsx(ListItemText$1,{primary:Re,sx:{mr:4}}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Ae})]},_e)),!!Ie&&Ie]})).value()]})).value():jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ListItem$1,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",children:"No info to show."})})})}})})})}const identity$1=({children:ne})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne({})});function useSelectionMenu(){const[{layers:ne}]=useLayers();return reactExports.useMemo(()=>lodashExports$1.chain(ne).reduce((oe,ce)=>{var pe;const ue=((pe=getController(ce))==null?void 0:pe.provideSelectionInfo)??identity$1;return({children:me,event:ge})=>jsxRuntimeExports.jsx(ue,{layer:ce.key,event:ge,children:ye=>jsxRuntimeExports.jsx(oe,{event:ge,children:ve=>me==null?void 0:me(lodashExports$1.merge(ye,ve))})})},identity$1).value(),[ne])}const TILE_RESOLUTION=128,tileSize=(ne=!1)=>(ne?.75:devicePixelRatio*2)*TILE_RESOLUTION,rendererOptions={tileSubdivision:2,workerCount:lodashExports$1.clamp(lodashExports$1.floor((navigator.hardwareConcurrency-1)/2),1,12),tileResolution:{width:tileSize(),height:tileSize()}},TraceRendererContext=reactExports.createContext({});function useRendererInstance(){return reactExports.useContext(TraceRendererContext)}function useRenderer(ne,{width:oe,height:ce}={}){const ue=useTheme$1(),[pe]=useRenderers(),me=reactExports.useRef(null),[ge,ye]=reactExports.useState(""),[ve,xe]=reactExports.useState();return reactExports.useEffect(()=>{if(me.current&&oe&&ce&&ne){const _e=lodashExports$1.find(pe,Se=>Se.renderer.meta.id===ne);if(_e)try{const Se=new _e.renderer.constructor;return Se.setup({...rendererOptions,screenSize:{width:oe,height:ce},backgroundColor:ue.palette.background.paper,accentColor:ue.palette.primary.main}),me.current.append(Se.getView()),xe(Se),ye(""),()=>{var $e,Re;try{(Re=($e=me.current)==null?void 0:$e.removeChild)==null||Re.call($e,Se.getView()),xe(void 0)}catch(Ae){console.warn(Ae)}finally{Se.destroy()}}}catch(Se){ye(`${_e.renderer.meta.name}: ${lodashExports$1.get(Se,"message")}`),xe(void 0)}}},[me.current,lodashExports$1.map,ne,pe,ue,ye,xe]),useDebounce(()=>{ve&&oe&&ce&&ve.setOptions({screenSize:{width:oe,height:ce}})},ue.transitions.duration.standard,[ve,oe,ce]),{instance:ve,ref:me,error:ge}}function TraceRendererCircularProgress(){const[{map:ne,specimen:oe}]=useLoading();return!!(ne||oe)&&jsxRuntimeExports.jsx(CircularProgress$1,{sx:{position:"absolute",top:ce=>ce.spacing(6+2),right:ce=>ce.spacing(2)}})}const VIEWPORT_PAGE_DESCRIPTION="When you create a layer, you'll see it visualised here.";function TraceRenderer({width:ne,height:oe,renderer:ce,rendererRef:ue,layers:pe}){const me=reactExports.useMemo(nanoid$1,[]),{instance:ge,error:ye,ref:ve}=useRenderer(ce,{width:ne,height:oe}),{playing:xe}=usePlaybackState(),[,_e]=useScreenshots(),[Se,$e]=reactExports.useState();reactExports.useEffect(()=>{if(ge){const Ae=(Ie,ke)=>{const Be=Ie;$e({client:{x:Be.clientX,y:Be.clientY},world:ke.world,info:{point:ke.world,components:ke.components}})};return ge.on("click",Ae),()=>void ge.off("click",Ae)}},[ge]);const Re=reactExports.useMemo(()=>({renderer:ge}),[ge]);return reactExports.useEffect(()=>ue==null?void 0:ue(ge),[ge,ue]),reactExports.useEffect(()=>{const Ae=async()=>{var Ie;return await((Ie=ge==null?void 0:ge.toDataUrl)==null?void 0:Ie.call(ge))};return _e(()=>({[me]:Ae})),()=>_e(()=>({[me]:void 0}))},[me,ge]),reactExports.useEffect(()=>{ge&&ge.setOptions({tileResolution:{width:tileSize(xe),height:tileSize(xe)}})},[ge,xe]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TraceRendererCircularProgress,{}),jsxRuntimeExports.jsx(TraceRendererContext.Provider,{value:Re,children:pe!=null&&pe.length?ye?jsxRuntimeExports.jsxs(Box$1,{sx:{display:"flex",flexDirection:"column",width:ne,height:oe,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[jsxRuntimeExports.jsx(DisabledIcon,{sx:{mb:2},fontSize:"large"}),ye]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Box$1,{ref:ve,children:pe.map((Ae,Ie)=>jsxRuntimeExports.jsx(RenderLayer,{index:Ie,layer:Ae},Ae.key))})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(ViewportIcon,{}),label:"Viewport",width:ne,height:oe,secondary:VIEWPORT_PAGE_DESCRIPTION})}),jsxRuntimeExports.jsx(SelectionMenu,{selection:Se,onClose:()=>$e(void 0)})]})}function NodeList({nodes:ne,start:oe=0,end:ce=(ne==null?void 0:ne.length)??0}){const{renderer:ue}=useRendererInstance();return reactExports.useEffect(()=>{if(ue&&(ne!=null&&ne.length))return ue.add(lodashExports$1.slice(ne,oe,ce).flat())},[ue,ne,oe,ce]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function NodeList2({nodes:ne}){const{renderer:oe}=useRendererInstance();return reactExports.useEffect(()=>{if(oe&&(ne!=null&&ne.length))return oe.add(ne)},[oe,ne]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function LazyNodeList({nodes:ne,end:oe}){const ue=lodashExports$1.floor((oe??0)/100)*100,pe=reactExports.useMemo(()=>lodashExports$1.slice(ne,0,ue),[ne,ue]),me=reactExports.useMemo(()=>lodashExports$1.slice(ne,ue,(oe??0)+1),[ne,ue,oe]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!ue&&jsxRuntimeExports.jsx(NodeList,{nodes:pe}),me.map((ge,ye)=>jsxRuntimeExports.jsx(NodeList2,{nodes:ge},ue+ye))]})}const useEffectWhen=(ne,oe,ce)=>{const ue=usePrevious$1(ce);return reactExports.useEffect(()=>{allSame(ce,ue)||ne()},[oe])};function allSame(ne,oe){return lodashExports$1.zip(ne,oe).every(([ce,ue])=>ce===ue)}const useEffectWhenAsync=(ne,oe=[],ce=[])=>{const[ue,pe]=reactExports.useState(oe),[me,ge]=reactExports.useState(ce);return reactExports.useEffect(()=>{allSame(me,ce)||(pe(oe),ge(ce))},[oe,ce,me]),useAsyncAbortable(ne,[...ue,...me])};function useConnectionResolver(){const[ne]=useConnections();return reactExports.useCallback(oe=>lodashExports$1.find(ne,oe),[ne])}function useConnection(ne){return useConnectionResolver()({url:ne})}function useMapContent(ne){const oe=useSnackbar(),ce=useLoadingState("map"),ue=useConnectionResolver(),pe=reactExports.useMemo(()=>memoizee$1(async({source:ve,id:xe}={})=>{if(ve&&xe){const _e=ue({url:ve});if(_e){oe("Fetching map...");const Se=await _e.transport().call("features/map",{id:xe});return Se==null?void 0:Se.content}}},{normalizer:JSON.stringify}),[ue,oe]),{content:me,source:ge,id:ye}=ne??{};return useAsync(()=>ce(async()=>{if(ye)return{...ne,content:me||await pe({source:ge,id:ye})}}),[pe,me,ge,ye])}const noop$7=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});function useMapOptions(ne){const{format:oe}=ne??{};return useAsync(async()=>{var ce,ue;return await((ue=(ce=getParser(oe))==null?void 0:ce.editor)==null?void 0:ue.call(ce,ne==null?void 0:ne.content))??noop$7},[oe,ne==null?void 0:ne.content])}function useParsedMap(ne,oe){const ce=useSnackbar(),ue=useTheme$1(),pe=useLoadingState("map"),{format:me,content:ge}=ne??{};return useAsync(()=>pe(async()=>{var ye,ve;if(me&&ge){ce("Processing map...");try{const xe=await((ve=(ye=getParser(me))==null?void 0:ye.parse)==null?void 0:ve.call(ye,ge,{color:ue.palette.text.primary,background:ue.palette.background.paper,...oe}))??{nodes:[]};return ce("Map loaded",`${xe.nodes.length} elements, ${xe.log.join(", ")}`),{...ne,...xe}}catch(xe){return console.error(xe),ce("Error parsing",lodashExports$1.get(xe,"message")),{error:lodashExports$1.get(xe,"message")}}}}),[me,ge,ue,oe])}const controller$2={key:"map",icon:jsxRuntimeExports.jsx(MapTwoTone,{}),inferName:ne=>{var oe;return(oe=ne==null?void 0:ne.source)!=null&&oe.map?`${ne.source.map.name} (${lodashExports$1.startCase(ne.source.map.format)})`:"Untitled Map"},error:ne=>{var oe,ce;return(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedMap)==null?void 0:ce.error},compress:ne=>lodashExports$1.pick(ne,["map","options"]),claimImportedFile:async ne=>lodashExports$1.keys(mapParsers).includes(ext$1(ne.name))?{claimed:!0,layer:async oe=>{oe("Opening map...");try{return{map:{...await readUploadedMap(ne,lodashExports$1.entries(mapParsers).map(([ue])=>({id:ue}))).read()}}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports$1.get(ce,"message")}`),{map:{key:nanoid$1(),id:custom$1().id,error:lodashExports$1.get(ce,"message"),name:lodashExports$1.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var pe,me,ge;const ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap,{result:ue}=useMapOptions(ce);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Source",content:jsxRuntimeExports.jsx(MapPicker,{value:(me=ne==null?void 0:ne.source)==null?void 0:me.map,onChange:ye=>oe(ve=>lodashExports$1.set(ve,"source.map",ye))})}),(ce==null?void 0:ce.error)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:ye=>ye.palette.error.main,sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:ce==null?void 0:ce.error})}),!!ce&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Heading,{label:"Map Options"}),ue?jsxRuntimeExports.jsx(ue,{value:(ge=ne==null?void 0:ne.source)==null?void 0:ge.options,onChange:ye=>oe(ve=>{var xe;lodashExports$1.set(ve,"source.options",ye(((xe=ve.source)==null?void 0:xe.options)??{}))})}):jsxRuntimeExports.jsx(CircularProgress$1,{sx:{mt:2}})]})]})}),renderer:({layer:ne,index:oe})=>{var pe;const{nodes:ce}=((pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap)??{},ue=reactExports.useMemo(()=>[lodashExports$1.map(ce,me=>({...me,meta:{...me.meta,sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))],[ce,oe,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode]);return jsxRuntimeExports.jsx(NodeList,{nodes:ue})},service:withProduce(({value:ne,produce:oe})=>{var me,ge;const{result:ce}=useMapContent((me=ne==null?void 0:ne.source)==null?void 0:me.map),{result:ue,loading:pe}=useParsedMap(ce,(ge=ne==null?void 0:ne.source)==null?void 0:ge.options);return useEffectWhen(()=>{pe||oe(ye=>{lodashExports$1.set(ye,"source.parsedMap",ue),lodashExports$1.set(ye,"viewKey",nanoid$1())})},[ue,oe,pe],[ue]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const{layer:ue,setLayer:pe,layers:me}=useLayer(ce),{parsedMap:ge}=(ue==null?void 0:ue.source)??{},{point:ye,node:ve}=reactExports.useMemo(()=>{var _e,Se,$e,Re;if(ge&&oe){const Ae=(Re=($e=getParser((Se=(_e=ue==null?void 0:ue.source)==null?void 0:_e.map)==null?void 0:Se.format))==null?void 0:$e.hydrate)==null?void 0:Re.call($e,ge);if(Ae){const Ie=(oe==null?void 0:oe.world)&&Ae.snap(oe.world);if(Ie){const ke=(oe==null?void 0:oe.world)&&Ae.nodeAt(Ie);return{point:Ie,node:ke}}}}return{}},[ge,oe]),xe=reactExports.useMemo(()=>({...ue&&ye&&!lodashExports$1.isUndefined(ve)&&{[ue.key]:{primary:inferLayerName(ue),items:{point:{primary:"Point",secondary:`(${lodashExports$1.round(ye.x,2)}, ${lodashExports$1.round(ye.y,2)})`}}}}}),[ye,ve,ue,me,pe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne(xe)})},getSources:ne=>{var ue,pe;const oe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.map,ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap;return oe?[{id:"map",name:`(Source) ${oe.name}`,language:"txt",content:ce==null?void 0:ce.content}]:[]},onEditSource:(ne,oe,ce)=>ne};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(ne){return typeof ne>"u"||ne===null}function isObject$3(ne){return typeof ne=="object"&&ne!==null}function toArray$1(ne){return Array.isArray(ne)?ne:isNothing(ne)?[]:[ne]}function extend$2(ne,oe){var ce,ue,pe,me;if(oe)for(me=Object.keys(oe),ce=0,ue=me.length;ce+pe);return ue<-2||ue>4?jsxRuntimeExports.jsxs("span",{children:[ce,"x10",jsxRuntimeExports.jsx("sup",{style:supProps,children:ue})]}):lodashExports$1.round(ne,2)}else return ne;case"string":return`${ne}`;case"undefined":return"null";default:return oe?jsxRuntimeExports.jsx("code",{children:lodashExports$1.isNull(ne)?"null":lodashExports$1.get(ne,"constructor.name")??typeof ne}):jsxRuntimeExports.jsx("code",{style:{whiteSpace:"pre"},children:lodashExports$1.truncate(beautify$1(ne,void 0,2),{length:100})})}}function Property({label:ne,value:oe,type:ce,simple:ue}){return jsxRuntimeExports.jsxs(Flex,{width:"auto",mr:2,mb:.5,alignItems:"baseline",children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",...ce,sx:{opacity:.54,...ce==null?void 0:ce.sx},children:ne}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",...ce,children:renderProperty(oe,ue)??"none"})]},`${ne}::${renderProperty(oe)}`)}const COMMON_PROPS=["type"],OMIT_PROPS=[...COMMON_PROPS,"id"],ESSENTIAL_PROPS=["id"],GRAPH_PROPS=[...ESSENTIAL_PROPS,"pId"],HEURISTIC_PROPS=["f","g"],ALL_PROPS=[...OMIT_PROPS,...GRAPH_PROPS,...HEURISTIC_PROPS],sortEventKeys=ne=>lodashExports$1.chain(ne).entries().filter(([,oe])=>!lodashExports$1.isUndefined(oe)).sortBy(([oe])=>lodashExports$1.indexOf(ALL_PROPS,oe)+1||Number.MAX_SAFE_INTEGER).value();function PropertyDialog({event:ne,max:oe=10,simple:ce,variant:ue,...pe}){const me=sortEventKeys(ne);return jsxRuntimeExports.jsx(ManagedModal,{...lodashExports$1.merge({appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Event Properties"})},trigger:ge=>jsxRuntimeExports.jsxs(Button$2,{variant:"text",sx:{mx:-1,minWidth:0,width:"fit-content",color:ye=>ye.palette.text.secondary,justifyContent:"left"},onClick:ye=>{ye.stopPropagation(),ye.preventDefault(),ge(ye)},children:[me.length-oe," more"]})},pe),children:[{name:"common",props:lodashExports$1.filter(me,([ge])=>COMMON_PROPS.includes(ge))},{name:"Graph",props:lodashExports$1.filter(me,([ge])=>GRAPH_PROPS.includes(ge))},{name:"Heuristic",props:lodashExports$1.filter(me,([ge])=>HEURISTIC_PROPS.includes(ge))},{name:"other",props:lodashExports$1.filter(me,([ge])=>!ALL_PROPS.includes(ge))}].map(({name:ge,props:ye},ve)=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!!ve&&jsxRuntimeExports.jsx(Divider$1,{sx:{mb:1}}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",sx:{px:3},children:lodashExports$1.startCase(ge)}),jsxRuntimeExports.jsx(Box$1,{sx:{p:1,pt:0,display:"grid",gridAutoFlow:"row",gridTemplateColumns:"repeat(2, 1fr)"},children:lodashExports$1.map(ye,([xe,_e])=>jsxRuntimeExports.jsx(ListItem$1,{sx:{py:.5},children:jsxRuntimeExports.jsx(ListItemText$1,{secondary:xe,primary:renderProperty(_e)})},`${xe}::${_e}`))},ge)]},ge))})}function PropertyList(ne){const{event:oe,variant:ce="body2",max:ue=10,simple:pe,primitives:me,...ge}=ne,ye=sortEventKeys(oe);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Flex,{...ge,children:[lodashExports$1.chain(ye).filter(me?([,ve])=>isPrimitive(ve):lodashExports$1.constant(!0)).slice(0,ue).map(([ve,xe],_e)=>jsxRuntimeExports.jsx(Property,{label:ve,value:xe,type:{variant:ce},simple:pe},_e)).value(),ye.length>ue&&!pe&&jsxRuntimeExports.jsx(PropertyDialog,{...ne})]})})}function isPrimitive(ne){return lodashExports$1.isString(ne)||lodashExports$1.isNumber(ne)}var t$5,e$4,s$2,i$5;(function(ne){ne.HEX="HEX",ne.RGB="RGB",ne.HSL="HSL",ne.CIELab="CIELab",ne.CMYK="CMYK"})(t$5||(t$5={})),function(ne){ne.ANALOGOUS="ANALOGOUS",ne.COMPLEMENTARY="COMPLEMENTARY",ne.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",ne.TRIADIC="TRIADIC",ne.TETRADIC="TETRADIC",ne.SQUARE="SQUARE"}(e$4||(e$4={})),function(ne){ne.ADDITIVE="ADDITIVE",ne.SUBTRACTIVE="SUBTRACTIVE"}(s$2||(s$2={})),function(ne){ne.black="#000000",ne.silver="#C0C0C0",ne.gray="#808080",ne.white="#FFFFFF",ne.maroon="#800000",ne.red="#FF0000",ne.purple="#800080",ne.fuchsia="#FF00FF",ne.green="#008000",ne.lime="#00FF00",ne.olive="#808000",ne.yellow="#FFFF00",ne.navy="#000080",ne.blue="#0000FF",ne.teal="#008080",ne.aqua="#00FFFF",ne.orange="#FFA500",ne.aliceblue="#F0F8FF",ne.antiquewhite="#FAEBD7",ne.aquamarine="#7FFFD4",ne.azure="#F0FFFF",ne.beige="#F5F5DC",ne.bisque="#FFE4C4",ne.blanchedalmond="#FFEBCD",ne.blueviolet="#8A2BE2",ne.brown="#A52A2A",ne.burlywood="#DEB887",ne.cadetblue="#5F9EA0",ne.chartreuse="#7FFF00",ne.chocolate="#D2691E",ne.coral="#FF7F50",ne.cornflowerblue="#6495ED",ne.cornsilk="#FFF8DC",ne.crimson="#DC143C",ne.cyan="#00FFFF",ne.darkblue="#00008B",ne.darkcyan="#008B8B",ne.darkgoldenrod="#B8860B",ne.darkgray="#A9A9A9",ne.darkgreen="#006400",ne.darkgrey="#A9A9A9",ne.darkkhaki="#BDB76B",ne.darkmagenta="#8B008B",ne.darkolivegreen="#556B2F",ne.darkorange="#FF8C00",ne.darkorchid="#9932CC",ne.darkred="#8B0000",ne.darksalmon="#E9967A",ne.darkseagreen="#8FBC8F",ne.darkslateblue="#483D8B",ne.darkslategray="#2F4F4F",ne.darkslategrey="#2F4F4F",ne.darkturquoise="#00CED1",ne.darkviolet="#9400D3",ne.deeppink="#FF1493",ne.deepskyblue="#00BFFF",ne.dimgray="#696969",ne.dimgrey="#696969",ne.dodgerblue="#1E90FF",ne.firebrick="#B22222",ne.floralwhite="#FFFAF0",ne.forestgreen="#228B22",ne.gainsboro="#DCDCDC",ne.ghostwhite="#F8F8FF",ne.gold="#FFD700",ne.goldenrod="#DAA520",ne.greenyellow="#ADFF2F",ne.grey="#808080",ne.honeydew="#F0FFF0",ne.hotpink="#FF69B4",ne.indianred="#CD5C5C",ne.indigo="#4B0082",ne.ivory="#FFFFF0",ne.khaki="#F0E68C",ne.lavender="#E6E6FA",ne.lavenderblush="#FFF0F5",ne.lawngreen="#7CFC00",ne.lemonchiffon="#FFFACD",ne.lightblue="#ADD8E6",ne.lightcoral="#F08080",ne.lightcyan="#E0FFFF",ne.lightgoldenrodyellow="#FAFAD2",ne.lightgray="#D3D3D3",ne.lightgreen="#90EE90",ne.lightgrey="#D3D3D3",ne.lightpink="#FFB6C1",ne.lightsalmon="#FFA07A",ne.lightseagreen="#20B2AA",ne.lightskyblue="#87CEFA",ne.lightslategray="#778899",ne.lightslategrey="#778899",ne.lightsteelblue="#B0C4DE",ne.lightyellow="#FFFFE0",ne.limegreen="#32CD32",ne.linen="#FAF0E6",ne.magenta="#FF00FF",ne.mediumaquamarine="#66CDAA",ne.mediumblue="#0000CD",ne.mediumorchid="#BA55D3",ne.mediumpurple="#9370DB",ne.mediumseagreen="#3CB371",ne.mediumslateblue="#7B68EE",ne.mediumspringgreen="#00FA9A",ne.mediumturquoise="#48D1CC",ne.mediumvioletred="#C71585",ne.midnightblue="#191970",ne.mintcream="#F5FFFA",ne.mistyrose="#FFE4E1",ne.moccasin="#FFE4B5",ne.navajowhite="#FFDEAD",ne.oldlace="#FDF5E6",ne.olivedrab="#6B8E23",ne.orangered="#FF4500",ne.orchid="#DA70D6",ne.palegoldenrod="#EEE8AA",ne.palegreen="#98FB98",ne.paleturquoise="#AFEEEE",ne.palevioletred="#DB7093",ne.papayawhip="#FFEFD5",ne.peachpuff="#FFDAB9",ne.peru="#CD853F",ne.pink="#FFC0CB",ne.plum="#DDA0DD",ne.powderblue="#B0E0E6",ne.rosybrown="#BC8F8F",ne.royalblue="#4169E1",ne.saddlebrown="#8B4513",ne.salmon="#FA8072",ne.sandybrown="#F4A460",ne.seagreen="#2E8B57",ne.seashell="#FFF5EE",ne.sienna="#A0522D",ne.skyblue="#87CEEB",ne.slateblue="#6A5ACD",ne.slategray="#708090",ne.slategrey="#708090",ne.snow="#FFFAFA",ne.springgreen="#00FF7F",ne.steelblue="#4682B4",ne.tan="#D2B48C",ne.thistle="#D8BFD8",ne.tomato="#FF6347",ne.turquoise="#40E0D0",ne.violet="#EE82EE",ne.wheat="#F5DEB3",ne.whitesmoke="#F5F5F5",ne.yellowgreen="#9ACD32",ne.rebeccapurple="#663399"}(i$5||(i$5={}));const a$3=Object.keys(i$5),r$4={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},n$5={BGR:t$5.RGB,ABGR:t$5.RGB,HLS:t$5.HSL,AHLS:t$5.HSL,LAB:t$5.CIELab,ALAB:t$5.CIELab,CKMY:t$5.CMYK,ACKMY:t$5.CMYK};var c$3;(function(ne){ne.NUMBER="number",ne.BOOLEAN="boolean"})(c$3||(c$3={}));const o$3={[t$5.HEX]:/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,[t$5.RGB]:/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$5.HSL]:/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$5.CIELab]:/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$5.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/},A$3=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,h$6=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,u$5=/^0x([a-f\d]{1,2})$/i,d$5=/\{(\d+)\}/g,l$5=/,( +|\d+)/g,E$2=/ +/,m$4="The provided string color doesn't have a correct format",b$4="The provided color object doesn't have the proper keys or format";var C$2,L$2,g$4;(function(ne){ne.NONE="none",ne.DEGREES="deg",ne.GRADIANS="grad",ne.RADIANS="rad",ne.TURNS="turn"})(C$2||(C$2={})),function(ne){ne.NONE="none",ne.PERCENT="percent"}(L$2||(L$2={})),function(ne){ne.DEVICE_CMYK="device-cmyk",ne.CMYK="cmyk"}(g$4||(g$4={}));const B$2={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:C$2.NONE,rgbUnit:L$2.NONE,labUnit:L$2.NONE,cmykUnit:L$2.PERCENT,alphaUnit:L$2.NONE,cmykFunction:g$4.DEVICE_CMYK},p$5=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),H$4=ne=>+`${ne}`.replace(h$6,"$1"),F$2=ne=>h$6.test(`${ne}`)?H$4(ne):Math.min(+ne,100),R$2=ne=>(ne.length===1&&(ne+=ne),parseInt(ne,16)),S$3=ne=>{const oe=D$3(ne,0).toString(16).toUpperCase();return oe.length===1?`0x0${oe}`:`0x${oe}`},I$2=(ne,oe=!1)=>!oe&&h$6.test(ne)?Math.min(255*H$4(ne)/100,255):u$5.test(ne)?(ne.length===3&&(ne+=ne.slice(-1)),oe?D$3(ne)/255:D$3(ne)):Math.min(+ne,oe?1:255),G$2=ne=>h$6.test(ne)?f$4(125*H$4(ne)/100,-125,125):f$4(+ne,-125,125),M$3=ne=>Math.min(h$6.test(ne)?H$4(ne)/100:+ne,1),y$2=ne=>[...ne].sort().join("").toUpperCase(),D$3=(ne,oe=6)=>{const ce=Math.pow(10,oe);return Math.round(+ne*ce)/ce},f$4=(ne,oe,ce)=>Math.max(oe,Math.min(ne,ce)),O$1=ne=>{if(typeof ne=="string"){const oe=ne.match(A$3),ce=+oe[1];switch(oe[2]){case C$2.RADIANS:ne=D$3(180*ce/Math.PI);break;case C$2.TURNS:ne=D$3(360*ce);break;case C$2.GRADIANS:ne=D$3(.9*ce);break;case C$2.DEGREES:default:ne=ce}}return(ne>360||ne<0)&&(ne-=360*Math.floor(ne/360)),ne},Y$3=(ne,oe)=>{let ce;switch(oe){case C$2.RADIANS:ce=D$3((ue=>ue*Math.PI/180)(ne));break;case C$2.TURNS:ce=D$3(ne/360);break;case C$2.GRADIANS:ce=D$3(10/9*ne);break;case C$2.DEGREES:case C$2.NONE:default:ce=ne}return ce},k$6=(ne,...oe)=>{const ce=[],ue=[],pe=[],me=[],ge=[],ye=[],ve=Object.values(C$2),xe=Object.values(L$2),_e=Object.values(g$4),Se={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const $e of oe)if(typeof $e=="string"){if(ce.push($e),$e.includes(",")){Se.legacyCSS++;const Re=$e.match(l$5);new Set(Re).size===1&&E$2.test(Re[0].slice(1))&&Se.spacesAfterCommas++}if($e.match(o$3.HSL)){const Re=$e.match(o$3.HSL),Ae=Re[1]||Re[5],Ie=Re[8],ke=Ae.match(A$3)[2];ue.push(ke===""?C$2.NONE:ke),ye.push(h$6.test(Ie));continue}if(o$3.RGB.test($e)){const Re=$e.match(o$3.RGB),Ae=Re[1]||Re[5],Ie=Re[2]||Re[6],ke=Re[3]||Re[7],Be=Re[8];pe.push(h$6.test(Ae)&&h$6.test(Ie)&&h$6.test(ke)),ye.push(h$6.test(Be));continue}if(o$3.CIELab.test($e)){const Re=$e.match(o$3.CIELab),Ae=Re[1],Ie=Re[2],ke=Re[3],Be=Re[4];me.push(h$6.test(Ae)&&h$6.test(Ie)&&h$6.test(ke)),ye.push(h$6.test(Be));continue}if($e.match(o$3.CMYK)){const Re=$e.match(o$3.CMYK),Ae=Re[1]||Re[6],Ie=Re[2]||Re[7],ke=Re[3]||Re[8],Be=Re[4]||Re[9],Ne=Re[10];ge.push(h$6.test(Ae)&&h$6.test(Ie)&&h$6.test(ke)&&h$6.test(Be)),$e.startsWith("cmyk")&&Se.cmykFunction++,ye.push(h$6.test(Ne))}}return{decimals:typeof ne.decimals===c$3.NUMBER?ne.decimals:B$2.decimals,legacyCSS:typeof ne.legacyCSS===c$3.BOOLEAN?ne.legacyCSS:!!(ce.length&&Se.legacyCSS===ce.length)||B$2.legacyCSS,spacesAfterCommas:typeof ne.spacesAfterCommas===c$3.BOOLEAN?ne.spacesAfterCommas:!!(ce.length&&Se.spacesAfterCommas===ce.length)||B$2.spacesAfterCommas,anglesUnit:ne.anglesUnit&&ve.includes(ne.anglesUnit)?ne.anglesUnit:new Set(ue).size===1?ue[0]:B$2.anglesUnit,rgbUnit:ne.rgbUnit&&xe.includes(ne.rgbUnit)?ne.rgbUnit:new Set(pe).size===1&&pe[0]?L$2.PERCENT:B$2.rgbUnit,labUnit:ne.labUnit&&xe.includes(ne.labUnit)?ne.labUnit:new Set(me).size===1&&me[0]?L$2.PERCENT:B$2.labUnit,cmykUnit:ne.cmykUnit&&xe.includes(ne.cmykUnit)?ne.cmykUnit:new Set(ge).size!==1||ge[0]?B$2.cmykUnit:L$2.NONE,alphaUnit:ne.alphaUnit&&xe.includes(ne.alphaUnit)?ne.alphaUnit:new Set(ye).size===1&&ye[0]?L$2.PERCENT:B$2.alphaUnit,cmykFunction:ne.cmykFunction&&_e.includes(ne.cmykFunction)?ne.cmykFunction:ge.length&&ge.length===Se.cmykFunction?g$4.CMYK:B$2.cmykFunction}},K$2=ne=>`${ne}`in s$2,X$2=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],T$2=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],N$3=X$2.map(ne=>ne.reduce((oe,ce)=>oe+ce,0)),$$4=(ne,oe,ce)=>(ce<0&&(ce+=6),ce>=6&&(ce-=6),D$3(ce<1?255*((oe-ne)*ce+ne):ce<3?255*oe:ce<4?255*((oe-ne)*(4-ce)+ne):255*ne)),j$3=ne=>ne<=.04045?ne/12.92:((ne+.055)/1.055)**2.4,U$2=ne=>ne<=.0031308?12.92*ne:1.055*ne**(1/2.4)-.055,w$4=(ne,oe,ce,ue)=>{const pe=[0,0,0],me=[ne,oe,ce];return ue.forEach((ge,ye)=>{ge.forEach((ve,xe)=>{pe[ye]+=ve*me[xe]})}),pe},x$2=(ne,oe,ce)=>{oe/=100;const ue=(ce/=100)<=.5?ce*(oe+1):ce+oe-ce*oe,pe=2*ce-ue;return{R:$$4(pe,ue,(ne/=60)+2),G:$$4(pe,ue,ne),B:$$4(pe,ue,ne-2)}},v$5=(ne,oe,ce,ue=1)=>{ne/=255,oe/=255,ce/=255,ue=Math.min(ue,1);const pe=Math.max(ne,oe,ce),me=Math.min(ne,oe,ce),ge=pe-me;let ye=0,ve=0;const xe=(pe+me)/2;if(ge!==0){switch(pe){case ne:ye=(oe-ce)/ge%6;break;case oe:ye=(ce-ne)/ge+2;break;case ce:ye=(ne-oe)/ge+4}ye=D$3(60*ye),ye<0&&(ye+=360),ve=ge/(1-Math.abs(2*xe-1))}return{H:ye,S:D$3(100*ve),L:D$3(100*xe),A:ue}},V$2=(ne,oe,ce)=>{const ue=[ne/255,oe/255,ce/255].map(j$3),pe=w$4(ue[0],ue[1],ue[2],X$2),me=((ge,ye,ve)=>{const xe=$e=>$e>.008856451679035631?Math.cbrt($e):$e/.12841854934601665+.13793103448275862,_e=xe(ge/N$3[0]),Se=xe(ye/N$3[1]);return[116*Se-16,500*(_e-Se),200*(Se-xe(ve/N$3[2]))]})(pe[0],pe[1],pe[2]);return{L:me[0],a:me[1],b:me[2]}},P$1=(ne,oe,ce)=>{const ue=((me,ge,ye)=>{const ve=$e=>$e>.20689655172413793?$e**3:.12841854934601665*($e-.13793103448275862),xe=(me+16)/116,_e=ge/500,Se=ye/200;return[N$3[0]*ve(xe+_e),N$3[1]*ve(xe),N$3[2]*ve(xe-Se)]})(ne,oe,ce),pe=w$4(ue[0],ue[1],ue[2],T$2).map(U$2);return{R:f$4(255*pe[0],0,255),G:f$4(255*pe[1],0,255),B:f$4(255*pe[2],0,255)}},q$5=(ne,oe,ce,ue)=>({R:D$3(255*(1-ne)*(ue=1-ue)),G:D$3(255*(1-oe)*ue),B:D$3(255*(1-ce)*ue)}),_$3=(ne,oe,ce)=>{ne/=255,oe/=255,ce/=255;const ue=1-Math.max(ne,oe,ce),pe=1-ue,me=pe&&(pe-oe)/pe,ge=pe&&(pe-ce)/pe;return{C:D$3(100*(pe&&(pe-ne)/pe)),M:D$3(100*me),Y:D$3(100*ge),K:D$3(100*ue)}},z$3=(ne,oe)=>{if(ne<0&&(ne+=360),ne>360&&(ne-=360),ne===360||ne===0)return ne;const ce=[[0,120],[120,180],[180,240],[240,360]],ue=[[0,60],[60,120],[120,240],[240,360]],pe=oe?ue:ce;let me=0,ge=0,ye=0,ve=0;return(oe?ce:ue).find((xe,_e)=>ne>=xe[0]&&nene?", ":",",W$2=(ne,oe)=>{const ce=y$2(Object.keys(ne));return r$4[n$5[ce]].reduce((ue,pe,me)=>{const ge=ne[pe];return ge!==void 0&&ue.push(oe(ge,me)),ue},[])},J$2=(ne,oe)=>ne.replace(d$5,(ce,ue)=>`${oe[+ue-1]}`),Z$3=(ne,oe,ce=!1)=>{const{alphaUnit:ue,legacyCSS:pe,decimals:me}=oe;return ue!==L$2.PERCENT||pe&&!ce?D$3(ne,me):`${D$3(100*ne,me)}%`},tt$2={[t$5.HEX]:ne=>{const oe=W$2(ne,ue=>(pe=>{let me=D$3(pe,0).toString(16).toUpperCase();return me.length===1&&(me=`0${me}`),me})(D$3(ue))),ce=oe.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return J$2(ce,oe)},[t$5.RGB]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,rgbUnit:me}=oe,ge=Q$2(pe),ye=W$2(ne,(xe,_e)=>me===L$2.PERCENT&&_e<3?`${((Se,$e)=>D$3(Se/255*100,$e))(xe,ce)}%`:_e===3?Z$3(xe,oe):D$3(xe,ce)),ve=ue?ye.length===4?`rgba({1}${ge}{2}${ge}{3}${ge}{4})`:`rgb({1}${ge}{2}${ge}{3})`:ye.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return J$2(ve,ye)},[t$5.HSL]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,anglesUnit:me}=oe,ge=Q$2(pe),ye=W$2(ne,(xe,_e)=>_e===0&&me!==C$2.NONE?`${D$3(Y$3(xe,me),ce)}${me}`:_e===3?Z$3(xe,oe):D$3(xe,ce)),ve=ue?ye.length===4?`hsla({1}${ge}{2}%${ge}{3}%${ge}{4})`:`hsl({1}${ge}{2}%${ge}{3}%)`:ye.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return J$2(ve,ye)},[t$5.CIELab]:(ne,oe)=>{const{decimals:ce,labUnit:ue}=oe,pe=W$2(ne,(ge,ye)=>{if(ye===0){const ve=D$3(F$2(ge),ce);return ue===L$2.PERCENT?`${ve}%`:`${ve}`}return ye<3?ue===L$2.PERCENT?`${((ve,xe)=>D$3(ve/125*100,xe))(ge,ce)}%`:D$3(ge,ce):Z$3(ge,oe,!0)}),me=pe.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return J$2(me,pe)},[t$5.CMYK]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,cmykUnit:me,cmykFunction:ge}=oe,ye=Q$2(pe),ve=W$2(ne,(_e,Se)=>me===L$2.PERCENT&&Se<4?`${D$3(_e,ce)}%`:Se===4?Z$3(_e,oe):D$3(_e/100,ce)),xe=ue?ve.length===5?`${ge}({1}${ye}{2}${ye}{3}${ye}{4}${ye}{5})`:`${ge}({1}${ye}{2}${ye}{3}${ye}{4})`:ve.length===5?`${ge}({1} {2} {3} {4} / {5})`:`${ge}({1} {2} {3} {4})`;return J$2(xe,ve)}},et$2=ne=>(typeof ne=="string"&&(ne=h$6.test(ne)?H$4(ne)/100:+ne),isNaN(+ne)||ne>1?1:D$3(ne)),st$1=(ne,oe,ce)=>oe.reduce((ue,pe)=>[...ue,{...ne,H:ce===s$2.ADDITIVE?O$1(ne.H+pe):O$1(z$3(z$3(ne.H,!1)+pe,!0))}],[{...ne}]),it$1=(ne,oe)=>st$1(ne,[30,-30],oe),at$1=(ne,oe)=>st$1(ne,[180],oe),rt$1=(ne,oe)=>st$1(ne,[150,-150],oe),nt$1=(ne,oe)=>st$1(ne,[120,-120],oe),ct$1=(ne,oe)=>st$1(ne,[60,-120,180],oe),ot$1=(ne,oe)=>st$1(ne,[90,-90,180],oe),At=ne=>typeof ne=="string"?(oe=>{let ce;if(Object.keys(t$5).some(ue=>{if(o$3[ue].test(oe))return ce=ue,!0}),!ce&&~a$3.indexOf(oe)&&(ce=t$5.HEX),!ce)throw new Error(m$4);return ce})(ne):(oe=>{let ce,ue=!1;const pe=y$2(Object.keys(oe));if(n$5[pe]&&(ce=n$5[pe]),ce&&ce===t$5.RGB){const me=Object.entries(oe).some(ye=>!u$5.test(`${ye[1]}`)),ge=Object.entries(oe).some(ye=>!(h$6.test(`${ye[1]}`)||!u$5.test(`${ye[1]}`)&&!isNaN(+ye[1])&&+ye[1]<=255));me&&ge&&(ue=!0),me||(ce=t$5.HEX)}if(!ce||ue)throw new Error(b$4);return ce})(ne),ht$1={[t$5.HEX](ne){const oe=(~a$3.indexOf(ne)?i$5[ne]:ne).match(o$3.HEX),ce={R:R$2(oe[1]||oe[5]),G:R$2(oe[2]||oe[6]),B:R$2(oe[3]||oe[7])},ue=oe[4]||oe[8];return ue!==void 0&&(ce.A=R$2(ue)/255),ce},[t$5.RGB](ne){const oe=ne.match(o$3.RGB),ce=I$2(oe[1]||oe[5]),ue=I$2(oe[2]||oe[6]),pe=I$2(oe[3]||oe[7]),me=oe[4]||oe[8],ge={R:Math.min(ce,255),G:Math.min(ue,255),B:Math.min(pe,255)};return me!==void 0&&(ge.A=et$2(me)),ge},[t$5.HSL](ne){const oe=ne.match(o$3.HSL),ce=O$1(oe[1]||oe[5]),ue=F$2(oe[2]||oe[6]),pe=F$2(oe[3]||oe[7]),me=oe[4]||oe[8],ge=x$2(ce,ue,pe);return me!==void 0&&(ge.A=et$2(me)),ge},[t$5.CIELab](ne){const oe=ne.match(o$3.CIELab),ce=F$2(oe[1]),ue=G$2(oe[2]),pe=G$2(oe[3]),me=oe[4],ge=P$1(ce,ue,pe);return me!==void 0&&(ge.A=et$2(me)),ge},[t$5.CMYK](ne){const oe=ne.match(o$3.CMYK),ce=M$3(oe[1]||oe[6]),ue=M$3(oe[2]||oe[7]),pe=M$3(oe[3]||oe[8]),me=M$3(oe[4]||oe[9]),ge=oe[5]||oe[10],ye=q$5(ce,ue,pe,me);return ge!==void 0&&(ye.A=et$2(ge)),ye}},ut$1={[t$5.HEX](ne){const oe={R:I$2(`${ne.R}`),G:I$2(`${ne.G}`),B:I$2(`${ne.B}`)};return p$5(ne,"A")&&(oe.A=Math.min(I$2(`${ne.A}`,!0),1)),oe},[t$5.RGB](ne){return this.HEX(ne)},[t$5.HSL](ne){const oe=F$2(`${ne.S}`),ce=F$2(`${ne.L}`),ue=x$2(O$1(ne.H),oe,ce);return p$5(ne,"A")&&(ue.A=et$2(ne.A)),ue},[t$5.CIELab](ne){const oe=F$2(`${ne.L}`),ce=G$2(`${ne.a}`),ue=G$2(`${ne.b}`),pe=P$1(oe,ce,ue);return p$5(ne,"A")&&(pe.A=et$2(ne.A)),pe},[t$5.CMYK](ne){const oe=M$3(`${ne.C}`),ce=M$3(`${ne.M}`),ue=M$3(`${ne.Y}`),pe=M$3(`${ne.K}`),me=q$5(oe,ce,ue,pe);return p$5(ne,"A")&&(me.A=et$2(ne.A)),me}},dt$1=(ne,oe=At(ne))=>typeof ne=="string"?ht$1[oe](ne):ut$1[oe](ne),lt={[t$5.HEX]:ne=>({R:S$3(ne.R),G:S$3(ne.G),B:S$3(ne.B)}),HEXA(ne){const oe=lt.HEX(ne);return oe.A=p$5(ne,"A")?S$3(255*ne.A):"0xFF",oe},[t$5.RGB](ne,oe){const ce=Ct(ne,oe);return p$5(ce,"A")&&delete ce.A,ce},RGBA(ne,oe){const ce=lt.RGB(ne,oe);return ce.A=p$5(ne,"A")?D$3(ne.A):1,ce},[t$5.HSL](ne,oe){const ce=v$5(ne.R,ne.G,ne.B);return delete ce.A,Lt(ce,oe)},HSLA(ne,oe){const ce=lt.HSL(ne,oe);return ce.A=p$5(ne,"A")?D$3(ne.A,oe):1,ce},[t$5.CIELab](ne,oe){const ce=V$2(ne.R,ne.G,ne.B);return gt(ce,oe)},CIELabA(ne,oe){const ce=lt.CIELab(ne,oe);return ce.A=p$5(ne,"A")?D$3(ne.A,oe):1,ce},[t$5.CMYK]:(ne,oe)=>Bt(_$3(ne.R,ne.G,ne.B),oe),CMYKA(ne,oe){const ce=lt.CMYK(ne,oe);return ce.A=p$5(ne,"A")?D$3(ne.A,oe):1,ce}},Et=(ne,oe,ce,ue)=>{const pe=At(ne),me=typeof ne=="string",ge=dt$1(ne,pe),ye=typeof ne=="string"&&p$5(ge,"A")||typeof ne!="string"&&p$5(ne,"A"),ve=v$5(ge.R,ge.G,ge.B,ge.A);ye||delete ve.A;const xe=ce?ve.L/(oe+1):(100-ve.L)/(oe+1),_e=Array(oe).fill(null).map((Se,$e)=>({...ve,L:ve.L+xe*($e+1)*(1-2*+ce)}));switch(pe){case t$5.HEX:default:return _e.map(Se=>{const $e=x$2(Se.H,Se.S,Se.L);return ye&&($e.A=Se.A),me?ye?tt$2.HEX({...$e,A:D$3(255*$e.A)}):tt$2.HEX($e):ye?lt.HEXA($e):lt.HEX($e)});case t$5.RGB:return _e.map(Se=>{const $e=x$2(Se.H,Se.S,Se.L);return ye&&($e.A=Se.A),me?tt$2.RGB($e,ue):ye?lt.RGBA($e,ue.decimals):lt.RGB($e,ue.decimals)});case t$5.HSL:return _e.map(Se=>me?tt$2.HSL(Se,ue):ye?lt.HSLA({...x$2(Se.H,Se.S,Se.L),A:Se.A},ue.decimals):lt.HSL(x$2(Se.H,Se.S,Se.L),ue.decimals));case t$5.CIELab:return _e.map(Se=>{const $e=x$2(Se.H,Se.S,Se.L);return me?tt$2.CIELab(ye?lt.CIELabA($e,ue.decimals):lt.CIELab($e,ue.decimals),ue):ye?lt.CIELabA({...$e,A:Se.A},ue.decimals):lt.CIELab($e,ue.decimals)})}},mt={buildHarmony(ne,oe,ce,ue){const pe=At(ne),me=dt$1(ne,pe),ge=v$5(me.R,me.G,me.B,me.A),ye=typeof ne=="string"&&p$5(me,"A")||typeof ne!="string"&&p$5(ne,"A"),ve=typeof ne=="string";switch(pe){case t$5.HEX:default:return ye?this.HEXA(Lt(ge,0),oe,ce,ve):this.HEX(Lt(ge,0),oe,ce,ve);case t$5.HSL:return ye?this.HSLA(ge,oe,ce,ve,ue):this.HSL(ge,oe,ce,ve,ue);case t$5.RGB:return ye?this.RGBA(ge,oe,ce,ve,ue):this.RGB(ge,oe,ce,ve,ue);case t$5.CIELab:return ye?this.CIELabA(ge,oe,ce,ve,ue):this.CIELab(ge,oe,ce,ve,ue)}},[t$5.HEX]:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$2.HEX(x$2(pe.H,pe.S,pe.L)):lt.HEX(x$2(pe.H,pe.S,pe.L))),HEXA:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$2.HEX({...x$2(pe.H,pe.S,pe.L),A:255*et$2(pe.A)}):lt.HEXA({...x$2(pe.H,pe.S,pe.L),A:et$2(pe.A)})),[t$5.RGB]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.RGB(x$2(me.H,me.S,me.L),pe):lt.RGB(x$2(me.H,me.S,me.L),pe.decimals)),RGBA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.RGB({...x$2(me.H,me.S,me.L),A:et$2(me.A)},pe):lt.RGBA({...x$2(me.H,me.S,me.L),A:et$2(me.A)},pe.decimals)),[t$5.HSL]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.HSL({H:me.H,S:me.S,L:me.L},pe):lt.HSL(x$2(me.H,me.S,me.L),pe.decimals)),HSLA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$2.HSL({...me,A:et$2(me.A)},pe):lt.HSLA({...x$2(me.H,me.S,me.L),A:et$2(me.A)},pe.decimals)),[t$5.CIELab]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$2(me.H,me.S,me.L);return ue?tt$2.CIELab(V$2(ge.R,ge.G,ge.B),pe):lt.CIELab(ge,pe.decimals)}),CIELabA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$2(me.H,me.S,me.L);return ue?tt$2.CIELab({...V$2(ge.R,ge.G,ge.B),A:et$2(me.A)},pe):lt.CIELabA({...ge,A:et$2(me.A)},pe.decimals)})},bt={mix(ne,oe){const ce=ne.map(ge=>{const ye=At(ge);return dt$1(ge,ye)}),ue=oe===s$2.SUBTRACTIVE?ce.map(ge=>{const ye=((ve,xe,_e)=>{const Se=Math.min(ve,xe,_e),$e=Math.min(255-ve,255-xe,255-_e),Re=ve-Se,Ae=xe-Se,Ie=_e-Se,ke=Math.min(Re,Ae),Be=Re-ke,Ne=(Ae+ke)/2,Fe=(Ie+Ae-ke)/2,Ue=Math.max(Be,Ne,Fe)/Math.max(Re,Ae,Ie),We=isNaN(Ue)||Ue===1/0||Ue<=0?1:Ue;return{R:Be/We+$e,Y:Ne/We+$e,B:Fe/We+$e}})(ge.R,ge.G,ge.B);return p$5(ge,"A")&&(ye.A=ge.A),ye}):null;function pe(ge){const ye=oe===s$2.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return ge.reduce((ve,xe)=>{const _e=p$5(xe,"A")?xe.A:1,Se={R:Math.min(ve.R+xe.R*_e,255),B:Math.min(ve.B+xe.B*_e,255),A:1-(1-_e)*(1-ve.A)},$e="G"in ve?ve.G:ve.Y,Re="G"in xe?xe.G:xe.Y;return{...Se,...oe===s$2.ADDITIVE?{G:Math.min($e+Re*_e,255)}:{Y:Math.min($e+Re*_e,255)}}},ye)}let me;if(oe===s$2.ADDITIVE)me=pe(ce);else{const ge=pe(ue);me=((ye,ve,xe)=>{const _e=Math.min(ye,ve,xe),Se=Math.min(255-ye,255-ve,255-xe),$e=ye-_e,Re=ve-_e,Ae=xe-_e,Ie=Math.min(Re,Ae),ke=$e+Re-Ie,Be=Re+Ie,Ne=2*(Ae-Ie),Fe=Math.max(ke,Be,Ne)/Math.max($e,Re,Ae),Ue=isNaN(Fe)||Fe===1/0||Fe<=0?1:Fe;return{R:ke/Ue+Se,G:Be/Ue+Se,B:Ne/Ue+Se}})(ge.R,ge.Y,ge.B),me.A=ge.A}return{R:D$3(me.R),G:D$3(me.G),B:D$3(me.B),A:f$4(me.A,0,1)}},[t$5.HEX](ne,oe,ce){const ue=this.mix(ne,oe);return delete ue.A,ce?tt$2.HEX(ue):lt.HEX(ue)},HEXA(ne,oe,ce){const ue=this.mix(ne,oe);return ue.A=ce?255*et$2(ue.A):et$2(ue.A),ce?tt$2.HEX(ue):lt.HEXA(ue)},[t$5.RGB](ne,oe,ce,ue){const pe=this.mix(ne,oe);return delete pe.A,ce?tt$2.RGB(pe,ue):lt.RGB(pe,ue.decimals)},RGBA(ne,oe,ce,ue){const pe=this.mix(ne,oe);return ce?tt$2.RGB(pe,ue):lt.RGBA(pe,ue.decimals)},[t$5.HSL](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$5(pe.R,pe.G,pe.B);return delete pe.A,delete me.A,ce?tt$2.HSL(me,ue):lt.HSL(pe,ue.decimals)},HSLA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$5(pe.R,pe.G,pe.B,pe.A);return ce?tt$2.HSL(me,ue):lt.HSLA(pe,ue.decimals)},[t$5.CIELab](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$2(pe.R,pe.G,pe.B);return delete pe.A,ce?tt$2.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)},CIELabA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$2(pe.R,pe.G,pe.B);return p$5(pe,"A")&&(me.A=pe.A),ce?tt$2.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)}},Ct=(ne,oe)=>({R:D$3(ne.R,oe),G:D$3(ne.G,oe),B:D$3(ne.B,oe),...p$5(ne,"A")?{A:D$3(ne.A,oe)}:{}}),Lt=(ne,oe)=>({H:D$3(ne.H,oe),S:D$3(ne.S,oe),L:D$3(ne.L,oe),...p$5(ne,"A")?{A:D$3(ne.A,oe)}:{}}),gt=(ne,oe)=>({L:D$3(ne.L,oe),a:D$3(ne.a,oe),b:D$3(ne.b,oe)}),Bt=(ne,oe)=>({C:D$3(ne.C,oe),M:D$3(ne.M,oe),Y:D$3(ne.Y,oe),K:D$3(ne.K,oe)}),pt=(ne,oe,ce,ue)=>ue(dt$1(ne,oe),ce),Ht=(ne,oe,ce,ue,pe)=>(ce<1&&(ce=5),((ge,ye,ve)=>{const xe=ve-1,_e=(ye.R-ge.R)/xe,Se=(ye.G-ge.G)/xe,$e=(ye.B-ge.B)/xe,Re=et$2(ge.A),Ae=(et$2(ye.A)-Re)/xe;return Array(ve).fill(null).map((Ie,ke)=>ke===0?ge:ke===xe?ye:{R:D$3(ge.R+_e*ke),G:D$3(ge.G+Se*ke),B:D$3(ge.B+$e*ke),A:D$3(Re+Ae*ke)})})(dt$1(ne),dt$1(oe),ce).map(ge=>pe(ge,ue))),Ft$1=(ne,oe,ce,ue)=>({[e$4.ANALOGOUS]:mt.buildHarmony(oe,it$1,ce,ue),[e$4.COMPLEMENTARY]:mt.buildHarmony(oe,at$1,ce,ue),[e$4.SPLIT_COMPLEMENTARY]:mt.buildHarmony(oe,rt$1,ce,ue),[e$4.TRIADIC]:mt.buildHarmony(oe,nt$1,ce,ue),[e$4.TETRADIC]:mt.buildHarmony(oe,ct$1,ce,ue),[e$4.SQUARE]:mt.buildHarmony(oe,ot$1,ce,ue)})[ne];class Rt{constructor(oe,ce={}){this._options=k$6(ce,oe),this.rgb=dt$1(oe),this.updateHSL(),this.updateLab(),this.updateCMYK()}updateRGB(){this.rgb={...x$2(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateRGBFromCMYK(){this.rgb={...q$5(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLab(){this.rgb={...P$1(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateHSL(){this.hsl=v$5(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLab(){this.lab={...V$2(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=_$3(this.rgb.R,this.rgb.G,this.rgb.B)}setOptions(oe={}){return this._options={...this._options,...oe},this}setH(oe){return this.hsl.H=O$1(oe),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setS(oe){return this.hsl.S=f$4(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setL(oe){return this.hsl.L=f$4(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setR(oe){this.rgb.R=f$4(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()}setG(oe){return this.rgb.G=f$4(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setB(oe){return this.rgb.B=f$4(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setCIEL(oe){return this.lab.L=f$4(oe,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEa(oe){return this.lab.a=f$4(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEb(oe){return this.lab.b=f$4(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setA(oe){return this.hsl.A=this.rgb.A=f$4(oe,0,1),this}setC(oe){return this.cmyk.C=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setM(oe){return this.cmyk.M=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setY(oe){return this.cmyk.Y=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setK(oe){return this.cmyk.K=f$4(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}get options(){return this._options}get H(){return D$3(this.hsl.H,this.options.decimals)}get S(){return D$3(this.hsl.S,this.options.decimals)}get L(){return D$3(this.hsl.L,this.options.decimals)}get CIEL(){return D$3(this.lab.L,this.options.decimals)}get CIEa(){return D$3(this.lab.a,this.options.decimals)}get CIEb(){return D$3(this.lab.b,this.options.decimals)}get R(){return D$3(this.rgb.R,this.options.decimals)}get G(){return D$3(this.rgb.G,this.options.decimals)}get B(){return D$3(this.rgb.B,this.options.decimals)}get A(){return D$3(this.hsl.A,this.options.decimals)}get C(){return D$3(this.cmyk.C,this.options.decimals)}get M(){return D$3(this.cmyk.M,this.options.decimals)}get Y(){return D$3(this.cmyk.Y,this.options.decimals)}get K(){return D$3(this.cmyk.K,this.options.decimals)}get HEXObject(){return lt.HEX(this.rgb)}get HEXAObject(){return lt.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return tt$2.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return tt$2.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})}get RGB(){return tt$2.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return tt$2.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return tt$2.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return tt$2.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get CIELab(){return tt$2.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return tt$2.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get CMYK(){return tt$2.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return tt$2.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEX)}static toHEX(oe){return tt$2.HEX(Rt.toHEXObject(oe))}static toHEXAObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEXA)}static toHEXA(oe){return tt$2.HEX(Rt.toHEXAObject(oe))}static toRGBObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGB)}static toRGB(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGB);return tt$2.RGB(me,pe)}static toRGBAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGBA)}static toRGBA(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGBA);return tt$2.RGB(me,pe)}static toHSLObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSL)}static toHSL(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSL);return tt$2.HSL(me,pe)}static toHSLAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSLA)}static toHSLA(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSLA);return tt$2.HSL(me,pe)}static toCIELabObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELab)}static toCIELab(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELab);return tt$2.CIELab(me,pe)}static toCIELabAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELabA)}static toCIELabA(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELabA);return tt$2.CIELab(me,pe)}static toCMYKObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYK)}static toCMYK(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYK);return tt$2.CMYK(me,pe)}static toCMYKAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYKA)}static toCMYKA(oe,ce={}){const ue=At(oe),pe=k$6(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYKA);return tt$2.CMYK(me,pe)}static getBlendHEXObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEX)}static getBlendHEX(oe,ce,ue=5){return Rt.getBlendHEXObject(oe,ce,ue).map(pe=>tt$2.HEX(pe))}static getBlendHEXAObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEXA)}static getBlendHEXA(oe,ce,ue=5){return Rt.getBlendHEXAObject(oe,ce,ue).map(pe=>tt$2.HEX(pe))}static getBlendRGBObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB)}static getBlendRGB(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB).map(me=>tt$2.RGB(me,k$6(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB).map(me=>tt$2.RGB(me,k$6(ue||{},oe,ce)))}static getBlendRGBAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA)}static getBlendRGBA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA).map(me=>tt$2.RGB(me,k$6(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA).map(me=>tt$2.RGB(me,k$6(ue||{},oe,ce)))}static getBlendHSLObject(oe,ce,ue,pe){return Ht(oe,ce,typeof ue=="number"?ue:5,pe==null?void 0:pe.decimals,lt.HSL)}static getBlendHSL(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSL).map(me=>tt$2.HSL(me,k$6(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSL).map(me=>tt$2.HSL(me,k$6(ue||{},oe,ce)))}static getBlendHSLAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA)}static getBlendHSLA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA).map(me=>tt$2.HSL(me,k$6(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA).map(me=>tt$2.HSL(me,k$6(ue||{},oe,ce)))}static getBlendCIELabObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab)}static getBlendCIELab(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab).map(me=>tt$2.CIELab(me,k$6(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab).map(me=>tt$2.CIELab(me,k$6(ue||{},oe,ce)))}static getBlendCIELabAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA)}static getBlendCIELabA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA).map(me=>tt$2.CIELab(me,k$6(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA).map(me=>tt$2.CIELab(me,k$6(ue||{},oe,ce)))}static getMixHEXObject(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!1)}static getMixHEX(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!0)}static getMixHEXAObject(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!1)}static getMixHEXA(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!0)}static getMixRGBObject(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!1,k$6(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!1,k$6(ce||{},...oe))}static getMixRGB(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!0,k$6(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!0,k$6(ce||{},...oe))}static getMixRGBAObject(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!1,k$6(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!1,k$6(ce||{},...oe))}static getMixRGBA(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!0,k$6(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!0,k$6(ce||{},...oe))}static getMixHSLObject(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!1,k$6(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!1,k$6(ce||{},...oe))}static getMixHSL(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!0,k$6(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!0,k$6(ce||{},...oe))}static getMixHSLAObject(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!1,k$6(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!1,k$6(ce||{},...oe))}static getMixHSLA(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!0,k$6(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!0,k$6(ce||{},...oe))}static getMixCIELabObject(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!1,k$6(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!1,k$6(ce||{},...oe))}static getMixCIELab(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!0,k$6(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!0,k$6(ce||{},...oe))}static getMixCIELabAObject(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!1,k$6(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!1,k$6(ce||{},...oe))}static getMixCIELabA(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!0,k$6(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!0,k$6(ce||{},...oe))}static getShades(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!0,k$6(ue||{},oe)):Et(oe,5,!0,k$6(ce||{},oe))}static getTints(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!1,k$6(ue||{},oe)):Et(oe,5,!1,k$6(ce||{},oe))}static getHarmony(oe,ce,ue,pe){return`${ce}`in e$4?Ft$1(ce,oe,K$2(ue)?ue:s$2.ADDITIVE,k$6(K$2(ue)?pe||{}:ue||{},oe)):K$2(ce)?Ft$1(e$4.COMPLEMENTARY,oe,ce,k$6(ue||{},oe)):Ft$1(e$4.COMPLEMENTARY,oe,s$2.ADDITIVE,k$6(ce||{},oe))}}function hash(ne){let oe=5381,ce=ne.length;for(;ce;)oe=oe*33^ne.charCodeAt(--ce);return oe>>>0}const tint="500";function hex(ne){return parseInt(ne.replace("#","0x"))}const searchEventAliases=lodashExports$1.thru({source:["source","start"],destination:["destination","goal","finish"],updating:["update","updating"],expanding:["expanding","expanding"],generating:["generate","generating","open","opening"],closing:["close","closing"],end:["finish","end"]},ne=>{const oe={};for(const[ce,ue]of lodashExports$1.entries(ne))for(const pe of ue)oe[pe]=ce;return oe}),colorsHex={source:green$1.A400,destination:red$1.A400,updating:orange$1[tint],expanding:deepPurple$1[tint],generating:amber$1[tint],closing:pink$1[tint],end:blue$1.A400};lodashExports$1.mapValues(colorsHex,hex);const shades=lodashExports$1.sortBy(lodashExports$1.keys(accentColors),ne=>new Rt(getShade(ne,"dark")).H);function getColorHex(ne="",oe){if(searchEventAliases[lodashExports$1.lowerCase(ne)])return colorsHex[ne];if(oe)return oe;{const ue=hash(lodashExports$1.lowerCase(ne)),pe=lodashExports$1.values(accentColors);return pe[ue%pe.length][tint]}}function inferLayerName(ne){var oe;return ne!=null&&ne.name?ne==null?void 0:ne.name:(oe=ne==null?void 0:ne.source)!=null&&oe.type?getController(ne).inferName(ne):"Untitled Layer"}let windowObject;typeof window<"u"?windowObject=window:typeof self<"u"?windowObject=self:windowObject=global;let cancelFrame=null,requestFrame=null;const TIMEOUT_DURATION=20,clearTimeoutFn=windowObject.clearTimeout,setTimeoutFn=windowObject.setTimeout,cancelAnimationFrameFn=windowObject.cancelAnimationFrame||windowObject.mozCancelAnimationFrame||windowObject.webkitCancelAnimationFrame,requestAnimationFrameFn=windowObject.requestAnimationFrame||windowObject.mozRequestAnimationFrame||windowObject.webkitRequestAnimationFrame;cancelAnimationFrameFn==null||requestAnimationFrameFn==null?(cancelFrame=clearTimeoutFn,requestFrame=function(oe){return setTimeoutFn(oe,TIMEOUT_DURATION)}):(cancelFrame=function([oe,ce]){cancelAnimationFrameFn(oe),clearTimeoutFn(ce)},requestFrame=function(oe){const ce=requestAnimationFrameFn(function(){clearTimeoutFn(ue),oe()}),ue=setTimeoutFn(function(){cancelAnimationFrameFn(ce),oe()},TIMEOUT_DURATION);return[ce,ue]});function createDetectElementResize(ne){let oe,ce,ue,pe,me,ge,ye;const ve=typeof document<"u"&&document.attachEvent;if(!ve){ge=function(Be){const Ne=Be.__resizeTriggers__,Fe=Ne.firstElementChild,Ue=Ne.lastElementChild,We=Fe.firstElementChild;Ue.scrollLeft=Ue.scrollWidth,Ue.scrollTop=Ue.scrollHeight,We.style.width=Fe.offsetWidth+1+"px",We.style.height=Fe.offsetHeight+1+"px",Fe.scrollLeft=Fe.scrollWidth,Fe.scrollTop=Fe.scrollHeight},me=function(Be){return Be.offsetWidth!==Be.__resizeLast__.width||Be.offsetHeight!==Be.__resizeLast__.height},ye=function(Be){if(Be.target.className&&typeof Be.target.className.indexOf=="function"&&Be.target.className.indexOf("contract-trigger")<0&&Be.target.className.indexOf("expand-trigger")<0)return;const Ne=this;ge(this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){me(Ne)&&(Ne.__resizeLast__.width=Ne.offsetWidth,Ne.__resizeLast__.height=Ne.offsetHeight,Ne.__resizeListeners__.forEach(function(We){We.call(Ne,Be)}))})};let $e=!1,Re="";ue="animationstart";const Ae="Webkit Moz O ms".split(" ");let Ie="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),ke="";{const Be=document.createElement("fakeelement");if(Be.style.animationName!==void 0&&($e=!0),$e===!1){for(let Ne=0;Ne div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',Ae=$e.head||$e.getElementsByTagName("head")[0],Ie=$e.createElement("style");Ie.id="detectElementResize",Ie.type="text/css",ne!=null&&Ie.setAttribute("nonce",ne),Ie.styleSheet?Ie.styleSheet.cssText=Re:Ie.appendChild($e.createTextNode(Re)),Ae.appendChild(Ie)}};return{addResizeListener:function($e,Re){if(ve)$e.attachEvent("onresize",Re);else{if(!$e.__resizeTriggers__){const Ae=$e.ownerDocument,Ie=windowObject.getComputedStyle($e);Ie&&Ie.position==="static"&&($e.style.position="relative"),xe(Ae),$e.__resizeLast__={},$e.__resizeListeners__=[],($e.__resizeTriggers__=Ae.createElement("div")).className="resize-triggers";const ke=Ae.createElement("div");ke.className="expand-trigger",ke.appendChild(Ae.createElement("div"));const Be=Ae.createElement("div");Be.className="contract-trigger",$e.__resizeTriggers__.appendChild(ke),$e.__resizeTriggers__.appendChild(Be),$e.appendChild($e.__resizeTriggers__),ge($e),$e.addEventListener("scroll",ye,!0),ue&&($e.__resizeTriggers__.__animationListener__=function(Fe){Fe.animationName===ce&&ge($e)},$e.__resizeTriggers__.addEventListener(ue,$e.__resizeTriggers__.__animationListener__))}$e.__resizeListeners__.push(Re)}},removeResizeListener:function($e,Re){if(ve)$e.detachEvent("onresize",Re);else if($e.__resizeListeners__.splice($e.__resizeListeners__.indexOf(Re),1),!$e.__resizeListeners__.length){$e.removeEventListener("scroll",ye,!0),$e.__resizeTriggers__.__animationListener__&&($e.__resizeTriggers__.removeEventListener(ue,$e.__resizeTriggers__.__animationListener__),$e.__resizeTriggers__.__animationListener__=null);try{$e.__resizeTriggers__=!$e.removeChild($e.__resizeTriggers__)}catch{}}}}}class AutoSizer extends reactExports.Component{constructor(...oe){super(...oe),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:ce,disableWidth:ue,onResize:pe}=this.props;if(this._parentNode){const me=window.getComputedStyle(this._parentNode)||{},ge=parseFloat(me.paddingLeft||"0"),ye=parseFloat(me.paddingRight||"0"),ve=parseFloat(me.paddingTop||"0"),xe=parseFloat(me.paddingBottom||"0"),_e=this._parentNode.getBoundingClientRect(),Se=_e.height-ve-xe,$e=_e.width-ge-ye,Re=this._parentNode.offsetHeight-ve-xe,Ae=this._parentNode.offsetWidth-ge-ye;(!ce&&(this.state.height!==Re||this.state.scaledHeight!==Se)||!ue&&(this.state.width!==Ae||this.state.scaledWidth!==$e))&&(this.setState({height:Re,width:Ae,scaledHeight:Se,scaledWidth:$e}),typeof pe=="function"&&pe({height:Re,scaledHeight:Se,scaledWidth:$e,width:Ae}))}},this._setRef=ce=>{this._autoSizer=ce}}componentDidMount(){const{nonce:oe}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=createDetectElementResize(oe),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:oe,defaultHeight:ce,defaultWidth:ue,disableHeight:pe=!1,disableWidth:me=!1,nonce:ge,onResize:ye,style:ve={},tagName:xe="div",..._e}=this.props,{height:Se,scaledHeight:$e,scaledWidth:Re,width:Ae}=this.state,Ie={overflow:"visible"},ke={};let Be=!1;return pe||(Se===0&&(Be=!0),Ie.height=0,ke.height=Se,ke.scaledHeight=$e),me||(Ae===0&&(Be=!0),Ie.width=0,ke.width=Ae,ke.scaledWidth=Re),reactExports.createElement(xe,{ref:this._setRef,style:{...Ie,...ve},..._e},!Be&&oe(ke))}}const treeWorkerUrl=""+new URL("tree.worker-62add194.js",import.meta.url).href;class TreeWorkerUrl extends Worker{constructor(){super(treeWorkerUrl,{type:"module"})}}const treeAsync=usingMemoizedWorkerTask(TreeWorkerUrl);function useTree(ne){return useAsync(async()=>await treeAsync(ne),[ne])}function useTreeMemo(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree(ce)}const isDefined$1=ne=>!lodashExports$1.isUndefined(ne)&&!lodashExports$1.isNull(ne),divider$4=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1}});function useCache(ne,oe=!1){const[ce,ue]=reactExports.useState();return reactExports.useEffect(()=>{oe||ne&&ue(ne)},[ne,oe]),ce}const layoutModes={"directed-graph":{value:"directed-graph",name:"Directed Graph",description:"Show all edges",showAllEdges:!0},tree:{value:"tree",name:"Tree",description:"Show only edges between each node and their final parents",showAllEdges:!1}};function GraphEvents({onSelection:ne,layer:oe}){const ce=v$6(),ue=y$3();return reactExports.useEffect(()=>{ue({clickNode:pe=>{ne==null||ne({event:pe.event.original,node:pe.node})},enterNode:()=>{document.body.style.cursor="pointer"},leaveNode:()=>{document.body.style.cursor=""}})},[oe,ue,ce]),null}const SEVEN_CLASS_GNBU=["#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"];function TreeGraph({trace:ne,tree:oe,step:ce=0,layer:ue,showAllEdges:pe,trackedProperty:me}){const ge=v$6(),[ye,ve]=reactExports.useState("vertical"),xe=usePaper(),_e=useAcrylic(),Se=useTheme$1(),$e=interpolate$1([Se.palette.background.paper,Se.palette.text.primary]),Re=_$4(),Ae=reactExports.useMemo(()=>getFinalParents(ne),[ne]),Ie=reactExports.useMemo(()=>{const ke=ye==="vertical",Be=new MultiDirectedGraph;lodashExports$1.forEach(oe,Fe=>{Be.addNode(Fe.label,{x:ke?Fe.x:-Fe.y,y:ke?Fe.y:-Fe.x,label:Fe.label,size:Math.log(Fe.size)+2,color:Se.palette.action.disabledBackground})});const Ne={};return lodashExports$1.forEach(ne==null?void 0:ne.events,({id:Fe,pId:Ue})=>{Fe&&Ue&&(Ne[Fe]=Ne[Fe]??new Set,Ne[Fe].add(Ue))}),lodashExports$1.forEach(ne==null?void 0:ne.events,({id:Fe,pId:Ue})=>{if(isDefined$1(Ue)&&Be.hasNode(`${Ue}`)){const We=makeEdgeKey(Fe,Ue);!Be.hasEdge(We)&&Be.hasNode(`${Fe}`)&&Be.addDirectedEdgeWithKey(We,`${Ue}`,`${Fe}`,{label:"",color:"white",size:2,final:Ae[Fe]===Ue}),Be.hasDirectedEdge(We)&&Be.updateEdgeAttribute(We,"size",qe=>Math.log(Math.E**(qe-.5)+.5)+.5)}}),Be},[Re,ne,oe,Ae,ye]);return reactExports.useEffect(()=>{const ke=memoizee$1(We=>interpolate$1([Se.palette.background.paper,We])),Be=400,Ne=$e(.1);Ie.forEachNode(We=>{Ie.setNodeAttribute(We,"color",Ne),Ie.setNodeAttribute(We,"forceLabel",!1),Ie.setNodeAttribute(We,"label",lodashExports$1.truncate(We,{length:15}))}),Ie.forEachEdge(We=>{const qe=Ie.getEdgeAttribute(We,"final");Ie.setEdgeAttribute(We,"color",Ne),Ie.setEdgeAttribute(We,"hidden",!pe&&!qe),Ie.setEdgeAttribute(We,"forceLabel",!1),Ie.setEdgeAttribute(We,"label","")});const Fe={},Ue={};if((pe?lodashExports$1.forEach:lodashExports$1.forEachRight)(lodashExports$1.slice(ne==null?void 0:ne.events,0,ce+1),({id:We,type:qe,pId:ze},Ge)=>{const Ze=getColorHex(qe),Dt=ke(Ze)(lodashExports$1.max([1-(ce-Ge)/Be,.2]));if(Ie.hasNode(`${We}`)&&!Fe[We]){Ie.setNodeAttribute(`${We}`,"color",Dt),Ie.setNodeAttribute(`${We}`,"label",lodashExports$1.truncate(`${lodashExports$1.startCase(qe)} ${We}`,{length:15})),Ie.setNodeAttribute(`${We}`,"forceLabel",ce===Ge);const Je=makeEdgeKey(We,ze);isDefined$1(ze)&&Ie.hasNode(`${ze}`)&&Ie.hasEdge(Je)&&!Ue[Je]&&(Ie.setEdgeAttribute(Je,"forceLabel",ce===Ge),Ie.setEdgeAttribute(Je,"color",Dt),Ie.setEdgeAttribute(Je,"label",`Step ${Ge}`),Ie.setEdgeAttribute(Je,"hidden",!1),pe||(Ue[Je]=!0)),pe||(Fe[We]=!0)}}),me){const We=lodashExports$1.min(lodashExports$1.map(ne==null?void 0:ne.events,Ze=>lodashExports$1.get(Ze,me))),qe=lodashExports$1.max(lodashExports$1.map(ne==null?void 0:ne.events,Ze=>lodashExports$1.get(Ze,me))),ze=Ze=>isNaN(We)||isNaN(qe)||isNaN(Ze)?0:(Ze-We)/(qe-We),Ge=interpolate$1(SEVEN_CLASS_GNBU);lodashExports$1.forEach(lodashExports$1.slice(ne==null?void 0:ne.events,0,ce+1),Ze=>{if(Ie.hasNode(`${Ze.id}`)){const Dt=Ge(ze(lodashExports$1.get(Ze,me)));if(Ie.setNodeAttribute(`${Ze.id}`,"color",Dt),isDefined$1(Ze.pId)){const Je=makeEdgeKey(`${Ze.id}`,`${Ze.pId}`);Ie.hasDirectedEdge(Je)&&Ie.setEdgeAttribute(Je,"color",Dt)}}})}Re(Ie)},[Ie,ce,ne,pe,me,Se]),jsxRuntimeExports.jsx(Stack$1,{sx:{pt:6,position:"absolute",top:0,left:0},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{...xe(1),..._e,alignItems:"center",height:ke=>ke.spacing(6),px:1,m:1},children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{var ke,Be,Ne;(Ne=(Be=(ke=ge==null?void 0:ge.getCamera)==null?void 0:ke.call(ge))==null?void 0:Be.animatedReset)==null||Ne.call(Be)},label:"Fit",icon:jsxRuntimeExports.jsx(CenterFocusWeakOutlined,{})}),divider$4,jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{ve(ye==="vertical"?"horizontal":"vertical")},label:"Rotate",icon:jsxRuntimeExports.jsx(RotateIcon,{})}),divider$4,jsxRuntimeExports.jsx(MinimisedPlaybackControls,{layer:ue})]})})}function makeEdgeKey(ne,oe){return`${ne}::${oe}`}const stepsLayerGuard$2=ne=>!!getController(ne).steps;function TreePage({template:ne}){var Je,Ut,jt,Ke,an,Zt;const{key:oe,setKey:ce,layer:ue,layers:pe,allLayers:me}=useLayer(void 0,stepsLayerGuard$2),ge=useTheme$1(),{controls:ye,onChange:ve,state:xe,dragHandle:_e}=useViewTreeContext(),Se=useThrottle$1(((Je=ue==null?void 0:ue.source)==null?void 0:Je.step)??0,1e3/24),{stepTo:$e}=usePlaybackState(oe),Re=reactExports.useMemo(()=>{var en,Kt,Wt;return lodashExports$1.chain((Wt=(Kt=(en=ue==null?void 0:ue.source)==null?void 0:en.trace)==null?void 0:Kt.content)==null?void 0:Wt.events).flatMap(lodashExports$1.keys).uniq().filter(un=>un!=="type").value()},[(Ke=(jt=(Ut=ue==null?void 0:ue.source)==null?void 0:Ut.trace)==null?void 0:jt.content)==null?void 0:Ke.events]),[Ae,Ie]=reactExports.useState(""),ke=(Zt=(an=ue==null?void 0:ue.source)==null?void 0:an.trace)==null?void 0:Zt.content;reactExports.useEffect(()=>{Ie("")},[ke,Ie]);const[Be,Ne]=reactExports.useState(),[Fe,Ue]=reactExports.useState(!1),[We,qe]=reactExports.useState("tree"),ze=reactExports.useMemo(()=>{const en=lodashExports$1.filter(lodashExports$1.map(ke==null?void 0:ke.events,(Kt,Wt)=>({event:Kt,step:Wt})),Kt=>`${Kt.event.id}`===(Be==null?void 0:Be.node));return{events:en,current:lodashExports$1.findLast(en,Kt=>Kt.step<=Se)}},[Be,Se]),{result:Ge,loading:Ze}=useTreeMemo({trace:ke,mode:We},[oe,We]),Dt=reactExports.useMemo(()=>({stagePadding:8*8,allowInvalidContainer:!0,edgeLabelColor:{color:ge.palette.text.secondary},labelFont:"Inter",labelSize:14,labelDensity:.1,renderEdgeLabels:!0,edgeLabelFont:"Inter",edgeLabelSize:12,defaultDrawNodeHover:()=>{},labelColor:{color:ge.palette.text.primary},edgeLabelWeight:"500",defaultEdgeType:"arrow",edgeProgramClasses:{straight:EdgeArrowProgram$1,curvedArrow:EdgeCurvedArrowProgram}}),[ge]);return jsxRuntimeExports.jsxs(ne,{onChange:ve,stack:xe,children:[jsxRuntimeExports.jsx(ne.Key,{children:"tree"}),jsxRuntimeExports.jsx(ne.Title,{children:"Tree"}),jsxRuntimeExports.jsx(ne.Handle,{children:_e}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:ke?Ze?jsxRuntimeExports.jsxs(Flex,{sx:{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(CircularProgress$1,{}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",sx:{px:8,maxWidth:480},children:"Generating layout"})]}):Ge!=null&&Ge.length?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AutoSizer,{children:en=>jsxRuntimeExports.jsxs(k$7,{style:{...en,background:ge.palette.background.paper},graph:MultiDirectedGraph,settings:Dt,children:[jsxRuntimeExports.jsx(TreeGraph,{step:Se,tree:Ge,trace:ke,layer:ue,showAllEdges:layoutModes[We].showAllEdges,trackedProperty:Ae}),jsxRuntimeExports.jsx(GraphEvents,{layer:oe,onSelection:Kt=>{Ne(Kt),Ue(!0)}})]})}),jsxRuntimeExports.jsx(Menu$1,{onClose:()=>Ue(!1),anchorReference:"anchorPosition",anchorPosition:{left:(Be==null?void 0:Be.event.clientX)??0,top:(Be==null?void 0:Be.event.clientY)??0},transformOrigin:{horizontal:"left",vertical:"top"},open:Fe,children:jsxRuntimeExports.jsxs(MenuList$1,{dense:!0,sx:{p:0},children:[!!ze.current&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItem$1,{sx:{py:0},children:jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",variant:"overline",children:["Step ",ze.current.step]})}),jsxRuntimeExports.jsx(Box$1,{px:2,py:1,children:jsxRuntimeExports.jsx(PropertyList,{event:ze.current.event,vertical:!0,simple:!0,primitives:!0})}),jsxRuntimeExports.jsx(Divider$1,{sx:{my:1,mx:2}})]}),jsxRuntimeExports.jsx(ListItem$1,{sx:{py:0},children:jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",variant:"overline",children:["Events at ",Be==null?void 0:Be.node]})}),lodashExports$1.map(ze.events,(en,Kt,Wt)=>{var Xt;const un=((Xt=lodashExports$1.findLast(Wt,nn=>nn.step<=Se))==null?void 0:Xt.step)===en.step;return jsxRuntimeExports.jsxs(Stack$1,{direction:"row",children:[jsxRuntimeExports.jsx(MenuItem$1,{selected:un,sx:{height:32,flex:1,borderLeft:`4px solid ${getColorHex(en.event.type)}`},onClick:()=>{$e(en.step)},children:jsxRuntimeExports.jsx(Tooltip$1,{title:`Go to step ${en.step}`,children:jsxRuntimeExports.jsx(Box$1,{sx:{ml:-.5,pr:4},children:jsxRuntimeExports.jsx(Label$1,{primary:lodashExports$1.startCase(en.event.type),secondary:isDefined$1(en.event.pId)?`Step ${en.step}, from ${en.event.pId}`:`Step ${en.step}`})})})}),jsxRuntimeExports.jsx(Box$1,{sx:{flex:0},children:jsxRuntimeExports.jsx(PropertyDialog,{event:en.event,trigger:nn=>jsxRuntimeExports.jsx(MenuItem$1,{selected:un,onClick:nn,sx:{pr:0},children:jsxRuntimeExports.jsx(Tooltip$1,{title:"See all properties",children:jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(DataObjectOutlined,{})})})})})})]})})]})})]}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(TreeIcon,{}),label:"Graph",secondary:`${inferLayerName(ue)} is not a graph.`}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(TreeIcon,{}),label:"Graph",secondary:"When you load a trace that has tree-like data, you'll see it here as a decision tree."})})}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:oe,items:lodashExports$1.map(me,en=>({id:en.key,hidden:!lodashExports$1.find(pe,{key:en.key}),name:inferLayerName(en)})),onChange:ce,arrow:!0,ellipsis:12}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(ModeStandbyOutlined,{}),label:"Layout",value:We,onChange:qe,items:lodashExports$1.map(lodashExports$1.entries(layoutModes),([en,Kt])=>({id:en,...Kt})),arrow:!0}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(TimelineOutlined,{}),label:"Tracked Property",value:Ae,onChange:Ie,items:[{id:"",name:"Off"},...lodashExports$1.map(Re,en=>({id:en,name:`$.${en}`}))],arrow:!0})]}),jsxRuntimeExports.jsx(ne.Extras,{children:ye})]})}function getFinalParents(ne){const oe={};return lodashExports$1.forEach(ne==null?void 0:ne.events,({id:ce,pId:ue})=>{oe[ce]=ue}),oe}function SelectionMenu({selection:ne,onClose:oe}){const ce=useSelectionMenu(),ue=useCache(ne),{client:pe}=ne??{};return jsxRuntimeExports.jsx(Menu$1,{open:!!ne,anchorReference:"anchorPosition",anchorPosition:{top:(pe==null?void 0:pe.y)??0,left:(pe==null?void 0:pe.x)??0},onClose:oe,keepMounted:!0,children:jsxRuntimeExports.jsx(MenuList$1,{dense:!0,sx:{py:0},children:jsxRuntimeExports.jsx(ce,{event:ue,children:me=>{const ge=lodashExports$1.entries(me);return ge.length?lodashExports$1.chain(ge).sortBy(([,ye])=>ye.index).map(([,{items:ye,primary:ve}],xe)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!xe&&jsxRuntimeExports.jsx(Divider$1,{sx:{my:1,mx:2}}),ve&&jsxRuntimeExports.jsx(ListItem$1,{sx:{py:0},children:jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",variant:"overline",children:ve})}),lodashExports$1.chain(ye).entries().sortBy(([,_e])=>_e.index).map(([_e,{action:Se,icon:$e,primary:Re,secondary:Ae,extras:Ie}])=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!(Se||Re||Ae)&&(Se?jsxRuntimeExports.jsxs(MenuItem$1,{onClick:()=>{Se==null||Se(),oe==null||oe()},children:[$e&&jsxRuntimeExports.jsx(ListItemIcon$1,{children:$e}),jsxRuntimeExports.jsx(ListItemText$1,{primary:Re,sx:{mr:4}}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Ae})]},_e):jsxRuntimeExports.jsxs(ListItem$1,{children:[$e&&jsxRuntimeExports.jsx(ListItemIcon$1,{children:$e}),jsxRuntimeExports.jsx(ListItemText$1,{primary:Re,sx:{mr:4}}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Ae})]},_e)),!!Ie&&Ie]})).value()]})).value():jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ListItem$1,{children:jsxRuntimeExports.jsx(Type$2,{component:"div",children:"No info to show."})})})}})})})}const identity$1=({children:ne})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne({})});function useSelectionMenu(){const[{layers:ne}]=useLayers();return reactExports.useMemo(()=>lodashExports$1.chain(ne).reduce((oe,ce)=>{var pe;const ue=((pe=getController(ce))==null?void 0:pe.provideSelectionInfo)??identity$1;return({children:me,event:ge})=>jsxRuntimeExports.jsx(ue,{layer:ce.key,event:ge,children:ye=>jsxRuntimeExports.jsx(oe,{event:ge,children:ve=>me==null?void 0:me(lodashExports$1.merge(ye,ve))})})},identity$1).value(),[ne])}const TILE_RESOLUTION=128,tileSize=(ne=!1)=>(ne?.75:devicePixelRatio*2)*TILE_RESOLUTION,rendererOptions={tileSubdivision:2,workerCount:lodashExports$1.clamp(lodashExports$1.floor((navigator.hardwareConcurrency-1)/2),1,12),tileResolution:{width:tileSize(),height:tileSize()}},TraceRendererContext=reactExports.createContext({});function useRendererInstance(){return reactExports.useContext(TraceRendererContext)}function useRenderer(ne,{width:oe,height:ce}={}){const ue=useTheme$1(),[pe]=useRenderers(),me=reactExports.useRef(null),[ge,ye]=reactExports.useState(""),[ve,xe]=reactExports.useState();return reactExports.useEffect(()=>{if(me.current&&oe&&ce&&ne){const _e=lodashExports$1.find(pe,Se=>Se.renderer.meta.id===ne);if(_e)try{const Se=new _e.renderer.constructor;Se.setup({...rendererOptions,screenSize:{width:oe,height:ce},backgroundColor:ue.palette.background.paper,accentColor:ue.palette.primary.main}),me.current.append(Se.getView()),xe(Se),ye("");const $e=me.current;return()=>{try{$e.removeChild(Se.getView()),xe(void 0)}catch(Re){console.warn(Re)}finally{Se.destroy()}}}catch(Se){ye(`${_e.renderer.meta.name}: ${lodashExports$1.get(Se,"message")}`),xe(void 0)}}},[me.current,lodashExports$1.map,ne,pe,ue,ye,xe]),useDebounce(()=>{ve&&oe&&ce&&ve.setOptions({screenSize:{width:oe,height:ce}})},ue.transitions.duration.standard,[ve,oe,ce]),{instance:ve,ref:me,error:ge}}function TraceRendererCircularProgress(){const[{map:ne,specimen:oe}]=useLoading();return!!(ne||oe)&&jsxRuntimeExports.jsx(CircularProgress$1,{sx:{position:"absolute",top:ce=>ce.spacing(6+2),right:ce=>ce.spacing(2)}})}const VIEWPORT_PAGE_DESCRIPTION="When you create a layer, you'll see it visualised here.";function TraceRenderer({width:ne,height:oe,renderer:ce,rendererRef:ue,layers:pe}){const me=reactExports.useMemo(nanoid$1,[]),{instance:ge,error:ye,ref:ve}=useRenderer(ce,{width:ne,height:oe}),{playing:xe}=usePlaybackState(),[,_e]=useScreenshots(),[Se,$e]=reactExports.useState();reactExports.useEffect(()=>{if(ge){const Ae=(Ie,ke)=>{const Be=Ie;$e({client:{x:Be.clientX,y:Be.clientY},world:ke.world,info:{point:ke.world,components:ke.components}})};return ge.on("click",Ae),()=>void ge.off("click",Ae)}},[ge]);const Re=reactExports.useMemo(()=>({renderer:ge}),[ge]);return reactExports.useEffect(()=>ue==null?void 0:ue(ge),[ge,ue]),reactExports.useEffect(()=>{const Ae=async()=>{var Ie;return await((Ie=ge==null?void 0:ge.toDataUrl)==null?void 0:Ie.call(ge))};return _e(()=>({[me]:Ae})),()=>_e(()=>({[me]:void 0}))},[me,ge]),reactExports.useEffect(()=>{ge&&ge.setOptions({tileResolution:{width:tileSize(xe),height:tileSize(xe)}})},[ge,xe]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TraceRendererCircularProgress,{}),jsxRuntimeExports.jsx(TraceRendererContext.Provider,{value:Re,children:jsxRuntimeExports.jsx(Box$1,{sx:{width:ne,height:oe},children:pe!=null&&pe.length?jsxRuntimeExports.jsx(TrustedContent,{children:ye?jsxRuntimeExports.jsxs(Box$1,{sx:{display:"flex",flexDirection:"column",width:ne,height:oe,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[jsxRuntimeExports.jsx(DisabledIcon,{sx:{mb:2},fontSize:"large"}),ye]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Box$1,{ref:ve,children:pe.map((Ae,Ie)=>jsxRuntimeExports.jsx(RenderLayer,{index:Ie,layer:Ae},Ae.key))})})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(ViewportIcon,{}),label:"Viewport",width:ne,height:oe,secondary:VIEWPORT_PAGE_DESCRIPTION})})}),jsxRuntimeExports.jsx(SelectionMenu,{selection:Se,onClose:()=>$e(void 0)})]})}function NodeList({nodes:ne,start:oe=0,end:ce=(ne==null?void 0:ne.length)??0}){const{renderer:ue}=useRendererInstance();return reactExports.useEffect(()=>{if(ue&&(ne!=null&&ne.length))return ue.add(lodashExports$1.slice(ne,oe,ce).flat())},[ue,ne,oe,ce]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function NodeList2({nodes:ne}){const{renderer:oe}=useRendererInstance();return reactExports.useEffect(()=>{if(oe&&(ne!=null&&ne.length))return oe.add(ne)},[oe,ne]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function LazyNodeList({nodes:ne,end:oe}){const ue=lodashExports$1.floor((oe??0)/100)*100,pe=reactExports.useMemo(()=>lodashExports$1.slice(ne,0,ue),[ne,ue]),me=reactExports.useMemo(()=>lodashExports$1.slice(ne,ue,(oe??0)+1),[ne,ue,oe]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!ue&&jsxRuntimeExports.jsx(NodeList,{nodes:pe}),me.map((ge,ye)=>jsxRuntimeExports.jsx(NodeList2,{nodes:ge},ue+ye))]})}const useEffectWhen=(ne,oe,ce)=>{const ue=usePrevious$1(ce);return reactExports.useEffect(()=>{allSame(ce,ue)||ne()},[oe])};function allSame(ne,oe){return lodashExports$1.zip(ne,oe).every(([ce,ue])=>ce===ue)}const useEffectWhenAsync=(ne,oe=[],ce=[])=>{const[ue,pe]=reactExports.useState(oe),[me,ge]=reactExports.useState(ce);return reactExports.useEffect(()=>{allSame(me,ce)||(pe(oe),ge(ce))},[oe,ce,me]),useAsyncAbortable(ne,[...ue,...me])};function useConnectionResolver(){const[ne]=useConnections();return reactExports.useCallback(oe=>lodashExports$1.find(ne,oe),[ne])}function useConnection(ne){return useConnectionResolver()({url:ne})}function useMapContent(ne){const oe=useSnackbar(),ce=useLoadingState("map"),ue=useConnectionResolver(),pe=reactExports.useMemo(()=>memoizee$1(async({source:ve,id:xe}={})=>{if(ve&&xe){const _e=ue({url:ve});if(_e){oe("Fetching map...");const Se=await _e.transport().call("features/map",{id:xe});return Se==null?void 0:Se.content}}},{normalizer:JSON.stringify}),[ue,oe]),{content:me,source:ge,id:ye}=ne??{};return useAsync(()=>ce(async()=>{if(ye)return{...ne,content:me||await pe({source:ge,id:ye})}}),[pe,me,ge,ye])}const noop$7=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});function useMapOptions(ne){const{format:oe}=ne??{};return useAsync(async()=>{var ce,ue;return await((ue=(ce=getParser(oe))==null?void 0:ce.editor)==null?void 0:ue.call(ce,ne==null?void 0:ne.content))??noop$7},[oe,ne==null?void 0:ne.content])}function useParsedMap(ne,oe){const ce=useSnackbar(),ue=useTheme$1(),pe=useLoadingState("map"),{format:me,content:ge}=ne??{};return useAsync(()=>pe(async()=>{var ye,ve;if(me&&ge){ce("Processing map...");try{const xe=await((ve=(ye=getParser(me))==null?void 0:ye.parse)==null?void 0:ve.call(ye,ge,{color:ue.palette.text.primary,background:ue.palette.background.paper,...oe}))??{nodes:[]};return ce("Map loaded",`${xe.nodes.length} elements, ${xe.log.join(", ")}`),{...ne,...xe}}catch(xe){return console.error(xe),ce("Error parsing",lodashExports$1.get(xe,"message")),{error:lodashExports$1.get(xe,"message")}}}}),[me,ge,ue,oe])}const controller$2={key:"map",icon:jsxRuntimeExports.jsx(MapTwoTone,{}),inferName:ne=>{var oe;return(oe=ne==null?void 0:ne.source)!=null&&oe.map?`${ne.source.map.name} (${lodashExports$1.startCase(ne.source.map.format)})`:"Untitled Map"},error:ne=>{var oe,ce;return(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedMap)==null?void 0:ce.error},compress:ne=>lodashExports$1.pick(ne,["map","options"]),claimImportedFile:async ne=>lodashExports$1.keys(mapParsers).includes(ext$1(ne.name))?{claimed:!0,layer:async oe=>{oe("Opening map...");try{return{map:{...await readUploadedMap(ne,lodashExports$1.entries(mapParsers).map(([ue])=>({id:ue}))).read()}}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports$1.get(ce,"message")}`),{map:{key:nanoid$1(),id:custom$1().id,error:lodashExports$1.get(ce,"message"),name:lodashExports$1.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var pe,me,ge;const ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap,{result:ue}=useMapOptions(ce);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Source",content:jsxRuntimeExports.jsx(MapPicker,{value:(me=ne==null?void 0:ne.source)==null?void 0:me.map,onChange:ye=>oe(ve=>lodashExports$1.set(ve,"source.map",ye))})}),(ce==null?void 0:ce.error)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:ye=>ye.palette.error.main,sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:ce==null?void 0:ce.error})}),!!ce&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Heading,{label:"Map Options"}),ue?jsxRuntimeExports.jsx(ue,{value:(ge=ne==null?void 0:ne.source)==null?void 0:ge.options,onChange:ye=>oe(ve=>{var xe;lodashExports$1.set(ve,"source.options",ye(((xe=ve.source)==null?void 0:xe.options)??{}))})}):jsxRuntimeExports.jsx(CircularProgress$1,{sx:{mt:2}})]})]})}),renderer:({layer:ne,index:oe})=>{var pe;const{nodes:ce}=((pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap)??{},ue=reactExports.useMemo(()=>[lodashExports$1.map(ce,me=>({...me,meta:{...me.meta,sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))],[ce,oe,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode]);return jsxRuntimeExports.jsx(NodeList,{nodes:ue})},service:withProduce(({value:ne,produce:oe})=>{var me,ge;const{result:ce}=useMapContent((me=ne==null?void 0:ne.source)==null?void 0:me.map),{result:ue,loading:pe}=useParsedMap(ce,(ge=ne==null?void 0:ne.source)==null?void 0:ge.options);return useEffectWhen(()=>{pe||oe(ye=>{lodashExports$1.set(ye,"source.parsedMap",ue),lodashExports$1.set(ye,"viewKey",nanoid$1())})},[ue,oe,pe],[ue]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const{layer:ue,setLayer:pe,layers:me}=useLayer(ce),{parsedMap:ge}=(ue==null?void 0:ue.source)??{},{point:ye,node:ve}=reactExports.useMemo(()=>{var _e,Se,$e,Re;if(ge&&oe){const Ae=(Re=($e=getParser((Se=(_e=ue==null?void 0:ue.source)==null?void 0:_e.map)==null?void 0:Se.format))==null?void 0:$e.hydrate)==null?void 0:Re.call($e,ge);if(Ae){const Ie=(oe==null?void 0:oe.world)&&Ae.snap(oe.world);if(Ie){const ke=(oe==null?void 0:oe.world)&&Ae.nodeAt(Ie);return{point:Ie,node:ke}}}}return{}},[ge,oe]),xe=reactExports.useMemo(()=>({...ue&&ye&&!lodashExports$1.isUndefined(ve)&&{[ue.key]:{primary:inferLayerName(ue),items:{point:{primary:"Point",secondary:`(${lodashExports$1.round(ye.x,2)}, ${lodashExports$1.round(ye.y,2)})`}}}}}),[ye,ve,ue,me,pe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne(xe)})},getSources:ne=>{var ue,pe;const oe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.map,ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap;return oe?[{id:"map",name:`${oe.name}`,language:"txt",content:ce==null?void 0:ce.content}]:[]},onEditSource:(ne,oe,ce)=>ne};function _defineProperty$2(ne,oe,ce){return oe in ne?Object.defineProperty(ne,oe,{value:ce,enumerable:!0,configurable:!0,writable:!0}):ne[oe]=ce,ne}function ownKeys$1(ne,oe){var ce=Object.keys(ne);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ne);oe&&(ue=ue.filter(function(pe){return Object.getOwnPropertyDescriptor(ne,pe).enumerable})),ce.push.apply(ce,ue)}return ce}function _objectSpread2$1(ne){for(var oe=1;oe=0)&&(ce[pe]=ne[pe]);return ce}function _objectWithoutProperties(ne,oe){if(ne==null)return{};var ce=_objectWithoutPropertiesLoose(ne,oe),ue,pe;if(Object.getOwnPropertySymbols){var me=Object.getOwnPropertySymbols(ne);for(pe=0;pe=0)&&Object.prototype.propertyIsEnumerable.call(ne,ue)&&(ce[ue]=ne[ue])}return ce}function _slicedToArray$1(ne,oe){return _arrayWithHoles$1(ne)||_iterableToArrayLimit$1(ne,oe)||_unsupportedIterableToArray$1(ne,oe)||_nonIterableRest$1()}function _arrayWithHoles$1(ne){if(Array.isArray(ne))return ne}function _iterableToArrayLimit$1(ne,oe){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ne)))){var ce=[],ue=!0,pe=!1,me=void 0;try{for(var ge=ne[Symbol.iterator](),ye;!(ue=(ye=ge.next()).done)&&(ce.push(ye.value),!(oe&&ce.length===oe));ue=!0);}catch(ve){pe=!0,me=ve}finally{try{!ue&&ge.return!=null&&ge.return()}finally{if(pe)throw me}}return ce}}function _unsupportedIterableToArray$1(ne,oe){if(ne){if(typeof ne=="string")return _arrayLikeToArray$1(ne,oe);var ce=Object.prototype.toString.call(ne).slice(8,-1);if(ce==="Object"&&ne.constructor&&(ce=ne.constructor.name),ce==="Map"||ce==="Set")return Array.from(ne);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return _arrayLikeToArray$1(ne,oe)}}function _arrayLikeToArray$1(ne,oe){(oe==null||oe>ne.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce=ne.length?ne.apply(this,pe):function(){for(var ge=arguments.length,ye=new Array(ge),ve=0;ve1&&arguments[1]!==void 0?arguments[1]:{};validators$1.initial(ne),validators$1.handler(oe);var ce={current:ne},ue=curry$1(didStateUpdate)(ce,oe),pe=curry$1(updateState)(ce),me=curry$1(validators$1.changes)(ne),ge=curry$1(extractChanges)(ce);function ye(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(_e){return _e};return validators$1.selector(xe),xe(ce.current)}function ve(xe){compose$2(ue,pe,me,ge)(xe)}return[ye,ve]}function extractChanges(ne,oe){return isFunction$2(oe)?oe(ne.current):oe}function updateState(ne,oe){return ne.current=_objectSpread2(_objectSpread2({},ne.current),oe),oe}function didStateUpdate(ne,oe,ce){return isFunction$2(oe)?oe(ne.current):Object.keys(ce).forEach(function(ue){var pe;return(pe=oe[ue])===null||pe===void 0?void 0:pe.call(oe,ne.current[ue])}),ce}var index$2={create:create$2},config$1={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function curry(ne){return function oe(){for(var ce=this,ue=arguments.length,pe=new Array(ue),me=0;me=ne.length?ne.apply(this,pe):function(){for(var ge=arguments.length,ye=new Array(ge),ve=0;ve{ue.current=!1}:ne,oe)}var l$4=he;function D$2(){}function h$5(ne,oe,ce,ue){return De(ne,ue)||be(ne,oe,ce,ue)}function De(ne,oe){return ne.editor.getModel(te(ne,oe))}function be(ne,oe,ce,ue){return ne.editor.createModel(oe,ce,ue?te(ne,ue):void 0)}function te(ne,oe){return ne.Uri.parse(oe)}function Oe({original:ne,modified:oe,language:ce,originalLanguage:ue,modifiedLanguage:pe,originalModelPath:me,modifiedModelPath:ge,keepCurrentOriginalModel:ye=!1,keepCurrentModifiedModel:ve=!1,theme:xe="light",loading:_e="Loading...",options:Se={},height:$e="100%",width:Re="100%",className:Ae,wrapperProps:Ie={},beforeMount:ke=D$2,onMount:Be=D$2}){let[Ne,Fe]=reactExports.useState(!1),[Ue,We]=reactExports.useState(!0),qe=reactExports.useRef(null),ze=reactExports.useRef(null),Ge=reactExports.useRef(null),Ze=reactExports.useRef(Be),Dt=reactExports.useRef(ke),Je=reactExports.useRef(!1);k$5(()=>{let an=loader.init();return an.then(Zt=>(ze.current=Zt)&&We(!1)).catch(Zt=>(Zt==null?void 0:Zt.type)!=="cancelation"&&console.error("Monaco initialization: error:",Zt)),()=>qe.current?Ke():an.cancel()}),l$4(()=>{if(qe.current&&ze.current){let an=qe.current.getOriginalEditor(),Zt=h$5(ze.current,ne||"",ue||ce||"text",me||"");Zt!==an.getModel()&&an.setModel(Zt)}},[me],Ne),l$4(()=>{if(qe.current&&ze.current){let an=qe.current.getModifiedEditor(),Zt=h$5(ze.current,oe||"",pe||ce||"text",ge||"");Zt!==an.getModel()&&an.setModel(Zt)}},[ge],Ne),l$4(()=>{let an=qe.current.getModifiedEditor();an.getOption(ze.current.editor.EditorOption.readOnly)?an.setValue(oe||""):oe!==an.getValue()&&(an.executeEdits("",[{range:an.getModel().getFullModelRange(),text:oe||"",forceMoveMarkers:!0}]),an.pushUndoStop())},[oe],Ne),l$4(()=>{var an,Zt;(Zt=(an=qe.current)==null?void 0:an.getModel())==null||Zt.original.setValue(ne||"")},[ne],Ne),l$4(()=>{let{original:an,modified:Zt}=qe.current.getModel();ze.current.editor.setModelLanguage(an,ue||ce||"text"),ze.current.editor.setModelLanguage(Zt,pe||ce||"text")},[ce,ue,pe],Ne),l$4(()=>{var an;(an=ze.current)==null||an.editor.setTheme(xe)},[xe],Ne),l$4(()=>{var an;(an=qe.current)==null||an.updateOptions(Se)},[Se],Ne);let Ut=reactExports.useCallback(()=>{var en;if(!ze.current)return;Dt.current(ze.current);let an=h$5(ze.current,ne||"",ue||ce||"text",me||""),Zt=h$5(ze.current,oe||"",pe||ce||"text",ge||"");(en=qe.current)==null||en.setModel({original:an,modified:Zt})},[ce,oe,pe,ne,ue,me,ge]),jt=reactExports.useCallback(()=>{var an;!Je.current&&Ge.current&&(qe.current=ze.current.editor.createDiffEditor(Ge.current,{automaticLayout:!0,...Se}),Ut(),(an=ze.current)==null||an.editor.setTheme(xe),Fe(!0),Je.current=!0)},[Se,xe,Ut]);reactExports.useEffect(()=>{Ne&&Ze.current(qe.current,ze.current)},[Ne]),reactExports.useEffect(()=>{!Ue&&!Ne&&jt()},[Ue,Ne,jt]);function Ke(){var Zt,en,Kt,Wt;let an=(Zt=qe.current)==null?void 0:Zt.getModel();ye||((en=an==null?void 0:an.original)==null||en.dispose()),ve||((Kt=an==null?void 0:an.modified)==null||Kt.dispose()),(Wt=qe.current)==null||Wt.dispose()}return React$2.createElement(H$3,{width:Re,height:$e,isEditorReady:Ne,loading:_e,_ref:Ge,className:Ae,wrapperProps:Ie})}var ie=Oe;reactExports.memo(ie);function Pe(){let[ne,oe]=reactExports.useState(loader.__getMonacoInstance());return k$5(()=>{let ce;return ne||(ce=loader.init(),ce.then(ue=>{oe(ue)})),()=>ce==null?void 0:ce.cancel()}),ne}var Le=Pe;function He(ne){let oe=reactExports.useRef();return reactExports.useEffect(()=>{oe.current=ne},[ne]),oe.current}var se=He,_$2=new Map;function Ve({defaultValue:ne,defaultLanguage:oe,defaultPath:ce,value:ue,language:pe,path:me,theme:ge="light",line:ye,loading:ve="Loading...",options:xe={},overrideServices:_e={},saveViewState:Se=!0,keepCurrentModel:$e=!1,width:Re="100%",height:Ae="100%",className:Ie,wrapperProps:ke={},beforeMount:Be=D$2,onMount:Ne=D$2,onChange:Fe,onValidate:Ue=D$2}){let[We,qe]=reactExports.useState(!1),[ze,Ge]=reactExports.useState(!0),Ze=reactExports.useRef(null),Dt=reactExports.useRef(null),Je=reactExports.useRef(null),Ut=reactExports.useRef(Ne),jt=reactExports.useRef(Be),Ke=reactExports.useRef(),an=reactExports.useRef(ue),Zt=se(me),en=reactExports.useRef(!1),Kt=reactExports.useRef(!1);k$5(()=>{let Xt=loader.init();return Xt.then(nn=>(Ze.current=nn)&&Ge(!1)).catch(nn=>(nn==null?void 0:nn.type)!=="cancelation"&&console.error("Monaco initialization: error:",nn)),()=>Dt.current?un():Xt.cancel()}),l$4(()=>{var nn,vn,Sn,Cn;let Xt=h$5(Ze.current,ne||ue||"",oe||pe||"",me||ce||"");Xt!==((nn=Dt.current)==null?void 0:nn.getModel())&&(Se&&_$2.set(Zt,(vn=Dt.current)==null?void 0:vn.saveViewState()),(Sn=Dt.current)==null||Sn.setModel(Xt),Se&&((Cn=Dt.current)==null||Cn.restoreViewState(_$2.get(me))))},[me],We),l$4(()=>{var Xt;(Xt=Dt.current)==null||Xt.updateOptions(xe)},[xe],We),l$4(()=>{!Dt.current||ue===void 0||(Dt.current.getOption(Ze.current.editor.EditorOption.readOnly)?Dt.current.setValue(ue):ue!==Dt.current.getValue()&&(Kt.current=!0,Dt.current.executeEdits("",[{range:Dt.current.getModel().getFullModelRange(),text:ue,forceMoveMarkers:!0}]),Dt.current.pushUndoStop(),Kt.current=!1))},[ue],We),l$4(()=>{var nn,vn;let Xt=(nn=Dt.current)==null?void 0:nn.getModel();Xt&&pe&&((vn=Ze.current)==null||vn.editor.setModelLanguage(Xt,pe))},[pe],We),l$4(()=>{var Xt;ye!==void 0&&((Xt=Dt.current)==null||Xt.revealLine(ye))},[ye],We),l$4(()=>{var Xt;(Xt=Ze.current)==null||Xt.editor.setTheme(ge)},[ge],We);let Wt=reactExports.useCallback(()=>{var Xt;if(!(!Je.current||!Ze.current)&&!en.current){jt.current(Ze.current);let nn=me||ce,vn=h$5(Ze.current,ue||ne||"",oe||pe||"",nn||"");Dt.current=(Xt=Ze.current)==null?void 0:Xt.editor.create(Je.current,{model:vn,automaticLayout:!0,...xe},_e),Se&&Dt.current.restoreViewState(_$2.get(nn)),Ze.current.editor.setTheme(ge),ye!==void 0&&Dt.current.revealLine(ye),qe(!0),en.current=!0}},[ne,oe,ce,ue,pe,me,xe,_e,Se,ge,ye]);reactExports.useEffect(()=>{We&&Ut.current(Dt.current,Ze.current)},[We]),reactExports.useEffect(()=>{!ze&&!We&&Wt()},[ze,We,Wt]),an.current=ue,reactExports.useEffect(()=>{var Xt,nn;We&&Fe&&((Xt=Ke.current)==null||Xt.dispose(),Ke.current=(nn=Dt.current)==null?void 0:nn.onDidChangeModelContent(vn=>{Kt.current||Fe(Dt.current.getValue(),vn)}))},[We,Fe]),reactExports.useEffect(()=>{if(We){let Xt=Ze.current.editor.onDidChangeMarkers(nn=>{var Sn;let vn=(Sn=Dt.current.getModel())==null?void 0:Sn.uri;if(vn&&nn.find(Cn=>Cn.path===vn.path)){let Cn=Ze.current.editor.getModelMarkers({resource:vn});Ue==null||Ue(Cn)}});return()=>{Xt==null||Xt.dispose()}}return()=>{}},[We,Ue]);function un(){var Xt,nn;(Xt=Ke.current)==null||Xt.dispose(),$e?Se&&_$2.set(me,Dt.current.saveViewState()):(nn=Dt.current.getModel())==null||nn.dispose(),Dt.current.dispose()}return React$2.createElement(H$3,{width:Re,height:Ae,isEditorReady:We,loading:ve,_ref:Je,className:Ie,wrapperProps:ke})}var fe=Ve,de=reactExports.memo(fe),Ft=de;const DELAY=2500;function ScriptEditor({code:ne,onChange:oe}){const ce=useTheme$1();return useMonacoTheme(ce),jsxRuntimeExports.jsx(Flex,{height:"100%",overflow:"hidden",children:jsxRuntimeExports.jsx(AutoSizer,{children:({width:ue,height:pe})=>jsxRuntimeExports.jsx(Ft,{theme:ce.palette.mode==="dark"?"posthoc-dark":"light",width:ue,loading:jsxRuntimeExports.jsx(CircularProgress$1,{variant:"indeterminate"}),height:pe,language:"javascript",defaultValue:ne,onChange:lodashExports$1.debounce(me=>oe==null?void 0:oe(me),DELAY),options:{minimap:{enabled:!1}}})})})}function useMonacoTheme(ne){var ce;const oe=Le();(ce=oe==null?void 0:oe.editor)==null||ce.defineTheme("posthoc-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":ne.palette.background.paper}})}function ScriptViewer(ne){const oe=useTheme$1();return useMonacoTheme(oe),jsxRuntimeExports.jsx(Flex,{height:"100%",overflow:"hidden",children:jsxRuntimeExports.jsx(AutoSizer,{children:({width:ce,height:ue})=>jsxRuntimeExports.jsx(Ft,{theme:oe.palette.mode==="dark"?"posthoc-dark":"light",width:ce,loading:jsxRuntimeExports.jsx(CircularProgress$1,{variant:"indeterminate"}),height:ue,language:"javascript",...ne,options:{minimap:{enabled:!1},...ne.options}})})})}/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(ne){return typeof ne>"u"||ne===null}function isObject$3(ne){return typeof ne=="object"&&ne!==null}function toArray$1(ne){return Array.isArray(ne)?ne:isNothing(ne)?[]:[ne]}function extend$2(ne,oe){var ce,ue,pe,me;if(oe)for(me=Object.keys(oe),ce=0,ue=me.length;ce=0?"0b"+ne.toString(2):"-0b"+ne.toString(2).slice(1)},octal:function(ne){return ne>=0?"0o"+ne.toString(8):"-0o"+ne.toString(8).slice(1)},decimal:function(ne){return ne.toString(10)},hexadecimal:function(ne){return ne>=0?"0x"+ne.toString(16).toUpperCase():"-0x"+ne.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(ne){return!(ne===null||!YAML_FLOAT_PATTERN.test(ne)||ne[ne.length-1]==="_")}function constructYamlFloat(ne){var oe,ce;return oe=ne.replace(/_/g,"").toLowerCase(),ce=oe[0]==="-"?-1:1,"+-".indexOf(oe[0])>=0&&(oe=oe.slice(1)),oe===".inf"?ce===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:oe===".nan"?NaN:ce*parseFloat(oe,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(ne,oe){var ce;if(isNaN(ne))switch(oe){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===ne)switch(oe){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===ne)switch(oe){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(ne))return"-0.0";return ce=ne.toString(10),SCIENTIFIC_WITHOUT_DOT.test(ce)?ce.replace("e",".e"):ce}function isFloat(ne){return Object.prototype.toString.call(ne)==="[object Number]"&&(ne%1!==0||common.isNegativeZero(ne))}var float=new type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}),json$1=failsafe$1.extend({implicit:[_null,bool,int,float]}),core$1=json$1,YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(ne){return ne===null?!1:YAML_DATE_REGEXP.exec(ne)!==null||YAML_TIMESTAMP_REGEXP.exec(ne)!==null}function constructYamlTimestamp(ne){var oe,ce,ue,pe,me,ge,ye,ve=0,xe=null,_e,Se,$e;if(oe=YAML_DATE_REGEXP.exec(ne),oe===null&&(oe=YAML_TIMESTAMP_REGEXP.exec(ne)),oe===null)throw new Error("Date resolve error");if(ce=+oe[1],ue=+oe[2]-1,pe=+oe[3],!oe[4])return new Date(Date.UTC(ce,ue,pe));if(me=+oe[4],ge=+oe[5],ye=+oe[6],oe[7]){for(ve=oe[7].slice(0,3);ve.length<3;)ve+="0";ve=+ve}return oe[9]&&(_e=+oe[10],Se=+(oe[11]||0),xe=(_e*60+Se)*6e4,oe[9]==="-"&&(xe=-xe)),$e=new Date(Date.UTC(ce,ue,pe,me,ge,ye,ve)),xe&&$e.setTime($e.getTime()-xe),$e}function representYamlTimestamp(ne){return ne.toISOString()}var timestamp$1=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(ne){return ne==="<<"||ne===null}var merge$2=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function resolveYamlBinary(ne){if(ne===null)return!1;var oe,ce,ue=0,pe=ne.length,me=BASE64_MAP;for(ce=0;ce64)){if(oe<0)return!1;ue+=6}return ue%8===0}function constructYamlBinary(ne){var oe,ce,ue=ne.replace(/[\r\n=]/g,""),pe=ue.length,me=BASE64_MAP,ge=0,ye=[];for(oe=0;oe>16&255),ye.push(ge>>8&255),ye.push(ge&255)),ge=ge<<6|me.indexOf(ue.charAt(oe));return ce=pe%4*6,ce===0?(ye.push(ge>>16&255),ye.push(ge>>8&255),ye.push(ge&255)):ce===18?(ye.push(ge>>10&255),ye.push(ge>>2&255)):ce===12&&ye.push(ge>>4&255),new Uint8Array(ye)}function representYamlBinary(ne){var oe="",ce=0,ue,pe,me=ne.length,ge=BASE64_MAP;for(ue=0;ue>18&63],oe+=ge[ce>>12&63],oe+=ge[ce>>6&63],oe+=ge[ce&63]),ce=(ce<<8)+ne[ue];return pe=me%3,pe===0?(oe+=ge[ce>>18&63],oe+=ge[ce>>12&63],oe+=ge[ce>>6&63],oe+=ge[ce&63]):pe===2?(oe+=ge[ce>>10&63],oe+=ge[ce>>4&63],oe+=ge[ce<<2&63],oe+=ge[64]):pe===1&&(oe+=ge[ce>>2&63],oe+=ge[ce<<4&63],oe+=ge[64],oe+=ge[64]),oe}function isBinary$1(ne){return Object.prototype.toString.call(ne)==="[object Uint8Array]"}var binary$1=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary$1,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(ne){if(ne===null)return!0;var oe=[],ce,ue,pe,me,ge,ye=ne;for(ce=0,ue=ye.length;ce64)){if(oe<0)return!1;ue+=6}return ue%8===0}function constructYamlBinary(ne){var oe,ce,ue=ne.replace(/[\r\n=]/g,""),pe=ue.length,me=BASE64_MAP,ge=0,ye=[];for(oe=0;oe>16&255),ye.push(ge>>8&255),ye.push(ge&255)),ge=ge<<6|me.indexOf(ue.charAt(oe));return ce=pe%4*6,ce===0?(ye.push(ge>>16&255),ye.push(ge>>8&255),ye.push(ge&255)):ce===18?(ye.push(ge>>10&255),ye.push(ge>>2&255)):ce===12&&ye.push(ge>>4&255),new Uint8Array(ye)}function representYamlBinary(ne){var oe="",ce=0,ue,pe,me=ne.length,ge=BASE64_MAP;for(ue=0;ue>18&63],oe+=ge[ce>>12&63],oe+=ge[ce>>6&63],oe+=ge[ce&63]),ce=(ce<<8)+ne[ue];return pe=me%3,pe===0?(oe+=ge[ce>>18&63],oe+=ge[ce>>12&63],oe+=ge[ce>>6&63],oe+=ge[ce&63]):pe===2?(oe+=ge[ce>>10&63],oe+=ge[ce>>4&63],oe+=ge[ce<<2&63],oe+=ge[64]):pe===1&&(oe+=ge[ce>>2&63],oe+=ge[ce<<4&63],oe+=ge[64],oe+=ge[64]),oe}function isBinary$1(ne){return Object.prototype.toString.call(ne)==="[object Uint8Array]"}var binary$1=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary$1,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(ne){if(ne===null)return!0;var oe=[],ce,ue,pe,me,ge,ye=ne;for(ce=0,ue=ye.length;ceoe(new Proxy(normalize$1(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace$1=/^\$\{\{\s*/,closeBrace$1=/^\s*\}\}/,neverMatch$1=/\b\B/,parser$2=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace$1,VARIABLE_END:closeBrace$1,PIPE_START:neverMatch$1,PIPE_PARAMETER_START:neverMatch$1,QUOTED_STRING:neverMatch$1}),parseString$1=memoizee$1(ne=>{const oe=parser$2(ne);return lodashExports$1.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken$1(ue)(ce)):parseToken$1(oe.variables[0].name)},{primitive:!0});function parseProperty$1(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports$1.map(ne,parseProperty$1);return ce=>lodashExports$1.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports$1.mapValues(ne,parseProperty$1);return ce=>lodashExports$1.mapValues(oe,ue=>ue(ce))}case String:return parseString$1(ne);default:return()=>ne}}function commonjsRequire(ne){throw new Error('Could not dynamically require "'+ne+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pluralize$1={exports:{}};(function(ne,oe){(function(ce,ue){typeof commonjsRequire=="function"?ne.exports=ue():ce.pluralize=ue()})(commonjsGlobal,function(){var ce=[],ue=[],pe={},me={},ge={};function ye(Ie){return typeof Ie=="string"?new RegExp("^"+Ie+"$","i"):Ie}function ve(Ie,ke){return Ie===ke?ke:Ie===Ie.toLowerCase()?ke.toLowerCase():Ie===Ie.toUpperCase()?ke.toUpperCase():Ie[0]===Ie[0].toUpperCase()?ke.charAt(0).toUpperCase()+ke.substr(1).toLowerCase():ke.toLowerCase()}function xe(Ie,ke){return Ie.replace(/\$(\d{1,2})/g,function(Be,Ne){return ke[Ne]||""})}function _e(Ie,ke){return Ie.replace(ke[0],function(Be,Ne){var Fe=xe(ke[1],arguments);return ve(Be===""?Ie[Ne-1]:Be,Fe)})}function Se(Ie,ke,Be){if(!Ie.length||pe.hasOwnProperty(Ie))return ke;for(var Ne=Be.length;Ne--;){var Fe=Be[Ne];if(Fe[0].test(ke))return _e(ke,Fe)}return ke}function $e(Ie,ke,Be){return function(Ne){var Fe=Ne.toLowerCase();return ke.hasOwnProperty(Fe)?ve(Ne,Fe):Ie.hasOwnProperty(Fe)?ve(Ne,Ie[Fe]):Se(Fe,Ne,Be)}}function Re(Ie,ke,Be,Ne){return function(Fe){var Ue=Fe.toLowerCase();return ke.hasOwnProperty(Ue)?!0:Ie.hasOwnProperty(Ue)?!1:Se(Ue,Ue,Be)===Ue}}function Ae(Ie,ke,Be){var Ne=ke===1?Ae.singular(Ie):Ae.plural(Ie);return(Be?ke+" ":"")+Ne}return Ae.plural=$e(ge,me,ce),Ae.isPlural=Re(ge,me,ce),Ae.singular=$e(me,ge,ue),Ae.isSingular=Re(me,ge,ue),Ae.addPluralRule=function(Ie,ke){ce.push([ye(Ie),ke])},Ae.addSingularRule=function(Ie,ke){ue.push([ye(Ie),ke])},Ae.addUncountableRule=function(Ie){if(typeof Ie=="string"){pe[Ie.toLowerCase()]=!0;return}Ae.addPluralRule(Ie,"$0"),Ae.addSingularRule(Ie,"$0")},Ae.addIrregularRule=function(Ie,ke){ke=ke.toLowerCase(),Ie=Ie.toLowerCase(),ge[Ie]=ke,me[ke]=Ie},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(Ie){return Ae.addIrregularRule(Ie[0],Ie[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(Ie){return Ae.addPluralRule(Ie[0],Ie[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(Ie){return Ae.addSingularRule(Ie[0],Ie[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(Ae.addUncountableRule),Ae})})(pluralize$1);var pluralizeExports=pluralize$1.exports;const pluralize=getDefaultExportFromCjs(pluralizeExports),parseTraceWorkerLegacyUrl=""+new URL("parseTrace.worker-46466b88.js",import.meta.url).href,parseTraceWorkerUrl=""+new URL("parseTrace.worker-10cdd3eb.js",import.meta.url).href;class ParseTraceWorker extends Worker{constructor(){super(parseTraceWorkerUrl,{type:"module"})}}class ParseTraceWorkerLegacy extends Worker{constructor(){super(parseTraceWorkerLegacyUrl,{type:"module"})}}const parseTraceAsync=usingMemoizedWorkerTask(ParseTraceWorker),parseTraceLegacyAsync=usingMemoizedWorkerTask(ParseTraceWorkerLegacy);function useTraceParser(ne,oe){const ce=useSnackbar(),ue=useLoadingState("specimen");return reactExports.useMemo(()=>{if(ne.trace)return()=>ue(async()=>{var pe,me;ce("Processing trace...");try{const ge=((pe=ne.trace)==null?void 0:pe.version)==="1.4.0"?await parseTraceAsync(ne):await parseTraceLegacyAsync(ne);return ce("Trace loaded",pluralize("step",((me=ge==null?void 0:ge.stepsPersistent)==null?void 0:me.length)??0,!0)),{components:ge,content:ne.trace}}catch(ge){return console.error(ge),ce("Error parsing",lodashExports$1.get(ge,"message")),{error:lodashExports$1.get(ge,"message")}}})},oe)}function mapProperties(ne={},oe){const ce={};for(const ue of Object.keys(ne))ce[ue]=ue==="$"?ne[ue]:oe(ne[ue],ue,ne);return Object.setPrototypeOf(ce,ne)}function normalize(ne={}){return mapProperties(ne,oe=>lodashExports$1.isFunction(oe)?oe:parseProperty(oe))}const parseToken=ne=>{const oe=Function("$",`return ${ne};`);return ce=>oe(new Proxy(normalize(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace=/^\{\{\s*/,closeBrace=/^\s*\}\}/,neverMatch=/\b\B/,parser$1=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace,VARIABLE_END:closeBrace,PIPE_START:neverMatch,PIPE_PARAMETER_START:neverMatch,QUOTED_STRING:neverMatch}),parseString=memoizee$1(ne=>{const oe=parser$1(ne);return lodashExports$1.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken(ue)(ce)):parseToken(oe.variables[0].name)},{primitive:!0});function parseProperty(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports$1.map(ne,parseProperty);return ce=>lodashExports$1.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports$1.mapValues(ne,parseProperty);return ce=>lodashExports$1.mapValues(oe,ue=>ue(ce))}case String:return parseString(ne);default:return()=>ne}}function useTraceContent(ne){const oe=useSnackbar(),ce=useLoadingState("specimen"),ue=useConnectionResolver(),[{traces:pe}]=useFeatures(),me=reactExports.useMemo(()=>memoizee$1(async({source:Se,id:$e})=>{if(Se&&$e){const Re=ue({url:Se});if(Re){oe("Fetching trace...");const Ae=await Re.transport().call("features/trace",{id:$e});return console.log(Ae==null?void 0:Ae.content),Ae==null?void 0:Ae.content}}},{normalizer:JSON.stringify}),[ue,oe]),{content:ge,source:ye,id:ve,key:xe}=ne??{},{lastModified:_e}=lodashExports$1.find(pe,{id:ve,source:ye})??{};return useAsync(()=>ce(async()=>{if(ve){if(ge)return{...ne,content:ge};{const Se=await me({source:ye,id:ve,lastModified:_e});return{...ne,content:Se}}}}),[me,!!ge,xe,ye,ve,_e])}const labelScale=1.25,reuseCanvas={canvas:document.createElement("canvas")};function getTextWidth(ne,oe){const ue=(reuseCanvas.canvas||(reuseCanvas.canvas=document.createElement("canvas"))).getContext("2d");return ue.font=oe,ue.measureText(ne).width}const isNullish=ne=>ne==null;function makePathIndex(ne){const oe=[],ce={},ue={},pe=lodashExports$1.chain(ne==null?void 0:ne.events).map((ye,ve)=>({step:ve,id:ye.id,pId:ye.pId})).groupBy("id").value();lodashExports$1.forEach(ne==null?void 0:ne.events,({id:ye,pId:ve},xe)=>{!isNullish(ve)&&ce[ye]!==ve&&(oe.push({id:ye,pId:ve,step:xe,prev:lodashExports$1.last(oe)}),ce[ye]=ve),ue[xe]=lodashExports$1.last(oe)});const me=(ye,ve=(xe=>(xe=ne==null?void 0:ne.events)==null?void 0:xe.length)()??0)=>{let _e=ue[ve];for(;_e;){if(_e.id===ye)return _e.pId;_e=_e.prev}};return{getParent:me,getPath:ye=>{const ve=[ye];let xe={...(ne.events??[])[ye],step:ye};for(;xe;){const _e=me(xe.id,xe.step);if(_e){const Se=lodashExports$1.findLast(pe[_e],$e=>$e.step<=xe.step);if(Se)ve.push(Se.step),xe=Se;else break}else break}return ve}}}const controller$1={key:"trace",icon:jsxRuntimeExports.jsx(RouteTwoTone,{}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Trace"},error:ne=>{var oe,ce,ue,pe;return((ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.trace)==null?void 0:ce.error)||((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.parsedTrace)==null?void 0:pe.error)},compress:ne=>lodashExports$1.pick(ne,["trace","onion","step","code","breakpoints"]),claimImportedFile:async ne=>isTraceFormat(ne)?{claimed:!0,layer:async oe=>{oe("Opening trace...");try{return{trace:await readUploadedTrace(ne).read()}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports$1.get(ce,"message")}`),{trace:{key:nanoid$1(),id:custom$1().id,error:lodashExports$1.get(ce,"message"),name:lodashExports$1.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var ce,ue,pe,me,ge,ye,ve,xe,_e,Se,$e;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Trace",content:jsxRuntimeExports.jsx(TracePicker,{onChange:Re=>oe(Ae=>lodashExports$1.set(Ae,"source.trace",Re)),value:(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace})}),((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.trace)==null?void 0:pe.error)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:Re=>Re.palette.error.main,sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(ge=(me=ne==null?void 0:ne.source)==null?void 0:me.trace)==null?void 0:ge.error})}),((ve=(ye=ne==null?void 0:ne.source)==null?void 0:ye.parsedTrace)==null?void 0:ve.error)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:Re=>Re.palette.error.main,sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(_e=(xe=ne==null?void 0:ne.source)==null?void 0:xe.parsedTrace)==null?void 0:_e.error})}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box$1,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:($e=(Se=ne==null?void 0:ne.source)==null?void 0:Se.parsedTrace)==null?void 0:$e.content})})]})}),service:withProduce(({value:ne,produce:oe})=>{var ge;const{palette:ce}=useTheme$1(),{result:ue,loading:pe}=useTraceContent((ge=ne==null?void 0:ne.source)==null?void 0:ge.trace);reactExports.useEffect(()=>{oe(ye=>{var ve,xe;return lodashExports$1.set(ye,"source.playbackTo",((xe=(ve=ue==null?void 0:ue.content)==null?void 0:ve.events)==null?void 0:xe.length)??0)})},[ue==null?void 0:ue.key]);const me=useTraceParser({trace:ue==null?void 0:ue.content,context:{theme:{foreground:ce.text.primary,background:ce.background.paper,accent:ce.primary.main},color:{...colorsHex,...lodashExports$1.mapValues(accentColors,(ye,ve)=>getShade(ve,ce.mode,500,400))},themeAccent:ce.primary.main,themeTextPrimary:ce.text.primary,themeBackground:ce.background.paper},view:"main"},[ue==null?void 0:ue.key,ce.mode]);return useAsync$1(async()=>{if(me&&!pe){const ye=await me();oe(ve=>{lodashExports$1.set(ve,"source.parsedTrace",ye),lodashExports$1.set(ve,"viewKey",nanoid$1())})}},[pe,me]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(PlaybackService,{value:ne})})}),renderer:({layer:ne,index:oe})=>{var ve,xe,_e;const ce=(xe=(ve=ne==null?void 0:ne.source)==null?void 0:ve.parsedTrace)==null?void 0:xe.components,ue=useThrottle$1(((_e=ne==null?void 0:ne.source)==null?void 0:_e.step)??0,1e3/60),pe=use2DPath(ne,oe,ue),me=reactExports.useMemo(()=>lodashExports$1.map(ce==null?void 0:ce.stepsPersistent,Se=>lodashExports$1.map(Se,$e=>lodashExports$1.merge($e,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsPersistent,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ge=reactExports.useMemo(()=>lodashExports$1.map(ce==null?void 0:ce.stepsTransient,Se=>lodashExports$1.map(Se,$e=>lodashExports$1.merge($e,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsTransient,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ye=reactExports.useMemo(()=>[ge[ue]??[]],[ge,ue]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(LazyNodeList,{end:ue,nodes:me}),jsxRuntimeExports.jsx(NodeList,{nodes:ye}),pe]})},steps:ne=>{var oe,ce,ue;return((ue=(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedTrace)==null?void 0:ce.content)==null?void 0:ue.events)??[]},provideSelectionInfo:({layer:ne,event:oe,children:ce})=>{const{layer:ue,setLayer:pe}=useLayer(ne),me=reactExports.useMemo(()=>{var xe,_e,Se,$e,Re;const ge=((Se=(_e=(xe=ue==null?void 0:ue.source)==null?void 0:xe.parsedTrace)==null?void 0:_e.content)==null?void 0:Se.events)??[],ye=lodashExports$1.chain(($e=oe==null?void 0:oe.info)==null?void 0:$e.components).filter(Ae=>{var Ie;return((Ie=Ae.meta)==null?void 0:Ie.sourceLayer)===(ue==null?void 0:ue.key)}).map(Ae=>{var Ie;return(Ie=Ae.meta)==null?void 0:Ie.step}).filter(lodashExports$1.negate(lodashExports$1.isUndefined)).sort((Ae,Ie)=>Ae-Ie).value(),ve=lodashExports$1.chain((Re=oe==null?void 0:oe.info)==null?void 0:Re.components).filter(Ae=>{var Ie;return((Ie=Ae.meta)==null?void 0:Ie.sourceLayer)===(ue==null?void 0:ue.key)}).filter(Ae=>{var Ie;return(Ie=Ae.meta)==null?void 0:Ie.info}).value();if(ye.length&&ue){const Ae=lodashExports$1.last(ye),Ie=ge[Ae];if(Ie)return{...lodashExports$1.keyBy(lodashExports$1.map(ve,(ke,Be)=>({key:`${ue.key}.${Be}`,primary:`Selection in ${inferLayerName(ue)}`,items:{info:{index:-1,primary:jsxRuntimeExports.jsx(PropertyList,{event:ke.meta.info,vertical:!0})}}})),"key"),[ue.key]:{primary:inferLayerName(ue),items:{properties:{index:-2,primary:jsxRuntimeExports.jsx(PropertyList,{event:Ie,vertical:!0,simple:!0,primitives:!0})},propertiesDetails:{index:-1,extras:jsxRuntimeExports.jsx(PropertyDialog,{event:Ie,trigger:ke=>jsxRuntimeExports.jsxs(MenuItem$1,{onClick:ke,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(DataObjectOutlined,{})}),jsxRuntimeExports.jsx(ListItemText$1,{sx:{mr:4},children:"See properties"}),jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:["Step ",Ae]})]})})},[`${Ie}`]:{primary:`Go to step ${Ae}`,secondary:`${lodashExports$1.startCase(Ie.type)}`,action:()=>pe(produce(ue,ke=>{lodashExports$1.set(ke,"source.step",Ae)})),icon:jsxRuntimeExports.jsx(ArrowOutwardRounded,{})}}}}}return{}},[ue,oe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ce==null?void 0:ce(me)})},getSources:ne=>{var ce;const oe=(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace;return oe?[{id:"trace",name:`(Source) ${oe.name}`,language:"yaml",content:dump(oe.content,{noCompatMode:!0})}]:[]}},labelSize=.8;function use2DPath(ne,oe=0,ce=0){var ge,ye,ve;const{palette:ue}=useTheme$1(),{getPath:pe}=reactExports.useMemo(()=>{var xe,_e,Se;return((xe=ne==null?void 0:ne.source)==null?void 0:xe.playback)!=="playing"&&((Se=(_e=ne==null?void 0:ne.source)==null?void 0:_e.parsedTrace)!=null&&Se.content)?makePathIndex(ne.source.parsedTrace.content):{getParent:lodashExports$1.constant(void 0),getPath:lodashExports$1.constant([])}},[(ye=(ge=ne==null?void 0:ne.source)==null?void 0:ge.parsedTrace)==null?void 0:ye.content,(ve=ne==null?void 0:ne.source)==null?void 0:ve.playback]);return reactExports.useMemo(()=>{var Se,$e,Re,Ae,Ie,ke,Be,Ne,Fe,Ue,We,qe;const xe=interpolate$1([ue.background.paper,ue.text.primary])(.05),_e=($e=(Se=ne==null?void 0:ne.source)==null?void 0:Se.parsedTrace)==null?void 0:$e.content;if((Re=_e==null?void 0:_e.render)!=null&&Re.path||_e!=null&&_e.pivot){const ze=((Ie=(Ae=_e==null?void 0:_e.render)==null?void 0:Ae.path)==null?void 0:Ie.pivot)??(_e==null?void 0:_e.pivot)??{},Ge=(Be=(ke=_e==null?void 0:_e.render)==null?void 0:ke.path)!=null&&Be.scale?_e.render.path.scale*(1/.3):((Ne=_e==null?void 0:_e.pivot)==null?void 0:Ne.scale)??1,{x:Ze,y:Dt}=ze,Je=(_e==null?void 0:_e.version)==="1.4.0"?parseProperty$1:Zt=>en=>parseProperty(Zt)({event:en}),Ut=Ze?Je(Ze):Zt=>Zt.x,jt=Dt?Je(Dt):Zt=>Zt.y,Ke=lodashExports$1.map(pe(ce),Zt=>{var en;return(en=_e==null?void 0:_e.events)==null?void 0:en[Zt]}),an={x:Ut({x:0,y:0,...lodashExports$1.head(Ke)}),y:jt({x:0,y:0,...lodashExports$1.head(Ke)})};if(Ke.length){const Zt=`${lodashExports$1.startCase((Fe=lodashExports$1.head(Ke))==null?void 0:Fe.type)} ${(Ue=lodashExports$1.head(Ke))==null?void 0:Ue.id}`,en=getTextWidth(Zt,`${labelSize*Ge*labelScale}px Inter`),Kt=[{$:"circle",x:Ut({x:0,y:0,...lodashExports$1.last(Ke)}),y:jt({x:0,y:0,...lodashExports$1.last(Ke)}),fill:ue.primary.main,radius:.3*Ge},{$:"path",points:Ke.map(Wt=>({x:Ut({x:0,y:0,...Wt}),y:jt({x:0,y:0,...Wt})})),fill:ue.primary.main,alpha:1,lineWidth:.3*Ge},{$:"circle",...an,fill:ue.primary.main,radius:.3*Ge},{$:"rect",alpha:.85,fill:xe,x:an.x-.3*Ge*labelScale,y:an.y-2*Ge*labelScale,width:en+(.8+.5)*Ge*labelScale,height:1.4*Ge*labelScale},{$:"path",points:[{x:an.x,y:an.y},{x:an.x+(-.3-.05)*Ge*labelScale,y:an.y+(-2+1.4)*Ge*labelScale}],fill:getColorHex((We=lodashExports$1.head(Ke))==null?void 0:We.type),alpha:1,lineWidth:.1*Ge*labelScale},{$:"rect",x:an.x+(-.3-.1)*Ge*labelScale,y:an.y+-2*Ge*labelScale,fill:getColorHex((qe=lodashExports$1.head(Ke))==null?void 0:qe.type),height:1.4*Ge*labelScale,width:.1*Ge*labelScale},{$:"rect",alpha:0,fill:"rgba(255, 255, 255, 0)",x:an.x-.3*Ge*labelScale,y:an.y-2*Ge*labelScale,width:en*2,height:1*Ge*labelScale,label:Zt,"label-size":labelSize*Ge*labelScale,"label-x":(.1+.5)*Ge*labelScale,"label-y":1*Ge*labelScale,"label-color":ue.text.primary}];return jsxRuntimeExports.jsx(NodeList,{nodes:[lodashExports$1.map(Kt,Wt=>({component:Wt,meta:{source:"path",sourceLayerIndex:-99999+oe}}))]})}}return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},[ne,oe,ce,ue,pe])}const mapValuesDeep=(ne,oe)=>lodashExports$1.isArray(ne)?lodashExports$1.map(ne,ce=>mapValuesDeep(ce,oe)):lodashExports$1.isObject(ne)?lodashExports$1.mapValues(ne,ce=>mapValuesDeep(ce,oe)):oe(ne);async function findConnection(ne,oe,ce){for(const ue of ne){const pe=await ue.transport().call("features/algorithms"),me=await ue.transport().call("features/formats");if(lodashExports$1.find(pe,{id:oe})&&lodashExports$1.find(me,{id:ce}))return ue}}const maxStringPropLength=40,controller={...lodashExports$1.omit(controller$1,"claimImportedFile"),key:"query",icon:jsxRuntimeExports.jsx(RouteTwoTone,{}),compress:ne=>lodashExports$1.pick(ne,["mapLayerKey","query","start","end","algorithm","onion","step","code","breakpoints"]),editor:withProduce(({value:ne,produce:oe})=>{var xe,_e;const{algorithm:ce}=(ne==null?void 0:ne.source)??{},{layers:ue,allLayers:pe,layer:me,key:ge}=useLayer(void 0,Se=>{var $e;return(($e=Se.source)==null?void 0:$e.type)==="map"}),[{algorithms:ye}]=useFeatures(),[ve]=useConnections();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Algorithm",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(CodeOutlined,{}),label:"Algorithm",value:ce,items:ye.map(Se=>{var $e;return{...Se,description:($e=lodashExports$1.find(ve,{url:Se.source}))==null?void 0:$e.name}}),onChange:async Se=>oe($e=>lodashExports$1.set($e,"source.algorithm",Se))})}),!(ye!=null&&ye.length)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),jsxRuntimeExports.jsx(Option,{label:"Map",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:ge,items:pe.map(Se=>({id:Se.key,hidden:!lodashExports$1.find(ue,$e=>$e.key===Se.key),name:inferLayerName(Se)})),onChange:async Se=>oe($e=>lodashExports$1.set($e,"source.mapLayerKey",Se))})}),me&&jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",inferLayerName(me)]}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box$1,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:(_e=(xe=ne==null?void 0:ne.source)==null?void 0:xe.trace)==null?void 0:_e.content})})]})}),service:withProduce(({value:ne,produce:oe,onChange:ce})=>{var Ae;const ue=controller$1.service,pe=useSnackbar(),{algorithm:me,mapLayerKey:ge,start:ye,end:ve}=(ne==null?void 0:ne.source)??{},[{layers:xe}]=useLayers(),[_e]=useConnections(),[{algorithms:Se}]=useFeatures(),$e=reactExports.useMemo(()=>{if(ge&&me)return lodashExports$1.find(xe,{key:ge})},[ge,me,xe]),{result:Re}=useMapContent((Ae=$e==null?void 0:$e.source)==null?void 0:Ae.map);return useEffectWhenAsync(async Ie=>{var ke;if($e&&Re&&me){const{format:Be}=((ke=$e==null?void 0:$e.source)==null?void 0:ke.map)??{},{content:Ne}=Re??{};if(Be&&Ne){const Fe=await findConnection(_e,me,Be),Ue=lodashExports$1.find(Se,{id:me});if(Fe){pe(`Executing ${inferLayerName(ne)} using ${Fe.name}...`);const We={format:Be,instances:[{start:ye??0,end:ve??0}],mapURI:`map:${encodeURIComponent(Ne)}`,algorithm:me},qe=await Fe.transport().call("solve/pathfinding",We);Ie.aborted?pe("Canceled"):oe(ze=>{lodashExports$1.set(ze,"source.trace",{name:`${Ue==null?void 0:Ue.name}`,content:qe,key:nanoid$1(),id:nanoid$1()}),lodashExports$1.set(ze,"source.query",We)})}}}},[$e,_e,me,ye,ve,oe,pe,ne,Se],[$e,Re,_e,me,ye,ve]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ue,{value:ne,onChange:ce})})}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Query"},provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const ue=controller$1.provideSelectionInfo,{layer:pe,setLayer:me,layers:ge}=useLayer(ce),ye=reactExports.useMemo(()=>{const xe=lodashExports$1.filter(ge,{source:{type:"map"}});return lodashExports$1.filter(lodashExports$1.map(xe,_e=>{var $e,Re,Ae,Ie;const{parsedMap:Se}=(_e==null?void 0:_e.source)??{};if(Se&&oe){const ke=(Ie=(Ae=getParser((Re=($e=_e==null?void 0:_e.source)==null?void 0:$e.map)==null?void 0:Re.format))==null?void 0:Ae.hydrate)==null?void 0:Ie.call(Ae,Se);if(ke){const Be=(oe==null?void 0:oe.world)&&ke.snap(oe.world);if(Be){const Ne=(oe==null?void 0:oe.world)&&ke.nodeAt(Be);return{point:Be,node:Ne,key:_e.key,name:inferLayerName(_e)}}}}}))},[ge]),ve=reactExports.useMemo(()=>!!pe&&!!ye.length&&{[pe.key]:{primary:inferLayerName(pe),items:{...lodashExports$1.reduce(ye,(xe,_e)=>({...xe,[`${ce}-${_e==null?void 0:_e.key}-source`]:{primary:"Set as source",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,Se=>{lodashExports$1.set(Se,"source.start",_e==null?void 0:_e.node),lodashExports$1.set(Se,"source.query",void 0),lodashExports$1.set(Se,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports$1.set(Se,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(StartIcon,{sx:{transform:"scale(0.5)"}})},[`${ce}-${_e==null?void 0:_e.key}-destination`]:{primary:"Set as destination",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,Se=>{lodashExports$1.set(Se,"source.end",_e==null?void 0:_e.node),lodashExports$1.set(Se,"source.query",void 0),lodashExports$1.set(Se,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports$1.set(Se,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(DestinationIcon,{})}}),{})}}},[ye,pe,ge,me]);return jsxRuntimeExports.jsx(ue,{event:oe,layer:ce,children:xe=>ne==null?void 0:ne(lodashExports$1.merge(xe,ve))})},getSources:ne=>{const{algorithm:oe=null,start:ce=0,end:ue=0,query:pe}=(ne==null?void 0:ne.source)??{};return[{id:"params",name:"Query",language:"yaml",content:dump({algorithm:oe,instances:[{start:ce,end:ue}],mapURI:"(...)",format:"(...)",...mapValuesDeep(pe,me=>typeof me=="string"&&me.length>maxStringPropLength?`${lodashExports$1.truncate(me,{length:maxStringPropLength})} (${me.length} characters)`:me)},{noCompatMode:!0})},...controller$1.getSources(ne)]}};function getController(ne){var oe;return getControllers()[((oe=ne==null?void 0:ne.source)==null?void 0:oe.type)??""]}const getControllers=lodashExports$1.once(()=>({trace:controller$1,map:controller$2,query:controller}));function inferLayerName(ne){var oe;return ne!=null&&ne.name?ne==null?void 0:ne.name:(oe=ne==null?void 0:ne.source)!=null&&oe.type?getController(ne).inferName(ne):"Untitled Layer"}var shim$5={exports:{}},useSyncExternalStoreShim_production_min={};/** + `);return ce=>oe(new Proxy(normalize$1(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace$1=/^\$\{\{\s*/,closeBrace$1=/^\s*\}\}/,neverMatch$1=/\b\B/,parser$2=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace$1,VARIABLE_END:closeBrace$1,PIPE_START:neverMatch$1,PIPE_PARAMETER_START:neverMatch$1,QUOTED_STRING:neverMatch$1}),parseString$1=memoizee$1(ne=>{const oe=parser$2(ne);return lodashExports$1.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken$1(ue)(ce)):parseToken$1(oe.variables[0].name)},{primitive:!0});function parseProperty$1(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports$1.map(ne,parseProperty$1);return ce=>lodashExports$1.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports$1.mapValues(ne,parseProperty$1);return ce=>lodashExports$1.mapValues(oe,ue=>ue(ce))}case String:return parseString$1(ne);default:return()=>ne}}function commonjsRequire(ne){throw new Error('Could not dynamically require "'+ne+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pluralize$1={exports:{}};(function(ne,oe){(function(ce,ue){typeof commonjsRequire=="function"?ne.exports=ue():ce.pluralize=ue()})(commonjsGlobal,function(){var ce=[],ue=[],pe={},me={},ge={};function ye(Ie){return typeof Ie=="string"?new RegExp("^"+Ie+"$","i"):Ie}function ve(Ie,ke){return Ie===ke?ke:Ie===Ie.toLowerCase()?ke.toLowerCase():Ie===Ie.toUpperCase()?ke.toUpperCase():Ie[0]===Ie[0].toUpperCase()?ke.charAt(0).toUpperCase()+ke.substr(1).toLowerCase():ke.toLowerCase()}function xe(Ie,ke){return Ie.replace(/\$(\d{1,2})/g,function(Be,Ne){return ke[Ne]||""})}function _e(Ie,ke){return Ie.replace(ke[0],function(Be,Ne){var Fe=xe(ke[1],arguments);return ve(Be===""?Ie[Ne-1]:Be,Fe)})}function Se(Ie,ke,Be){if(!Ie.length||pe.hasOwnProperty(Ie))return ke;for(var Ne=Be.length;Ne--;){var Fe=Be[Ne];if(Fe[0].test(ke))return _e(ke,Fe)}return ke}function $e(Ie,ke,Be){return function(Ne){var Fe=Ne.toLowerCase();return ke.hasOwnProperty(Fe)?ve(Ne,Fe):Ie.hasOwnProperty(Fe)?ve(Ne,Ie[Fe]):Se(Fe,Ne,Be)}}function Re(Ie,ke,Be,Ne){return function(Fe){var Ue=Fe.toLowerCase();return ke.hasOwnProperty(Ue)?!0:Ie.hasOwnProperty(Ue)?!1:Se(Ue,Ue,Be)===Ue}}function Ae(Ie,ke,Be){var Ne=ke===1?Ae.singular(Ie):Ae.plural(Ie);return(Be?ke+" ":"")+Ne}return Ae.plural=$e(ge,me,ce),Ae.isPlural=Re(ge,me,ce),Ae.singular=$e(me,ge,ue),Ae.isSingular=Re(me,ge,ue),Ae.addPluralRule=function(Ie,ke){ce.push([ye(Ie),ke])},Ae.addSingularRule=function(Ie,ke){ue.push([ye(Ie),ke])},Ae.addUncountableRule=function(Ie){if(typeof Ie=="string"){pe[Ie.toLowerCase()]=!0;return}Ae.addPluralRule(Ie,"$0"),Ae.addSingularRule(Ie,"$0")},Ae.addIrregularRule=function(Ie,ke){ke=ke.toLowerCase(),Ie=Ie.toLowerCase(),ge[Ie]=ke,me[ke]=Ie},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(Ie){return Ae.addIrregularRule(Ie[0],Ie[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(Ie){return Ae.addPluralRule(Ie[0],Ie[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(Ie){return Ae.addSingularRule(Ie[0],Ie[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(Ae.addUncountableRule),Ae})})(pluralize$1);var pluralizeExports=pluralize$1.exports;const pluralize=getDefaultExportFromCjs(pluralizeExports),parseTraceWorkerLegacyUrl=""+new URL("parseTrace.worker-46466b88.js",import.meta.url).href,parseTraceWorkerUrl=""+new URL("parseTrace.worker-10cdd3eb.js",import.meta.url).href;class ParseTraceWorker extends Worker{constructor(){super(parseTraceWorkerUrl,{type:"module"})}}class ParseTraceWorkerLegacy extends Worker{constructor(){super(parseTraceWorkerLegacyUrl,{type:"module"})}}const parseTraceAsync=usingMemoizedWorkerTask(ParseTraceWorker),parseTraceLegacyAsync=usingMemoizedWorkerTask(ParseTraceWorkerLegacy);function useTraceParser(ne,oe,ce){const ue=useSnackbar(),pe=useLoadingState("specimen");return reactExports.useMemo(()=>{if(ne.trace)return oe?()=>pe(async()=>{var me,ge;ue("Processing trace...");try{const ye=((me=ne.trace)==null?void 0:me.version)==="1.4.0"?await parseTraceAsync(ne):await parseTraceLegacyAsync(ne);return ue("Trace loaded",pluralize("step",((ge=ye==null?void 0:ye.stepsPersistent)==null?void 0:ge.length)??0,!0)),{components:ye,content:ne.trace}}catch(ye){return console.error(ye),ue("Error parsing",lodashExports$1.get(ye,"message")),{error:lodashExports$1.get(ye,"message")}}}):()=>pe(async()=>{var me,ge;return ue("Trace loaded",pluralize("step",((ge=(me=ne.trace)==null?void 0:me.events)==null?void 0:ge.length)??0,!0)),{content:ne.trace,components:[]}})},ce)}function mapProperties(ne={},oe){const ce={};for(const ue of Object.keys(ne))ce[ue]=ue==="$"?ne[ue]:oe(ne[ue],ue,ne);return Object.setPrototypeOf(ce,ne)}function normalize(ne={}){return mapProperties(ne,oe=>lodashExports$1.isFunction(oe)?oe:parseProperty(oe))}const parseToken=ne=>{const oe=Function("$",`return ${ne};`);return ce=>oe(new Proxy(normalize(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace=/^\{\{\s*/,closeBrace=/^\s*\}\}/,neverMatch=/\b\B/,parser$1=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace,VARIABLE_END:closeBrace,PIPE_START:neverMatch,PIPE_PARAMETER_START:neverMatch,QUOTED_STRING:neverMatch}),parseString=memoizee$1(ne=>{const oe=parser$1(ne);return lodashExports$1.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken(ue)(ce)):parseToken(oe.variables[0].name)},{primitive:!0});function parseProperty(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports$1.map(ne,parseProperty);return ce=>lodashExports$1.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports$1.mapValues(ne,parseProperty);return ce=>lodashExports$1.mapValues(oe,ue=>ue(ce))}case String:return parseString(ne);default:return()=>ne}}function useTraceContent(ne){const oe=useSnackbar(),ce=useLoadingState("specimen"),ue=useConnectionResolver(),[{traces:pe}]=useFeatures(),me=reactExports.useMemo(()=>memoizee$1(async({source:Se,id:$e})=>{if(Se&&$e){const Re=ue({url:Se});if(Re){oe("Fetching trace...");const Ae=await Re.transport().call("features/trace",{id:$e});return console.log(Ae==null?void 0:Ae.content),Ae==null?void 0:Ae.content}}},{normalizer:JSON.stringify}),[ue,oe]),{content:ge,source:ye,id:ve,key:xe}=ne??{},{lastModified:_e}=lodashExports$1.find(pe,{id:ve,source:ye})??{};return useAsync(()=>ce(async()=>{if(ve){if(ge)return{...ne,content:ge};{const Se=await me({source:ye,id:ve,lastModified:_e});return{...ne,content:Se}}}}),[me,!!ge,xe,ye,ve,_e])}const labelScale=1.25,reuseCanvas={canvas:document.createElement("canvas")};function getTextWidth(ne,oe){const ue=(reuseCanvas.canvas||(reuseCanvas.canvas=document.createElement("canvas"))).getContext("2d");return ue.font=oe,ue.measureText(ne).width}const isNullish=ne=>ne==null;function makePathIndex(ne){const oe=[],ce={},ue={},pe=lodashExports$1.chain(ne==null?void 0:ne.events).map((ye,ve)=>({step:ve,id:ye.id,pId:ye.pId})).groupBy("id").value();lodashExports$1.forEach(ne==null?void 0:ne.events,({id:ye,pId:ve},xe)=>{!isNullish(ve)&&ce[ye]!==ve&&(oe.push({id:ye,pId:ve,step:xe,prev:lodashExports$1.last(oe)}),ce[ye]=ve),ue[xe]=lodashExports$1.last(oe)});const me=(ye,ve=(xe=>(xe=ne==null?void 0:ne.events)==null?void 0:xe.length)()??0)=>{let _e=ue[ve];for(;_e;){if(_e.id===ye)return _e.pId;_e=_e.prev}};return{getParent:me,getPath:ye=>{const ve=[ye];let xe={...(ne.events??[])[ye],step:ye};for(;xe;){const _e=me(xe.id,xe.step);if(_e){const Se=lodashExports$1.findLast(pe[_e],$e=>$e.step<=xe.step);if(Se)ve.push(Se.step),xe=Se;else break}else break}return ve}}}const controller$1={key:"trace",icon:jsxRuntimeExports.jsx(RouteTwoTone,{}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Trace"},error:ne=>{var oe,ce,ue,pe;return((ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.trace)==null?void 0:ce.error)||((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.parsedTrace)==null?void 0:pe.error)},compress:ne=>lodashExports$1.pick(ne,["trace","onion","step","code","breakpoints"]),claimImportedFile:async ne=>isTraceFormat(ne)?{claimed:!0,layer:async oe=>{oe("Opening trace...");try{return{trace:await readUploadedTrace(ne).read()}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports$1.get(ce,"message")}`),{trace:{key:nanoid$1(),id:custom$1().id,error:lodashExports$1.get(ce,"message"),name:lodashExports$1.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var ce,ue,pe,me,ge,ye,ve,xe,_e,Se,$e;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Trace",content:jsxRuntimeExports.jsx(TracePicker,{onChange:Re=>oe(Ae=>lodashExports$1.set(Ae,"source.trace",Re)),value:(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace})}),((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.trace)==null?void 0:pe.error)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:Re=>Re.palette.error.main,sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(ge=(me=ne==null?void 0:ne.source)==null?void 0:me.trace)==null?void 0:ge.error})}),((ve=(ye=ne==null?void 0:ne.source)==null?void 0:ye.parsedTrace)==null?void 0:ve.error)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:Re=>Re.palette.error.main,sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(_e=(xe=ne==null?void 0:ne.source)==null?void 0:xe.parsedTrace)==null?void 0:_e.error})}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box$1,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:($e=(Se=ne==null?void 0:ne.source)==null?void 0:Se.parsedTrace)==null?void 0:$e.content})})]})}),service:withProduce(({value:ne,produce:oe})=>{var ye;const{palette:ce}=useTheme$1(),{result:ue,loading:pe}=useTraceContent((ye=ne==null?void 0:ne.source)==null?void 0:ye.trace);reactExports.useEffect(()=>{oe(ve=>{var xe,_e;return lodashExports$1.set(ve,"source.playbackTo",((_e=(xe=ue==null?void 0:ue.content)==null?void 0:xe.events)==null?void 0:_e.length)??0)})},[ue==null?void 0:ue.key]);const{isTrusted:me}=useUntrustedLayers(),ge=useTraceParser({trace:ue==null?void 0:ue.content,context:{theme:{foreground:ce.text.primary,background:ce.background.paper,accent:ce.primary.main},color:{...colorsHex,...lodashExports$1.mapValues(accentColors,(ve,xe)=>getShade(xe,ce.mode,500,400))},themeAccent:ce.primary.main,themeTextPrimary:ce.text.primary,themeBackground:ce.background.paper},view:"main"},me,[ue==null?void 0:ue.key,ce.mode,me]);return useAsync$1(async()=>{if(ge&&!pe){const ve=await ge();oe(xe=>{lodashExports$1.set(xe,"source.parsedTrace",ve),lodashExports$1.set(xe,"viewKey",nanoid$1())})}},[pe,ge]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(PlaybackService,{value:ne})})}),renderer:({layer:ne,index:oe})=>{var ve,xe,_e;const ce=(xe=(ve=ne==null?void 0:ne.source)==null?void 0:ve.parsedTrace)==null?void 0:xe.components,ue=useThrottle$1(((_e=ne==null?void 0:ne.source)==null?void 0:_e.step)??0,1e3/60),pe=use2DPath(ne,oe,ue),me=reactExports.useMemo(()=>lodashExports$1.map(ce==null?void 0:ce.stepsPersistent,Se=>lodashExports$1.map(Se,$e=>lodashExports$1.merge($e,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsPersistent,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ge=reactExports.useMemo(()=>lodashExports$1.map(ce==null?void 0:ce.stepsTransient,Se=>lodashExports$1.map(Se,$e=>lodashExports$1.merge($e,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsTransient,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ye=reactExports.useMemo(()=>[ge[ue]??[]],[ge,ue]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(LazyNodeList,{end:ue,nodes:me}),jsxRuntimeExports.jsx(NodeList,{nodes:ye}),pe]})},steps:ne=>{var oe,ce,ue;return((ue=(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedTrace)==null?void 0:ce.content)==null?void 0:ue.events)??[]},provideSelectionInfo:({layer:ne,event:oe,children:ce})=>{const{layer:ue,setLayer:pe}=useLayer(ne),me=reactExports.useMemo(()=>{var xe,_e,Se,$e,Re;const ge=((Se=(_e=(xe=ue==null?void 0:ue.source)==null?void 0:xe.parsedTrace)==null?void 0:_e.content)==null?void 0:Se.events)??[],ye=lodashExports$1.chain(($e=oe==null?void 0:oe.info)==null?void 0:$e.components).filter(Ae=>{var Ie;return((Ie=Ae.meta)==null?void 0:Ie.sourceLayer)===(ue==null?void 0:ue.key)}).map(Ae=>{var Ie;return(Ie=Ae.meta)==null?void 0:Ie.step}).filter(lodashExports$1.negate(lodashExports$1.isUndefined)).sort((Ae,Ie)=>Ae-Ie).value(),ve=lodashExports$1.chain((Re=oe==null?void 0:oe.info)==null?void 0:Re.components).filter(Ae=>{var Ie;return((Ie=Ae.meta)==null?void 0:Ie.sourceLayer)===(ue==null?void 0:ue.key)}).filter(Ae=>{var Ie;return(Ie=Ae.meta)==null?void 0:Ie.info}).value();if(ye.length&&ue){const Ae=lodashExports$1.last(ye),Ie=ge[Ae];if(Ie)return{...lodashExports$1.keyBy(lodashExports$1.map(ve,(ke,Be)=>({key:`${ue.key}.${Be}`,primary:`Selection in ${inferLayerName(ue)}`,items:{info:{index:-1,primary:jsxRuntimeExports.jsx(PropertyList,{event:ke.meta.info,vertical:!0})}}})),"key"),[ue.key]:{primary:inferLayerName(ue),items:{properties:{index:-2,primary:jsxRuntimeExports.jsx(PropertyList,{event:Ie,vertical:!0,simple:!0,primitives:!0})},propertiesDetails:{index:-1,extras:jsxRuntimeExports.jsx(PropertyDialog,{event:Ie,trigger:ke=>jsxRuntimeExports.jsxs(MenuItem$1,{onClick:ke,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(DataObjectOutlined,{})}),jsxRuntimeExports.jsx(ListItemText$1,{sx:{mr:4},children:"See properties"}),jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:["Step ",Ae]})]})})},[`${Ie}`]:{primary:`Go to step ${Ae}`,secondary:`${lodashExports$1.startCase(Ie.type)}`,action:()=>pe(produce(ue,ke=>{lodashExports$1.set(ke,"source.step",Ae)})),icon:jsxRuntimeExports.jsx(ArrowOutwardRounded,{})}}}}}return{}},[ue,oe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ce==null?void 0:ce(me)})},getSources:ne=>{var ce;const oe=(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace;return oe?[{id:"trace",name:`${oe.name}`,language:"yaml",content:dump(oe.content,{noCompatMode:!0})}]:[]}},labelSize=.8;function use2DPath(ne,oe=0,ce=0){var ge,ye,ve;const{palette:ue}=useTheme$1(),{getPath:pe}=reactExports.useMemo(()=>{var xe,_e,Se;return((xe=ne==null?void 0:ne.source)==null?void 0:xe.playback)!=="playing"&&((Se=(_e=ne==null?void 0:ne.source)==null?void 0:_e.parsedTrace)!=null&&Se.content)?makePathIndex(ne.source.parsedTrace.content):{getParent:lodashExports$1.constant(void 0),getPath:lodashExports$1.constant([])}},[(ye=(ge=ne==null?void 0:ne.source)==null?void 0:ge.parsedTrace)==null?void 0:ye.content,(ve=ne==null?void 0:ne.source)==null?void 0:ve.playback]);return reactExports.useMemo(()=>{var Se,$e,Re,Ae,Ie,ke,Be,Ne,Fe,Ue,We,qe;const xe=interpolate$1([ue.background.paper,ue.text.primary])(.05),_e=($e=(Se=ne==null?void 0:ne.source)==null?void 0:Se.parsedTrace)==null?void 0:$e.content;if((Re=_e==null?void 0:_e.render)!=null&&Re.path||_e!=null&&_e.pivot){const ze=((Ie=(Ae=_e==null?void 0:_e.render)==null?void 0:Ae.path)==null?void 0:Ie.pivot)??(_e==null?void 0:_e.pivot)??{},Ge=(Be=(ke=_e==null?void 0:_e.render)==null?void 0:ke.path)!=null&&Be.scale?_e.render.path.scale*(1/.3):((Ne=_e==null?void 0:_e.pivot)==null?void 0:Ne.scale)??1,{x:Ze,y:Dt}=ze,Je=(_e==null?void 0:_e.version)==="1.4.0"?parseProperty$1:Zt=>en=>parseProperty(Zt)({event:en}),Ut=Ze?Je(Ze):Zt=>Zt.x,jt=Dt?Je(Dt):Zt=>Zt.y,Ke=lodashExports$1.map(pe(ce),Zt=>{var en;return(en=_e==null?void 0:_e.events)==null?void 0:en[Zt]}),an={x:Ut({x:0,y:0,...lodashExports$1.head(Ke)}),y:jt({x:0,y:0,...lodashExports$1.head(Ke)})};if(Ke.length){const Zt=`${lodashExports$1.startCase((Fe=lodashExports$1.head(Ke))==null?void 0:Fe.type)} ${(Ue=lodashExports$1.head(Ke))==null?void 0:Ue.id}`,en=getTextWidth(Zt,`${labelSize*Ge*labelScale}px Inter`),Kt=[{$:"circle",x:Ut({x:0,y:0,...lodashExports$1.last(Ke)}),y:jt({x:0,y:0,...lodashExports$1.last(Ke)}),fill:ue.primary.main,radius:.3*Ge},{$:"path",points:Ke.map(Wt=>({x:Ut({x:0,y:0,...Wt}),y:jt({x:0,y:0,...Wt})})),fill:ue.primary.main,alpha:1,lineWidth:.3*Ge},{$:"circle",...an,fill:ue.primary.main,radius:.3*Ge},{$:"rect",alpha:.85,fill:xe,x:an.x-.3*Ge*labelScale,y:an.y-2*Ge*labelScale,width:en+(.8+.5)*Ge*labelScale,height:1.4*Ge*labelScale},{$:"path",points:[{x:an.x,y:an.y},{x:an.x+(-.3-.05)*Ge*labelScale,y:an.y+(-2+1.4)*Ge*labelScale}],fill:getColorHex((We=lodashExports$1.head(Ke))==null?void 0:We.type),alpha:1,lineWidth:.1*Ge*labelScale},{$:"rect",x:an.x+(-.3-.1)*Ge*labelScale,y:an.y+-2*Ge*labelScale,fill:getColorHex((qe=lodashExports$1.head(Ke))==null?void 0:qe.type),height:1.4*Ge*labelScale,width:.1*Ge*labelScale},{$:"rect",alpha:0,fill:"rgba(255, 255, 255, 0)",x:an.x-.3*Ge*labelScale,y:an.y-2*Ge*labelScale,width:en*2,height:1*Ge*labelScale,label:Zt,"label-size":labelSize*Ge*labelScale,"label-x":(.1+.5)*Ge*labelScale,"label-y":1*Ge*labelScale,"label-color":ue.text.primary}];return jsxRuntimeExports.jsx(NodeList,{nodes:[lodashExports$1.map(Kt,Wt=>({component:Wt,meta:{source:"path",sourceLayerIndex:-99999+oe}}))]})}}return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},[ne,oe,ce,ue,pe])}const mapValuesDeep=(ne,oe)=>lodashExports$1.isArray(ne)?lodashExports$1.map(ne,ce=>mapValuesDeep(ce,oe)):lodashExports$1.isObject(ne)?lodashExports$1.mapValues(ne,ce=>mapValuesDeep(ce,oe)):oe(ne);async function findConnection(ne,oe,ce){for(const ue of ne){const pe=await ue.transport().call("features/algorithms"),me=await ue.transport().call("features/formats");if(lodashExports$1.find(pe,{id:oe})&&lodashExports$1.find(me,{id:ce}))return ue}}const maxStringPropLength=40,controller={...lodashExports$1.omit(controller$1,"claimImportedFile"),key:"query",icon:jsxRuntimeExports.jsx(RouteTwoTone,{}),compress:ne=>lodashExports$1.pick(ne,["mapLayerKey","query","start","end","algorithm","onion","step","code","breakpoints"]),editor:withProduce(({value:ne,produce:oe})=>{var xe,_e;const{algorithm:ce}=(ne==null?void 0:ne.source)??{},{layers:ue,allLayers:pe,layer:me,key:ge}=useLayer(void 0,Se=>{var $e;return(($e=Se.source)==null?void 0:$e.type)==="map"}),[{algorithms:ye}]=useFeatures(),[ve]=useConnections();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Algorithm",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(CodeOutlined,{}),label:"Algorithm",value:ce,items:ye.map(Se=>{var $e;return{...Se,description:($e=lodashExports$1.find(ve,{url:Se.source}))==null?void 0:$e.name}}),onChange:async Se=>oe($e=>lodashExports$1.set($e,"source.algorithm",Se))})}),!(ye!=null&&ye.length)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),jsxRuntimeExports.jsx(Option,{label:"Map",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:ge,items:pe.map(Se=>({id:Se.key,hidden:!lodashExports$1.find(ue,$e=>$e.key===Se.key),name:inferLayerName(Se)})),onChange:async Se=>oe($e=>lodashExports$1.set($e,"source.mapLayerKey",Se))})}),me&&jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",inferLayerName(me)]}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box$1,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:(_e=(xe=ne==null?void 0:ne.source)==null?void 0:xe.trace)==null?void 0:_e.content})})]})}),service:withProduce(({value:ne,produce:oe,onChange:ce})=>{var Ae;const ue=controller$1.service,pe=useSnackbar(),{algorithm:me,mapLayerKey:ge,start:ye,end:ve}=(ne==null?void 0:ne.source)??{},[{layers:xe}]=useLayers(),[_e]=useConnections(),[{algorithms:Se}]=useFeatures(),$e=reactExports.useMemo(()=>{if(ge&&me)return lodashExports$1.find(xe,{key:ge})},[ge,me,xe]),{result:Re}=useMapContent((Ae=$e==null?void 0:$e.source)==null?void 0:Ae.map);return useEffectWhenAsync(async Ie=>{var ke;if($e&&Re&&me){const{format:Be}=((ke=$e==null?void 0:$e.source)==null?void 0:ke.map)??{},{content:Ne}=Re??{};if(Be&&Ne){const Fe=await findConnection(_e,me,Be),Ue=lodashExports$1.find(Se,{id:me});if(Fe){pe(`Executing ${inferLayerName(ne)} using ${Fe.name}...`);const We={format:Be,instances:[{start:ye??0,end:ve??0}],mapURI:`map:${encodeURIComponent(Ne)}`,algorithm:me},qe=await Fe.transport().call("solve/pathfinding",We);Ie.aborted?pe("Canceled"):oe(ze=>{lodashExports$1.set(ze,"source.trace",{name:`${Ue==null?void 0:Ue.name}`,content:qe,key:nanoid$1(),id:nanoid$1()}),lodashExports$1.set(ze,"source.query",We)})}}}},[$e,_e,me,ye,ve,oe,pe,ne,Se],[$e,Re,_e,me,ye,ve]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ue,{value:ne,onChange:ce})})}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Query"},provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const ue=controller$1.provideSelectionInfo,{layer:pe,setLayer:me,layers:ge}=useLayer(ce),ye=reactExports.useMemo(()=>{const xe=lodashExports$1.filter(ge,{source:{type:"map"}});return lodashExports$1.filter(lodashExports$1.map(xe,_e=>{var $e,Re,Ae,Ie;const{parsedMap:Se}=(_e==null?void 0:_e.source)??{};if(Se&&oe){const ke=(Ie=(Ae=getParser((Re=($e=_e==null?void 0:_e.source)==null?void 0:$e.map)==null?void 0:Re.format))==null?void 0:Ae.hydrate)==null?void 0:Ie.call(Ae,Se);if(ke){const Be=(oe==null?void 0:oe.world)&&ke.snap(oe.world);if(Be){const Ne=(oe==null?void 0:oe.world)&&ke.nodeAt(Be);return{point:Be,node:Ne,key:_e.key,name:inferLayerName(_e)}}}}}))},[ge]),ve=reactExports.useMemo(()=>!!pe&&!!ye.length&&{[pe.key]:{primary:inferLayerName(pe),items:{...lodashExports$1.reduce(ye,(xe,_e)=>({...xe,[`${ce}-${_e==null?void 0:_e.key}-source`]:{primary:"Set as source",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,Se=>{lodashExports$1.set(Se,"source.start",_e==null?void 0:_e.node),lodashExports$1.set(Se,"source.query",void 0),lodashExports$1.set(Se,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports$1.set(Se,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(StartIcon,{sx:{transform:"scale(0.5)"}})},[`${ce}-${_e==null?void 0:_e.key}-destination`]:{primary:"Set as destination",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,Se=>{lodashExports$1.set(Se,"source.end",_e==null?void 0:_e.node),lodashExports$1.set(Se,"source.query",void 0),lodashExports$1.set(Se,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports$1.set(Se,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(DestinationIcon,{})}}),{})}}},[ye,pe,ge,me]);return jsxRuntimeExports.jsx(ue,{event:oe,layer:ce,children:xe=>ne==null?void 0:ne(lodashExports$1.merge(xe,ve))})},getSources:ne=>{const{algorithm:oe=null,start:ce=0,end:ue=0,query:pe}=(ne==null?void 0:ne.source)??{};return[{id:"params",name:"Query",language:"yaml",content:dump({algorithm:oe,instances:[{start:ce,end:ue}],mapURI:"(...)",format:"(...)",...mapValuesDeep(pe,me=>typeof me=="string"&&me.length>maxStringPropLength?`${lodashExports$1.truncate(me,{length:maxStringPropLength})} (${me.length} characters)`:me)},{noCompatMode:!0})},...controller$1.getSources(ne)]}};function getController(ne){var oe;return getControllers()[((oe=ne==null?void 0:ne.source)==null?void 0:oe.type)??""]}const getControllers=lodashExports$1.once(()=>({trace:controller$1,map:controller$2,query:controller}));var byte_size={STRING:2,BOOLEAN:4,BYTES:4,NUMBER:8,Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},buffer={},base64Js={};base64Js.byteLength=byteLength$2;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup$2=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$3=0,len=code.length;i$30)throw new Error("Invalid string. Length must be a multiple of 4");var ce=ne.indexOf("=");ce===-1&&(ce=oe);var ue=ce===oe?0:4-ce%4;return[ce,ue]}function byteLength$2(ne){var oe=getLens(ne),ce=oe[0],ue=oe[1];return(ce+ue)*3/4-ue}function _byteLength(ne,oe,ce){return(oe+ce)*3/4-ce}function toByteArray(ne){var oe,ce=getLens(ne),ue=ce[0],pe=ce[1],me=new Arr(_byteLength(ne,ue,pe)),ge=0,ye=pe>0?ue-4:ue,ve;for(ve=0;ve>16&255,me[ge++]=oe>>8&255,me[ge++]=oe&255;return pe===2&&(oe=revLookup[ne.charCodeAt(ve)]<<2|revLookup[ne.charCodeAt(ve+1)]>>4,me[ge++]=oe&255),pe===1&&(oe=revLookup[ne.charCodeAt(ve)]<<10|revLookup[ne.charCodeAt(ve+1)]<<4|revLookup[ne.charCodeAt(ve+2)]>>2,me[ge++]=oe>>8&255,me[ge++]=oe&255),me}function tripletToBase64(ne){return lookup$2[ne>>18&63]+lookup$2[ne>>12&63]+lookup$2[ne>>6&63]+lookup$2[ne&63]}function encodeChunk(ne,oe,ce){for(var ue,pe=[],me=oe;meye?ye:ge+me));return ue===1?(oe=ne[ce-1],pe.push(lookup$2[oe>>2]+lookup$2[oe<<4&63]+"==")):ue===2&&(oe=(ne[ce-2]<<8)+ne[ce-1],pe.push(lookup$2[oe>>10]+lookup$2[oe>>4&63]+lookup$2[oe<<2&63]+"=")),pe.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(ne,oe,ce,ue,pe){var me,ge,ye=pe*8-ue-1,ve=(1<>1,_e=-7,Se=ce?pe-1:0,$e=ce?-1:1,Re=ne[oe+Se];for(Se+=$e,me=Re&(1<<-_e)-1,Re>>=-_e,_e+=ye;_e>0;me=me*256+ne[oe+Se],Se+=$e,_e-=8);for(ge=me&(1<<-_e)-1,me>>=-_e,_e+=ue;_e>0;ge=ge*256+ne[oe+Se],Se+=$e,_e-=8);if(me===0)me=1-xe;else{if(me===ve)return ge?NaN:(Re?-1:1)*(1/0);ge=ge+Math.pow(2,ue),me=me-xe}return(Re?-1:1)*ge*Math.pow(2,me-ue)};ieee754.write=function(ne,oe,ce,ue,pe,me){var ge,ye,ve,xe=me*8-pe-1,_e=(1<>1,$e=pe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Re=ue?0:me-1,Ae=ue?1:-1,Ie=oe<0||oe===0&&1/oe<0?1:0;for(oe=Math.abs(oe),isNaN(oe)||oe===1/0?(ye=isNaN(oe)?1:0,ge=_e):(ge=Math.floor(Math.log(oe)/Math.LN2),oe*(ve=Math.pow(2,-ge))<1&&(ge--,ve*=2),ge+Se>=1?oe+=$e/ve:oe+=$e*Math.pow(2,1-Se),oe*ve>=2&&(ge++,ve/=2),ge+Se>=_e?(ye=0,ge=_e):ge+Se>=1?(ye=(oe*ve-1)*Math.pow(2,pe),ge=ge+Se):(ye=oe*Math.pow(2,Se-1)*Math.pow(2,pe),ge=0));pe>=8;ne[ce+Re]=ye&255,Re+=Ae,ye/=256,pe-=8);for(ge=ge<0;ne[ce+Re]=ge&255,Re+=Ae,ge/=256,xe-=8);ne[ce+Re-Ae]|=Ie*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(ne){const oe=base64Js,ce=ieee754,ue=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ne.Buffer=ye,ne.SlowBuffer=Ne,ne.INSPECT_MAX_BYTES=50;const pe=2147483647;ne.kMaxLength=pe,ye.TYPED_ARRAY_SUPPORT=me(),!ye.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function me(){try{const pn=new Uint8Array(1),tn={foo:function(){return 42}};return Object.setPrototypeOf(tn,Uint8Array.prototype),Object.setPrototypeOf(pn,tn),pn.foo()===42}catch{return!1}}Object.defineProperty(ye.prototype,"parent",{enumerable:!0,get:function(){if(ye.isBuffer(this))return this.buffer}}),Object.defineProperty(ye.prototype,"offset",{enumerable:!0,get:function(){if(ye.isBuffer(this))return this.byteOffset}});function ge(pn){if(pn>pe)throw new RangeError('The value "'+pn+'" is invalid for option "size"');const tn=new Uint8Array(pn);return Object.setPrototypeOf(tn,ye.prototype),tn}function ye(pn,tn,Gt){if(typeof pn=="number"){if(typeof tn=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Se(pn)}return ve(pn,tn,Gt)}ye.poolSize=8192;function ve(pn,tn,Gt){if(typeof pn=="string")return $e(pn,tn);if(ArrayBuffer.isView(pn))return Ae(pn);if(pn==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof pn);if(Kn(pn,ArrayBuffer)||pn&&Kn(pn.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Kn(pn,SharedArrayBuffer)||pn&&Kn(pn.buffer,SharedArrayBuffer)))return Ie(pn,tn,Gt);if(typeof pn=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const bn=pn.valueOf&&pn.valueOf();if(bn!=null&&bn!==pn)return ye.from(bn,tn,Gt);const kn=ke(pn);if(kn)return kn;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof pn[Symbol.toPrimitive]=="function")return ye.from(pn[Symbol.toPrimitive]("string"),tn,Gt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof pn)}ye.from=function(pn,tn,Gt){return ve(pn,tn,Gt)},Object.setPrototypeOf(ye.prototype,Uint8Array.prototype),Object.setPrototypeOf(ye,Uint8Array);function xe(pn){if(typeof pn!="number")throw new TypeError('"size" argument must be of type number');if(pn<0)throw new RangeError('The value "'+pn+'" is invalid for option "size"')}function _e(pn,tn,Gt){return xe(pn),pn<=0?ge(pn):tn!==void 0?typeof Gt=="string"?ge(pn).fill(tn,Gt):ge(pn).fill(tn):ge(pn)}ye.alloc=function(pn,tn,Gt){return _e(pn,tn,Gt)};function Se(pn){return xe(pn),ge(pn<0?0:Be(pn)|0)}ye.allocUnsafe=function(pn){return Se(pn)},ye.allocUnsafeSlow=function(pn){return Se(pn)};function $e(pn,tn){if((typeof tn!="string"||tn==="")&&(tn="utf8"),!ye.isEncoding(tn))throw new TypeError("Unknown encoding: "+tn);const Gt=Fe(pn,tn)|0;let bn=ge(Gt);const kn=bn.write(pn,tn);return kn!==Gt&&(bn=bn.slice(0,kn)),bn}function Re(pn){const tn=pn.length<0?0:Be(pn.length)|0,Gt=ge(tn);for(let bn=0;bn=pe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pe.toString(16)+" bytes");return pn|0}function Ne(pn){return+pn!=pn&&(pn=0),ye.alloc(+pn)}ye.isBuffer=function(tn){return tn!=null&&tn._isBuffer===!0&&tn!==ye.prototype},ye.compare=function(tn,Gt){if(Kn(tn,Uint8Array)&&(tn=ye.from(tn,tn.offset,tn.byteLength)),Kn(Gt,Uint8Array)&&(Gt=ye.from(Gt,Gt.offset,Gt.byteLength)),!ye.isBuffer(tn)||!ye.isBuffer(Gt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(tn===Gt)return 0;let bn=tn.length,kn=Gt.length;for(let jn=0,Wn=Math.min(bn,kn);jnkn.length?(ye.isBuffer(Wn)||(Wn=ye.from(Wn)),Wn.copy(kn,jn)):Uint8Array.prototype.set.call(kn,Wn,jn);else if(ye.isBuffer(Wn))Wn.copy(kn,jn);else throw new TypeError('"list" argument must be an Array of Buffers');jn+=Wn.length}return kn};function Fe(pn,tn){if(ye.isBuffer(pn))return pn.length;if(ArrayBuffer.isView(pn)||Kn(pn,ArrayBuffer))return pn.byteLength;if(typeof pn!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof pn);const Gt=pn.length,bn=arguments.length>2&&arguments[2]===!0;if(!bn&&Gt===0)return 0;let kn=!1;for(;;)switch(tn){case"ascii":case"latin1":case"binary":return Gt;case"utf8":case"utf-8":return Tn(pn).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Gt*2;case"hex":return Gt>>>1;case"base64":return zn(pn).length;default:if(kn)return bn?-1:Tn(pn).length;tn=(""+tn).toLowerCase(),kn=!0}}ye.byteLength=Fe;function Ue(pn,tn,Gt){let bn=!1;if((tn===void 0||tn<0)&&(tn=0),tn>this.length||((Gt===void 0||Gt>this.length)&&(Gt=this.length),Gt<=0)||(Gt>>>=0,tn>>>=0,Gt<=tn))return"";for(pn||(pn="utf8");;)switch(pn){case"hex":return Wt(this,tn,Gt);case"utf8":case"utf-8":return Ke(this,tn,Gt);case"ascii":return en(this,tn,Gt);case"latin1":case"binary":return Kt(this,tn,Gt);case"base64":return jt(this,tn,Gt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return un(this,tn,Gt);default:if(bn)throw new TypeError("Unknown encoding: "+pn);pn=(pn+"").toLowerCase(),bn=!0}}ye.prototype._isBuffer=!0;function We(pn,tn,Gt){const bn=pn[tn];pn[tn]=pn[Gt],pn[Gt]=bn}ye.prototype.swap16=function(){const tn=this.length;if(tn%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Gt=0;GtGt&&(tn+=" ... "),""},ue&&(ye.prototype[ue]=ye.prototype.inspect),ye.prototype.compare=function(tn,Gt,bn,kn,jn){if(Kn(tn,Uint8Array)&&(tn=ye.from(tn,tn.offset,tn.byteLength)),!ye.isBuffer(tn))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof tn);if(Gt===void 0&&(Gt=0),bn===void 0&&(bn=tn?tn.length:0),kn===void 0&&(kn=0),jn===void 0&&(jn=this.length),Gt<0||bn>tn.length||kn<0||jn>this.length)throw new RangeError("out of range index");if(kn>=jn&&Gt>=bn)return 0;if(kn>=jn)return-1;if(Gt>=bn)return 1;if(Gt>>>=0,bn>>>=0,kn>>>=0,jn>>>=0,this===tn)return 0;let Wn=jn-kn,dn=bn-Gt;const Bn=Math.min(Wn,dn),mn=this.slice(kn,jn),Pn=tn.slice(Gt,bn);for(let ur=0;ur2147483647?Gt=2147483647:Gt<-2147483648&&(Gt=-2147483648),Gt=+Gt,Rn(Gt)&&(Gt=kn?0:pn.length-1),Gt<0&&(Gt=pn.length+Gt),Gt>=pn.length){if(kn)return-1;Gt=pn.length-1}else if(Gt<0)if(kn)Gt=0;else return-1;if(typeof tn=="string"&&(tn=ye.from(tn,bn)),ye.isBuffer(tn))return tn.length===0?-1:ze(pn,tn,Gt,bn,kn);if(typeof tn=="number")return tn=tn&255,typeof Uint8Array.prototype.indexOf=="function"?kn?Uint8Array.prototype.indexOf.call(pn,tn,Gt):Uint8Array.prototype.lastIndexOf.call(pn,tn,Gt):ze(pn,[tn],Gt,bn,kn);throw new TypeError("val must be string, number or Buffer")}function ze(pn,tn,Gt,bn,kn){let jn=1,Wn=pn.length,dn=tn.length;if(bn!==void 0&&(bn=String(bn).toLowerCase(),bn==="ucs2"||bn==="ucs-2"||bn==="utf16le"||bn==="utf-16le")){if(pn.length<2||tn.length<2)return-1;jn=2,Wn/=2,dn/=2,Gt/=2}function Bn(Pn,ur){return jn===1?Pn[ur]:Pn.readUInt16BE(ur*jn)}let mn;if(kn){let Pn=-1;for(mn=Gt;mnWn&&(Gt=Wn-dn),mn=Gt;mn>=0;mn--){let Pn=!0;for(let ur=0;urkn&&(bn=kn)):bn=kn;const jn=tn.length;bn>jn/2&&(bn=jn/2);let Wn;for(Wn=0;Wn>>0,isFinite(bn)?(bn=bn>>>0,kn===void 0&&(kn="utf8")):(kn=bn,bn=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const jn=this.length-Gt;if((bn===void 0||bn>jn)&&(bn=jn),tn.length>0&&(bn<0||Gt<0)||Gt>this.length)throw new RangeError("Attempt to write outside buffer bounds");kn||(kn="utf8");let Wn=!1;for(;;)switch(kn){case"hex":return Ge(this,tn,Gt,bn);case"utf8":case"utf-8":return Ze(this,tn,Gt,bn);case"ascii":case"latin1":case"binary":return Dt(this,tn,Gt,bn);case"base64":return Je(this,tn,Gt,bn);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ut(this,tn,Gt,bn);default:if(Wn)throw new TypeError("Unknown encoding: "+kn);kn=(""+kn).toLowerCase(),Wn=!0}},ye.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function jt(pn,tn,Gt){return tn===0&&Gt===pn.length?oe.fromByteArray(pn):oe.fromByteArray(pn.slice(tn,Gt))}function Ke(pn,tn,Gt){Gt=Math.min(pn.length,Gt);const bn=[];let kn=tn;for(;kn239?4:jn>223?3:jn>191?2:1;if(kn+dn<=Gt){let Bn,mn,Pn,ur;switch(dn){case 1:jn<128&&(Wn=jn);break;case 2:Bn=pn[kn+1],(Bn&192)===128&&(ur=(jn&31)<<6|Bn&63,ur>127&&(Wn=ur));break;case 3:Bn=pn[kn+1],mn=pn[kn+2],(Bn&192)===128&&(mn&192)===128&&(ur=(jn&15)<<12|(Bn&63)<<6|mn&63,ur>2047&&(ur<55296||ur>57343)&&(Wn=ur));break;case 4:Bn=pn[kn+1],mn=pn[kn+2],Pn=pn[kn+3],(Bn&192)===128&&(mn&192)===128&&(Pn&192)===128&&(ur=(jn&15)<<18|(Bn&63)<<12|(mn&63)<<6|Pn&63,ur>65535&&ur<1114112&&(Wn=ur))}}Wn===null?(Wn=65533,dn=1):Wn>65535&&(Wn-=65536,bn.push(Wn>>>10&1023|55296),Wn=56320|Wn&1023),bn.push(Wn),kn+=dn}return Zt(bn)}const an=4096;function Zt(pn){const tn=pn.length;if(tn<=an)return String.fromCharCode.apply(String,pn);let Gt="",bn=0;for(;bnbn)&&(Gt=bn);let kn="";for(let jn=tn;jnbn&&(tn=bn),Gt<0?(Gt+=bn,Gt<0&&(Gt=0)):Gt>bn&&(Gt=bn),GtGt)throw new RangeError("Trying to access beyond buffer length")}ye.prototype.readUintLE=ye.prototype.readUIntLE=function(tn,Gt,bn){tn=tn>>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=this[tn],jn=1,Wn=0;for(;++Wn>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=this[tn+--Gt],jn=1;for(;Gt>0&&(jn*=256);)kn+=this[tn+--Gt]*jn;return kn},ye.prototype.readUint8=ye.prototype.readUInt8=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,1,this.length),this[tn]},ye.prototype.readUint16LE=ye.prototype.readUInt16LE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,2,this.length),this[tn]|this[tn+1]<<8},ye.prototype.readUint16BE=ye.prototype.readUInt16BE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,2,this.length),this[tn]<<8|this[tn+1]},ye.prototype.readUint32LE=ye.prototype.readUInt32LE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),(this[tn]|this[tn+1]<<8|this[tn+2]<<16)+this[tn+3]*16777216},ye.prototype.readUint32BE=ye.prototype.readUInt32BE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),this[tn]*16777216+(this[tn+1]<<16|this[tn+2]<<8|this[tn+3])},ye.prototype.readBigUInt64LE=Xn(function(tn){tn=tn>>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=Gt+this[++tn]*2**8+this[++tn]*2**16+this[++tn]*2**24,jn=this[++tn]+this[++tn]*2**8+this[++tn]*2**16+bn*2**24;return BigInt(kn)+(BigInt(jn)<>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=Gt*2**24+this[++tn]*2**16+this[++tn]*2**8+this[++tn],jn=this[++tn]*2**24+this[++tn]*2**16+this[++tn]*2**8+bn;return(BigInt(kn)<>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=this[tn],jn=1,Wn=0;for(;++Wn=jn&&(kn-=Math.pow(2,8*Gt)),kn},ye.prototype.readIntBE=function(tn,Gt,bn){tn=tn>>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=Gt,jn=1,Wn=this[tn+--kn];for(;kn>0&&(jn*=256);)Wn+=this[tn+--kn]*jn;return jn*=128,Wn>=jn&&(Wn-=Math.pow(2,8*Gt)),Wn},ye.prototype.readInt8=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,1,this.length),this[tn]&128?(255-this[tn]+1)*-1:this[tn]},ye.prototype.readInt16LE=function(tn,Gt){tn=tn>>>0,Gt||Xt(tn,2,this.length);const bn=this[tn]|this[tn+1]<<8;return bn&32768?bn|4294901760:bn},ye.prototype.readInt16BE=function(tn,Gt){tn=tn>>>0,Gt||Xt(tn,2,this.length);const bn=this[tn+1]|this[tn]<<8;return bn&32768?bn|4294901760:bn},ye.prototype.readInt32LE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),this[tn]|this[tn+1]<<8|this[tn+2]<<16|this[tn+3]<<24},ye.prototype.readInt32BE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),this[tn]<<24|this[tn+1]<<16|this[tn+2]<<8|this[tn+3]},ye.prototype.readBigInt64LE=Xn(function(tn){tn=tn>>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=this[tn+4]+this[tn+5]*2**8+this[tn+6]*2**16+(bn<<24);return(BigInt(kn)<>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=(Gt<<24)+this[++tn]*2**16+this[++tn]*2**8+this[++tn];return(BigInt(kn)<>>0,Gt||Xt(tn,4,this.length),ce.read(this,tn,!0,23,4)},ye.prototype.readFloatBE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),ce.read(this,tn,!1,23,4)},ye.prototype.readDoubleLE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,8,this.length),ce.read(this,tn,!0,52,8)},ye.prototype.readDoubleBE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,8,this.length),ce.read(this,tn,!1,52,8)};function nn(pn,tn,Gt,bn,kn,jn){if(!ye.isBuffer(pn))throw new TypeError('"buffer" argument must be a Buffer instance');if(tn>kn||tnpn.length)throw new RangeError("Index out of range")}ye.prototype.writeUintLE=ye.prototype.writeUIntLE=function(tn,Gt,bn,kn){if(tn=+tn,Gt=Gt>>>0,bn=bn>>>0,!kn){const dn=Math.pow(2,8*bn)-1;nn(this,tn,Gt,bn,dn,0)}let jn=1,Wn=0;for(this[Gt]=tn&255;++Wn>>0,bn=bn>>>0,!kn){const dn=Math.pow(2,8*bn)-1;nn(this,tn,Gt,bn,dn,0)}let jn=bn-1,Wn=1;for(this[Gt+jn]=tn&255;--jn>=0&&(Wn*=256);)this[Gt+jn]=tn/Wn&255;return Gt+bn},ye.prototype.writeUint8=ye.prototype.writeUInt8=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,1,255,0),this[Gt]=tn&255,Gt+1},ye.prototype.writeUint16LE=ye.prototype.writeUInt16LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,65535,0),this[Gt]=tn&255,this[Gt+1]=tn>>>8,Gt+2},ye.prototype.writeUint16BE=ye.prototype.writeUInt16BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,65535,0),this[Gt]=tn>>>8,this[Gt+1]=tn&255,Gt+2},ye.prototype.writeUint32LE=ye.prototype.writeUInt32LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,4294967295,0),this[Gt+3]=tn>>>24,this[Gt+2]=tn>>>16,this[Gt+1]=tn>>>8,this[Gt]=tn&255,Gt+4},ye.prototype.writeUint32BE=ye.prototype.writeUInt32BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,4294967295,0),this[Gt]=tn>>>24,this[Gt+1]=tn>>>16,this[Gt+2]=tn>>>8,this[Gt+3]=tn&255,Gt+4};function vn(pn,tn,Gt,bn,kn){Pt(tn,bn,kn,pn,Gt,7);let jn=Number(tn&BigInt(4294967295));pn[Gt++]=jn,jn=jn>>8,pn[Gt++]=jn,jn=jn>>8,pn[Gt++]=jn,jn=jn>>8,pn[Gt++]=jn;let Wn=Number(tn>>BigInt(32)&BigInt(4294967295));return pn[Gt++]=Wn,Wn=Wn>>8,pn[Gt++]=Wn,Wn=Wn>>8,pn[Gt++]=Wn,Wn=Wn>>8,pn[Gt++]=Wn,Gt}function Sn(pn,tn,Gt,bn,kn){Pt(tn,bn,kn,pn,Gt,7);let jn=Number(tn&BigInt(4294967295));pn[Gt+7]=jn,jn=jn>>8,pn[Gt+6]=jn,jn=jn>>8,pn[Gt+5]=jn,jn=jn>>8,pn[Gt+4]=jn;let Wn=Number(tn>>BigInt(32)&BigInt(4294967295));return pn[Gt+3]=Wn,Wn=Wn>>8,pn[Gt+2]=Wn,Wn=Wn>>8,pn[Gt+1]=Wn,Wn=Wn>>8,pn[Gt]=Wn,Gt+8}ye.prototype.writeBigUInt64LE=Xn(function(tn,Gt=0){return vn(this,tn,Gt,BigInt(0),BigInt("0xffffffffffffffff"))}),ye.prototype.writeBigUInt64BE=Xn(function(tn,Gt=0){return Sn(this,tn,Gt,BigInt(0),BigInt("0xffffffffffffffff"))}),ye.prototype.writeIntLE=function(tn,Gt,bn,kn){if(tn=+tn,Gt=Gt>>>0,!kn){const Bn=Math.pow(2,8*bn-1);nn(this,tn,Gt,bn,Bn-1,-Bn)}let jn=0,Wn=1,dn=0;for(this[Gt]=tn&255;++jn>0)-dn&255;return Gt+bn},ye.prototype.writeIntBE=function(tn,Gt,bn,kn){if(tn=+tn,Gt=Gt>>>0,!kn){const Bn=Math.pow(2,8*bn-1);nn(this,tn,Gt,bn,Bn-1,-Bn)}let jn=bn-1,Wn=1,dn=0;for(this[Gt+jn]=tn&255;--jn>=0&&(Wn*=256);)tn<0&&dn===0&&this[Gt+jn+1]!==0&&(dn=1),this[Gt+jn]=(tn/Wn>>0)-dn&255;return Gt+bn},ye.prototype.writeInt8=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,1,127,-128),tn<0&&(tn=255+tn+1),this[Gt]=tn&255,Gt+1},ye.prototype.writeInt16LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,32767,-32768),this[Gt]=tn&255,this[Gt+1]=tn>>>8,Gt+2},ye.prototype.writeInt16BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,32767,-32768),this[Gt]=tn>>>8,this[Gt+1]=tn&255,Gt+2},ye.prototype.writeInt32LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,2147483647,-2147483648),this[Gt]=tn&255,this[Gt+1]=tn>>>8,this[Gt+2]=tn>>>16,this[Gt+3]=tn>>>24,Gt+4},ye.prototype.writeInt32BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,2147483647,-2147483648),tn<0&&(tn=4294967295+tn+1),this[Gt]=tn>>>24,this[Gt+1]=tn>>>16,this[Gt+2]=tn>>>8,this[Gt+3]=tn&255,Gt+4},ye.prototype.writeBigInt64LE=Xn(function(tn,Gt=0){return vn(this,tn,Gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),ye.prototype.writeBigInt64BE=Xn(function(tn,Gt=0){return Sn(this,tn,Gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Cn(pn,tn,Gt,bn,kn,jn){if(Gt+bn>pn.length)throw new RangeError("Index out of range");if(Gt<0)throw new RangeError("Index out of range")}function Nt(pn,tn,Gt,bn,kn){return tn=+tn,Gt=Gt>>>0,kn||Cn(pn,tn,Gt,4),ce.write(pn,tn,Gt,bn,23,4),Gt+4}ye.prototype.writeFloatLE=function(tn,Gt,bn){return Nt(this,tn,Gt,!0,bn)},ye.prototype.writeFloatBE=function(tn,Gt,bn){return Nt(this,tn,Gt,!1,bn)};function Yt(pn,tn,Gt,bn,kn){return tn=+tn,Gt=Gt>>>0,kn||Cn(pn,tn,Gt,8),ce.write(pn,tn,Gt,bn,52,8),Gt+8}ye.prototype.writeDoubleLE=function(tn,Gt,bn){return Yt(this,tn,Gt,!0,bn)},ye.prototype.writeDoubleBE=function(tn,Gt,bn){return Yt(this,tn,Gt,!1,bn)},ye.prototype.copy=function(tn,Gt,bn,kn){if(!ye.isBuffer(tn))throw new TypeError("argument should be a Buffer");if(bn||(bn=0),!kn&&kn!==0&&(kn=this.length),Gt>=tn.length&&(Gt=tn.length),Gt||(Gt=0),kn>0&&kn=this.length)throw new RangeError("Index out of range");if(kn<0)throw new RangeError("sourceEnd out of bounds");kn>this.length&&(kn=this.length),tn.length-Gt>>0,bn=bn===void 0?this.length:bn>>>0,tn||(tn=0);let jn;if(typeof tn=="number")for(jn=Gt;jn2**32?kn=Ye(String(Gt)):typeof Gt=="bigint"&&(kn=String(Gt),(Gt>BigInt(2)**BigInt(32)||Gt<-(BigInt(2)**BigInt(32)))&&(kn=Ye(kn)),kn+="n"),bn+=` It must be ${tn}. Received ${kn}`,bn},RangeError);function Ye(pn){let tn="",Gt=pn.length;const bn=pn[0]==="-"?1:0;for(;Gt>=bn+4;Gt-=3)tn=`_${pn.slice(Gt-3,Gt)}${tn}`;return`${pn.slice(0,Gt)}${tn}`}function Xe(pn,tn,Gt){sn(tn,"offset"),(pn[tn]===void 0||pn[tn+Gt]===void 0)&&yn(tn,pn.length-(Gt+1))}function Pt(pn,tn,Gt,bn,kn,jn){if(pn>Gt||pn3?tn===0||tn===BigInt(0)?dn=`>= 0${Wn} and < 2${Wn} ** ${(jn+1)*8}${Wn}`:dn=`>= -(2${Wn} ** ${(jn+1)*8-1}${Wn}) and < 2 ** ${(jn+1)*8-1}${Wn}`:dn=`>= ${tn}${Wn} and <= ${Gt}${Wn}`,new Jt.ERR_OUT_OF_RANGE("value",dn,pn)}Xe(bn,kn,jn)}function sn(pn,tn){if(typeof pn!="number")throw new Jt.ERR_INVALID_ARG_TYPE(tn,"number",pn)}function yn(pn,tn,Gt){throw Math.floor(pn)!==pn?(sn(pn,Gt),new Jt.ERR_OUT_OF_RANGE(Gt||"offset","an integer",pn)):tn<0?new Jt.ERR_BUFFER_OUT_OF_BOUNDS:new Jt.ERR_OUT_OF_RANGE(Gt||"offset",`>= ${Gt?1:0} and <= ${tn}`,pn)}const qt=/[^+/0-9A-Za-z-_]/g;function wn(pn){if(pn=pn.split("=")[0],pn=pn.trim().replace(qt,""),pn.length<2)return"";for(;pn.length%4!==0;)pn=pn+"=";return pn}function Tn(pn,tn){tn=tn||1/0;let Gt;const bn=pn.length;let kn=null;const jn=[];for(let Wn=0;Wn55295&&Gt<57344){if(!kn){if(Gt>56319){(tn-=3)>-1&&jn.push(239,191,189);continue}else if(Wn+1===bn){(tn-=3)>-1&&jn.push(239,191,189);continue}kn=Gt;continue}if(Gt<56320){(tn-=3)>-1&&jn.push(239,191,189),kn=Gt;continue}Gt=(kn-55296<<10|Gt-56320)+65536}else kn&&(tn-=3)>-1&&jn.push(239,191,189);if(kn=null,Gt<128){if((tn-=1)<0)break;jn.push(Gt)}else if(Gt<2048){if((tn-=2)<0)break;jn.push(Gt>>6|192,Gt&63|128)}else if(Gt<65536){if((tn-=3)<0)break;jn.push(Gt>>12|224,Gt>>6&63|128,Gt&63|128)}else if(Gt<1114112){if((tn-=4)<0)break;jn.push(Gt>>18|240,Gt>>12&63|128,Gt>>6&63|128,Gt&63|128)}else throw new Error("Invalid code point")}return jn}function xn(pn){const tn=[];for(let Gt=0;Gt>8,kn=Gt%256,jn.push(kn),jn.push(bn);return jn}function zn(pn){return oe.toByteArray(wn(pn))}function Yn(pn,tn,Gt,bn){let kn;for(kn=0;kn=tn.length||kn>=pn.length);++kn)tn[kn+Gt]=pn[kn];return kn}function Kn(pn,tn){return pn instanceof tn||pn!=null&&pn.constructor!=null&&pn.constructor.name!=null&&pn.constructor.name===tn.name}function Rn(pn){return pn!==pn}const Mn=function(){const pn="0123456789abcdef",tn=new Array(256);for(let Gt=0;Gt<16;++Gt){const bn=Gt*16;for(let kn=0;kn<16;++kn)tn[bn+kn]=pn[Gt]+pn[kn]}return tn}();function Xn(pn){return typeof BigInt>"u"?Jn:pn}function Jn(){throw new Error("BigInt not supported")}})(buffer);const ECMA_SIZES=byte_size,Buffer$2=buffer.Buffer;function preciseStringSizeNode(ne){return 12+4*Math.ceil(ne.length/4)}function isNodeEnvironment(){return!(typeof window<"u"&&typeof document<"u")}function getSizeOfTypedArray(ne){return ne.BYTES_PER_ELEMENT?ne.length*ne.BYTES_PER_ELEMENT:-1}function objectSizeComplex(ne){let oe=0;const ce=-1;try{let ue=ne;if(ne instanceof Map?ue=Object.fromEntries(ne):ne instanceof Set&&(ue=Array.from(ne)),ArrayBuffer.isView(ne))return getSizeOfTypedArray(ne);const pe=JSON.stringify(ue,(me,ge)=>typeof ge=="bigint"||typeof ge=="function"?ge.toString():typeof ge>"u"?"undefined":typeof ge=="symbol"||ge instanceof RegExp?ge.toString():ge);oe=Buffer$2.byteLength(pe,"utf8")}catch(ue){return console.error("Error detected, returning "+ce,ue),ce}return oe}function objectSizeSimple(ne){const oe=[],ce=[ne];let ue=0;for(;ce.length;){const pe=ce.pop();if(typeof pe=="boolean")ue+=ECMA_SIZES.BYTES;else if(typeof pe=="string")isNodeEnvironment()?ue+=preciseStringSizeNode(pe):ue+=pe.length*ECMA_SIZES.STRING;else if(typeof pe=="number")ue+=ECMA_SIZES.NUMBER;else if(typeof pe=="symbol")Symbol.keyFor&&Symbol.keyFor(ne)?ue+=Symbol.keyFor(ne).length*ECMA_SIZES.STRING:ue+=(ne.toString().length-8)*ECMA_SIZES.STRING;else if(typeof pe=="bigint")ue+=Buffer$2.from(pe.toString()).byteLength;else if(typeof pe=="function")ue+=pe.toString().length;else if(typeof pe=="object"&&oe.indexOf(pe)===-1){oe.push(pe);for(const me in pe)ce.push(pe[me])}}return ue}var indexv2=function(ne){let oe=0;return ne!==null&&typeof ne=="object"?oe=objectSizeComplex(ne):oe=objectSizeSimple(ne),oe};const sizeOf=getDefaultExportFromCjs(indexv2);var dist$4={},data={},adjectives={};Object.defineProperty(adjectives,"__esModule",{value:!0});adjectives.default=["other","new","good","old","little","great","small","young","long","black","high","only","big","white","political","right","large","real","sure","different","important","public","possible","full","whole","certain","human","major","military","bad","social","dead","true","economic","open","early","free","national","strong","hard","special","clear","local","private","wrong","late","short","poor","recent","dark","fine","foreign","ready","red","cold","low","heavy","serious","single","personal","difficult","left","blue","federal","necessary","general","easy","likely","beautiful","happy","past","hot","close","common","afraid","simple","natural","main","various","available","nice","present","final","sorry","entire","current","similar","deep","huge","rich","nuclear","empty","strange","quiet","front","wide","modern","concerned","green","very","alone","particular","bright","supposed","basic","medical","aware","total","financial","legal","original","international","soft","alive","interested","tall","warm","popular","tiny","top","normal","powerful","silent","religious","impossible","quick","safe","thin","familiar","gray","fresh","physical","individual","willing","crazy","sick","angry","perfect","tired","wild","moral","brown","dangerous","famous","married","terrible","successful","fair","professional","official","obvious","glad","central","chief","effective","light","complete","interesting","thick","proper","involved","responsible","narrow","civil","industrial","dry","yellow","specific","sharp","sudden","direct","following","growing","significant","traditional","slow","previous","vast","surprised","busy","usual","clean","funny","regular","scientific","ordinary","ancient","senior","sweet","future","annual","secret","equal","independent","wonderful","tough","broad","additional","careful","domestic","brief","enormous","commercial","grand","average","sexual","nervous","pale","immediate","critical","proud","like","complex","separate","considerable","still","extra","expensive","guilty","active","mad","asleep","wooden","cool","presidential","apparent","weak","essential","living","pretty","cultural","useful","actual","unusual","daily","potential","wet","solid","lovely","comfortable","formal","outside","massive","sad","corporate","distant","loose","rare","stupid","visible","liberal","flat","pleased","pure","curious","practical","upper","technical","male","appropriate","fat","just","due","mere","handsome","mental","conservative","positive","leading","naked","false","drunk","dirty","friendly","constant","well","used","emotional","internal","odd","historical","female","ill","broken","capable","southern","pleasant","bare","minor","eager","lucky","urban","steady","fiscal","rough","primary","reasonable","typical","inner","favorite","attractive","slight","innocent","limited","straight","pink","excellent","double","dramatic","violent","honest","electric","fellow","substantial","opposite","awful","severe","joint","armed","hungry","remarkable","increased","gentle","illegal","middle","bitter","mass","permanent","increasing","damn","golden","correct","intense","round","northern","proposed","so-called","criminal","healthy","plain","vital","blind","native","intellectual","unknown","extreme","existing","raw","prime","brilliant","sensitive","extraordinary","sufficient","remaining","ultimate","unique","royal","initial","negative","fundamental","nearby","smart","strategic","educational","unlikely","smooth","modest","conventional","giant","scared","cheap","dear","delicate","anxious","valuable","standard","desperate","lonely","diplomatic","firm","wise","principal","congressional","occasional","ugly","vice","radical","faint","working","absolute","intelligent","racial","mutual","silly","fast","musical","tight","complicated","numerous","crucial","square","contemporary","bloody","western","endless","inevitable","environmental","constitutional","rapid","worried","lost","genuine","temporary","democratic","rural","regional","given","painful","literary","chemical","sophisticated","decent","academic","awake","conscious","revolutionary","surprising","elderly","agricultural","psychological","pregnant","live","adequate","superior","grateful","prominent","frightened","remote","overall","stiff","harsh","electronic","spiritual","okay","closed","excited","convinced","long-term","unexpected","dull","evident","civilian","mysterious","romantic","impressive","continuing","exciting","logical","peculiar","exact","widespread","foolish","extensive","evil","continued","confident","generous","legislative","stable","vulnerable","elegant","embarrassed","hostile","efficient","blond","dumb","advanced","defensive","outer","neat","estimated","wealthy","dying","loud","creative","acceptable","unhappy","sheer","competitive","concrete","reluctant","precious","tremendous","burning","precise","uncertain","holy","artificial","vague","ideal","universal","moderate","subtle","mild","peaceful","assistant","invisible","casual","crowded","crude","running","classic","controversial","ridiculous","frequent","grim","accurate","detailed","goddamn","fun","fierce","cruel","incredible","blank","dim","suitable","classical","elaborate","collective","eastern","legitimate","aggressive","rear","administrative","automatic","dependent","ashamed","distinct","fit","clever","brave","ethnic","maximum","relative","primitive","uncomfortable","profound","sacred","biological","identical","furious","loyal","rational","mechanical","mean","naval","noble","ambitious","purple","historic","dominant","suburban","developing","calm","frozen","subsequent","charming","damp","fixed","rigid","offensive","electrical","shy","continuous","urgent","weary","immense","splendid","downtown","uneasy","disappointed","helpless","voluntary","polite","junior","gross","striking","overwhelming","unconscious","steep","outstanding","tender","tragic","costly","miserable","near","useless","welcome","external","helpful","weekly","middle-aged","suspicious","old-fashioned","technological","damned","awkward","visual","organized","ideological","orange","horrible","strict","magnificent","deadly","dusty","mighty","puzzled","bold","global","passing","magic","fond","judicial","missing","definite","changing","rubber","theoretical","satisfied","promising","abstract","excessive","comparable","fatal","distinguished","inadequate","slender","artistic","known","sympathetic","favorable","cheerful","faithful","delighted","unnecessary","sole","cautious","productive","reliable","patient","sensible","desirable","depressed","atomic","able","instant","relevant","alien","spectacular","lesser","swift","comic","enthusiastic","marvelous","experimental","weird","retired","fascinating","content","medieval","inclined","bored","ruling","flying","consistent","organic","alleged","grave","smiling","realistic","amazing","exotic","symbolic","confused","underground","spare","philosophical","vigorous","troubled","shallow","amused","lively","genetic","impatient","brutal","solar","unfair","formidable","tense","unfortunate","minimum","sleeping","secondary","shiny","jealous","insane","gay","vivid","wounded","hurt","intimate","monthly","sour","socialist","worthy","preliminary","colonial","middle-class","alternative","influential","unpleasant","comprehensive","devoted","upset","secure","absurd","neutral","frightening","profitable","fragile","civilized","slim","partial","added","fearful","optimistic","isolated","eternal","vocal","beloved","alert","verbal","rising","skilled","antique","municipal","written","restless","outdoor","governmental","driving","sore","informal","loving","retail","hidden","determined","monetary","convenient","thoughtful","colored","progressive","bizarre","sweeping","fancy","expected","fantastic","editorial","intact","bottom","multiple","well-known","nasty","protective","acute","combined","related","fortunate","earnest","divine","passionate","icy","noisy","vicious","dreadful","apt","boring","unprecedented","decisive","sunny","marked","experienced","disturbing","satisfactory","sober","random","electoral","shocked","deliberate","coming","orderly","surrounding","unwilling","inherent","mixed","naive","dense","hopeless","aesthetic","supreme","encouraging","institutional","solemn","stubborn","required","relaxed","bald","frantic","exclusive","rotten","filthy","flexible","explicit","glorious","lean","ignorant","extended","embarrassing","architectural","mortal","corrupt","hopeful","regulatory","valid","characteristic","tribal","capitalist","diverse","functional","improved","ironic","graceful","unaware","respectable","eligible","lousy","established","postwar","objective","wary","elementary","moving","superb","cute","minimal","meaningful","notable","structural","developed","rolling","fashionable","persistent","distinctive","terrific","thorough","skeptical","secular","chronic","level","everyday","visiting","infinite","short-term","terrorist","youthful","unemployed","forced","liquid","explosive","rude","colorful","renewed","semantic","astonishing","passive","heroic","gleaming","indifferent","vertical","prior","anonymous","absent","customary","mobile","uniform","solitary","probable","amazed","petty","bleak","athletic","tentative","harmless","ample","right-wing","polished","obscure","sincere","dried","intensive","equivalent","convincing","idle","vacant","mature","amusing","competent","ominous","savage","motionless","tropical","blunt","drunken","delicious","lazy","ragged","longtime","nationwide","startling","civic","freezing","muscular","circular","imperial","irrelevant","countless","gloomy","startled","disastrous","skinny","hollow","upward","ethical","underlying","careless","wholesale","abandoned","unfamiliar","mandatory","imaginary","bewildered","annoyed","magnetic","dazzling","lengthy","stern","surgical","clinical","full-time","metropolitan","moist","unlike","doubtful","prosperous","keen","awesome","humble","interior","psychiatric","clumsy","outraged","theatrical","educated","gigantic","scattered","privileged","sleepy","battered","meaningless","predictable","gradual","miniature","radioactive","prospective","aging","destructive","authentic","portable","bearded","balanced","shining","spontaneous","bureaucratic","inferior","sturdy","cynical","exquisite","talented","immune","imaginative","ripe","shared","kind","parliamentary","glowing","frail","astonished","forward","inside","operational","faded","closing","pro","coastal","shrewd","preoccupied","celebrated","wicked","bourgeois","marginal","transparent","dynamic","psychic","plump","coarse","bleeding","striped","eventual","residential","hysterical","pathetic","planned","fake","imminent","sentimental","stunning","worldwide","militant","sizable","representative","incapable","provincial","poetic","injured","tactical","selfish","winning","foul","repeated","novel","dubious","part-time","abrupt","lone","overseas","grey","varied","cooperative","muddy","scheduled","legendary","arrogant","conspicuous","varying","devastating","vulgar","martial","amateur","mathematical","deaf","scarce","specialized","honorable","outrageous","confidential","fallen","goddamned","five-year","feminine","monstrous","brisk","systematic","exhausted","frank","lunar","daring","shadowy","respected","stark","accepted","successive","pending","prolonged","unseen","uniformed","wretched","sullen","arbitrary","drastic","crooked","resulting","intricate","unpredictable","printed","utter","satisfying","delightful","linguistic","shabby","statistical","accessible","prestigious","trivial","waiting","futile","prepared","aged","misleading","cognitive","shocking","childish","elected","magical","forthcoming","exceptional","gifted","stricken","fiery","cardboard","shaky","conflicting","commanding","starving","accustomed","rocky","long-range","floating","sinister","potent","phony","lasting","understandable","curved","barren","lethal","toxic","deserted","ambiguous","notorious","synthetic","worthwhile","imported","intent","reduced","painted","taut","sociological","questionable","crisp","pointed","harmful","horizontal","rival","somber","benign","prevailing","selected","organizational","excess","dedicated","veteran","implicit","prudent","plausible","confusing","smoking","large-scale","subdued","constructive","marital","scarlet","rugged","darkened","untouched","above","matching","covert","communal","sticky","affluent","energetic","stale","controlled","qualified","reminiscent","shut","blonde","handy","ritual","straightforward","terminal","dizzy","sane","twisted","occupied","finished","opposing","sly","depressing","irregular","marine","communist","obscene","wrinkled","unsuccessful","gracious","static","consecutive","reserve","exposed","scholarly","sleek","reckless","oral","comforting","pressing","swollen","viable","carved","obsessed","projected","hideous","unthinkable","mock","susceptible","respective","goddam","downward","memorable","worn","raised","glittering","beneficial","lingering","patriotic","stunned","hairy","worrying","lighted","sexy","abundant","tangled","perpetual","irresistible","terrified","compelling","unmistakable","feeble","uneven","trained","folded","relentless","killed","gorgeous","conservation","serene","eerie","premature","dismal","competing","risky","unacceptable","indirect","witty","muffled","feasible","interstate","heated","uncommon","accidental","queer","innovative","parallel","fried","unnatural","cracked","persuasive","integrated","ongoing","homosexual","sound","fertile","canned","preceding","worldly","onstage","declining","advisory","juvenile","slippery","numb","postal","olive","eccentric","lay","chilly","shrill","ceremonial","registered","boiling","contradictory","irresponsible","then","industrialized","obsolete","rusty","inflationary","split","discreet","intolerable","barefoot","territorial","outspoken","audible","adverse","associate","impending","decorative","luminous","two-year","expanding","unchanged","outstretched","momentary","good-looking","cunning","overnight","sprawling","unbelievable","bland","liable","terrifying","televised","appealing","breathless","alarming","supporting","greasy","affirmative","guiding","homeless","triumphant","rainy","stolen","empirical","timid","provocative","knowledgeable","pragmatic","touching","desired","amiable","attempted","humane","adjacent","superficial","greedy","assorted","elusive","ruthless","lush","soothing","imposing","preferred","lavish","pervasive","managing","sandy","inappropriate","desolate","nude","reassuring","shimmering","first-class","unfinished","insistent","comparative","conceivable","admirable","courageous","aristocratic","meager","subjective","vain","disgusted","dual","towering","responsive","ailing","compact","torn","sortal","entertaining","dreary","metallic","tedious","irrational","immoral","teen-age","interim","jagged","selective","volatile","cozy","unanimous","unlimited","hired","cosmic","indoor","retarded","gold","fabulous","dignified","long-distance","high-school","classified","luxurious","insufficient","pious","incomplete","oblivious","imperialist","stately","lifelong","subordinate","extravagant","intrinsic","unpopular","scant","surplus","radiant","ruined","grotesque","hazardous","disabled","intriguing","worthless","reported","hoarse","utmost","muted","bony","disgusting","monumental","pleasing","sterile","agreeable","three-year","tricky","lucrative","respectful","inexpensive","bulky","troublesome","affectionate","coherent","unreasonable","nineteenth-century","curly","indispensable","nursing","incompetent","governing","alternate","suspected","left-wing","refined","overt","chilling","virtual","devoid","perverse","enduring","outright","overhead","unnoticed","nonprofit","pointless","appalling","dental","chosen","enlightened","robust","commonplace","damaging","conscientious","eloquent","erratic","applied","merry","ardent","flowing","incoming","chaotic","noticeable","pitiful","locked","swelling","definitive","homemade","super","pronounced","kindly","prone","attentive","unstable","unrelated","charitable","armored","unclear","tangible","medium","winding","slick","credible","frustrating","shifting","spacious","day-to-day","surviving","expanded","arid","unwanted","unbearable","hesitant","recognizable","multinational","abdominal","murderous","glossy","mute","working-class","insignificant","ingenious","masculine","blessed","gaunt","miraculous","unconstitutional","parental","rigorous","bodily","impersonal","backward","computerized","four-year","unmarried","wry","resident","luxury","high-level","partisan","powerless","seasonal","self-conscious","triple","onetime","ecological","periodic","racist","exaggerated","facial","erotic","unreal","durable","manual","rounded","concentrated","literal","mystical","stimulating","staggering","tempting","last-minute","erect","feudal","head","emerging","hind","brooding","candid","paranoid","defective","linear","immortal","shattered","unsure","swinging","compatible","ghastly","investigative","rosy","convicted","sensational","committed","makeshift","tolerant","forceful","supernatural","joyous","limp","improper","hanging","sliding","renowned","tattered","nonexistent","supportive","frustrated","undercover","handicapped","apprehensive","plentiful","authoritative","sustained","disappointing","hereditary","photographic","impoverished","ornate","respiratory","substantive","acting","nutritional","unofficial","innumerable","prevalent","dire","menacing","outward","brittle","hasty","sparkling","sled","geographical","therapeutic","melancholy","adolescent","hearty","disturbed","sweaty","poisonous","paid","ineffective","humorous","burly","rebellious","reddish","stout","teenage","eminent","rhythmic","physiological","guaranteed","opaque","folding","fleeting","full-scale","low-income","infectious","stringent","stained","beige","stirring","soaring","glamorous","airborne","improbable","austere","anticipated","designated","oval","restrictive","yearly","precarious","relieved","said","feverish","occupational","holding","speculative","abnormal","challenging","healing","boyish","forbidding","divorced","famed","sluggish","struggling","united","undesirable","steaming","consulting","answering","recreational","accompanying","cramped","journalistic","neighboring","fictional","chopped","phenomenal","bankrupt","illicit","advancing","upcoming","racing","protected","padded","venerable","fuzzy","behavioral","roast","mocking","reactionary","inefficient","packed","sloppy","sparse","foster","revealing","reverse","gaping","blue-collar","thankful","down","unimportant","traveling","corresponding","maternal","autonomous","conceptual","smoky","baked","stuffed","murky","totalitarian","ghostly","seeming","flickering","sensual","clenched","offshore","stinging","oppressive","strained","messy","executive","evolutionary","theological","damaged","unrealistic","rectangular","off","mainstream","benevolent","thirsty","blinding","loaded","applicable","unused","crushed","tan","factual","involuntary","brand-new","akin","scary","modified","mindless","born","feminist","integral","uncanny","aloof","spreading","watery","playful","stocky","wasted","compulsory","indignant","pertinent","incredulous","simultaneous","turbulent","framed","aching","falling","cardiac","trim","silvery","accused","pastoral","barbed","adjoining","inspired","courteous","skillful","majestic","gilded","published","perennial","upright","seasoned","continual","papal","victorious","optical","ecstatic","agonizing","shameful","expressive","inconsistent","insulting","cloudy","defiant","restricted","approaching","aggregate","orthodox","unified","all-out","wooded","nationalist","favored","lofty","assured","smug","earthly","improving","instrumental","stray","clandestine","managerial","animated","intended","flawed","bent","clerical","outgoing","righteous","unspoken","poignant","faulty","defeated","authoritarian","treacherous","catastrophic","refreshing","unidentified","suicidal","sickly","disciplined","meticulous","preferable","trusted","hectic","husky","distraught","select","snowy","ferocious","crumpled","humiliating","divided","crippled","infamous","chic","broke","sovereign","continental","idealistic","first-rate","guarded","learned","nameless","runaway","metaphysical","senseless","boiled","needy","silver","recorded","polar","real-estate","stormy","incomprehensible","wiry","raging","composite","flamboyant","crimson","reproductive","intermediate","ubiquitous","repressive","hefty","listening","good-natured","parochial","stylish","high-tech","flaming","coronary","overweight","bathing","three-day","tidy","beleaguered","manifest","ludicrous","indigenous","adamant","placid","inept","exuberant","stony","salty","seductive","accomplished","impassive","grazing","congenial","misguided","wide-eyed","revised","bass","sonic","budgetary","halfway","ensuing","admiring","palpable","nightly","hooded","best-known","eighteenth-century","dissident","morbid","incumbent","demanding","inexperienced","hazy","revolving","rented","disadvantaged","innate","dietary","minute","cultivated","sealed","contemptuous","rhetorical","conciliatory","articulate","jobless","macho","forgotten","lifeless","proven","latent","secretive","perilous","token","graphic","alcoholic","overdue","permissible","shattering","preventive","illiterate","back","atmospheric","thermal","quaint","negotiated","preposterous","temporal","restrained","triangular","mayoral","spatial","heady","biblical","fitting","pessimistic","mammoth","allied","failed","intuitive","nagging","tidal","angular","speechless","finishing","protracted","watchful","businesslike","automated","versatile","booming","pouring","misty","deceptive","sunken","singular","suspended","unworthy","immigrant","expressionless","airy","mournful","neurotic","cubic","unauthorized","economical","fund-raising","captive","blatant","far-reaching","subversive","imperfect","jolly","inaccurate","resentful","strenuous","suffering","hardened","malicious","unjust","perceptive","newborn","promised","differing","virgin","alarmed","grassy","frivolous","apologetic","wasteful","endangered","unarmed","adept","unavoidable","approved","trembling","stuck","high-ranking","crushing","prescribed","dependable","fragrant","expansive","unfriendly","covered","bemused","digital","probing","sloping","man-made","festive","unilateral","unmarked","bipartisan","statewide","burgeoning","devout","sickening","mediocre","adventurous","elevated","suggestive","accountable","virtuous","lame","heavenly","bruised","unbroken","irritable","affected","inconceivable","sometime","vile","baggy","timely","glistening","imagined","unprepared","unresolved","windy","humanitarian","overriding","detached","annoying","narrative","interminable","appalled","penal","unsatisfactory","instinctive","variable","cumulative","obedient","deficient","colossal","unaffected","extinct","routine","microscopic","compassionate","nominal","forlorn","distorted","mistaken","enclosed","infected","fervent","analogous","frigid","instructive","appointed","one-way","gnarled","problematic","sardonic","two-hour","hypothetical","prompt","anguished","electromagnetic","sensuous","homely","beaten","malignant","rotting","concealed","peripheral","creaking","impeccable","khaki","grinning","irreversible","rampant","wondrous","inward","manufactured","grisly","cooked","discriminatory","cerebral","knowing","auxiliary","operative","losing","genial","phonetic","ecclesiastical","sarcastic","incorrect","ruddy","well-to-do","inexplicable","unreliable","developmental","woolen","agitated","lyrical","consequent","calculated","molecular","pompous","present-day","shaggy","even","inhuman","sublime","diagnostic","manly","raucous","balding","after","bilateral","mounted","blackened","assembled","separated","gaudy","evangelical","darling","juicy","impotent","receptive","irritating","pulmonary","dazed","cross-country","unavailable","parked","habitual","lexical","lowered","unwise","planetary","throbbing","enigmatic","superstitious","threatening","manned","childlike","sporting","right-hand","adult","reflective","white-haired","discernible","celestial","prodigious","translucent","equitable","epic","frayed","arduous","flimsy","penetrating","howling","disparate","alike","all-time","deformed","comical","inert","procedural","resistant","vibrant","geographic","wistful","specified","rightful","spirited","unborn","enjoyable","regal","cumbersome","burned","frenzied","gubernatorial","deteriorating","haunted","evasive","neglected","anthropological","inescapable","clear-cut","visionary","bloated","accumulated","agrarian","pained","dwindling","heightened","gray-haired","distressing","grinding","insecure","archaic","piercing","fluent","leisurely","giddy","slimy","oncoming","short-lived","spinal","wholesome","unanswered","illegitimate","staunch","two-day","rumpled","speedy","soaked","rocking","invaluable","gallant","tacit","finite","inviting","sporadic","powdered","cheery","volcanic","optional","mischievous","flowered","contagious","automotive","inflated","mythic","analytical","infrared","two-week","binding","ancestral","dissatisfied","upstate","veritable","unaccustomed","oily","monotonous","seated","feeding","fluorescent","undue","impassioned","picturesque","vocational","tranquil","tumultuous","rustic","patterned","two-story","pagan","flash","playing","exhilarating","maiden","three-dimensional","mythical","thriving","drab","black-and-white","honorary","dingy","founding","imperative","indistinguishable","lightweight","avid","dreamy","everlasting","obsessive","tional","homogeneous","inner-city","changed","tame","colorless","haggard","implacable","altered","unequal","focal","perceptual","literate","priceless","diminishing","harmonious","dark-haired","fatty","squat","undecided","banal","fruitful","pioneering","innocuous","cordial","rewarding","unsafe","maritime","overcrowded","timeless","fledgling","nostalgic","abreast","one-time","humid","astronomical","one-man","deepening","blazing","fleshy","dishonest","succeeding","qualitative","needless","rickety","joyful","stated","ambivalent","hybrid","six-month","limiting","workable","sleepless","unpaid","mundane","flashy","stagnant","bumper","recurring","sinful","immaculate","synonymous","measured","thrilling","long-standing","unruly","bewildering","unfit","edgy","numerical","sumptuous","fragmented","puffy","elastic","high-pitched","momentous","woven","unsteady","unnamed","cosmetic","snap","impenetrable","floral","waving","promotional","tenuous","lonesome","embroidered","strident","cherished","aghast","fundamentalist","white-collar","afloat","disruptive","law-enforcement","gathered","indefinite","intervening","publicized","geometric","disciplinary","descriptive","wavy","edible","disgruntled","obligatory","untrue","amber","snug","resolute","awed","simplistic","grandiose","crippling","high-speed","mounting","glaring","small-town","cavernous","hushed","wage-price","demographic","diseased","unpublished","causal","defenseless","sheltered","dormant","compulsive","loved","willful","truthful","punitive","disposable","ajar","drowsy","statutory","tanned","proprietary","informed","unheard","decision-making","transient","unlawful","dour","negligible","underwater","optimum","illusory","imaginable","borrowed","divergent","looking","exempt","contentious","forbidden","cowardly","masked","crazed","silken","parched","furry","wandering","insensitive","over-all","elated","waxed","veiled","envious","insidious","scrawny","unwarranted","lithe","abrasive","pretentious","far-off","murdered","deft","prickly","musty","shapeless","incongruous","gruesome","honored","perceived","grieving","unspecified","dizzying","privy","noteworthy","charred","median","fearless","twisting","unattractive","flawless","welcoming","flushed","hardy","glum","scenic","devious","recurrent","distasteful","jubilant","ballistic","hilarious","naughty","bustling","discarded","pristine","exemplary","fading","complacent","incessant","engaging","twentieth-century","protectionist","rudimentary","traumatic","steamy","emphatic","hard-line","teeming","generating","stuffy","connecting","stationary","genteel","populist","supple","hateful","retrospective","glazed","lawful","arched","tiresome","lucid","reserved","pivotal","grimy","surly","anti-Soviet","contrary","quarterly","old-time","residual","spiral","decaying","threatened","docile","appreciative","jovial","fascist","worrisome","red-haired","undisturbed","creamy","well-dressed","serial","existential","mountainous","pastel","self-sufficient","spoken","express","tasty","maroon","infrequent","deceased","full-fledged","transitional","leafy","gravitational","furtive","prophetic","nasal","unwelcome","troubling","immobile","merciful","uncontrollable","impartial","unfavorable","attendant","associated","high-rise","vascular","fateful","concerted","rash","stubby","paramount","impulsive","fraudulent","drooping","reciprocal","usable","fast-food","touchy","astute","oversized","mottled","slack","fruitless","unhealthy","decorated","shady","shaped","fanciful","quivering","charismatic","sordid","oppressed","inaccessible","fastidious","brazen","gloved","crumbling","underdeveloped","scarred","rambling","incipient","remedial","derelict","incompatible","fanatical","smoked","secondhand","hypnotic","failing","marching","flattened","paradoxical","unskilled","esthetic","tolerable","pungent","substitute","soggy","terse","tiring","fictitious","manageable","inventive","haughty","normative","premier","grudging","vested","exhausting","cross-legged","self-evident","away","horrified","prolific","incoherent","quantitative","full-length","year-round","unkind","provisional","exterior","brash","inconclusive","landed","breathtaking","acrid","noted","resultant","long-time","resounding","lovable","hypocritical","plush","foggy","acknowledged","idiotic","tracking","ceramic","taxable","enterprising","flashing","wee","barbaric","deafening","orbital","lurid","dated","hated","buoyant","mating","pictorial","overlapping","lax","archetypal","manic","limitless","puzzling","condescending","hapless","meek","faceless","uncommitted","horrid","greenish","unorthodox","unending","accelerated","day-care","undeniable","bushy","searing","fearsome","unharmed","divisive","overpowering","diving","telling","determining","uptight","cast","enlarged","ebullient","disagreeable","insatiable","grown-up","demented","puffing","inconvenient","uncontrolled","inland","repulsive","unintelligible","blue-eyed","pallid","nonviolent","dilapidated","unyielding","astounded","marvellous","low-cost","purposeful","courtly","predominant","conversational","erroneous","resourceful","converted","disconcerting","oblique","dreaded","indicative","silky","six-year","front-page","biting","flowering","sunlit","licensed","unspeakable","adrift","awash","identifiable","girlish","zealous","spooky","uncompromising","deserving","driven","certified","unlucky","temperate","budding","impractical","public-relations","inflexible","sensory","pornographic","outlandish","resonant","belligerent","wan","leftover","spotted","soybean","easygoing","vengeful","proportional","inaugural","dank","screaming","heterosexual","sliced","year-old","considerate","thunderous","distressed","warring","assertive","foreseeable","psychotic","intermittent","anti-Communist","generalized","unable","molten","excruciating","illustrious","voluminous","offending","trustworthy","grating","laughing","one-year","industrious","uninterrupted","dashing","speaking","metabolic","flattering","one-sided","ineffectual","primal","digestive","taped","floppy","jaunty","practiced","walled","hospitable","dutiful","melodramatic","intestinal","cluttered","conclusive","complementary","unprotected","buzzing","attributable","tasteless","forthright","wily","hourly","delayed","sweating","affable","studied","chubby","thyroid","chilled","conducive","childless","faltering","authorized","buried","land-based","observable","hurried","curving","dismayed","pernicious","upturned","believable","questioning","syndicated","pharmaceutical","high-risk","resigned","discrete","likable","imprisoned","cocky","outdated","autocratic","ablaze","askew","grammatical","wintry","incidental","matter-of-fact","disputed","exorbitant","low-level","sodden","skeletal","disproportionate","soiled","cellular","ephemeral","perfunctory","inconsequential","flourishing","intentional","two-way","elemental","whispered","four-day","stinking","informative","tenacious","outlying","virulent","horrendous","horrifying","burnt","longstanding","senile","unmoving","deprived","interpersonal","intimidating","posh","dainty","portly","nondescript","inquisitive","exiled","capricious","scandalous","severed","debilitating","widowed","horny","sallow","up-to-date","self-contained","carefree","boisterous","coordinated","anti-Semitic","superfluous","metric","expressed","enchanting","disorderly","paternal","wanton","frightful","free-lance","extremist","lined","scornful","inseparable","obese","ponderous","imperious","indistinct","adrenal","belated","rippling","valiant","livid","mystic","cracking","subterranean","invading","rusted","esoteric","red-faced","segregated","lanky","departmental","allergic","predatory","enforced","anti-inflation","implied","flagrant","best-selling","haphazard","trailing","seedy","real-life","unannounced","utilitarian","roving","despairing","immature","simulated","embattled","poisoned","patronizing","baffled","centralized","weathered","weeping","mutilated","painstaking","tax-exempt","socioeconomic","tearful","stringy","projecting","low-key","single-minded","shadowed","vehement","darn","fluffy","apocalyptic","completed","intelligible","furnished","elongated","worsening","eclectic","bacterial","earthy","sagging","wide-ranging","face-to-face","settled","dogmatic","anti","secluded","baffling","coy","pathological","echoing","bridal","autobiographical","instantaneous","ornamental","satirical","voluptuous","movable","kinetic","merciless","tireless","three-month","unconcerned","impromptu","turning","follow-up","retaliatory","arcane","waterproof","justifiable","glassy","unearthly","shuttered","inverted","bogus","petrified","simmering","guided","gritty","widening","generic","pretrial","returning","boundless","swirling","northeastern","swell","tive","minuscule","estranged","upbeat","explanatory","repetitive","repressed","vindictive","shrinking","canny","little-known","hydraulic","unrelenting","looming","supersonic","justified","lukewarm","unmoved","blurred","double-breasted","sanitary","unforgettable","diligent","unconventional","ashen","wordless","stainless","inlaid","irritated","spotless","pudgy","yellowish","lateral","adopted","lowly","obnoxious","utopian","called","unimaginable","hairless","foregoing","opulent","garish","nocturnal","rousing","unexplained","cosmopolitan","milky","medium-sized","all-night","bloodshot","rueful","hard-working","crafty","familial","iced","violet","arctic","ceaseless","exasperated","warped","aquatic","gruff","terrestrial","contrasting","egalitarian","needful","spent","untrained","escalating","liberated","long-haired","abortive","syntactic","consummate","lumpy","spoiled","ten-year-old","talkative","whimsical","weighty","audio","inflammatory","deplorable","spicy","corrugated","morose","sobering","southwestern","three-year-old","methodical","prehistoric","carpeted","smelly","processed","overheated","interstellar","agile","approximate","sadistic","living-room","irate","smashed","frontal","venereal","indiscriminate","suggested","cultured","creeping","recognized","toothless","handmade","mellow","fetal","disinterested","gratifying","trusting","small-scale","intravenous","crashing","exhaustive","afire","clammy","sleazy","florid","heartless","transcendent","restored","demonic","abusive","avowed","shrunken","objectionable","tailored","arms-control","listless","polluted","palatable","funded","elective","entrenched","classy","operatic","daunting","roaring","preferential","languid","three-hour","virile","inspiring","enhanced","scrupulous","bottomless","ginger","wispy","advantageous","rapt","umbilical","uphill","ordered","enraged","detrimental","curt","exalted","hard-pressed","intangible","fussy","forgiving","facile","populous","condemned","mashed","hard-boiled","introductory","rowdy","switching","perplexing","spilled","southeastern","undulating","fractured","inherited","inscrutable","measurable","stunted","hormonal","stylized","hierarchical","air-conditioned","aimless","subsidized","paying","symmetrical","nomadic","cloudless","reigning","thatched","perceptible","anesthetic","anti-American","miscellaneous","homesick","preparatory","seven-year","big-city","decadent","searching","all-important","inanimate","senatorial","diminutive","soft-spoken","contingent","dusky","smashing","precipitous","bulging","standardized","biographical","restive","indecent","upper-class","ecumenical","interchangeable","lumbering","fascinated","untidy","indulgent","leaden","wanted","endemic","doomed","wanting","receiving","engaged","unparalleled","abbreviated","malevolent","wishful","carnival","world-wide","protruding","resplendent","stranded","structured","biased","frosty","northwestern","viral","mindful","paved","indeterminate","painless","second-floor","geological","permissive","downhill","unsuspecting","expectant","fabled","jittery","windowless","evocative","unsolved","disoriented","monastic","soluble","misshapen","antiquated","repugnant","non-Communist","retiring","shaded","combative","high-powered","resilient","antagonistic","starched","vice-presidential","speckled","lopsided","bluish","late-night","prim","unrestrained","almighty","tyrannical","unkempt","menstrual","bleached","overgrown","idiosyncratic","shoddy","hallowed","trying","halting","princely","drugged","gratuitous","descending","fatherly","avant-garde","laborious","pinched","disguised","caustic","bespectacled","handwritten","goodly","itinerant","cryptic","undisclosed","affordable","outmoded","expedient","moody","tepid","firsthand","digging","elitist","observed","chartered","slain","five-day","unimpressed","tactful","idyllic","prostrate","ramshackle","expert","deferred","undistinguished","prized","transatlantic","crystalline","tacky","haunting","nutritious","bereft","turquoise","time-consuming","sanguine","culinary","fraught","precocious","assigned","scrambled","advisable","nationalistic","long-awaited","unwrapped","unchallenged","circumstantial","pleasurable","compressed","humanistic","unforeseen","diversified","frenetic","disapproving","proletarian","conspiratorial","featureless","going","commendable","no-nonsense","chipped","surreal","salient","pissed","insurmountable","backstage","contented","indebted","adoring","one-room","prewar","potted","accelerating","thorny","possessive","abiding","ever-increasing","bloodless","high-technology","counterproductive","attracting","entrepreneurial","cooling","unoccupied","craggy","leathery","degenerate","additive","weakened","quilted","untold","incandescent","intractable","middle-income","abject","self-made","gaseous","anal","displaced","unabashed","immutable","fluttering","ten-year","bearable","stamped","darkening","beefy","petite","charging","high-quality","left-hand","age-old","checkered","stupendous","priestly","loath","endearing","exacting","correctional","freak","sneaky","disgraceful","unholy","oriental","wayward","societal","hard-core","bilingual","flipping","staid","paramilitary","heartfelt","shapely","kosher","heedless","incurable","controlling","in-house","choral","manicured","cardinal","inconspicuous","steely","vanishing","misplaced","centre-fire","enchanted","unfounded","wrecked","womanly","delirious","deposed","panicky","differential","tawny","articulated","coded","wide-open","unregulated","lenient","feathered","simplified","beguiling","sectarian","producing","tiled","inorganic","frosted","lusty","scented","rotating","grievous","dissimilar","salaried","unequivocal","strangled","grubby","alluring","downcast","restraining","unjustified","contaminated","lacy","cinematic","second-class","splintered","adorable","derisive","state-owned","requisite","fleeing","uncomplicated","motherly","inter","high-heeled","climatic","republican","unqualified","leveraged","intercontinental","uncharacteristic","compositional","unwritten","patriarchal","brusque","unresponsive","replete","corrective","reflected","scraping","doctoral","premium","deductible","alternating","amorous","overjoyed","recalcitrant","presumptuous","vaulted","declared","inexorable","groggy","diminished","restful","retroactive","presumed","monolithic","curtained","tortured","ground","trendy","brassy","prosaic","inactive","chaste","bumpy","aggrieved","corny","centrist","trapped","noxious","jerky","concomitant","withholding","poorly","stolid","unguarded","methodological","primordial","retreating","telescopic","sidelong","off-duty","pleated","dissenting","agreed","double-action","optimal","plaintive","banned","kindred","quintessential","impervious","jumping","disenchanted","observant","congested","second-rate","reasoned","extrinsic","infantile","transitory","coveted","small-time","doctrinal","incomparable","jaded","special-interest","sociable","shameless","coloured","ascending","fraternal","queasy","wont","exhilarated","salted","disquieting","listed","unchanging","nine-year-old","unrestricted","uppermost","reputable","dummy","skimpy","crusty","corrosive","bubbling","decrepit","unsuitable","snarling","destitute","illuminating","systemic","material","unwashed","rushing","dialectical","jeweled","attached","liberating","judicious","errant","vanished","worn-out","erstwhile","uninformed","twelve-year-old","longterm","petulant","twin","self-righteous","afflicted","snappy","tantamount","sworn","unethical","drained","hydroelectric","perplexed","logistical","concentric","unifying","lunatic","invincible","diffident","inexhaustible","discouraging","dreamlike","artful","rolled","suppressed","secretarial","smoldering","redundant","forensic","million-dollar","self-styled","earned","weightless","signed","compensatory","glacial","unmanned","stalwart","funky","intensified","uninterested","submerged","urbane","glib","ascetic","contractual","warlike","high-priced","diagonal","cylindrical","gargantuan","illuminated","unconditional","hulking","supplementary","dictatorial","puny","sedate","moonlit","eight-year-old","gullible","counterfeit","alienated","spinning","analytic","nimble","adaptive","individualistic","numbered","blissful","insolent","supplemental","delectable","inordinate","unbalanced","tormented","unchecked","aspiring","punishing","self-serving","crossed","discretionary","box-office","snow-covered","improvised","squalid","orphaned","grizzled","unsmiling","disappearing","affiliated","readable","blocking","bullish","contending","burned-out","bloodied","subsidiary","complimentary","unclean","scanty","uprooted","farfetched","solicitous","regulated","threadbare","choppy","ever-present","negligent","nonstop","one-day","wild-eyed","infuriating","vivacious","abominable","wrought","inaudible","braided","transcendental","desultory","climactic","appellate","interlocking","submissive","unmatched","dapper","demeaning","adaptable","well-meaning","lustrous","tax-free","ungrateful","gentlemanly","missed","loathsome","incalculable","blistering","amenable","tremulous","massed","nonpartisan","unsettled","three-story","succulent","trite","masterful","reticent","unsettling","proverbial","strapping","spurious","invulnerable","paltry","embryonic","repeating","neural","sultry","metaphorical","foreign-policy","linked","pubic","beaming","ministerial","phantom","quizzical","hilly","cold-blooded","gregarious","three-piece","untroubled","bisexual","pensive","unpretentious","exploratory","unscathed","irrepressible","pelvic","newfound","starry","corned","overworked","illogical","unfaithful","interrelated","saintly","overcast","connected","ungainly","organizing","carnal","philosophic","nationalized","fickle","ultraviolet","crass","undeveloped","unprofitable","sheepish","archaeological","out-of-town","balmy","spongy","infallible","callous","scathing","rheumatic","audacious","participating","swarthy","hand-held","comatose","modernist","stellar","antinuclear","delinquent","time-honored","presiding","relaxing","high-pressure","impetuous","hypodermic","fringed","favourite","unscrupulous","inspirational","mystified","wobbly","intrepid","deferential","burdensome","stored","supervisory","seventeenth-century","six-day","interdependent","updated","all-powerful","unitary","stand-up","laconic","penniless","steadfast","dogged","scholastic","convertible","mingled","sorrowful","symptomatic","stylistic","well-intentioned","consuming","sketchy","weakening","generative","atrocious","first-quarter","irrevocable","charged","stoned","dividing","apathetic","debatable","uncomprehending","overhanging","galloping","kinky","uncritical","suave","undisputed","spiky","inarticulate","extracurricular","guttural","impressed","departing","yellowed","discontented","adroit","high-fiber","second-hand","blinking","formless","unsavory","new-found","withered","collected","menial","unobserved","flabby","afterward","vanquished","stained-glass","hour-long","bittersweet","invalid","incriminating","commensurate","all-American","assumed","tried","cursory","absorbing","clearing","confirmed","stressful","depleted","eight-year","participatory","stripped","concave","regrettable","fortified","effortless","regressive","irreverent","collegiate","defunct","grainy","inhospitable","gripping","grizzly","restoring","arterial","busted","indomitable","demure","rabid","headlong","blue-green","bound","breezy","materialistic","uneducated","scruffy","cohesive","full-blown","cranky","motivated","mauve","hardworking","melodic","genital","decorous","comely","rife","purported","hurtful","six-foot","macabre","odious","convulsive","well-trained","heterogeneous","curled","pearly","spindly","latter-day","innermost","clipped","checked","masterly","laughable","naturalistic","tinkling","impudent","fitful","illustrated","speeding","roasted","in-depth","helluva","vigilant","empty-handed","forged","wrought-iron","disgraced","agonized","infirm","preserving","tasteful","onerous","shredded","impregnable","slanted","tainted","opened","first-time","machine-gun","bottled","seismic","fetid","saturated","insubstantial","full-page","aromatic","stingy","promiscuous","unlit","regimental","spellbound","streamlined","bereaved","ruffled","creepy","treasured","ensconced","one-party","well-educated","pert","mercantile","all-purpose","voracious","tortuous","despised","unadorned","offhand","qualifying","manipulative","indelible","well-established","revolting","ethereal","roasting","prohibitive","domed","whipped","overstuffed","garrulous","skittish","revived","heartening","jumpy","grilled","melted","unfocused","spectral","unproductive","top-level","life-size","three-way","negotiable","disloyal","turn-of-the-century","four-hour","unopened","devilish","amorphous","antiseptic","sharpened","primeval","unrecognizable","ineligible","expendable","deathly","auspicious","insoluble","inimical","unquestioned","far-flung","medicinal","deep-seated","formative","iridescent","fragmentary","distinguishable","auburn","closed-circuit","emeritus","third-floor","hazel","tumbling","departed","obstinate","portentous","quixotic","scorched","adjustable","winged","intrusive","taxing","high-ceilinged","barbarous","decreasing","sleeveless","unattended","tight-lipped","concluding","unobtrusive","starved","quirky","big-time","sooty","copious","stalled","scriptural","unconvincing","earthen","throaty","august","extant","sexist","exultant","cancerous","psychedelic","yielding","matched","chunky","unfathomable","concise","admitting","knitted","projective","euphoric","garbled","divisional","despondent","recommended","passable","vegetarian","indefatigable","irreparable","feisty","untenable","contrite","angelic","reputed","untimely","dejected","appreciable","remembered","hellish","rear-view","open-air","ill-fated","nonpolitical","factional","separatist","contributing","post-war","uneventful","metaphoric","unsound","unwitting","venomous","harried","engraved","collapsing","reformist","thematic","inclusive","cheering","springy","obliging","contemplative","unbridled","state-run","reflex","allegorical","geopolitical","disembodied","issuing","bountiful","alright","overbearing","muddled","congenital","distinguishing","absorbed","tart","french","autumnal","verifiable","grueling","crackling","aft","punishable","freckled","indestructible","imprecise","hard-nosed","thoughtless","through","proficient","pent-up","never-ending","hunted","defensible","arresting","across-the-board","spotty","orchestral","undefined","stacked","implausible","antitank","unwary","inflamed","sacrificial","oil-producing","leaky","mint","chronological","conquering","jumbo","three-week","addictive","uninhibited","substandard","contracting","degenerative","triumphal","flowery","cardiovascular","shaken","undefeated","unassuming","luscious","unperturbed","gleeful","sentencing","brawny","perfumed","mild-mannered","healthful","left-handed","rancid","well-defined","unmanageable","drowning","clinging","anachronistic","revered","enriched","capitalistic","good-by","invigorating","practicing","unsold","long-legged","unruffled","aboriginal","inane","bedraggled","early-morning","run-down","straight-backed","reverent","acquired","bestselling","top-secret","woolly","foolhardy","sticking","blue-black","impassable","overcome","coiled","front-line","tinted","acquisitive","slatted","octagonal","receding","investing","doctrinaire","all-white","caring","prejudiced","slow-moving","circulating","science-fiction","shortsighted","disaffected","lawless","chastened","lewd","rubbery","foaming","unsympathetic","ladylike","betrayed","neurological","shouting","good-sized","electrostatic","untoward","flabbergasted","citywide","unanticipated","knotted","whitewashed","year-end","enticing","migratory","multicolored","hashish","ascorbic","topless","heathen","spherical","filmy","deviant","centennial","proportionate","instructional","contrived","savvy","over-the-counter","fast-moving","measuring","uptown","compliant","favourable","unforgivable","undamaged","psychoanalytic","gebling","bubbly","ready-made","caged","ostentatious","superhuman","busing","cream-colored","self-destructive","ostensible","cobbled","whirling","released","showy","baleful","red-hot","named","monogamous","fallow","disdainful","cyclical","long-running","pitiless","diffuse","omnipresent","mossy","cutting","astounding","lyric","dark-blue","unsophisticated","indigent","coincidental","imperceptible","veterinary","coercive","multilateral","ageless","law-abiding","functioning","beneficent","crawling","overturned","steamed","comprehensible","oil-rich","undetected","ribbed","nautical","textured","fast-growing","nauseous","vaunted","paralyzed","maimed","short-range","impure","unintended","practicable","intermediate-range","unfulfilled","behind-the-scenes","backhand","voluble","goofy","apolitical","contraceptive","waning","blasted","sundry","profane","binary","rock-and-roll","ruinous","open-ended","next-door","withering","conical","flustered","decided","able-bodied","round-trip","decreased","half-empty","sponsored","riotous","stereotyped","five-minute","irreplaceable","harrowing","uninteresting","salutary","frugal","disjointed","cupped","freshwater","shaven","ravenous","bulbous","stepped-up","swaying","two-room","valued","planted","bright-eyed","unreadable","trucking","infatuated","dysfunctional","pinkish","futuristic","airtight","unseemly","sizzling","mercurial","conic","unfettered","undisciplined","unrecognized","well-publicized","income-tax","self-appointed","ice-cold","biochemical","contemptible","barefooted","droll","mythological","tree-lined","rearing","luxuriant","heartbreaking","tufted","well-organized","selfless","world-class","unwieldy","contested","rasping","downright","ingratiating","self-proclaimed","parasitic","graying","reformed","cautionary","untested","beaded","maniacal","eucalyptus","pliable","air-conditioning","moot","traceable","anti-abortion","antisocial","reprehensible","self-imposed","yellowing","teasing","porous","ersatz","unwavering","untouchable","underprivileged","auditory","escaping","subservient","unspoiled","anterior","fatuous","lordly","infernal","bouncing","taboo","orthopedic","spiteful","surging","nuts","esteemed","outlawed","pushy","displeased","self-confident","attainable","bowed","cast-iron","despicable","unconvinced","famished","coed","bygone","nonaligned","sectional","typed","squeaky","disparaging","cut-rate","heart-shaped","offbeat","velvety","well-worn","upsetting","leery","long-lost","horse-drawn","puritanical","payable","fertilized","predicted","allowable","peaceable","soundless","marshy","discordant","intoxicating","concurrent","uncut","tantalizing","pedagogical","accursed","two-man","connective","hawkish","ripped","cleared","double-digit","unencumbered","yawning","manifold","stopped","untreated","subliminal","grayish","gory","upper-middle-class","avenging","self-fulfilling","equatorial","saucy","barred","arch","midwestern","blue-gray","tarnished","leafless","incisive","unearned","botanical","feline","extraneous","prep","intransigent","change-minimizing","insurgent","acrimonious","thermonuclear","blue-chip","crummy","acoustic","oversize","fated","galactic","cantankerous","ill-advised","detectable","lower-class","sacrosanct","palatial","conditional","insulated","step-by-step","nebulous","two-dimensional","well-heeled","bronchial","subatomic","semifinal","first-year","dark-eyed","tinny","attacking","indecisive","anatomical","brotherly","blooming","sinuous","meditative","socalled","rheumatoid","received","bleary","half-naked","leaded","woody","averse","shuddering","door-to-door","heretical","suspect","untapped","ravaged","decentralized","rutted","ineffable","intolerant","mechanized","fortuitous","equestrian","seven-year-old","darting","consoling","modern-day","ground-floor","emblematic","lurking","two-year-old","purplish","disorganized","vaudeville","circulatory","eight-hour","presentable","anarchic","unsatisfied","labored","maudlin","trampled","gibberish","unaccountable","sedentary","heavy-duty","thrilled","tutoring","self-centered","do-it-yourself","inquiring","uncaring","disillusioned","bloodstained","surface-to-air","consular","subconscious","four-year-old","collaborative","terraced","figurative","sinewy","horn-rimmed","impertinent","hit-and-run","standby","medium-size","peremptory","incremental","first-aid","dyed","centrifugal","omnipotent","lascivious","two-month","unionized","discredited","mass-produced","feathery","self-indulgent","liturgical","enviable","fifteen-year-old","buxom","abashed","urinary","newsworthy","flailing","beastly","undiscovered","strong-willed","prenatal","brownish","announced","flaky","washed","nightmarish","broad-shouldered","short-sleeved","two-bit","self-assured","whitish","suffocating","black-haired","full-size","self-help","created","uninhabited","smokeless","no-fault","unfashionable","mushy","forested","adhesive","creased","insufferable","down-to-earth","trifling","landless","disreputable","self-effacing","sporty","confined","adoptive","monogrammed","motley","duplicate","silver-haired","rejected","undifferentiated","blasphemous","institutionalized","blue-and-white","hip","winsome","button-down","discerning","abused","clean-cut","bracing","self-supporting","unsupported","premarital","flattered","studious","repetitious","marketable","anemic","meaty","airless","unhurried","galvanized","feal","peace-keeping","rapacious","bulletproof","well-placed","helmeted","packaged","court-ordered","aggravated","gastrointestinal","hand-to-hand","sixteen-year-old","fretful","fourth-quarter","conquered","satiric","nutty","befuddled","humorless","pitched","burnished","mirrored","fishy","fluted","conditioned","military-industrial","one-story","barbarian","branching","dynastic","unthinking","unconscionable","hunched","post-World","capital","putative","incendiary","shaving","topical","self-satisfied","farcical","narcissistic","kneeling","born-again","old-line","amateurish","ill-fitting","scaly","unpainted","eroding"];var nouns={};Object.defineProperty(nouns,"__esModule",{value:!0});nouns.default=["man","world","hand","room","face","thing","place","door","woman","house","money","father","government","country","mother","water","state","family","voice","fact","moment","power","city","business","war","school","system","car","number","office","point","body","wife","air","mind","girl","home","company","table","group","boy","problem","bed","death","hair","child","sense","job","light","question","idea","law","word","party","food","floor","book","reason","story","son","heart","friend","interest","right","town","history","land","program","game","control","matter","policy","oil","window","nation","position","ground","blood","action","wall","street","husband","fire","mouth","arm","sound","service","chance","information","price","building","road","paper","court","attention","space","trouble","form","society","art","market","force","effect","nature","chair","period","order","television","president","tax","field","glass","thought","industry","process","phone","plan","center","truth","couple","decision","change","eye","campaign","issue","situation","effort","report","sun","experience","peace","letter","level","energy","role","development","result","evidence","meeting","smile","support","baby","team","show","community","brother","picture","kitchen","production","press","study","daughter","director","dinner","class","defense","piece","record","desk","stage","earth","movement","future","board","security","sea","horse","language","public","church","course","bill","river","coffee","wind","bank","corner","committee","pain","help","answer","subject","hospital","film","economy","trade","feeling","member","apartment","ship","silence","seat","gold","education","leader","pressure","doctor","shoulder","sight","scene","figure","crowd","fear","telephone","labor","success","population","style","station","value","sky","growth","foot","radio","sign","strength","capital","neck","college","budget","breath","choice","direction","guy","agreement","speech","skin","will","amount","plane","practice","marriage","audience","movie","gun","living","hall","concern","income","quality","dog","cause","hotel","race","difference","stone","box","army","trip","distance","attack","chairman","election","presence","computer","science","color","theory","spring","machine","purpose","organization","material","image","tree","surface","officer","administration","act","statement","battle","page","suit","lady","play","stock","list","freedom","bar","relationship","farm","authority","student","conference","ball","structure","nose","plant","career","wood","basis","deal","source","chest","message","stuff","middle","sister","drink","majority","sex","store","trial","character","boat","union","animal","ice","front","firm","heat","hope","rock","weight","disease","spirit","memory","king","response","manner","opinion","operation","increase","lawyer","expression","kid","bag","department","crime","train","executive","aid","dream","beginning","rain","prison","conversation","shirt","lunch","possibility","pleasure","management","danger","rule","throat","wine","behavior","return","hat","surprise","snow","property","flight","training","ability","project","camp","range","approach","agency","treatment","reality","village","bottle","attempt","crisis","drug","violence","inflation","enemy","responsibility","opposition","newspaper","victory","dress","condition","darkness","opportunity","account","degree","pocket","performance","manager","visit","threat","failure","brain","driver","charge","beer","coat","shot","metal","activity","influence","intelligence","bit","official","existence","example","truck","note","construction","shape","event","screen","faith","safety","path","culture","chief","relief","grass","contract","product","investment","weather","soul","murder","bedroom","magazine","model","cup","leg","traffic","writer","beauty","song","share","cancer","patient","credit","club","argument","speed","quarter","design","desire","vision","candidate","bottom","pattern","date","finger","teacher","tea","section","article","flesh","island","balance","spot","meaning","technology","crew","proposal","leadership","concept","object","impact","guard","analysis","birth","shop","knife","advantage","generation","appearance","variety","anger","religion","reaction","fight","star","exchange","agent","investigation","milk","judge","silver","region","steel","ear","sugar","strike","youth","hole","thinking","attitude","supply","start","jacket","jury","taste","secretary","mountain","confidence","master","artist","spokesman","demand","cigarette","track","captain","network","whole","university","conflict","noise","smoke","commission","mirror","accident","plastic","garden","debate","interview","command","tradition","protection","dust","watch","lead","solution","measure","motion","discussion","mission","opening","respect","extent","struggle","goal","tongue","moon","author","iron","breakfast","competition","cover","legislation","environment","sake","justice","fuel","hill","key","length","shock","band","version","contact","engine","settlement","mistake","restaurant","revolution","estate","camera","beach","post","pool","fashion","football","border","touch","laughter","title","background","principle","strategy","roof","forest","philosophy","entrance","pause","doubt","bird","tape","belief","card","ring","occasion","wheel","capacity","cat","collection","passage","writing","bridge","owner","novel","pride","damage","contrast","judgment","gift","division","professor","bathroom","plate","explanation","smell","district","park","wave","player","present","theater","atmosphere","emergency","leather","impression","painting","neighborhood","block","function","circle","sentence","priest","method","warning","editor","ceiling","target","tour","gate","site","baseball","airport","shadow","walk","approval","gesture","individual","difficulty","attorney","criticism","affair","request","doorway","reputation","minority","consumer","notion","general","convention","being","honor","partner","chain","commitment","weapon","joke","coal","meal","reading","detail","library","debt","other","mail","drive","fellow","profit","soldier","forehead","housing","excitement","soil","literature","pilot","dance","reform","volume","scale","imagination","challenge","desert","secret","poet","cabin","average","factor","corn","check","wonder","absence","search","wedding","yard","hero","address","confusion","fool","package","victim","fault","platform","democracy","regime","terror","nurse","stream","offer","medicine","flow","grain","row","county","self","glance","humor","promise","employment","advance","planet","recreation","trail","chicken","storm","creature","mass","stand","ass","gaze","poetry","coast","lake","council","breast","corridor","conclusion","talent","tension","reporter","cut","appeal","total","belt","jail","passion","mayor","claim","combination","highway","wire","rifle","cheek","frame","exercise","incident","testimony","ticket","coach","connection","expert","disaster","valley","minister","deck","territory","chin","universe","independence","counter","resistance","cell","governor","salt","elevator","loan","release","schedule","porch","sheet","cloth","personality","actor","bomb","temperature","bench","break","code","journey","childhood","emphasis","aspect","pot","branch","identity","guest","arrival","recognition","hearing","lap","diet","factory","horror","fence","survey","fate","habit","lobby","bone","routine","discovery","comment","burden","treaty","knee","route","cry","ocean","fund","map","signal","ride","bear","deficit","height","element","sword","birthday","standing","cream","panel","fighting","travel","grandfather","creation","appointment","chapter","funeral","phrase","shore","planning","couch","survival","engineer","wagon","suggestion","waste","guilt","chamber","commander","clock","establishment","flag","content","supper","consciousness","proof","pack","beard","portion","comfort","resolution","sunlight","substance","benefit","honey","protest","prayer","stick","description","device","cloud","display","uniform","gasoline","tail","satisfaction","blanket","mess","consumption","drop","invasion","theme","mystery","belly","association","prospect","port","pipe","reference","skill","rear","heaven","destruction","worker","concentration","file","flat","cab","consideration","uncle","customer","laugh","radiation","favor","studio","boss","transportation","wage","fortune","tent","poem","procedure","clerk","surgery","percentage","expense","cap","household","match","bunch","column","intention","cousin","involvement","host","definition","wheat","permission","can","warmth","draft","silk","aide","lip","conviction","rope","illness","instrument","gap","string","adult","sweat","lover","evil","faculty","enthusiasm","farmer","missile","grin","tank","expansion","emotion","waist","discipline","distinction","technique","profession","wisdom","square","laboratory","tie","review","stranger","communication","pile","arrangement","palm","ceremony","tower","sympathy","deputy","script","nomination","friendship","institution","pass","civilization","magic","client","standard","significance","sport","defeat","announcement","reduction","grandmother","bowl","closet","genius","league","citizen","delivery","button","necessity","reader","lesson","trust","green","experiment","escape","craft","pistol","limit","witness","error","assistant","grace","salary","alarm","fist","potential","withdrawal","phase","bell","perspective","rose","score","amendment","fever","tip","god","crop","vehicle","barn","symbol","tale","exception","shift","scheme","suicide","tendency","logic","license","pollution","trend","bath","focus","producer","distribution","cotton","alternative","vacation","muscle","cycle","steam","palace","harm","location","beef","shame","policeman","compromise","tube","participation","fat","item","curiosity","blade","membership","lord","departure","shade","acid","enterprise","jet","selection","jungle","bond","retirement","alliance","bow","railroad","soup","airline","divorce","sofa","gear","gentleman","robe","plot","speaker","examination","egg","handful","recovery","embassy","entry","bastard","improvement","grip","invitation","barrel","context","controversy","fiction","revenue","reply","garage","crash","collar","landscape","grief","pen","teaching","angle","trunk","acceptance","recession","abortion","explosion","application","counsel","dignity","paint","landing","mixture","triumph","stove","winner","summit","thumb","depth","feature","setting","payment","grave","notice","museum","cop","graduate","sidewalk","taxi","trick","lamp","photograph","index","tray","essence","empire","tragedy","alcohol","flower","phenomenon","contribution","shower","castle","cross","booth","lawn","intensity","abuse","determination","passenger","opera","publication","wrist","hint","learning","punishment","ad","skirt","servant","prisoner","physician","midst","purse","rank","neighbor","elbow","contempt","round","cave","coverage","weakness","panic","basketball","juice","shooting","exposure","brick","miracle","unity","accent","coalition","fur","envelope","horizon","glory","stress","delight","politician","conscience","despair","rail","virtue","parent","dispute","killing","corruption","pound","core","stake","proportion","assault","curtain","efficiency","infant","count","suspicion","complex","formation","lock","entertainment","conduct","wit","outcome","shuttle","companion","discrimination","aunt","anxiety","shelter","confrontation","tool","climate","peak","cage","darling","assumption","stability","well","flame","marketing","currency","electricity","text","regulation","comedy","automobile","scientist","cake","scandal","contest","glow","cigar","arrest","brush","boom","basement","document","assembly","output","hut","slave","marble","breathing","pitch","loyalty","affection","resignation","guide","frustration","bureau","adviser","fleet","sector","privacy","awareness","fantasy","speculation","queen","tide","brass","formula","curve","zone","skull","sin","cable","corporation","foundation","achievement","countryside","monster","killer","strain","mask","breeze","whiskey","gang","rhythm","interpretation","basket","extension","tissue","satellite","doctrine","motor","hunger","intervention","kiss","fee","portrait","drawer","analyst","economist","reflection","visitor","transit","reception","provision","slope","sheriff","tunnel","complaint","devil","liquor","throne","hook","temple","tribe","preparation","handle","shoe","origin","helicopter","ruling","injury","crack","flash","gown","jaw","hallway","consequence","depression","subway","leave","drawing","cabinet","initiative","embarrassment","holiday","wilderness","towel","purchase","indication","sink","morality","impulse","rent","enforcement","utility","detective","comparison","critic","dish","hack","photo","crown","operator","conspiracy","rhetoric","bull","inquiry","humanity","demonstration","grade","alley","male","plain","pillow","remark","beast","seed","observation","guerrilla","straw","occupation","champion","excuse","possession","kingdom","snake","nerve","roll","horn","objective","cargo","mate","offense","resort","sequence","apple","bullet","presidency","strip","stroke","pig","print","champagne","saddle","dialogue","suitcase","protein","cook","quantity","toilet","chill","ranch","squad","priority","concert","van","adventure","representative","custom","shell","pension","prince","wound","video","courtroom","suffering","clay","actress","pencil","assignment","shelf","primary","waiter","charm","wool","sweater","soap","psychology","widow","delay","obligation","therapy","sergeant","shortage","myth","collapse","delegation","wish","perception","receiver","sauce","painter","reach","dear","fabric","carrier","ladder","hatred","dancing","cottage","opponent","dealer","prosecution","whisper","spread","poll","beam","exhibition","sigh","fog","harbor","successor","relation","gallery","prize","fireplace","fighter","pit","representation","prosecutor","liberty","bargaining","ownership","root","tin","celebration","stretch","nightmare","transport","link","diplomat","flood","architect","peasant","female","lab","category","inside","tune","carpet","mercy","fraud","introduction","facility","net","temper","rug","conception","eating","legend","tourist","refusal","disappointment","sensation","innocence","transfer","powder","parade","pursuit","parlor","pine","orbit","promotion","senator","colony","cart","interior","productivity","trap","identification","ambition","hip","admiration","corpse","emperor","patch","realm","barrier","ambassador","carriage","residence","maid","gathering","switch","lieutenant","sorrow","contrary","legislature","cliff","lightning","ritual","mist","salad","separation","flour","continent","poison","elite","radar","assessment","outfit","ideology","pad","exile","praise","employee","succession","gain","illusion","option","gravity","journalist","businessman","constitution","singer","sentiment","scope","transition","warrior","cast","march","herd","intent","inspection","episode","uncertainty","spell","isolation","observer","glimpse","privilege","spy","toy","thread","margin","anniversary","irony","organ","lecture","misery","needle","revolver","composition","admission","odor","candy","bid","classroom","bride","vitamin","refrigerator","sandwich","subcommittee","rescue","lad","defendant","blast","angel","compartment","vegetable","minimum","violation","agony","edition","compensation","evolution","treasure","salesman","log","clinic","layer","pitcher","publisher","suite","estimate","airplane","tournament","trace","hammer","reward","broadcasting","running","raid","specialist","mortgage","oak","pole","rocket","aisle","brandy","bureaucracy","mustache","vessel","penalty","export","orange","ignorance","hostility","integration","motive","ban","consultant","timing","equivalent","patrol","liver","assassination","instruction","leaf","railway","freeze","mention","designer","daylight","velvet","amusement","bush","fly","cloak","copper","orchestra","mechanism","chocolate","instinct","circuit","feed","courtyard","mob","profile","bombing","retreat","favorite","revenge","infection","historian","theatre","consent","bucket","mill","insult","pregnancy","psychiatrist","employer","presentation","swing","removal","financing","destiny","label","finish","ghost","channel","equality","requirement","dock","statue","doll","fan","mistress","oven","rim","scent","restraint","frontier","twin","framework","surveillance","diamond","pie","lion","cord","posture","wallet","stool","rally","realization","banker","invention","province","colonel","ally","inspiration","encounter","makeup","certainty","venture","takeover","daddy","ratio","fatigue","verdict","pardon","caution","scream","sleeve","coin","album","acquisition","laundry","transformation","handkerchief","candle","terminal","elephant","madness","appetite","rod","manufacturer","voyage","locker","pulse","indictment","riot","giant","sample","heritage","instance","hay","cure","clan","navy","monopoly","photographer","cowboy","bishop","linen","sacrifice","mortality","dilemma","frequency","harmony","junk","component","bargain","dragon","ruler","replacement","maker","blessing","resentment","surge","costume","editorial","mansion","hood","cellar","bout","driveway","championship","ambulance","sickness","guitar","rejection","compound","launch","journal","sculpture","preference","balcony","lid","toast","chart","motel","agenda","sadness","dimension","verse","scholar","submarine","confession","carbon","thunder","canal","socialism","merchant","bolt","insight","tub","topic","wolf","ridge","shed","gambling","arrow","con","lodge","bicycle","complexity","liberation","disorder","urge","circulation","pickup","distress","spine","romance","anticipation","military","lamb","gloom","pond","republic","ballet","bankruptcy","appreciation","rebellion","custody","feast","fluid","expedition","altar","recipe","array","anguish","harvest","sack","fraction","loneliness","trailer","notebook","surgeon","slip","festival","inability","pan","clearing","making","revival","rack","flashlight","sociology","heir","segment","moonlight","reign","exploration","burst","pet","charity","bundle","assurance","murderer","thrust","conservation","confirmation","outrage","quest","grant","perfection","liquid","stance","jar","essay","addition","diplomacy","rat","outlook","capability","broadcast","cocktail","breeding","immigration","optimism","urgency","helmet","correspondent","breakdown","domain","dressing","dancer","pork","colleague","crystal","insistence","guarantee","lane","dependence","chapel","transmission","hunt","turkey","veto","canoe","interference","sailor","arena","refuge","attraction","thesis","waitress","trigger","founder","briefcase","scholarship","commissioner","stack","lift","greeting","mining","partnership","cane","devotion","thief","troop","menu","finance","coincidence","sleeping","picnic","lounge","dose","jeep","brand","reasoning","proposition","administrator","cylinder","execution","commodity","drum","bronze","staircase","pin","whistle","robbery","catch","thigh","descent","canyon","ballot","shotgun","curb","nod","continuity","shaft","guess","gossip","jurisdiction","revolt","worry","recording","repair","saw","suspect","dome","globe","runway","resident","cemetery","conversion","black","passport","cease-fire","imitation","salvation","cement","creek","nephew","buddy","lung","embrace","ink","simplicity","sunset","astonishment","butt","oath","typewriter","outline","tribute","deadline","hostage","underwear","revelation","reluctance","dread","nest","nut","disposal","disclosure","destination","terrain","procession","recommendation","recorder","potato","ramp","accounting","bat","precision","heap","justification","fork","idiot","biography","prey","ivory","rumor","toll","robot","mix","glare","seal","sweep","haven","bike","courtesy","interaction","secrecy","ham","superiority","synagogue","calendar","ledge","engagement","lace","timber","turmoil","tooth","perfume","magnitude","veteran","lemon","cutting","tomb","accord","ammunition","spear","hunter","acquaintance","grocery","coming","pump","reservation","slide","award","institute","fringe","freight","accuracy","spectrum","ski","diameter","battery","desperation","pounding","variation","ankle","pepper","encouragement","cathedral","expectation","calf","monkey","suburb","rabbit","objection","dismay","boot","pipeline","lust","firing","aggression","ghetto","armor","merger","sphere","texture","moisture","kidney","broker","auction","hose","patent","hesitation","mound","cruise","goat","declaration","regret","conductor","terrace","contention","crap","manuscript","incentive","buyer","gin","principal","steak","novelist","criminal","heel","intellectual","conservative","quarterback","collector","motorcycle","refugee","punch","cluster","clown","preacher","torture","headache","pact","lump","buying","flavor","toe","spectacle","apron","banner","convenience","import","attendant","kindness","verge","dairy","umbrella","dam","inventory","turning","homeland","remainder","gum","plight","container","diversity","drought","reporting","biology","chemistry","curse","scar","merit","spray","reactor","shield","clarity","bamboo","metaphor","vocabulary","runner","luxury","diagnosis","bunk","white","statute","knock","garment","breed","railing","zoo","rival","supermarket","streak","pavement","discomfort","congregation","twilight","bacon","slot","scarf","dime","charter","grammar","theft","sensitivity","mainland","classification","coffin","rider","competence","adoption","reserve","fascination","specialty","mike","temptation","yield","evaluation","passing","intimacy","translation","philosopher","cafe","sitting","superintendent","pill","housewife","signature","correspondence","siege","inn","leftist","injustice","assertion","restoration","registration","farmhouse","denial","endorsement","predecessor","final","demon","greed","transaction","repression","mattress","nobility","embargo","bosom","gym","tenure","addiction","apology","double","litter","nail","incidence","merchandise","volunteer","labour","basin","fiber","whip","payroll","microphone","cruelty","ax","supervisor","resource","maturity","resemblance","cult","stadium","limousine","welcome","knot","probability","menace","nominee","characteristic","stare","vodka","obsession","nursery","paragraph","discourse","candidacy","battlefield","saint","hierarchy","precedent","imperialism","pope","intake","burial","freshman","rebel","mandate","clause","tile","electorate","torch","adjustment","implication","farewell","curriculum","fountain","satin","subsidiary","humiliation","slaughter","discount","crest","princess","asset","greenhouse","reorganization","irritation","ending","messenger","jealousy","breakthrough","mineral","baggage","mouse","tiger","memorandum","kit","substitute","paradise","stride","deed","accumulation","pledge","hull","projection","apprehension","glue","excellence","composer","decay","ditch","slice","beating","syndrome","parole","pony","saying","vulnerability","rental","wax","renewal","disk","athlete","warehouse","organism","disagreement","suspension","documentary","soda","availability","dedication","delegate","reminder","domination","leap","span","obstacle","counselor","taxation","grandson","banana","rehabilitation","stamp","anchor","diary","tunic","boycott","meadow","backyard","dismissal","rating","disc","glove","pasture","catalogue","inspector","exploitation","missionary","density","sail","excess","chemical","disposition","headline","wartime","atom","bartender","blue","wash","shark","negotiation","monument","mom","faction","echo","tomato","scrap","expenditure","plague","fortress","web","briefing","luncheon","vanity","ribbon","nostalgia","drill","frown","dioxide","sovereignty","sweetheart","cot","tag","laser","purity","melody","sanctuary","citizenship","poster","pal","marketplace","girlfriend","programme","retaliation","researcher","allowance","bedside","yacht","scenario","concession","offering","instructor","motivation","litigation","tolerance","puzzle","compliance","duration","quarrel","aura","crusade","salute","intellect","debut","eternity","monastery","immunity","flock","choir","stern","medal","meter","auditorium","equity","fairy","windshield","mare","conquest","razor","push","kick","battalion","generosity","whale","den","mama","emptiness","hysteria","hillside","ideal","landlord","stem","drain","temperament","orientation","spoon","associate","ash","wig","elimination","bark","boost","activist","stature","liar","vein","tract","telegram","completion","pizza","urine","hollow","ordeal","admiral","psychologist","rehearsal","questioning","musician","installation","ministry","puppet","axe","nitrogen","contractor","poker","arch","tractor","reverse","relative","buffalo","deployment","outbreak","pier","veil","summary","courthouse","academy","confinement","catastrophe","technician","specimen","bachelor","lobster","tyranny","discharge","graduation","shout","monitor","traveler","dope","user","vegetation","deposit","investigator","attic","rabbi","reversal","knight","innovation","probe","altitude","legacy","raft","boyfriend","twist","plaza","paradox","witch","folly","physicist","prophet","threshold","plaster","dentist","telescope","vault","climax","parish","balloon","probation","prescription","liability","wheelchair","blackness","colour","booze","exhibit","vest","abundance","hatch","sketch","cartoon","horseback","investor","violin","hazard","trader","stall","healing","prejudice","scorn","rum","accomplishment","limb","produce","epidemic","tumor","camel","starvation","insect","tenderness","cockpit","maximum","patriotism","chauffeur","parliament","capsule","deficiency","massacre","dessert","bail","meditation","petition","hypothesis","ruin","voter","wait","saving","imprisonment","nationalism","lawsuit","surrender","celebrity","contradiction","disgrace","betrayal","slogan","thrill","enjoyment","narrative","canopy","might","vaccine","fort","stereo","hearth","relaxation","asshole","avenue","fright","drift","width","guardian","portfolio","longing","brutality","frenzy","chaplain","chop","tactic","viewpoint","chip","banquet","closing","re-election","impeachment","wardrobe","cradle","facade","finding","tangle","adaptation","hamburger","analogy","fancy","counterpart","dissent","skepticism","gut","advocate","granite","equation","slump","vice-president","nap","foam","buildup","geography","scratch","major","preservation","folder","entity","defiance","nickel","monarchy","shack","teaspoon","chase","remedy","disappearance","foreman","seller","rag","youngster","allegiance","earthquake","columnist","goose","feather","bulb","imagery","bomber","overcoat","harassment","outsider","maze","reproduction","printing","reconciliation","kinship","grease","harp","parallel","stew","particle","accusation","criterion","garlic","boundary","scalp","recess","bearing","warrant","dictatorship","breach","bladder","elegance","fervor","disapproval","monk","tweed","loser","hen","shrug","junta","disguise","gulf","landmark","bourbon","reconstruction","decency","register","feat","hostess","workshop","accommodation","wreck","referendum","viewer","niece","flank","autopsy","boarding","grove","decoration","stain","cape","prophecy","bubble","asylum","commentary","grandeur","subsidy","seizure","badge","limitation","armchair","pro","spark","blaze","centre","split","peril","fusion","goodbye","ringing","solitude","handwriting","crossing","onion","rubber","forefinger","bait","solidarity","measurement","multitude","dump","novelty","truce","perimeter","alien","decree","opposite","constituency","maneuver","ransom","supplier","performer","murmur","coordination","hobby","dough","lantern","cherry","fox","quota","deterioration","flaw","millionaire","raincoat","skeleton","bum","washing","plantation","spotlight","arsenal","villa","sermon","compliment","podium","collision","ratification","jam","loft","theology","escort","tyrant","ore","caste","brokerage","lighter","screw","inheritance","eagle","annoyance","napkin","rationale","flurry","mall","dresser","autobiography","slate","cheer","sulfur","assortment","memorial","electron","detachment","addict","shrine","mold","rookie","astronaut","diesel","neon","heroine","clash","recollection","sweetness","complexion","stewardess","adversary","trance","virgin","screening","classic","nuisance","uprising","shipment","mug","stairway","supporter","famine","stench","click","stupidity","bug","throw","lumber","current","mentality","regiment","galaxy","patron","tap","mischief","contingent","gospel","racket","liaison","honeymoon","foliage","leak","doom","irrigation","mechanic","chef","viewing","swamp","void","mule","lottery","pastor","steward","ranking","survivor","tuition","medication","misunderstanding","prediction","forum","oppression","ale","expanse","consultation","pawn","attachment","franchise","intercom","chunk","mat","pioneer","prairie","familiarity","undergraduate","tenant","chimney","cereal","thirst","pub","packet","aftermath","outburst","habitat","federation","deduction","pageant","circumstance","discontent","microscope","sausage","coma","want","intersection","detention","shrimp","deception","illustration","manipulation","ecstasy","dash","eyebrow","ray","persuasion","builder","injunction","foe","inclination","precinct","slab","anthropologist","amnesty","loaf","radical","intrusion","dwelling","calculation","paperback","usage","paste","ashtray","shovel","capture","ferry","preoccupation","joint","filing","spit","womb","puff","quilt","squadron","playwright","rotation","lease","brilliance","burn","cough","spouse","assassin","flu","cabbage","reliance","console","carpenter","dependency","advertisement","lipstick","mahogany","disadvantage","holder","furnace","certificate","alienation","collaboration","extinction","austerity","pupil","tenor","foyer","bluff","whisky","similarity","pouch","chant","nun","hike","babe","com","input","pianist","treason","brake","shake","dividend","repetition","fisherman","pinch","persecution","brightness","disdain","sunrise","gleam","premise","shawl","kettle","forecast","recipient","strap","outlet","chalk","plywood","nickname","fulfillment","doorbell","keyboard","peanut","knob","compass","interval","intuition","clearance","format","shuffling","dent","ambush","chatter","lettuce","harness","hiring","ache","continuation","fit","friction","pretense","velocity","tavern","abdomen","scout","splendor","barber","flap","plateau","hedge","raising","visa","dictator","housekeeper","cafeteria","enrollment","sailing","ingenuity","limp","bard","consistency","ordinance","bathrobe","gauge","strand","taxpayer","spider","coward","reservoir","brigade","self-interest","crackdown","crib","hum","roommate","traitor","blend","kitten","setup","dagger","sophistication","clout","goddess","disability","touchdown","fertilizer","punk","agitation","seminar","hitter","crust","comprehension","nightgown","gamble","freak","stump","microwave","lever","libel","playground","exhaust","abstraction","picket","diversion","advancement","bourgeoisie","coordinator","myriad","dial","diagram","sensibility","donor","endurance","prominence","playgroup","transmitter","revision","consolation","storyteller","jewel","mourning","burglary","competitor","narrator","verb","butterfly","rationality","ant","mister","satire","placement","reunion","plunge","comb","commuter","carving","hormone","creator","swim","clip","necklace","frost","fix","allocation","thickness","happening","disruption","caravan","rodeo","axis","submission","insanity","protocol","caller","porcelain","aristocracy","interrogation","boyhood","muzzle","delicacy","teenager","undertaking","textile","tailor","defence","comeback","zero","wizard","cupboard","cynicism","behaviour","holster","bulletin","broom","receptionist","listener","exemption","flicker","exam","treasury","hug","interruption","no","drugstore","roast","trifle","jerk","exclusion","inmate","contra","permit","gene","melancholy","alcoholic","trainer","perspiration","instability","doorman","deterrent","occurrence","hem","pricing","wear","hog","cushion","commune","courtship","paradigm","down","participant","triangle","apprentice","prevention","forearm","symptom","flush","newcomer","announcer","gorge","frog","platoon","hawk","rivalry","trench","geometry","clubhouse","feller","hymn","dictionary","showing","homicide","crow","pneumonia","gourmet","flannel","congress","dislike","illumination","jockey","superpower","papa","absorption","fragment","catalog","genre","hypocrisy","duel","cone","organizer","fraternity","cubicle","hardship","restriction","gasp","authorization","partition","barrage","groan","waterfront","aerial","cinema","proximity","mockery","compulsion","slum","default","evacuation","fugitive","carton","chariot","masterpiece","nylon","dialect","tee","bathtub","congressman","vapor","disturbance","mailbox","take","groin","moss","shepherd","formulation","foreigner","solo","elder","textbook","predicament","trait","reef","intruder","captivity","commotion","farce","royalty","exasperation","developer","expulsion","plaid","believer","migration","gal","fitness","idealism","galley","offensive","hometown","sophomore","clump","launching","mast","slowdown","generator","make-up","mount","worm","chuckle","prototype","catcher","crotch","interpreter","graveyard","mane","premium","cuisine","jeopardy","reassurance","vantage","condemnation","vase","blackout","token","abandonment","maple","magician","bust","syrup","cassette","pick","madman","cleaner","throng","hanging","riding","villain","squeeze","wallpaper","lime","blur","modification","clatter","anonymity","lineup","polish","accountant","setback","neutrality","modernization","borrowing","kill","dwarf","amateur","expectancy","donkey","fella","contamination","ballroom","kidnapping","popcorn","entourage","crook","ambiguity","coral","roadside","fragrance","slack","spectator","stimulation","groom","rattle","synthesis","tan","skipper","distrust","siren","spin","revulsion","signing","booster","savage","glamour","flute","civilian","flask","tug","misfortune","therapist","plug","standpoint","weed","ecology","footing","patio","decor","malpractice","residue","passageway","chopper","batch","acceleration","depot","quarry","hound","pilgrimage","deference","splash","heartbeat","rap","wedge","indicator","pretext","make","saloon","clientele","poisoning","hemisphere","grotto","ignition","cover-up","ape","transcript","blizzard","crab","ration","puck","propriety","hunch","madam","imbalance","jug","manual","raise","silhouette","sponsor","bore","volcano","crate","humility","devaluation","rocker","rainbow","chap","informant","freezer","limestone","guise","valve","appraisal","handicap","correction","bra","sinking","turnout","manure","pail","cardinal","grape","bee","rumble","miner","dissatisfaction","pamphlet","plaque","chat","injection","pulpit","platter","symphony","molecule","rib","pyramid","shudder","dissolution","vinegar","calling","acreage","chick","cuff","scrub","orphan","porter","saucer","antenna","trophy","rig","convent","good-bye","troupe","ploy","niche","veal","semester","contender","grenade","hilt","spiral","stink","marathon","boulder","treasurer","cookie","peninsula","freeway","rainfall","showdown","parody","telling","statesman","decrease","symbolism","pillar","tremor","penetration","carcass","breadth","psyche","hiss","suppression","pottery","dormitory","scare","overtime","bean","schoolteacher","timetable","buzzer","mesh","jack","marshal","windfall","lance","uterus","inconvenience","chrome","brute","gardener","whim","pearl","fold","trim","ravine","critique","adultery","stretcher","trolley","elevation","worthy","vibration","bracelet","plank","jelly","foil","wrestling","colon","layout","quotation","sting","son-in-law","jargon","likeness","knack","defect","sedan","tilt","chore","moratorium","convoy","piety","acknowledgment","formality","thud","blockade","chord","hush","takeoff","lining","marsh","manifestation","humidity","ingredient","crater","liking","pigeon","abolition","granddaughter","vintage","flourish","playoff","prostitute","prick","oblivion","sociologist","helping","locomotive","contraction","bookstore","surrogate","hippie","sherry","scotch","packing","wink","spasm","conglomerate","ensemble","dugout","insider","sect","inclusion","feedback","trumpet","massage","constituent","brotherhood","directory","newsletter","comrade","grid","turtle","restructuring","reel","spur","comet","dummy","combustion","moustache","oversight","motto","mantle","handshake","mouthful","monologue","buffet","miss","crunch","waking","gray","exaggeration","gait","clutch","courier","hangar","dive","curator","ridicule","diaphragm","tow","projector","eclipse","parcel","lure","transplant","township","squash","commentator","mentor","gutter","stint","treat","germ","infinity","impasse","burglar","proprietor","tariff","dispatch","torment","dove","superstition","going","tempo","warden","sponge","rooster","barge","gorilla","draw","wharf","stallion","countenance","orchard","navigation","tar","biographer","wheelbarrow","imposition","hurricane","stronghold","distortion","starter","rash","feud","parting","interviewer","wrongdoing","lavender","low","leash","envoy","stairwell","backup","doorstep","negotiator","heading","excursion","sewer","endeavor","backbone","rite","vine","gypsy","directive","defender","scoring","esteem","torrent","gland","consortium","nightclub","swell","employe","obscenity","cavity","pulp","lifestyle","butler","peach","tack","fossil","glitter","liner","destroyer","flyer","individuality","roller","outcry","felony","artery","cruiser","bedding","dude","bounty","blindness","bodyguard","corral","coroner","spice","martini","contingency","gag","serving","wail","wrench","sock","safe","spite","broth","trustee","moth","vice","gender","cartel","casting","puppy","prohibition","ox","sculptor","treachery","stir","printer","audit","brim","handbag","lobbyist","jolt","comedian","distraction","challenger","telegraph","homage","evasion","detector","filling","overhead","cartridge","walnut","sonar","puddle","quake","flooding","crescent","thrift","following","tanker","stoop","clergyman","opener","latitude","anatomy","convertible","arbitration","leukemia","absurdity","stab","biologist","baseman","fuse","specialization","carnival","scarcity","gangster","stalemate","trickle","mallet","working","receipt","charcoal","mortar","drainage","mother-in-law","regularity","emigration","plasma","condominium","muck","workplace","roster","stroll","softness","serpent","owl","infield","sill","swallow","backdrop","fidelity","historiography","thicket","baking","omen","yell","functioning","bribe","dynasty","trough","pudding","alcove","ancestor","ripple","flint","bracket","cube","pasta","proxy","groove","commercial","holocaust","countess","scroll","bang","planting","premiere","norm","bloom","gunman","vow","arithmetic","accelerator","postcard","relish","semblance","whine","inventor","sarcasm","designation","pat","symmetry","quiet","chisel","experimentation","cutter","differentiation","stud","apathy","relay","seminary","escalation","life-style","coil","mythology","futility","intimidation","childbirth","flare","glint","rue","mural","whiff","deposition","vogue","animation","migrant","caretaker","dot","mediator","lookout","captive","blackboard","pocketbook","recourse","negation","plaintiff","shriek","obstruction","latch","manor","casualty","grunt","gambler","erection","nationality","epic","starch","delusion","linkage","provocation","avalanche","offender","melodrama","contentment","appropriation","tonic","salon","accompaniment","paranoia","grimace","communion","cancellation","pendulum","shoreline","hail","refinery","subtlety","videotape","commando","repertoire","refinement","dryer","rust","lapse","haircut","errand","ailment","reanimation","ther","tab","prom","contemplation","bin","gilt","bunker","protector","sage","hilltop","hue","blueprint","correlation","brochure","roadway","arson","remnant","breaking","bouquet","exertion","garrison","beneficiary","colt","turbulence","refuse","bravery","indulgence","assimilation","coastline","livelihood","swarm","configuration","lecturer","paw","upheaval","switchboard","sub","claw","downfall","dye","immigrant","specter","deprivation","shrink","marker","sampling","fellowship","beak","pantry","mouthpiece","gratification","qualification","finality","debacle","extortion","chieftain","speaking","totalitarianism","mole","incumbent","jumper","crush","stubble","terrorist","comic","farmland","contributor","gravy","blossom","keeper","craftsman","pavilion","obscurity","loading","affiliation","vacancy","proclamation","gaiety","yarn","enclosure","clamor","sucker","recruitment","subversion","boiler","emblem","spade","stocking","staple","vocation","sling","maniac","musket","primitive","periphery","idol","snack","antique","redemption","listing","airliner","bandage","bulge","glimmer","priesthood","diner","astronomer","ovation","kindergarten","module","lifting","radiator","booklet","resurrection","precaution","affinity","thinker","quote","turbine","tally","vise","landslide","bakery","portal","majesty","abyss","admirer","turnaround","airfield","wastebasket","lapel","pennant","complication","slick","initiation","rustle","hearse","schooner","carrot","inscription","wench","embryo","vet","poise","disintegration","procurement","speck","kite","vent","plow","homosexual","membrane","waterfall","teevee","matron","utterance","buffer","memoir","cork","recital","loathing","cameraman","throttle","insecurity","trooper","hinge","hoard","umpire","slug","mountainside","affliction","pastime","felt","sentry","denomination","mushroom","linebacker","parachute","teller","fender","trademark","specification","harem","plum","metabolism","certification","neutron","organisation","heresy","relocation","payoff","lizard","termination","dropout","torpedo","stepmother","helm","resonance","heed","progression","braid","cardboard","walkout","shiver","gust","foreground","replica","repertory","sparkle","seam","bump","substitution","rapport","casket","dew","squirrel","palate","hitch","rebirth","reverie","boon","pirate","foresight","vinyl","delta","moat","presumption","tablespoon","aroma","digging","heartland","healer","malaise","creed","archway","exterior","screenplay","examiner","parity","copyright","strawberry","outpost","bookcase","cashmere","bikini","sheaf","pastry","respite","divinity","impossibility","legislator","saga","thump","inauguration","seaman","degradation","strategist","emerald","anthem","affront","burner","entrepreneur","thorn","marvel","stair","cavern","swivel","outlaw","underside","cleanup","fin","catalyst","forage","tapestry","dosage","covering","proletariat","turnover","notch","misconduct","onslaught","upbringing","coyote","bumper","champ","creep","boxer","mileage","vigil","fodder","occupant","dashboard","rarity","centerpiece","consul","ascent","paddle","martyr","doctorate","runoff","grudge","tattoo","robber","carbine","holding","oratory","distributor","heavyweight","footnote","terminology","infrastructure","drummer","chili","tableau","dung","magnet","deceit","caricature","itch","refund","cripple","rectangle","mortal","ancestry","inequality","generalization","furor","relativity","jukebox","dune","endowment","pathology","calibre","subpoena","attrition","hump","congestion","reflex","hoax","honour","herb","mantel","articulation","washer","judgement","brace","printout","helper","wording","crisp","shortstop","boulevard","characterization","cashier","matrix","documentation","deadlock","oyster","chasm","outing","expiration","heater","nutrient","beacon","bile","grievance","janitor","skyline","patrolman","juncture","antagonism","rump","hardwood","solace","warhead","assent","litany","enactment","chimpanzee","rye","feeding","suede","coke","inference","ivy","mosquito","eruption","symposium","variable","cooler","filter","storeroom","mailing","chancellor","beggar","antiquity","inertia","motif","absentee","float","blush","embankment","riverbank","demeanor","vampire","disciple","inadequacy","reinforcement","pedestrian","persona","berserker","tumult","incline","beaver","grill","morgue","denim","wreath","grouping","relic","syndicate","rancher","idiom","hegemony","seating","affirmation","physiology","repose","blight","jest","turret","slit","goalie","clarification","avoidance","volley","redhead","inefficiency","folklore","embodiment","afterthought","steer","cyanide","digestion","continuum","mania","giggle","buggy","willow","pantomime","fireman","growl","devastation","navel","halo","yearning","laborer","alligator","prelude","verification","brown","bead","midget","sleeper","riddle","portrayal","counterattack","lectern","tutor","chestnut","remembrance","aversion","taking","billing","regimen","translator","headmaster","duke","ace","snort","fanfare","imprint","calamity","exposition","cedar","intrigue","transistor","bowel","boardwalk","tramp","ornament","sticker","processor","voltage","sovereign","whistling","orgasm","caliber","exuberance","snout","enclave","kilt","bombardment","corporal","overhaul","syllable","curfew","layman","consolidation","insignia","mediocrity","coherence","hospitalization","flick","pew","coloring","sanction","baritone","radicalism","savagery","pallet","stead","cadet","shutdown","supplement","unicorn","stepfather","excise","spelling","rebound","puzzlement","tenement","souvenir","veneer","safari","quartet","whirlwind","hamlet","practitioner","parasite","installment","emission","kissing","chronology","mosque","chairmanship","blonde","steamer","caption","shave","standstill","maiden","polling","condor","twinge","campfire","drinker","exhilaration","seafood","gala","crane","hickory","cathode","graph","orgy","deliberation","planner","marrow","bud","mediation","cutoff","tit","tic","parchment","noun","culprit","lair","showcase","hangover","chemist","aggregate","thriller","smack","efficacy","smear","heiress","crank","fig","finale","pea","staging","die","rebuke","curry","scum","potency","acclaim","collateral","schoolboy","canteen","radius","deportation","grate","madame","mop","pronunciation","sheen","respiration","breakup","professional","omission","gunshot","ugliness","fanatic","barbecue","dorm","trot","flattery","stereotype","hatchet","capitalist","purge","brew","totality","fern","enzyme","plumber","subscription","cholera","bruise","forge","nipple","commencement","superstar","ether","gem","sash","extraction","spaceship","golfer","realist","encampment","necktie","repayment","skillet","darky","disparity","bedspread","haul","questionnaire","promoter","wand","windowsill","victor","rector","enamel","hoop","coronation","patriot","chandelier","watchdog","glade","renovation","goblet","zipper","communique","crevice","motorcade","sequel","scourge","serum","single","icebox","junction","cache","berth","streetcar","syringe","antithesis","bureaucrat","blacksmith","oval","bun","loot","fiasco","tomahawk","ulcer","pinball","jersey","asthma","brook","pedestal","feeder","soot","inevitability","alteration","carrying","showroom","gimmick","lunatic","gall","fir","borough","hash","woe","controller","sponsorship","applicant","twig","screaming","librarian","intermission","sister-in-law","bushel","inflammation","pomp","vial","extravagance","pate","prostate","dolphin","tuxedo","mathematician","guinea","veranda","aperture","disillusionment","gavel","dating","knocking","oasis","nebula","woodland","yellow","ambivalence","hardness","oxide","socket","wasteland","leopard","blazer","follower","asking","urn","weaving","swimmer","closure","dart","loudspeaker","bazaar","bog","transfusion","reproach","sham","parka","affiliate","scowl","primate","attacker","rink","funnel","spate","elaboration","legality","tablet","heyday","tripod","bully","sharpness","demolition","flip","dandy","appliance","slant","sentimentality","knoll","gloss","defection","explorer","ram","stupor","clone","baton","cohesion","bearer","penance","bandit","aberration","gallop","swirl","coconut","spree","pedal","detergent","canon","teen","brood","phonograph","tabletop","enlargement","sniper","cohort","fable","rising","spill","affidavit","imperative","snapshot","apparition","stunt","wristwatch","chute","teammate","carelessness","over","stripe","postponement","rapture","savior","pacifist","admonition","pear","junkie","surcharge","wavelength","horseman","hag","confessional","comptroller","orthodoxy","financier","snarl","cliche","refreshment","incest","adolescent","teapot","seaweed","drilling","roadblock","antibody","sheath","pallor","constable","misuse","arcade","lee","keep","anarchist","watering","rhyme","exclamation","backseat","great-grandfather","han","pod","daughter-in-law","mailman","alphabet","sloop","reckoning","grower","simulation","homer","birthplace","ence","actuality","depletion","novice","diffusion","concealment","cadre","pathway","fungus","ouster","loner","autograph","descendant","aspiration","better","sick","variant","fragmentation","pesticide","frigate","bestseller","propensity","foul","senate","trouser","airstrip","insurrection","chronicle","coating","stigma","toothbrush","pumpkin","apprenticeship","widower","paycheck","query","teen-ager","shifting","informer","doorknob","ardor","pebble","finesse","scrapbook","fiddle","dowager","sod","wrap","turtleneck","clipboard","rogue","mutiny","suitor","bulkhead","babble","fad","billboard","beverage","hairline","grille","exporter","pathologist","mesa","goblin","scapegoat","crucifix","backpack","observance","forgery","dungeon","methodology","gauze","bonanza","inkling","beret","shouting","ex-wife","wickedness","toil","preview","porridge","cornerstone","scanner","smoker","rebate","mite","brawl","axle","easel","allegation","grab","parrot","antidote","drawl","hijacker","telltale","venom","el","baron","intermediary","seduction","birch","contour","redistribution","cam","protagonist","enmity","hulk","stockbroker","decorator","cookbook","protege","mage","cricket","smock","apex","cortex","modem","shareholder","lament","determinism","rift","tablecloth","trajectory","preface","sneer","gamma","rendition","insemination","aristocrat","hare","labyrinth","thaw","invalid","staffer","alpha","fingernail","medic","crutch","entertainer","jade","eminence","discrepancy","yawn","flea","ledger","orphanage","getaway","manifesto","hijacking","incarnation","elm","adobe","spruce","gist","grit","boar","oracle","mobilization","cantor","crypt","cutback","musical","fallacy","corduroy","fray","racetrack","buckle","foreboding","pest","clap","ber","notation","peek","sow","ballad","brat","constellation","lard","industrialist","hunk","assailant","splinter","bridegroom","dip","fixture","cadence","watchman","windmill","prerogative","drawback","bungalow","heaving","nationalization","mating","writ","rationalization","milking","modernism","landlady","calculator","animosity","workout","skirmish","glycogen","discord","portico","vestibule","renegade","overdose","iceberg","lineage","mosaic","liturgy","watershed","playing","lobe","dowel","ranger","dossier","anvil","co-operation","satchel","fa","corollary","bridle","gateway","brothel","monotony","vendor","mysticism","saucepan","accomplice","hernia","guild","pup","hoof","sparrow","dreamer","craving","outpouring","blink","overlap","duct","brownstone","maneuvering","stagger","foothold","craze","monsoon","induction","handgun","scan","constraint","citadel","rigidity","anecdote","halter","occupancy","rightist","convict","tribunal","stalk","waterway","debtor","yoke","audition","inconsistency","peg","sliver","midwife","premonition","ruby","conduit","excavation","fart","condenser","hop","poodle","upsurge","attainment","stitch","crimson","anomaly","backlog","yeast","chimp","awning","gig","parable","drumming","tiptoe","prow","bypass","crease","reformer","intestine","counterpoint","enormity","anthology","rudder","shroud","magistrate","twitch","commonwealth","circumference","stuffing","sweating","scattering","lender","dripping","legion","refrain","mummy","covenant","morbidity","prop","initial","alignment","licence","infusion","unification","rebuttal","adjective","humour","larceny","mistrust","horde","assemblage","delinquency","testament","convert","patrician","dissension","cider","infidelity","bonnet","displacement","crackle","edifice","conciliation","bondage","schizophrenia","embroidery","standoff","monotone","oddity","mobile","tornado","semicircle","panorama","ex","ping","yogurt","screech","underdog","quay","tai-pan","extract","podesta","ticking","shrubbery","backside","communicator","sorcerer","interlude","dominion","battleground","taboo","blunder","conjecture","drone","cove","maverick","secondary","companionway","rook","gauntlet","ordering","violinist","rooftop","slash","thermometer","vomit","anteroom","deity","nave","acquittal","talker","reed","concussion","malfunction","tundra","cub","anemia","constructivist","cocoon","divide","keeping","percussion","freighter","noose","narcotic","expediency","grandchild","gully","innkeeper","pigment","bloodstream","quiver","alderman","halftime","stable","fission","aggressor","denunciation","abduction","expressway","uniformity","faucet","buff","broiler","allusion","jock","spike","herald","polyester","genocide","fer","parapet","classmate","tinge","sandstone","lurch","skunk","huddle","mum","tranquilizer","pharmacy","susceptibility","penicillin","lark","hoe","lily","hanger","headset","john","appointee","advisor","twine","slumber","magnetism","schoolgirl","smash","screwdriver","newsman","sleet","cleavage","lacquer","milestone","commandant","crick","splitting","rosary","edict","hurdle","fixation","appendix","lock-mechanism","eyelid","swath","fingerprint","carbohydrate","tick","magnate","heck","sailboat","donation","malady","polishing","clipping","collective","sensuality","loom","swagger","facet","variance","mean","walkway","aptitude","prodigy","solemnity","understatement","ebb","scoop","wrapper","narration","icon","prerequisite","planter","gash","interplay","evangelist","drip","vulgarity","subdivision","backwater","euphemism","lotion","corpus","broadcaster","toothpaste","curmudgeon","fo","thong","thatch","baptism","peacock","workman","downturn","scoundrel","machete","creak","five-year-old","dissertation","dishwasher","pimp","electrician","tycoon","otter","shove","snail","rendering","nobleman","booking","pronghorn","deadpan","shutter","escalator","girdle","fling","hire","alibi","flop","stampede","prognosis","itinerary","cologne","spoonful","detour","violet","watcher","falsehood","hype","locale","estimation","propeller","squaw","pickle","lass","pun","racist","scratching","rout","downpour","casing","complacency","camper","equator","reticence","learner","outcast","brunette","improvisation","stag","maxim","loophole","livery","blasphemy","shoot","solvent","misdemeanor","buyout","tiller","jetliner","checkbook","awakening","sideboard","romanticism","squire","newsstand","nuance","consulate","excrement","reprisal","bastion","beginner","obituary","softball","conjunction","scripture","phalanx","vindication","grub","swig","inaction","redwood","scabbard","bonfire","casserole","ovulation","unreality","totem","palette","choreographer","peasantry","skyscraper","penitentiary","outfield","melon","bounce","yolk","diver","archbishop","plurality","amber","recurrence","adulation","piston","insurgency","stoan","coop","tart","eyeball","toss","giveaway","cross-examination","dissident","hermit","ruse","ture","pore","leaving","dowry","gunner","epitome","snowstorm","summation","switchblade","crock","ity","frock","luster","piazza","rotor","impropriety","pivot","blender","immediacy","borrower","slaying","feminist","preserve","bidder","depiction","parasol","clover","intern","asteroid","stub","barricade","medley","multiplier","smirk","knapsack","hank","cognac","headway","treatise","homestead","troublemaker","giraffe","mover","allotment","drowning","naturalist","orderly","attribute","scalpel","shipyard","estrogen","educator","enrichment","grandstand","sire","perversion","sideline","landowner","confidant","gel","deviation","clemency","liberal","bigotry","filly","six-year-old","lifeguard","shred","adversity","shelling","pineapple","referee","knockout","jigsaw","retailer","extremity","outgrowth","amplifier","sinner","campground","teasing","steamboat","turban","mutton","cobra","contraption","chopping","schoolhouse","varnish","pane","observatory","ballerina","czar","immensity","lethargy","reimbursement","undershirt","concierge","fracture","variability","accordion","slime","meanness","gelding","practicality","advertiser","graft","gull","stockholder","pilgrim","hooker","puritan","benediction","barbershop","stanza","hallmark","mishap","harpy","silage","enchantment","whirlpool","conditioner","gadget","divestiture","lathe","incarceration","amalgam","antibiotic","annexation","martyrdom","pyre","shank","alert","shale","artifact","interchange","mystic","meet","grinding","triple","boutique","antagonist","fermentation","twinkle","sweetie","shin","creditor","amulet","pall","posse","homeowner","skier","vastness","smith","allegory","oxidation","cracker","levy","ark","sporophyte","enthusiast","snob","spinster","searchlight","waistband","lorry","repeat","reprieve","slalom","respirator","visor","reviewer","putt","miscalculation","shortfall","concourse","dialectic","native","hairdresser","normality","immorality","sprinkling","allure","lick","drudgery","habitation","gondola","vista","ice-cream","cheerleader","predator","countdown","juxtaposition","stumbling","muffler","derby","timer","salvage","boast","cabbie","clam","windbreaker","retardation","antelope","shampoo","raccoon","bible","glider","momma","valise","coffeepot","emissary","compression","grail","guideline","lavatory","glaze","outpatient","thunderstorm","foray","co-op","valet","baker","sycamore","thumbnail","nozzle","timidity","orator","liquidation","spokeswoman","militant","jig","naivete","motorist","dumping","armpit","margarine","exultation","headboard","plume","amplitude","flutter","pronouncement","finery","trepidation","airing","coupon","knuckle","gametophyte","deathbed","extermination","alleyway","hybrid","gambit","nova","binge","original","froth","lighthouse","coolant","continuance","collaborator","fuselage","profanity","whirl","saber","filmmaker","checkup","shaman","rancor","retort","earring","sieve","post-mortem","implantation","conceit","simplification","vat","proficiency","deluge","kiosk","outlay","tantrum","flooring","veterinarian","fireball","carousel","bandanna","glacier","censure","citation","oar","fridge","metamorphosis","superior","approximation","girth","tirade","grocer","holdup","forward","snobbery","cleansing","replay","recitation","facsimile","patter","jubilation","snare","frailty","rampage","pick-up","overture","tumble","residency","prevalence","repository","reentry","battleship","mutation","hammock","importation","thug","semiconductor","ballast","spurt","extreme","artichoke","convergence","circular","rigor","realignment","physique","handbook","bugle","precipice","sauna","whorehouse","skater","furcot","volatility","valuation","barbarian","peddler","layoff","overall","deliverance","chromosome","innuendo","lexicon","empress","polarization","dictum","fitting","impediment","piracy","crocodile","cucumber","keel","sitcom","hypocrite","roaring","encroachment","steamship","resin","fairway","eyewitness","broadside","washroom","sighting","mantra","swan","supposition","governess","upswing","rep","solicitude","rustling","invocation","heather","rectory","orchid","brocade","raiser","invective","fragility","acronym","ostrich","col","absolutism","vicar","psychotherapy","navigator","cartoonist","doe","landfill","invader","werowance","ble","flatness","locality","druid","visitation","headlight","rapist","benefactor","colonization","excerpt","nick","kangaroo","pink","buy","cascade","campsite","slander","headdress","topcoat","causality","karma","trestle","atheist","checkpoint","renunciation","eater","payload","pointer","theologian","beet","undertaker","lineman","hart","gourd","doubling","shuffle","cabaret","periscope","bodice","shootout","grandma","wildcat","proton","dioxin","sorcery","torchlight","stopover","executioner","collage","mesquite","reincarnation","kidnaping","programmer","disloyalty","muslin","throb","mint","aquarium","tel","eccentricity","purification","kerchief","warranty","rigging","breeder","nite","conservatory","fastball","magnification","spa","favour","regeneration","incision","saxophone","detriment","scam","android","coloration","bunny","restitution","rake","serf","despotism","pollen","sidewinder","upstart","revisionist","birthright","multiple","lifeline","queue","follow-up","swipe","boardinghouse","armament","travesty","stirrup","caper","chloride","crepe","primer","clich","inflection","skid","repudiation","serve","spire","peep","inducement","clothesline","fabrication","morsel","spleen","coon","bustle","crossword","back-up","assessor","biopsy","sidecar","hassle","shingle","tint","fixing","collarbone","taint","pusher","gestation","mantelpiece","vaulting","ra","peat","indignity","adequacy","genus","scrape","scaffolding","serial","neurologist","duffel","cipher","rote","horseshoe","bulldog","electrode","joker","juror","fibre","misconception","rut","connoisseur","flowering","op","flirtation","highlander","wisp","sounding","bugger","pharmacist","doughnut","toaster","pinnacle","slob","promenade","amphitheater","singsong","beau","whimper","importer","locket","watermelon","marking","beta","co-author","crossbow","atrocity","desktop","inhibition","draught","rowboat","volleyball","snowfall","extravaganza","teddy","miscarriage","storefront","toxicity","abode","hearty","handyman","centurion","phrasing","anachronism","newspaperman","annex","walker","till","volition","tributary","close-up","nook","cleric","ferment","proverb","inlet","heretic","waistcoat","duet","sniff","crewman","campaigner","wearing","grizzly","p","optimist","placard","overflow","pedigree","clang","brig","cinder","bunting","wag","dishonor","denominator","gong","siding","trilogy","deli","fluoride","questioner","squat","competency","partisan","putter","entree","cynic","tombstone","scoreboard","biscuit","souffle","homecoming","overseer","hideout","brewery","emancipation","interface","premier","auditor","troll","conscription","stout","trucker","beetle","dealing","bookkeeper","build-up","yardstick","da","polity","wick","wrinkle","private","outflow","borderline","outfielder","visage","leper","chiffon","arbor","weave","barnyard","checklist","granny","insensitivity","ex-husband","barometer","rupture","infirmary","desertion","wonderment","encyclopedia","slaughterhouse","nostril","ineptitude","implant","infatuation","laundromat","warship","rub","benchmark","polygraph","dinghy","behind","tween","filibuster","wearer","crayon","sensor","hustler","sinew","progeny","dig","pediatrician","foursome","buckskin","cornfield","safeguard","divergence","ting","coupling","dislocation","the","immersion","purchaser","cleft","overhang","booty","scuffle","rattlesnake","teacup","retinue","hallucination","potion","yeshiva","tapping","rip","multiplication","canister","gallantry","morn","thermostat","grind","aviator","ecosystem","pariah","recruit","vestige","ro","phosphate","abomination","laurel","sweatshirt","vaccination","psychoanalyst","blind","psychosis","sidekick","shopkeeper","theorist","delicatessen","sheepskin","billionaire","receptacle","salami","paddock","glen","beech","leer","mime","ty","perfectionist","seedling","wil","bind","intolerance","dint","plural","rouge","skylight","mammy","drab","microcosm","sole","organist","court-martial","matinee","bulwark","must","expatriate","stethoscope","daydream","backer","godfather","breech","artifice","auxiliary","adventurer","atrium","counterman","idiocy","grotesque","dishonesty","runaway","digit","baseline","reflector","preamble","sellout","falcon","scribe","retainer","louse","grapevine","sojourn","lash","marquee","schoolmaster","squeak","squeal","shooter","townhouse","nationalist","billiard","backfield","auctioneer","aria","avant-garde","hostler","smattering","giving","coaster","arraignment","duo","malignancy","throwback","doc","turnabout","seeker","deletion","vernacular","bulldozer","tedium","hustle","raspberry","estrangement","mutilation","styling","incinerator","wrong","shortcut","mastectomy","infringement","bonding","timbre","cameo","workroom","grassland","spraying","cooperative","tarpaulin","determinant","thyme","innocent","clique","racer","leakage","conflagration","jingle","duplicity","diaper","conqueror","committeeman","robin","reprimand","marina","cross-section","flagship","denouement","recluse","homemaker","moron","rind","gent","magnificence","dispatcher","detonation","harbour","toddler","rotunda","sedition","fell","dolly","laureate","woodsman","syndication","clot","guitarist","blemish","password","overview","eggplant","incantation","drapery","incapacity","florist","hive","civility","mod","screenwriter","intoxication","barman","ern","furrow","cant","clapboard","tumbler","walkie-talkie","pajama","vortex","defenseman","hostel","subjugation","interception","armory","fanaticism","sibling","inhalation","undercurrent","husk","mead","maw","padlock","abnormality","penguin","undersecretary","damnation","independent","airlift","peel","schoolroom","rascal","fingertip","cartilage","dichotomy","blank","lingo","clasp","racquet","acknowledgement","rebuff","bier","aerosol","taping","checkout","arse","thoroughfare","pelt","copse","keg","fissure","tern","mirage","blockbuster","balm","arbiter","shutout","schism","fluff","circumcision","insertion","pseudonym","heathen","eulogy","snowball","penthouse","kinsman","gebling","regulator","proponent","yearbook","barbarism","mutt","reopening","paunch","governorship","differential","airship","subscriber","alloy","adjunct","impairment","incongruity","pheasant","grownup","predicate","loo","sleigh","seer","flitter","sunburn","plebiscite","stockade","pout","sledge","stipulation","lordship","bayonet","wretch","vulture","postman","breaker","newsroom","consort","grinder","ballpoint","tequila","unpleasantness","wrapping","squall","adage","monograph","privation","streetlight","hilarity","sacrament","diminution","mannequin","duplication","banishment","rasp","biochemist","goatee","cranberry","sultan","blip","disservice","idealist","middleman","shaping","apocalypse","strut","oligarchy","moor","zombie","certitude","javelin","azure","turnpike","forger","commode","bleach","sideshow","banister","closeup","dysentery","steeple","offence","commandment","furlough","best-seller","filament","mountaintop","censor","snowmobile","kaleidoscope","elf","imp","slipper","lunacy","telecast","nanny","kernel","eventuality","subordination","sonnet","nitrate","foal","prank","expropriation","fedora","zigzag","resale","namesake","highlight","supplication","concurrence","medallion","jailer","loin","tread","quill","cardigan","prune","slur","surtax","internist","strait","smuggler","panacea","turd","wanderer","crude","darlin","epitaph","docking","seashore","cheeseburger","netting","provider","dispenser","intonation","marching","caress","hootch","morass","chum","sanctum","headband","powerhouse","axiom","terrier","springboard","tot","latrine","toad","clink","herbicide","figger","hick","manger","poppy","chaise","archetype","undoing","beehive","illustrator","withholding","sterility","paddy","coven","custodian","half-life","embezzlement","armoire","kickoff","possessor","rectum","sit","daisy","housecoat","pollster","policewoman","ointment","expressionist","stockpile","bombshell","impresario","co-pilot","chessboard","dazzle","scepter","archdiocese","linguist","odyssey","capitol","accession","lute","liter","multimillionaire","decoy","warp","conveyor","grandpa","ance","mumble","betterment","bullfighter","chador","ampule","indiscretion","shake-up","clarinet","catapult","normalcy","shanty","dinosaur","epithet","tang","scaffold","immunization","repairman","suntan","mu","environmentalist","nightcap","tempest","artisan","orbiter","spiel","needlepoint","geologist","humanist","stutter","perplexity","roundup","concoction","treadmill","cacophony","antipathy","blackberry","bloodbath","brassiere","allergy","hitchhiker","grunting","choke","sitter","elixir","ba","repatriation","whack","decanter","crusader","burlap","incursion","lyric","compilation","seaport","coachman","philanthropy","secretion","collie","inquest","taper","moral","quartermaster","jeweler","salutation","confluence","gullet","tram","hideaway","by-product","drybone","copulation","divorcee","mausoleum","peeling","annuity","set-up","skiff","neurosis","windpipe","buoy","glide","archaeologist","pendant","junkyard","bullhorn","porthole","quandary","irrationality","acidity","pragmatist","derivation","stylist","duplicate","panther","brigadier","introspection","depravity","keynote","vexation","psi","weighing","deserter","speculator","teak","armful","remission","precursor","sorghum","harmonica","olive","gangway","contraband","defector","purgatory","genie","expedient","crowbar","desecration","bathhouse","enhancement","tenet","seasoning","wrangling","downhill","venue","tracery","dictation","bailout","undertone","pecker","prep","forerunner","bandstand","letdown","luminosity","tonnage","catwalk","brunch","sapphire","ballplayer","wineglass","readout","genealogy","horsepower","messiah","blackjack","hemorrhage","damask","registry","gunwale","jerkin","humorist","bowler","tingle","engraving","chauvinist","spirituality","eyepiece","twang","constancy","blot","blob","chard","highschool","sportswriter","tiara","domino","contestant","migraine","newscast","mainstay","hammering","tracker","wager","offshoot","buster","informality","python","felon","imperfection","slag","convulsion","sedative","cellblock","punt","headwaiter","outhouse","monstrosity","nonwhite","override","raisin","inversion","pancake","flavour","cataract","reclamation","churchyard","pidgin","suction","chanting","aggravation","dynamo","pee","fistful","hogan","byproduct","brooch","lullaby","workday","slop","silencer","dealership","earner","anchorman","pittance","crumb","custard","rainstorm","tote","mulch","mason","earl","barroom","levee","discouragement","falsity","compressor","lodging","gynecologist","divination","calico","bibliography","cyclone","senor","gatehouse","lagoon","squirt","artwork","songwriter","derivative","supernova","divan","photon","surety","cobbler","fatality","gout","eleven-year-old","ent","cropping","mainspring","prism","confederation","weaver","neighbour","yuppie","muffin","juniper","ovum","lesbian","pi","shimmer","fax","increment","co-ordination","splashing","thanksgiving","exaltation","confiscation","fairy-tale","fudge","brief","priestess","re-creation","hydrocarbon","ford","usurper","maelstrom","spaceport","swordsman","vegetarian","newness","grad","potter","manservant","fullback","fiend","giver","subculture","debutante","striving","scorer","catechism","charger","armada","blond","paign","handball","wince","appetizer","guidebook","jog","millet","hoot","inferno","pardner","mash","mousse","mammography","launcher","battering","predilection","portent","beep","exhortation","notification","warm-up","diatribe","panda","menstruation","telex","revitalization","workingman","cordon","charmer","fumble","hamper","moralist","settler","chowder","ley","mannerism","drunkard","posting","turquoise","elasticity","abbot","bookie","tusk","paragon","precondition","rollback","lunge","conundrum","eviction","sealer","cellist","cosmology","turntable","outside","fortification","nightstand","spook","shoemaker","sac","sulfate","isle","antigen","steed","bacterium","utopia","stunner","hillock","clove","irritant","tat","memento","rung","gaffe","portraiture","solicitor","rodent","barter","intensification","gallbladder","condom","antiquarian","peck","cheering","meteor","inflow","stenographer","blinking","icing","jackass","dweller","fiesta","irrelevance","harpoon","appendage","stipend","mommy","cassock","microfilm","dead-end","vermouth","scarecrow","fielder","referral","mart","burger","ticker","hindrance","coverlet","speedboat","wafer","sluice","bellboy","hangout","figurehead","midterm","petticoat","matador","skein","beholder","flier","waiver","flotilla","smudge","inequity","mixer","sulfide","banality","roach","billy","tailgate","gaggle","softening","loincloth","gore","bib","chrissake","changer","muse","longitude","tourney","mil","aorta","poop","regression","soviet","placing","winch","apostle","constant","squabble","blimp","abdication","porpoise","puncture","workbench","parameter","conventionalist","flagpole","unfairness","reptile","typist","bookshop","hesitancy","strongman","headland","sprint","manhole","blowing","archipelago","ideologue","slouch","poke","gush","stratum","mulatto","echelon","postmaster","sheik","emigre","alto","affectation","rad","climber","deerskin","bower","idolatry","reciprocity","sweet","wasp","dissection","baby-sitter","purple","toothpick","lyre","archer","sprawl","councilor","contrivance","flake","kynd","suffocation","damp","ware","travail","candelabra","wrestler","patina","moaning","paisley","recruiter","moderator","respondent","marmalade","bellow","harpsichord","atrophy","ejector","jetty","stripper","monorail","dramatist","hysterectomy","riverbed","revaluation","stoppage","conspirator","fetish","sunflower","cognition","scrim","rec","retriever","aphrodisiac","redneck","palsy","pullover","flywheel","roundness","peculiarity","ernment","nectar","ruck","swimsuit","curd","underclass","polka","conservationist","mire","drumbeat","cinch","cordiality","deacon","speechwriter","purr","gelatin","muddle","booby","solid","cloakroom","stopwatch","sportsman","burlesque","overload","mademoiselle","divider","bailiff","handout","ordination","stiff","languor","paperweight","opiate","snap","causation","mower","perversity","snatch","touchstone","self-indulgence","shrub","interceptor","mammoth","proceeding","cheekbone","spoke","repellent","cardiologist","reminiscence","sprinter","evocation","postscript","enlistment","blotter","troika","dacha","cabdriver","fund-raiser","switching","para","tendon","fireside","effigy","leech","veneration","reek","schoolyard","pellet","shellac","weasel","jab","carcinogen","restroom","cauliflower","levity","caftan","topside","fruitcake","bickering","drawing-room","dovetail","culvert","chateau","bugging","tinker","hobo","corset","automaker","actualization","oration","handhold","nutmeg","tentacle","quicksand","handler","panoply","bowhead","testimonial","mammal","bellhop","devotee","technicality","trainee","mongrel","newscaster","aggregation","footpath","fawn","accreditation","heave","jib","rationalist","vendetta","midpoint","buckboard","screwball","hatchway","disinfectant","cramp","causeway","tease","corkscrew","sledgehammer","sloth","materialist","mogul","stopper","bevel","carbonate","berry","snore","throwaway","agribusiness","rerun","guillotine","nip","computation","keyhole","storybook","watercolor","cer","porcupine","urging","cockroach","esse","headman","settee","usher","short","obstetrician","faggot","ballpark","palisade","whimsy","co-owner","spout","nub","pectin","dun","cypress","trombone","scat","lite","dame","quip","invisibility","baboon","sneeze","swish","originator","biennial","newsreel","chameleon","dressmaker","storehouse","trapping","statistician","bloke","helmsman","ewe","drape","trump","great-grandmother","cloister","caterer","grounding","hotbed","life-span","urinal","funk","bedchamber","boudoir","theoretician","oddball","nameplate","raven","ditty","canary","anticommunist","reconsideration","playboy","skate","transparency","uplift","six-pack","rambling","commendation","wimp","pestilence","sufferer","kelp","counterforce","self-doubt","deformity","croak","marine","marksman","directorate","reversion","stimulant","dence","beloved","eraser","slurry","tracing","bigot","compendium","entitlement","monolith","misrepresentation","darkroom","nutshell","torque","concubine","peephole","lesion","bogey","spindle","birdie","nugget","tenon","supercomputer","weakling","provenance","vowel","empiricist","filet","co-founder","prelate","onlooker","tricycle","sax","catheter","accessory","fresco","prod","oscillator","self-image","refraction","excretion","prance","insurer","cask","impersonation","rangeland","toothache","magnum","accuser","rubbing","carver","carnation","masquerade","pervert","trapdoor","shaker","mittee","tux","poignancy","payday","captor","couplet","mutant","jogger","raider","dilution","sickle","prowl","blister","reassessment","infirmity","matchmaker","workload","restaurateur","tuning","wiretap","perpetrator","davenport","lamppost","inductivist","affect","sterilization","booming","rucksack","repurchase","starship","bystander","taker","spaniel","teletype","cuckoo","sneaker","aspen","soundtrack","sacrilege","surname","succor","co-chairman","anticlimax","hopper","jumpsuit","rinse","rummy","cigaret","washcloth","butchery","almond","cooker","implement","effluent","cheat","threshing","silicone","draining","vector","shopper","dandelion","pecking","brazier","cobblestone","slugger","sacrificer","airlock","lunchroom","zebra","ejection","cutthroat","wizardry","crony","kennel","internship","cohabitation","omelet","wheelhouse","redundancy","schema","psychopath","buttock","grasshopper","playmate","lamentation","socialite","cornucopia","lichen","coterie","warlord","discomfiture","frieze","montage","traveller","curvature","condensation","vineyard","scraper","generality","archive","half-sister","gangplank","intimation","doublet","pleading","tome","quadrangle","connotation","lifeboat","blueberry","coinage","prospector","bash","disciplinarian","dualism","bookshelf","adjutant","clod","apportionment","footbridge","tourniquet","spore","slicker","jetport","magenta","schizophrenic","oilman","harbinger","trespass","merry-go-round","sabra","old-timer","vigilante","melanoma","torpor","gliding","refutation","dab","jurist","plumage","kitty","cauldron","abbey","jasmine","lefty","cabal","detonator","retiree","abatement","clamp","roost","councilman","halfback","centimeter","shirttail","whispering","stratagem","exponent","cheesecake","truism","jaunt","node","ironclad","undertow","self-portrait","urchin","idealization","splendour","antechamber","living-room","sampler","friar","irregularity","lateness","playback","binder","washbasin","tummy","capitulation","felicity","canter","birthrate","earthenware","kitchenette","foundry","ladle","babushka","chlorophyll","adjournment","villager","recrimination","hotshot","blaster","pruning","soloist","hummingbird","recuperation","bequest","hemlock","cottonwood","drawbridge","alternation","malt","interconnection","mugger","tuft","keystone","riverboat","thrall","ayatollah","highland","mistrial","bunkhouse","anesthesiologist","dredging","anode","salsa","prizefighter","neckline","chile","foreclosure","cola","digression","scythe","lout","chamberlain","minefield","sabbatical","appraiser","isotope","demarcation","garnet","buzzard","repulsion","lowland","snifter","bending","weekly","dispensation","botanist","sari","stabbing","ovary","skullcap","journeyman","thievery","look-alike","parson","heartbreak","distillate","neophyte","blower","storekeeper","firmament","taxicab","corona","fusillade","publicist","resume","breather","casement","smokestack","interrogator","outcropping","mecca","dilettante","shoestring","belch","behemoth","negligee","heath","smut","negative","fistfight","regent","incumbency","curragh","toga","ministration","turnip","beamer","stepladder","loon","businesswoman","jumbo","whining","spoor","posturing","parlour","concertina","alkali","rampart","chime","warmup","taffeta","hyena","firehouse","sweetener","guessing","pronoun","madhouse","lioness","breadwinner","diocese","escarpment","mimic","retina","larder","gnat","hothouse","ponytail","markup","bevy","revocation","depressive","garner","redefinition","lifter","stateroom","nutritionist","isolationist","surveyor","polemic","ornamentation","gouge","counterweight","thrower","illegality","joining","lumberyard","wholesaler","obeisance","stagecoach","substage","lockup","nudge","rejoinder","compost","carburetor","peacemaker","prologue","swinger","right-of-way","precipitate","sprinkler","crone","valentine","vassal","tabloid","minstrel","nursemaid","attribution","courtier","docket","spool","convocation","serviceman","letterhead","zealot","negro","cackle","masthead","dispersion","underwriting","armload","noodle","squawk","periodical","reformation","boa","starlet","about-face","ejaculation","encore","harangue","woodpile","earlobe","reaffirmation","handlebar","compunction","contemporary","midriff","nimbus","householder","postgraduate","quirk","innovator","sneak","straitjacket","pussycat","belle","kidnapper","spacing","laying","standout","estuary","duster","jackpot","motorboat","welterweight","kicker","expectant","revue","senior","epistemology","yeoman","firearm","granddaddy","projectile","stammer","crossfire","toxin","hookup","phantom","transgression","flagstone","acuity","twick","acolyte","directorship","corpsman","worktable","mammogram","wart","liqueur","unbutton","receivership","duchess","delinquent","picker","earphone","blare","promontory","formalism","infamy","operative","hock","crusher","megaphone","retrenchment","chaser","dementia","wane","triviality","quadrant","curate","pairing","forging","dermatologist","mango","bon","moccasin","hayloft","marionette","seedship","ooze","interloper","twill","solicitation","trowel","professorship","scrimmage","scrawl","blockage","parkway","motorman","snapper","transcription","vasectomy","binary","flagon","choirboy","butte","throbbing","bound","thunderbolt","dike","cowbell","elect","prodding","lynching","rant","drifter","snot","preservative","brogue","tary","tortoise","lattice","strudel","composite","churn","median","neurosurgeon","mariner","kiln","boarder","ama","petal","friendly","clearinghouse","swastika","filler","enquiry","dispensary","chump","archeologist","rescuer","dy","draftsman","snicker","shakedown","romp","construct","conclave","winery","polarity","breakin","wailing","gurgle","bedroll","commissar","albatross","shading","peal","taverna","chicanery","has-been","waistline","oaf","satirist","faint","myosin","dimple","landfall","fornication","smithy","tough","gunboat","busboy","cassava","poplar","discontinuity","obelisk","blubber","demonstrator","meltdown","abolitionist","thorax","holler","pimple","sending","druggist","indirection","leotard","ken","showman","despot","ombudsman","lyricist","dearie","lumberjack","gaff","pagan","cremation","infarction","sturgeon","publican","bottleneck","chambermaid","pectoral","purser","godsend","whisk","canard","concentrate","copter","shipwreck","laundering","clipper","notepad","jackal","indentation","basilica","adhesive","mermaid","knighthood","personage","omelette","whoosh","embellishment","misgiving","tracer","brawling","crucifixion","steal","transference","sleight","threesome","windowpane","bereavement","viceroy","betrothal","refresher","seagull","jay","needler","discoverer","goiter","caterpillar","impostor","diminutive","cation","playpen","amputation","confidante","dockside","inquisition","chronicler","seamstress","lath","absolutist","cadaver","perusal","subterfuge","self-satisfaction","sawmill","agitator","shortcoming","breakwater","microcomputer","lima","greatcoat","mahout","prima","undress","superstructure","stopgap","moo","bio","fret","pomposity","bough","autocracy","anchorage","samovar","gen","burrow","rosebud","segregationist","mortise","hydrant","postmortem","oversimplification","entryway","paintbrush","rea","balustrade","chuck","trumpeter","ferret","opportunist","pinnace","salamander","transom","mace","individualist","synthesizer","thoroughbred","cupola","tomboy","ensign","bottling","whir","poultice","entranceway","saver","gurdwara","renegotiation","tossing","ruffle","footprint","skeptic","birthmark","tailspin","kickback","chalice","plagiarism","passer","inhumanity","ceremonial","sapling","babysitter","creeper","galleon","bellman","holly","hacienda","cur","transplantation","scab","ballgame","demotion","flimsy","hovel","lug","layup","firefighter","gravestone","nymph","cajole","tickle","boxcar","secession","refractor","somersault","personification","treacle","tutorial","voucher","thimble","stickler","front-runner","paroxysm","exorcism","psalm","infestation","scrubbing","castor","peppermint","orchestration","extremist","oppressor","lode","prompting","watchword","swindle","statehouse","floater","nightdress","bloak","elegy","woodshed","trembling","banning","adornment","redoubt","lightweight","postulate","anti-Semite","tasting","viewscreen","sentinel","nation-state","heft","nurture","villainy","manhunt","invoice","sprig","self-denial","selector","piglet","commemoration","crucible","piper","curtsy","lackey","breastplate","gadfly","octave","epilogue","self-examination","thyroid","apologist","chemise","super","figment","waif","essayist","brewer","miniature","sediment","cannibal","tulip","caramel","caseload","synonym","analogue","ver","shirtwaist","cornerback","insecticide","debauchery","lien","strangulation","intricacy","guesthouse","crumbling","glassware","cachet","thumping","damper","colonist","frolic","ogre","heist","sorting","pawl","muttering","refill","cowl","imbecile","painkiller","garter","creole","overpass","simile","potpourri","piling","predisposition","corsage","mobster","sandal","aphorism","vice-chairman","heartache","converter","pecan","ecologist","substrate","quagmire","trenchcoat","voyce","overstatement","soapbox","rediscovery","effusion","agronomist","firecracker","haunt","murmuring","henhouse","fluctuation","signora","mulberry","hoist","bullfight","discotheque","finder","tureen","hairstyle","dignitary","consummation","spar","pogrom","beeper","read","outboard","sho","skit","impurity","sadist","parafoil","bouncer","spender","locust","boardroom","burnout","inoculation","surfeit","welder","propagandist","mortuary","pessimist","equivalence","juke","spatter","incubator","reproof","gulch","notary","speedometer","lodger","mitt","southpaw","footman","amity","bloodline","cleaver","coffeehouse","confederate","assist","ation","lecher","abrasion","daybed","knit","laddie","forfeit","kebele","filigree","frisbee","cantina","oscillation","countryman","juggler","scion","acrobat","hourglass","realtor","onyx","pettiness","chancellery","footfall","slippage","mandarin","eral","lob","impertinence","providence","dom","idyll","democrat","deferral","sorority","slamming","badger","mutter","ling","strobe","explosive","municipality","crossover","bedstead","spatula","tug-of-war","goon","pauper","lation","sacking","alder","nightstick","salve","infraction","prowler","falsification","pant","drunk","rumbling","ce","minuet","plaything","yelling","kiddie","duction","buttress","carapace","sobbing","insufficiency","prig","bidet","bloodhound","madwoman","buffoon","vignette","doorjamb","caprice","gable","converse","cad","creche","mullah","spectre","spotter","ingenue","chalet","automatic","stash","truckload","tailback","static","productivist","dissipation","haunch","nag","awl","self-delusion","rattler","blacklist","beagle","trapeze","obstinacy","fiddler","theorem","rearrangement","changeover","reassignment","courtesan","fillet","nay","cutout","luncheonette","purveyor","incitement","remarriage","amelioration","executor","buttonhole","duality","churchman","sickroom","farmstead","jester","perfidy","cuticle","weal","snub","pretension","roadbed","furnishing","quickie","workweek","conveyance","pseudopatient","turbocharger","fleece","abbreviation","spigot","leaflet","great-aunt","ninny","beaker","experimenter","validation","inhabitant","grading","cantaloupe","potentiality","flue","commoner","playroom","readjustment","boathouse","vivacity","brakeman","petitioner","singularity","gage","delineation","fester","paratrooper","font","pitchfork","signifier","crossbar","playhouse","tripe","stylus","pacemaker","clustering","hone","runt","emporium","ragtag","aneurysm","trapper","pulley","thrashing","candlestick","checkerboard","swoop","surcoat","dystrophy","bristle","beck","toolbox","hunchback","subcompact","doze","seaway","disclaimer","arbitrator","miller","crackpot","loafer","instigation","sen","bale","skim","skip","dollop","tender","oeuvre","goner","sor","tort","cropland","profundity","caf","zoom","gabardine","quack","cataclysm","condolence","foxhole","circlet","brave","misfit","bivouac","artificiality","dachshund","puke","bagel","sortie","nomad","opal","ethnicity","firebox","ratchet","cud","worsted","squabbling","cheque","jean","avatar","dirge","footstool","velour","barrister","pression","microchip","coda","reappraisal","cess","hangman","centenary","plough","broomstick","headstone","tormentor","sore","rathorn","voyeur","world-view","co-star","warren","fail","deflation","noble","fleck","saleswoman","hap","machinist","waffle","tom","ell","prefab","suckling","guardhouse","sabre","entanglement","integrator","quarterly","paraffin","heifer","frivolity","good","bougainvillea","excommunication","distillation","cyclist","meteorologist","rubric","cul-de-sac","misnomer","phobia","demagogue","bloodletting","raconteur","ger","astrologer","zygote","counterrevolution","reinstatement","anchovy","getup","tryout","scullery","turnstile","cyst","mustang","gaslight","self-deception","emanation","grown-up","escapade","versity","fishery","paprika","grailstone","gurney","fount","holdout","licensee","jackknife","asterisk","still","fundamentalist","humbug","repast","christening","butternut","miniskirt","fortune-teller","spillway","ference","salver","payout","nodule","high","tugboat","gizzard","sympathizer","fibrillation","incompatibility","dodge","trove","mercenary","pigtail","matchbook","masterwork","barb","endeavour","confection","ephor","yarmulke","char","mimeograph","holdover","subtitle","saddlebag","metronome","tine","testicle","caveat","etching","auntie","guarantor","ringer","airman","boatman","carnivore","armband","polder","tryst","lem","sitting-room","barrow","reappearance","pastiche","bankroll","stroller","saxophonist","blanc","redesign","plotting","gruel","juicer","slat","scooter","socialist","gradient","ember","scorecard","remembering","bo","forecaster","flirt","backache","parakeet","pixie","guffaw","anesthetist","logjam","pursuer","physiologist","follicle","coverall","patsy","bunt","lubricant","jawbone","numeral","mourner","rune","bettor","solder","nitrite","rime","pinstripe","pistachio","monocle","equivocation","crystallization","twit","two-year-old","toupee","eyelash","recognizance","cy","sophistry","seesaw","loony","do-gooder","dusting","commonality","yearling","disbarment","self-congratulation","tsar","vagabond","rhinestone","viper","planetoid","crochet","laird","flatland","prompt","catamaran","wigwam","mainframe","shivering","stringer","vane","iniquity","hoodlum","tableware","smelter","overlay","umber","placenta","yew","right-hander","laggard","cornice","philanthropist","scouring","dissenter","mainsail","showplace","conch","sentimentalist","protectorate","sanitarium","truancy","angler","showpiece","carotene","pollutant","diabetic","hairbrush","videodisc","intellectualist","pothole","setter","tense","grader","kneecap","birdbath","dell","typhoid","tuba","torturer","commie","houseboat","revelry","medalist","hinterland","jowl","splotch","sable","mouf","ripoff","coolie","streetlamp","damn","sharecropper","oral","schoolmate","commander-in-chief","capitalization","flex","shtetl","chenille","pullback","pharaoh","claret","fulfilment","glower","remuneration","internationalist","pap","pediment","sonata","toke","co-director","dollhouse","salesgirl","greenback","analog","ofa","freelancer","hairpin","aphasia","kicking","bummer","lawmaker","thickening","juggernaut","comma","sander","claimant","triad","rhizome","prolongation","placer","transvestite","faceplate","shortening","coffle","surfer","greengrocer","roughage","nudist","dumbbell","coiffure","pinky","ex-President","start-up","bobby","sidearm","paean","raiment","conceptualization","surmise","agnostic","cranny","tassel","infarct","pitchman","minor","stationmaster","sublet","puter","dramatization","mounting","washstand","counsellor","penknife","curtailment","remake","millimeter","sextant","vocalist","blowup","walleye","pickax","fanny","ascendant","brushing","highball","bandleader","winning","godmother","horoscope","disequilibrium","run-up","grazer","sandbar","motorbike","hassock","piggy","teat","reprise","wheeling","psychotherapist","calabash","cob","relativist","packer","slayer","digger","banshee","autocrat","knave","muskrat","extinguisher","foreleg","sobriquet","hospice","accretion","mastermind","figurine","newsmagazine","epidemiologist","pic","minaret","dereliction","city-state","jawline","escapist","legation","weatherman","sinker","cabby","guardrail","objector","timepiece","cistern","werewolf","decadent","harlot","epiphany","bricklayer","doorkeeper","obsidian","bedpost","constriction","refectory","blackbird","enforcer","riposte","schmuck","squab","pop-up","handrail","sandbag","superman","underbelly","alarmist","sesame","paratroop","droplet","proclivity","theorizing","quark","tactician","sundae","poolhall","behaviorist","dipper","postmark","co-conspirator","carload","electrocution","mould","goodnight","appendectomy","statuette","coefficient","cornet","scolding","prude","platitude","carport","lilac","geisha","foist","mitigation","percussionist","lechery","wyrm","charlatan","tussle","slough","jamb","twister","lakeshore","scavenger","pinkie","changeling","pinhead","muster","exploring","fief","critter","haystack","skimmer","geyser","stumble","update","tabernacle","gargoyle","projectionist","requisite","suffix","ramrod","betrayer","perience","tance","fluting","flare-up","fatherland","guardianship","douche","good-night","trawler","headsman","stoplight","operetta","spend","hater","teakettle","geneticist","particular","wardroom","slider","deuce","gingham","telethon","acclamation","centrifuge","workstation","pretender","prong","lampshade","ureter","hiccup","acetate","molding","wallop","vagrant","three-star","carafe","blowout","equinox","rave","junior","spoof","confessor","troubleshooter","braggart","judgeship","rapier","landmass","stoic","cuckold","inheritor","forester","jangle","gymnast","wingman","stein","gnome","drumstick","whatnot","yachtsman","realty","glob","by-election","academic","deflection","knocker","wondering","mugging","petit","frosting","pillowcase","panelling","grendel","tribune","tabulation","simulator","whaler","stork","gill","cavalcade","workhorse","locksmith","preppie","henchman","countertop","groundcar","puree","wellspring","debasement","prankster","tration","insert","put-down","typer","chartreuse","crematorium","headpiece","noncom","wipe","drove","sportscaster","impersonator","shrew","twitching","loader","magnolia","dropping","functionary","dissonance","cudgel","forfeiture","glutton","reject","doubleheader","tarp","suburbanite","afghan","chaperone","bas-relief","oscilloscope","imposter","newel","trusteeship","shocker","cannonball","half-breed","woodpecker","tumbleweed","snip","consignment","left-hander","spoil","also-ran","exhalation","signification","tester","ashram","gardenia","deductible","frontline","subtraction","bowstring","upland","bearskin","gramophone","mock-up","serenade","mix-up","extrapolation","tidbit","semaphore","banging","dogwood","carol","mapping","exchanger","ignominy","retraction","videocassette","precept","sirloin","mortification","pagoda","belfry","cubbyhole","mindstone","greyhound","clank","snowbank","instep","sanatorium","savanna","longshoreman","copier","nightshirt","boatyard","brigand","usurpation","understudy","interrelationship","undercarriage","sulphate","quasar","marshmallow","thrush","sweeper","alleviation","feint","chimera","infidel","modifier","perennial","simpleton","gridiron","overlord","airway","binding","abstention","algorithm","amalgamation","ascension","herdsman","lollipop","pastel","laminate","tendril","synopsis","drawstring","intermarriage","restorer","swoon","firefight","civilisation","self-criticism","hanky","ventricle","jot","interferon","circel","avenger","stepson","amethyst","beachhead","loggia","sizzle","burp","watchtower","endearment","dryad","prefect","tong","croissant","blocker","brioche","thistle","sunburst","savor","dumpling","checker","soliloquy","marketer","wheeze","molar","oboe","inbound","masochist","superficiality","tabby","outcrop","deputation","bassist","particularity","strop","thang","doggy","zation","ghoul","domestic","frostbite","relapse","floorboard","clicking","paraphrase","sinkhole","pushcart","overdraft","spinnaker","sourdough","sweatshop","meteorite","lander","caboose","junket","planer","iguana","brouhaha","reaper","sharpshooter","eggshell","self-sacrifice","minnow","skyrocket","connexion","effrontery","oblong","biker","flinch","cog","bullock","retrial","underwriter","gentlewoman","noggin","sissy","collect","dogmatism","sweatsuit","biplane","polariser","server","hiker","electrolyte","thunderclap","bronc","snooze","mascot","sherbet","carillon","decal","womanizer","underground","tailcoat","worshipper","automaton","proscription","sleuth","honeybee","abutment","foller","palladium","partake","jailing","counterfeit","pompadour","moneymaker","acacia","monthly","geographer","doghouse","bludgeon","fitter","conservator","indecency","atoll","fife","acquit","barracuda","mortician","striker","plait","untruth","hoarding","eighteen-wheeler","shakeup","grounder","abuser","hamstring","parishioner","cherub","cubist","antler","kisser","shunt","cravat","admixture","whinny","scorpion","amenity","matchup","spacer","settling","insinuation","possum","tenancy","girder","adapter","mousetrap","cubble","steppe","hypochondriac","covey","whipping","taunt","pocketful","pug","panhandle","conga","citron","foul-up","plaint","nouveau","oilskin","meridian","lifer","bolster","wren","gripe","mountaineer","transceiver","treetop","hex","harrow","tampering","photocopy","redskin","cesspool","barrette","cleanser","missive","breakfront","mini","ridgeline","semi","pasha","byword","phoneme","seducer","miser","cookstove","limerick","cummerbund","labourer","ascot","wraith","tarantula","toffee","pituitary","liana","cleat","line-up","helix","highboy","bicep","partment","coed","expletive","dumpster","deferment","progenitor","sandbox","mignon","typhoon","sublimation","backdoor","alchemist","pacifier","insomniac","hairpiece","lintel","indemnity","blurb","republican","electrocardiogram","futurist","recliner","mote","sketchbook","fulcrum","gratuity","aqueduct","adherent","masque","sundial","template","handmaiden","hedgehog","coding","corsair","solstice","orifice","sonobuoy","prizewinner","spinner","townsman","rosette","mind-set","unkindness","pushover","bility","infielder","hutch","erasure","parallelism","avowal","fastness","broadcloth","hellhole","grandparent","toehold","ident","sleepwalker","watching","aerie","database","mismatch","hombre","scrambler","spoiler","putdown","rookery","spinoff","ringleader","duchy","sealskin","transformer","doggie","bedsheet","cowhide","ceramic","prostration","cheroot","houseboy","giantess","tomcat","speedster","basalt","minicomputer","rapacity","spaceman","in-law","equerry","humpback","academician","harvester","fairground","ream","carat","entreaty","groundswell","obfuscation","provocateur","fugue","denigration","rifleman","manipulator","panting","synod","glitch","nightie","goaltender","kingpin","comforter","anesthetic","klaxon","hijack","orb","hostelry","gladiator","misadventure","bombard","fixity","tanner","stringency","wonderland","x-ray","plainclothesman","roadhouse","travelogue","gasket","nibble","hacking","nude","tincture","receptor","fink","schoolmarm","washtub","homesteader","hacker","portiere","hatbox","tamer","howitzer","grouper","frontage","amoeba","clime","flashback","teamster","accolade","polluter","officeholder","inpatient","altercation","reverberation","coproduction","phosphor","substation","bandana","sapper","preserver","pigeonhole","prefecture","milkman","avocation","argyle","amphetamine","linker","leviathan","hamster","bondsman","comer","bumpkin","sheikh","beefsteak","tyke","discoloration","kingmaker","quotient","excision","whitey","asymmetry","trill","discourtesy","bleat","hatching","crier","creel","seabed","witticism","riser","lurcher","moviemaker","pantsuit","linchpin","deformation","deodorant","soybean","washboard","egotist","underpass","dysfunction","tingling","barstool","paramour","udder","microbe","radiologist","qualm","welt","salesperson","signpost","sepulcher","lumpectomy","slaver","shopgirl","peregrine","siesta","reiteration","profligacy","iodide","iconoclast","rollcall","fillip","oratorio","splat","incoherence","accompanist","motorcar","nunnery","busybody","carryall","nettle","jaguar","pretence","odometer","potentate","mussel","prophetess","monetarist","proach","typescript","hacksaw","broadsword","miter","fatty","terrarium","archangel","powerboat","stooge","cannery","pylon","pulsation","misstep","yucca","hearthstone","rumour","lockout","toboggan","trampoline","concatenation","debility","acorn","forklift","psion","dragonet","ligament","folio","tie-up","picking","swatch","arrowhead","martinet","fisher","quintet","ellipse","sumbitch","legitimation","nightwatch","hardback","schemer","conversationalist","collectivist","reallocation","diorama","cutaway","point-of-view","cattleman","abscess","talc","incubus","dribble","sis","rhododendron","rolling","spiderweb","nonsmoker","crissake","refusenik","save","obstructionist","suture","parenthesis","reefer","great-grandson","steelworker","bumblebee","bullfrog","festivity","embolism","defeatist","tankard","ferryman","garret","co-worker","consonant","copywriter","bookseller","compress","dogfight","embezzler","quiche","liege","dissector","taskmaster","prosthesis","emulsion","spitball","modulation","squint","retelling","baiting","whirr","air-conditioner","individuation","geezer","aspirant","pensioner","re-enactment","flapper","looker","marshland","sexton","adverb","coenzyme","misapprehension","inaccuracy","barmaid","beautician","daredevil","racehorse","oxford","spume","busload","tradesman","manicure","propellant","apothecary","ruffian","titillation","instigator","siting","ringmaster","enumeration","twirl","bookmaker","technocrat","mouth-harp","quaver","icehouse","ventilator","roadster","subpena","carter","comedienne","savannah","milkmaid","pumper","signer","deadbeat","cofounder","bootlegger","tribesman","wildfire","shard","hailstorm","struction","routing","dolmen","idiosyncrasy","poniard","honky-tonk","spendthrift","draftee","hermaphrodite","pinafore","roundabout","frill","redeployment","ophthalmologist","caldron","reinvestment","troubadour","fjord","leave-taking","elongation","clinch","trinket","suasion","neutralist","finalist","whiplash","ventriloquist","violator","monarchist","spanking","grindstone","initiator","standard-bearer","sender","atelier","distemper","ingot","frontiersman","altarpiece","endgame","homily","synapse","pillbox","ochre","scimitar","jubilee","presentiment","tation","aggrandizement","truncheon","damsel","fallibility","papaya","piggyback","puppeteer","workhouse","nightingale","entomologist","wicket","debriefing","logician","moorland","minimalist","matte","skirmishing","tonality","maidservant","yam","gatekeeper","whammy","drudge","angora","garland","manoeuvre","moviegoer","slingshot","titan","re-evaluation","ironwork","ambassadorship","lanch","pollination","riage","vocalization","brawler","shaving","particulate","inhaler","impoundment","surfboard","waterman","almanac","pepperoni","kook","colonnade","infantryman","scruple","functionalist","wisecrack","conscript","boor","bannister","pretzel","analgesic","firebrand","microprocessor","frame-up","guardsman","teetotaler","broad","pallbearer","airframe","wrangle","backboard","knockdown","reparation","poorhouse","milkshake","battlement","dragonfly","paymaster","snuffler","crudeness","nerd","blockhouse","donut","backhoe","principality","dimmer","wounding","collier","beater","footlocker","barkeep","absurdist","brickwork","great-uncle","rumination","appellation","joiner","hydrolysis","interlocutor","raindrop","hardtop","groping","cymbal","miscellany","pomegranate","hearer","abortionist","corncob","shoal","dunce","bellowing","bridgehead","mangrove","blotch","boxwood","briar","which","trickster","epileptic","dependent","encumbrance","claque","pickpocket","half-truth","bilge","overrun","caveman","posterior","derriere","sty","maggot","vibrator","imbecility","hang-up","syllogism","blindfold","sunbeam","chrysanthemum","amour","ne'er-do-well","odour","flowerpot","satrap","reconnoiter","tonsillectomy","clampdown","coliseum","menage","warbler","hubcap","crudity","baseboard","lithograph","homeroom","stanchion","amphitheatre","disquisition","commonplace","feedlot","reprint","shire","kraken","careerist","goatskin","worldview","waddle","washout","doormat","diadem","sniffer","spat","superhighway","snooper","libation","zoologist","subtext","bailiwick","exterminator","popsicle","actuary","cabinetmaker","swami","contraceptive","softener","margarita","hatter","tention","earpiece","dormer","timberland","katun","crooner","one-liner","adjudication","snitch","referent","subset","disavowal","starburst","merchantman","dalliance","polymer","hypnotist","monogram","peerage","claymore","satyr","twerp","matchstick","rubber-stamp","clapper","exhibitionist","warhorse","eatery","seashell","radish","router","dinette","trombonist","rivet","requiem","breakaway","hard-liner","locator","shindig","corrective","truffle","whelp","expediter","savant","mitten","canton","wobble","misinterpretation","fense","headwrap","conciliator","chine","topping","assemblyman","divine","scuffling","boomlet","dervish","yellow-green","stockyard","hummock","trimming","royalist","calumny","vandal","prickle","strikeout","apologia","afterburner","hunker","flippancy","fop","embrasure","hornet","tithe","oilfield","lawman","turnkey","fledgling","coauthor","blowpipe","subjectivist","backstop","fishbowl","bedpan","sedge","protrusion","crybaby","freedman","seminarian","spacesuit","tautology","footstep","fiveyear","stoneware","mance","generalist","quitter","domicile","requisition","seance","cabana","wastrel","underling","looter","glassful","wallow","boater","disharmony","shiksa","herringbone","flyleaf","eyesore","lawnmower","walk-up","hemline","wiggle","posing","whirring","cropper","reappointment","psychodrama","shaver","orthodontist","granary","extrovert","calfskin","thinning","foghorn","trainload","carbide","metier","harpist","minim","ballcarrier","rayon","bursting","flipper","fastening","mullet","exploit","squatter","nullity","commodore","newlywed","eavesdropper","chiropractor","miler","arsonist","wrecker","transmutation","incompetency","subcontractor","tress","meatball","bobcat","distributorship","camcorder","pasty","glimmering","groaning","classicist","stakeout","supplicant","repeater","crackling","cryptographer","croupier","honeycomb","insincerity","inhibitor","mystification","greaser","barker","anthill","barbarity","strangle","myrtle","segmentation","marlin","capon","toenail","flip-flop","auger","blasphemer","dipping","pawnshop","penumbra","mohole","bauble","rube","flophouse","triplicate","sardine","master-mason","fang","brainstorm","derangement","hanker","molestation","smokescreen","cavalryman","edging","layover","signalman","clavicle","crewcut","tricolor","cochairman","liberationist","foreskin","bleacher","semi-circle","quince","flatcar","abattoir","farmboy","tibia","thrum","conformist","southerner","docudrama","whorl","break-up","conglomeration","exhibitor","bramble","cutie","woodchuck","compatriot","stole","tuner","housemother","dharma","femme","teahouse","banquette","bottomland","arranger","philistine","vacillation","chiton","retch","caddie","reissue","teaser","swampland","deejay","libertarian","pegboard","greenhorn","dork","cellmate","jobber","wishbone","millstone","haunting","blow-up","snorkel","snowplow","trespasser","punter","snowflake","snowdrift","gunnysack","surround","evergreen","clog","radioisotope","cougar","pundit","wattle","subgroup","oviduct","mixup","misstatement","sulfite","pansy","splint","counterproposal","pulsar","remove","landau","four-year-old","rebbe","disconnection","neomort","exegesis","meteoroid","meringue","sheepherder","radioman","strumpet","opment","millionth","speakeasy","conformation","cultivator","goof","annual","gazelle","demitasse","fishhook","preferment","homebody","skewer","chancre","sorbet","hologram","rivulet","oldster","prisoner-of-war","tulle","riff","restatement","debit","emplacement","repre","invariance","half-circle","objectivist","passer-by","scarlet","flail","impala","persimmon","purist","gation","burgher","snowman","starling","barony","annulment","lifespan","herder","embolden","swathe","ex-convict","trouper","half-wit","fuchsia","grange","ricochet","stinker","opacity","colander","absorber","armadillo","pleasantry","noncommunist","taxiway","overtone","debater","taillight","advisement","birdcage","baroness","aureole","breakout","colouring","astrophysicist","flatboat","stilt","eyeshade","barbell","deliverer","fishnet","prise","jackrabbit","manifold","chattel","jimmy","workshirt","thornbush","chatty","frisson","recount","patentee","oceanographer","forepaw","murderess","whalebone","frontrunner","cerebrum","jector","militiaman","lobsterman","earthling","clean","swindler","scree","begat","doorsill","housedress","strangler","shantytown","roughhouse","scenarist","foothill","contaminant","hamadryad","phony","fairyland","seascape","treble","prodigality","hobble","gantry","backroom","enticement","sawhorse","interviewee","cliffside","dustpan","scrubber","imbroglio","acquaintanceship","woodworker","aesthete","octogenarian","mauling","archivist","pungency","interweaving","jabber","bassinet","doubler","torte","linkup","outdoorsman","fixer","caddy","fumbling","defile","meristem","microbiologist","urologist","stovepipe","tambourine","constructionist","egomaniac","adjuster","liniment","impiety","timeline","cowgirl","sinecure","chillun","foreword","frat","retary","bagpipe","coif","visualization","colleen","shirtmaker","flounce","adder","riffle","underboss","reinterpretation","bender","seeding","fiver","sicken","decoder","holothete","figuring","stave","earplug","acrylic","epigraph","fairytale","flasher","sally","inkwell","nitwit","hussy","constrictor","stabilizer","stickup","seaplane","shimmy","dredge","updraft","speciality","insulator","frond","storyboard","shill","rafter","blowgun","dukedom","favourite","populist","striper","blowtorch","mallard","licking","poetess","tetracycline","ad-lib","toxicologist","fencer","gnawing","eration","photocell","golem","heirloom","penitence","gence","latecomer","broil","outdistance","howler","canine","replenishment","traditionalist","emcee","eyeglass","billow","eyelet","khaki","assignation","tepee","buccaneer","bellyache","parkland","musicologist","phaeton","spirochete","lanyard","mischance","tobacconist","blusher","castaway","meson","bouillabaisse","scrivener","stinger","life-cycle","harridan","motivator","mooring","crimp","inlay","purveyance","vertical","jackhammer","strongbox","dishpan","cobweb","couturier","chalkboard","basilisk","duckling","penitent","footrest","tangent","facing","peroration","floodlight","nouvelle","truss","sprite","drier","esplanade","banding","insulter","dialog","pincer","battlefront","missal","hayseed","parvenu","baronet","shipwright","whisker","no-hitter","double-dealing","moire","conjurer","rickshaw","crevasse","switchback","nicety","provincialism","novella","liberator","biggie","tune-up","ferryboat","remover","twosome","loveseat","tektite","sharpener","cartwheel","diva","flirting","disproportion","tortilla","rover","whodunit","birder","parley","birdsong","fiefdom","augury","harrier","tamale","judging","snakebite","diagnostician","tannin","qualifier","cheetah","distillery","protester","stockroom","factotum","newswoman","cosmopolitan","iridescence","aeroplane","toddy","co-defendant","parry","duocorn","boasting","elector","clarinetist","undergarment","psych","supergiant","armature","environ","collectivity","keepsake","gunfighter","wingspan","perforation","worshiper","groupie","cityscape","worrier","shipload","scallop","hatchery","portraitist","screamer","blaspheme","pacer","presenter","malcontent","seine","equivalency","scriptwriter","lieve","discard","bantam","centaur","typology","loiter","nigguh","drubbing","airfoil","curio","grandmaster","finisher","luminary","alliteration","phantasy","blooper","fasting","samba","gearbox","islet","apricot","smidgen","inset","firestorm","madcap","seedbed","gunsight","forelock","disjunction","writhing","huckleberry","abstract","squirm","ironist","monosaccharide","pushbutton","terracotta","artiste","showgirl","cornea","temptress","popularization","free-fall","scribbling","conviviality","flange","thwack","droop","rower","sweatband","gopher","mandolin","slobber","stricture","calyx","dietician","rehash","padre","ancient","dotage","jacaranda","pensione","contravention","undulation","ironworker","currant","hankie","face-lift","anthropoid","depressant","war-horse","tithing","greeter","matchbox","woodcutter","magpie","wayfarer","handcuff","lawgiver","traverse","minion","cavalier","sonarman","defoliant","scamp","snowshoe","polyp","gainer","honkie","bottler","halloo","amputee","ontology","bromide","brisket","goodie","tavern-keeper","choker","preaching","molester","tonsure","recapitulation","aviary","stevedore","raffle","bootstrap","angiogram","plantain","tipper","hooting","seismometer","persecutor","lobotomy","pigsty","virologist","gamete","presbytery","stepping-stone","dressing-room","cyclamate","chipmunk","platelet","flogging","tuber","reservist","blinker","demographer","turncoat","demesne","fancier","ideologist","self-justification","bucketful","m'lord","rapping","bestiality","irrelevancy","oiler","mackinaw","flutist","trafficker","categorization","pram","world-system","cathouse","deceiver","idjit","double-take","reformulation","brushfire","separator","neigh","whimpering","crisscross","regurgitation","auteur","backwash","refiner","broadsheet","hedonist","recitative","nonentity","codger","tinting","policymaker","tutu","boondoggle","entrant","wok","small","boatload","searcher","taMing","sycophant","substructure","megalomaniac","rusher","saleslady","registrar","blackguard","neckerchief","oldie","clinician","flushing","pinwheel","dition","charioteer","beastie","stridency","verity","eyedropper","canvass","desperado","teardrop","farmyard","mannerist","macaw","valedictorian","whopper","pertinence","assay","puncher","manse","anatomist","dishtowel","nuke","egalitarian","tribulation","cinematographer","sailer","icicle","legume","spiritualist","nativist","these","progressive","blastocyst","harpooner","pedant","instrumentality","connector","masseur","vertebra","moonshiner","bowsprit","grabber","stele","clanking","renter","antihero","bankbook","jailbird","handicraft","fighter-bomber","streamer","retardant","wallflower","flamethrower","agate","cairn","bantamweight","agglomeration","roustabout","linden","roughneck","formance","moray","cession","rashness","capstone","derailment","declivity","snowfield","talon","haymaker","abductor","diffuser","geosector","camisole"];Object.defineProperty(data,"__esModule",{value:!0});data.nouns=data.adjectives=void 0;const adjectives_1=adjectives;data.adjectives=adjectives_1.default;const nouns_1=nouns;data.nouns=nouns_1.default;const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(__viteBrowserExternal$1);(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.nouns=ne.adjectives=ne.uniqueUsernameGenerator=ne.generateUsername=ne.generateFromEmail=void 0;const oe=data,ce=require$$0$1,ue=(xe,_e)=>{const $e=(0,ce.randomBytes)(4).readUInt32BE(0);return xe+$e%(_e-xe+1)},pe=xe=>{let _e;switch(xe){case 1:_e=Math.floor(ue(1,9)).toString();break;case 2:_e=Math.floor(ue(10,90)).toString();break;case 3:_e=Math.floor(ue(100,900)).toString();break;case 4:_e=Math.floor(ue(1e3,9e3)).toString();break;case 5:_e=Math.floor(ue(1e4,9e4)).toString();break;case 6:_e=Math.floor(ue(1e5,9e5)).toString();break;default:_e="";break}return _e};function me(xe,_e){return xe.replace(/@.+/,"").replace(/[&/\\#,+()$~%._@'":*?<>{}]/g,"")+pe(_e)}ne.generateFromEmail=me;function ge(xe,_e,Se,$e){const Re=oe.nouns[Math.floor(Math.random()*oe.nouns.length)],Ae=$e?$e.replace(/\s{2,}/g," ").replace(/\s/g,xe??"").toLocaleLowerCase():oe.adjectives[Math.floor(Math.random()*oe.adjectives.length)];let Ie;return xe?Ie=Ae+xe+Re+pe(_e):Ie=Ae+Re+pe(_e),Se?Ie.substring(0,Se):Ie}ne.generateUsername=ge;function ye(xe){if(xe.dictionaries){const _e=Ie=>xe.dictionaries[Ie][ue(0,xe.dictionaries[Ie].length-1)],Se=xe.dictionaries.length,$e=xe.separator||"";let Re="";for(let Ie=0;IelodashExports$1.pick(ne,"workspaceMeta");function minimise(ne,oe){var ce;return{UIState:compressUIState(ne),layers:{layers:(ce=oe==null?void 0:oe.layers)==null?void 0:ce.map(ue=>{var me,ge;const pe=getController(ue);return{...ue,source:{type:(me=ue.source)==null?void 0:me.type,...(ge=pe==null?void 0:pe.compress)==null?void 0:ge.call(pe,ue.source)}}})}}}const ORIGIN_UNKNOWN="unknown";function useWorkspace(){const ne=useSnackbar(),[oe,ce]=useLayers(),[ue,pe]=useUIState(),me=useBusyState("workspace");return reactExports.useMemo(()=>{const ge=async ye=>({f:await r$5({accept:acceptedFormats,strict:!0}),origin:ye});return{load:async(ye,ve)=>{const{origin:xe,f:_e}=ye?{f:ye,origin:ve}:await ge(ve);return _e&&isWorkspaceFile(_e)?(await me(async()=>{const Se=isCompressedFile(_e)?await decompressBinaryAsync(new Uint8Array(await _e.arrayBuffer())):await _e.text(),$e=await parseYamlAsync(Se);$e&&(ce(()=>{var Re;for(const Ae of((Re=$e.layers)==null?void 0:Re.layers)??[])setLayerSource(Ae,xe);return $e.layers}),pe(()=>$e.UIState),pe(()=>({isTrusted:!1})))},`Opening workspace (${formatByte(_e.size)})`),!0):!1},save:async(ye,ve)=>{ne("Saving workspace...");const xe=JSON.stringify(minimise(ue,oe)),_e=ve??dist$4.generateUsername("-");if(ye){const Se=`${_e}.workspace.json`;return download(xe,Se,"application/json"),ne("Workspace saved",Se),{name:Se,size:byteLength$1(xe)}}else{const Se=`${_e}.workspace`,$e=await compressBinaryAsync(xe);return download($e,Se,"application/octet-stream"),ne("Workspace saved",Se),{name:Se,size:$e.byteLength}}},estimateWorkspaceSize:memoizee$1(ye=>sizeOf(minimise(ue,oe))*(ye?1:LZ_COMPRESSION_RATIO))}},[oe,ue])}function isCompressedFile(ne){return ne.name.endsWith(".workspace")}function isWorkspaceFile(ne){return!!lodashExports$1.find(acceptedFormats,oe=>ne.name.endsWith(oe))}function isWorkspace(ne){return!!lodashExports$1.find(acceptedFormats,oe=>ne.endsWith(oe))}function useUntrustedLayers(){var ue,pe;const[{layers:ne}]=useLayers(),[{trustedOrigins:oe}]=useSettings(),[{isTrusted:ce}]=useUIState();if(!ce){const me=(ue=ne==null?void 0:ne.find)==null?void 0:ue.call(ne,ge=>{var ye,ve,xe;return isTraceLayer(ge)&&((ye=ge.source)==null?void 0:ye.origin)&&!((xe=oe==null?void 0:oe.includes)!=null&&xe.call(oe,(ve=ge.source)==null?void 0:ve.origin))});if(me){const ge=((pe=me==null?void 0:me.source)==null?void 0:pe.origin)??ORIGIN_UNKNOWN;return{isTrusted:!1,untrustedLayer:me,untrustedLayerOrigin:ge}}return{isTrusted:!0}}return{isTrusted:!0}}function TrustedContent({children:ne}){const{isTrusted:oe,untrustedLayerOrigin:ce}=useUntrustedLayers(),[,ue]=useSettings(),[,pe]=useUIState();return oe?ne:jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(ShieldOutlined,{}),label:ce?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Trust"," ",jsxRuntimeExports.jsx(Link$1,{href:ce,children:ce}),"?"]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Trust this workspace?"}),secondary:"To enable custom views and advanced debugger features, you must trust this workspace first to allow third-party code to run.",action:jsxRuntimeExports.jsxs(Stack$1,{direction:"column",gap:2,alignItems:"center",children:[jsxRuntimeExports.jsx(Button,{onClick:()=>pe(()=>({isTrusted:!0})),startIcon:jsxRuntimeExports.jsx(CheckOutlined,{}),children:"Trust this time"}),!!ce&&jsxRuntimeExports.jsx(Button,{variant:"text",startIcon:jsxRuntimeExports.jsx(DoneAllOutlined,{}),onClick:()=>ue(producify(me=>{var ge;me.trustedOrigins=me.trustedOrigins??[],(ge=me.trustedOrigins)==null||ge.push(ce)})),children:"Always trust workspaces from this origin"})]})})}function makeTypeString({returnType:ne,params:oe}){return`@type {(${lodashExports$1.join(lodashExports$1.map(oe,ce=>`${ce.name}: ${ce.type}`),", ")}) => ${ne}}`}function makeComment(ne){const[oe,ce,ue]=["/**"," * "," */"],pe=lodashExports$1.map(lodashExports$1.chunk(lodashExports$1.split(ne.description," "),9),me=>lodashExports$1.join(me," "));return lodashExports$1.join([oe,...lodashExports$1.map(pe,me=>`${ce}${me}`),`${ce}${makeTypeString(ne)}`,ue],` +`)}function makeBody({name:ne,params:oe,defaultReturnValue:ce}){return lodashExports$1.join([`function ${ne}(${lodashExports$1.join(lodashExports$1.map(oe,"name"),", ")}) {`,` return ${JSON.stringify(ce)};`,"}"],` +`)}function makeTemplate(ne){return lodashExports$1.join(lodashExports$1.map(ne,oe=>lodashExports$1.join([makeComment(oe),makeBody(oe)],` +`)),` + +`)}var shim$5={exports:{}},useSyncExternalStoreShim_production_min={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -1073,14 +1080,7 @@ ${Nt.current.stack} -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; - `}}];return{always:getStyles(ge,"always"),resting:getStyles(ge,"resting"),dragging:getStyles(ge,"dragging"),dropAnimating:getStyles(ge,"dropAnimating"),userCancel:getStyles(ge,"userCancel")}};const useIsomorphicLayoutEffect$3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?reactExports.useLayoutEffect:reactExports.useEffect;var useLayoutEffect=useIsomorphicLayoutEffect$3;const getHead=()=>{const ne=document.querySelector("head");return ne||invariant(!1),ne},createStyleEl=ne=>{const oe=document.createElement("style");return ne&&oe.setAttribute("nonce",ne),oe.type="text/css",oe};function useStyleMarshal(ne,oe){const ce=useMemo(()=>getStyles$1(ne),[ne]),ue=reactExports.useRef(null),pe=reactExports.useRef(null),me=useCallback(memoizeOne(Se=>{const $e=pe.current;$e||invariant(!1),$e.textContent=Se}),[]),ge=useCallback(Se=>{const $e=ue.current;$e||invariant(!1),$e.textContent=Se},[]);useLayoutEffect(()=>{!ue.current&&!pe.current||invariant(!1);const Se=createStyleEl(oe),$e=createStyleEl(oe);return ue.current=Se,pe.current=$e,Se.setAttribute(`${prefix$2}-always`,ne),$e.setAttribute(`${prefix$2}-dynamic`,ne),getHead().appendChild(Se),getHead().appendChild($e),ge(ce.always),me(ce.resting),()=>{const Re=Ae=>{const Ie=Ae.current;Ie||invariant(!1),getHead().removeChild(Ie),Ae.current=null};Re(ue),Re(pe)}},[oe,ge,me,ce.always,ce.resting,ne]);const ye=useCallback(()=>me(ce.dragging),[me,ce.dragging]),ve=useCallback(Se=>{if(Se==="DROP"){me(ce.dropAnimating);return}me(ce.userCancel)},[me,ce.dropAnimating,ce.userCancel]),xe=useCallback(()=>{pe.current&&me(ce.resting)},[me,ce.resting]);return useMemo(()=>({dragging:ye,dropping:ve,resting:xe}),[ye,ve,xe])}function querySelectorAll(ne,oe){return Array.from(ne.querySelectorAll(oe))}var getWindowFromEl=ne=>ne&&ne.ownerDocument&&ne.ownerDocument.defaultView?ne.ownerDocument.defaultView:window;function isHtmlElement(ne){return ne instanceof getWindowFromEl(ne).HTMLElement}function findDragHandle(ne,oe){const ce=`[${dragHandle.contextId}="${ne}"]`,ue=querySelectorAll(document,ce);if(!ue.length)return null;const pe=ue.find(me=>me.getAttribute(dragHandle.draggableId)===oe);return!pe||!isHtmlElement(pe)?null:pe}function useFocusMarshal(ne){const oe=reactExports.useRef({}),ce=reactExports.useRef(null),ue=reactExports.useRef(null),pe=reactExports.useRef(!1),me=useCallback(function($e,Re){const Ae={id:$e,focus:Re};return oe.current[$e]=Ae,function(){const ke=oe.current;ke[$e]!==Ae&&delete ke[$e]}},[]),ge=useCallback(function($e){const Re=findDragHandle(ne,$e);Re&&Re!==document.activeElement&&Re.focus()},[ne]),ye=useCallback(function($e,Re){ce.current===$e&&(ce.current=Re)},[]),ve=useCallback(function(){ue.current||pe.current&&(ue.current=requestAnimationFrame(()=>{ue.current=null;const $e=ce.current;$e&&ge($e)}))},[ge]),xe=useCallback(function($e){ce.current=null;const Re=document.activeElement;Re&&Re.getAttribute(dragHandle.draggableId)===$e&&(ce.current=$e)},[]);return useLayoutEffect(()=>(pe.current=!0,function(){pe.current=!1;const $e=ue.current;$e&&cancelAnimationFrame($e)}),[]),useMemo(()=>({register:me,tryRecordFocus:xe,tryRestoreFocusRecorded:ve,tryShiftRecord:ye}),[me,xe,ve,ye])}function createRegistry(){const ne={draggables:{},droppables:{}},oe=[];function ce(Se){return oe.push(Se),function(){const Re=oe.indexOf(Se);Re!==-1&&oe.splice(Re,1)}}function ue(Se){oe.length&&oe.forEach($e=>$e(Se))}function pe(Se){return ne.draggables[Se]||null}function me(Se){const $e=pe(Se);return $e||invariant(!1),$e}const ge={register:Se=>{ne.draggables[Se.descriptor.id]=Se,ue({type:"ADDITION",value:Se})},update:(Se,$e)=>{const Re=ne.draggables[$e.descriptor.id];Re&&Re.uniqueId===Se.uniqueId&&(delete ne.draggables[$e.descriptor.id],ne.draggables[Se.descriptor.id]=Se)},unregister:Se=>{const $e=Se.descriptor.id,Re=pe($e);Re&&Se.uniqueId===Re.uniqueId&&(delete ne.draggables[$e],ne.droppables[Se.descriptor.droppableId]&&ue({type:"REMOVAL",value:Se}))},getById:me,findById:pe,exists:Se=>!!pe(Se),getAllByType:Se=>Object.values(ne.draggables).filter($e=>$e.descriptor.type===Se)};function ye(Se){return ne.droppables[Se]||null}function ve(Se){const $e=ye(Se);return $e||invariant(!1),$e}const xe={register:Se=>{ne.droppables[Se.descriptor.id]=Se},unregister:Se=>{const $e=ye(Se.descriptor.id);$e&&Se.uniqueId===$e.uniqueId&&delete ne.droppables[Se.descriptor.id]},getById:ve,findById:ye,exists:Se=>!!ye(Se),getAllByType:Se=>Object.values(ne.droppables).filter($e=>$e.descriptor.type===Se)};function _e(){ne.draggables={},ne.droppables={},oe.length=0}return{draggable:ge,droppable:xe,subscribe:ce,clean:_e}}function useRegistry(){const ne=useMemo(createRegistry,[]);return reactExports.useEffect(()=>function(){React$2.version.startsWith("16")||React$2.version.startsWith("17")?requestAnimationFrame(ne.clean):ne.clean()},[ne]),ne}var StoreContext=React$2.createContext(null),getBodyElement=()=>{const ne=document.body;return ne||invariant(!1),ne};const visuallyHidden={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var visuallyHidden$1=visuallyHidden;const getId=ne=>`rfd-announcement-${ne}`;function useAnnouncer(ne){const oe=useMemo(()=>getId(ne),[ne]),ce=reactExports.useRef(null);return reactExports.useEffect(function(){const me=document.createElement("div");return ce.current=me,me.id=oe,me.setAttribute("aria-live","assertive"),me.setAttribute("aria-atomic","true"),_extends$2(me.style,visuallyHidden$1),getBodyElement().appendChild(me),function(){setTimeout(function(){const ve=getBodyElement();ve.contains(me)&&ve.removeChild(me),me===ce.current&&(ce.current=null)})}},[oe]),useCallback(pe=>{const me=ce.current;if(me){me.textContent=pe;return}},[])}let count$1=0;const defaults$2={separator:"::"};function useDeprecatedUniqueId(ne,oe=defaults$2){return useMemo(()=>`${ne}${oe.separator}${count$1++}`,[oe.separator,ne])}function useUniqueId(ne,oe=defaults$2){const ce=React$2.useId();return useMemo(()=>`${ne}${oe.separator}${ce}`,[oe.separator,ne,ce])}var useUniqueId$1="useId"in React$2?useUniqueId:useDeprecatedUniqueId;function getElementId({contextId:ne,uniqueId:oe}){return`rfd-hidden-text-${ne}-${oe}`}function useHiddenTextElement({contextId:ne,text:oe}){const ce=useUniqueId$1("hidden-text",{separator:"-"}),ue=useMemo(()=>getElementId({contextId:ne,uniqueId:ce}),[ce,ne]);return reactExports.useEffect(function(){const me=document.createElement("div");return me.id=ue,me.textContent=oe,me.style.display="none",getBodyElement().appendChild(me),function(){const ye=getBodyElement();ye.contains(me)&&ye.removeChild(me)}},[ue,oe]),ue}var AppContext=React$2.createContext(null);function usePrevious(ne){const oe=reactExports.useRef(ne);return reactExports.useEffect(()=>{oe.current=ne}),oe}function create$1(){let ne=null;function oe(){return!!ne}function ce(ge){return ge===ne}function ue(ge){ne&&invariant(!1);const ye={abandon:ge};return ne=ye,ye}function pe(){ne||invariant(!1),ne=null}function me(){ne&&(ne.abandon(),pe())}return{isClaimed:oe,isActive:ce,claim:ue,release:pe,tryAbandon:me}}function isDragging(ne){return ne.phase==="IDLE"||ne.phase==="DROP_ANIMATING"?!1:ne.isDragging}const tab=9,enter=13,escape$1=27,space=32,pageUp=33,pageDown=34,end=35,home=36,arrowLeft=37,arrowUp=38,arrowRight=39,arrowDown=40,preventedKeys={[enter]:!0,[tab]:!0};var preventStandardKeyEvents=ne=>{preventedKeys[ne.keyCode]&&ne.preventDefault()};const supportedEventName=(()=>{const ne="visibilitychange";return typeof document>"u"?ne:[ne,`ms${ne}`,`webkit${ne}`,`moz${ne}`,`o${ne}`].find(ue=>`on${ue}`in document)||ne})();var supportedPageVisibilityEventName=supportedEventName;const primaryButton=0,sloppyClickThreshold=5;function isSloppyClickThresholdExceeded(ne,oe){return Math.abs(oe.x-ne.x)>=sloppyClickThreshold||Math.abs(oe.y-ne.y)>=sloppyClickThreshold}const idle$1={type:"IDLE"};function getCaptureBindings({cancel:ne,completed:oe,getPhase:ce,setPhase:ue}){return[{eventName:"mousemove",fn:pe=>{const{button:me,clientX:ge,clientY:ye}=pe;if(me!==primaryButton)return;const ve={x:ge,y:ye},xe=ce();if(xe.type==="DRAGGING"){pe.preventDefault(),xe.actions.move(ve);return}xe.type!=="PENDING"&&invariant(!1);const _e=xe.point;if(!isSloppyClickThresholdExceeded(_e,ve))return;pe.preventDefault();const Se=xe.actions.fluidLift(ve);ue({type:"DRAGGING",actions:Se})}},{eventName:"mouseup",fn:pe=>{const me=ce();if(me.type!=="DRAGGING"){ne();return}pe.preventDefault(),me.actions.drop({shouldBlockNextClick:!0}),oe()}},{eventName:"mousedown",fn:pe=>{ce().type==="DRAGGING"&&pe.preventDefault(),ne()}},{eventName:"keydown",fn:pe=>{if(ce().type==="PENDING"){ne();return}if(pe.keyCode===escape$1){pe.preventDefault(),ne();return}preventStandardKeyEvents(pe)}},{eventName:"resize",fn:ne},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{ce().type==="PENDING"&&ne()}},{eventName:"webkitmouseforcedown",fn:pe=>{const me=ce();if(me.type==="IDLE"&&invariant(!1),me.actions.shouldRespectForcePress()){ne();return}pe.preventDefault()}},{eventName:supportedPageVisibilityEventName,fn:ne}]}function useMouseSensor(ne){const oe=reactExports.useRef(idle$1),ce=reactExports.useRef(noop$2$1),ue=useMemo(()=>({eventName:"mousedown",fn:function(Se){if(Se.defaultPrevented||Se.button!==primaryButton||Se.ctrlKey||Se.metaKey||Se.shiftKey||Se.altKey)return;const $e=ne.findClosestDraggableId(Se);if(!$e)return;const Re=ne.tryGetLock($e,ge,{sourceEvent:Se});if(!Re)return;Se.preventDefault();const Ae={x:Se.clientX,y:Se.clientY};ce.current(),xe(Re,Ae)}}),[ne]),pe=useMemo(()=>({eventName:"webkitmouseforcewillbegin",fn:_e=>{if(_e.defaultPrevented)return;const Se=ne.findClosestDraggableId(_e);if(!Se)return;const $e=ne.findOptionsForDraggable(Se);$e&&($e.shouldRespectForcePress||ne.canGetLock(Se)&&_e.preventDefault())}}),[ne]),me=useCallback(function(){const Se={passive:!1,capture:!0};ce.current=bindEvents(window,[pe,ue],Se)},[pe,ue]),ge=useCallback(()=>{oe.current.type!=="IDLE"&&(oe.current=idle$1,ce.current(),me())},[me]),ye=useCallback(()=>{const _e=oe.current;ge(),_e.type==="DRAGGING"&&_e.actions.cancel({shouldBlockNextClick:!0}),_e.type==="PENDING"&&_e.actions.abort()},[ge]),ve=useCallback(function(){const Se={capture:!0,passive:!1},$e=getCaptureBindings({cancel:ye,completed:ge,getPhase:()=>oe.current,setPhase:Re=>{oe.current=Re}});ce.current=bindEvents(window,$e,Se)},[ye,ge]),xe=useCallback(function(Se,$e){oe.current.type!=="IDLE"&&invariant(!1),oe.current={type:"PENDING",point:$e,actions:Se},ve()},[ve]);useLayoutEffect(function(){return me(),function(){ce.current()}},[me])}function noop$1$1(){}const scrollJumpKeys={[pageDown]:!0,[pageUp]:!0,[home]:!0,[end]:!0};function getDraggingBindings(ne,oe){function ce(){oe(),ne.cancel()}function ue(){oe(),ne.drop()}return[{eventName:"keydown",fn:pe=>{if(pe.keyCode===escape$1){pe.preventDefault(),ce();return}if(pe.keyCode===space){pe.preventDefault(),ue();return}if(pe.keyCode===arrowDown){pe.preventDefault(),ne.moveDown();return}if(pe.keyCode===arrowUp){pe.preventDefault(),ne.moveUp();return}if(pe.keyCode===arrowRight){pe.preventDefault(),ne.moveRight();return}if(pe.keyCode===arrowLeft){pe.preventDefault(),ne.moveLeft();return}if(scrollJumpKeys[pe.keyCode]){pe.preventDefault();return}preventStandardKeyEvents(pe)}},{eventName:"mousedown",fn:ce},{eventName:"mouseup",fn:ce},{eventName:"click",fn:ce},{eventName:"touchstart",fn:ce},{eventName:"resize",fn:ce},{eventName:"wheel",fn:ce,options:{passive:!0}},{eventName:supportedPageVisibilityEventName,fn:ce}]}function useKeyboardSensor(ne){const oe=reactExports.useRef(noop$1$1),ce=useMemo(()=>({eventName:"keydown",fn:function(me){if(me.defaultPrevented||me.keyCode!==space)return;const ge=ne.findClosestDraggableId(me);if(!ge)return;const ye=ne.tryGetLock(ge,_e,{sourceEvent:me});if(!ye)return;me.preventDefault();let ve=!0;const xe=ye.snapLift();oe.current();function _e(){ve||invariant(!1),ve=!1,oe.current(),ue()}oe.current=bindEvents(window,getDraggingBindings(xe,_e),{capture:!0,passive:!1})}}),[ne]),ue=useCallback(function(){const me={passive:!1,capture:!0};oe.current=bindEvents(window,[ce],me)},[ce]);useLayoutEffect(function(){return ue(),function(){oe.current()}},[ue])}const idle={type:"IDLE"},timeForLongPress=120,forcePressThreshold=.15;function getWindowBindings({cancel:ne,getPhase:oe}){return[{eventName:"orientationchange",fn:ne},{eventName:"resize",fn:ne},{eventName:"contextmenu",fn:ce=>{ce.preventDefault()}},{eventName:"keydown",fn:ce=>{if(oe().type!=="DRAGGING"){ne();return}ce.keyCode===escape$1&&ce.preventDefault(),ne()}},{eventName:supportedPageVisibilityEventName,fn:ne}]}function getHandleBindings({cancel:ne,completed:oe,getPhase:ce}){return[{eventName:"touchmove",options:{capture:!1},fn:ue=>{const pe=ce();if(pe.type!=="DRAGGING"){ne();return}pe.hasMoved=!0;const{clientX:me,clientY:ge}=ue.touches[0],ye={x:me,y:ge};ue.preventDefault(),pe.actions.move(ye)}},{eventName:"touchend",fn:ue=>{const pe=ce();if(pe.type!=="DRAGGING"){ne();return}ue.preventDefault(),pe.actions.drop({shouldBlockNextClick:!0}),oe()}},{eventName:"touchcancel",fn:ue=>{if(ce().type!=="DRAGGING"){ne();return}ue.preventDefault(),ne()}},{eventName:"touchforcechange",fn:ue=>{const pe=ce();pe.type==="IDLE"&&invariant(!1);const me=ue.touches[0];if(!me||!(me.force>=forcePressThreshold))return;const ye=pe.actions.shouldRespectForcePress();if(pe.type==="PENDING"){ye&&ne();return}if(ye){if(pe.hasMoved){ue.preventDefault();return}ne();return}ue.preventDefault()}},{eventName:supportedPageVisibilityEventName,fn:ne}]}function useTouchSensor(ne){const oe=reactExports.useRef(idle),ce=reactExports.useRef(noop$2$1),ue=useCallback(function(){return oe.current},[]),pe=useCallback(function(Re){oe.current=Re},[]),me=useMemo(()=>({eventName:"touchstart",fn:function(Re){if(Re.defaultPrevented)return;const Ae=ne.findClosestDraggableId(Re);if(!Ae)return;const Ie=ne.tryGetLock(Ae,ye,{sourceEvent:Re});if(!Ie)return;const ke=Re.touches[0],{clientX:Be,clientY:Ne}=ke,Fe={x:Be,y:Ne};ce.current(),Se(Ie,Fe)}}),[ne]),ge=useCallback(function(){const Re={capture:!0,passive:!1};ce.current=bindEvents(window,[me],Re)},[me]),ye=useCallback(()=>{const $e=oe.current;$e.type!=="IDLE"&&($e.type==="PENDING"&&clearTimeout($e.longPressTimerId),pe(idle),ce.current(),ge())},[ge,pe]),ve=useCallback(()=>{const $e=oe.current;ye(),$e.type==="DRAGGING"&&$e.actions.cancel({shouldBlockNextClick:!0}),$e.type==="PENDING"&&$e.actions.abort()},[ye]),xe=useCallback(function(){const Re={capture:!0,passive:!1},Ae={cancel:ve,completed:ye,getPhase:ue},Ie=bindEvents(window,getHandleBindings(Ae),Re),ke=bindEvents(window,getWindowBindings(Ae),Re);ce.current=function(){Ie(),ke()}},[ve,ue,ye]),_e=useCallback(function(){const Re=ue();Re.type!=="PENDING"&&invariant(!1);const Ae=Re.actions.fluidLift(Re.point);pe({type:"DRAGGING",actions:Ae,hasMoved:!1})},[ue,pe]),Se=useCallback(function(Re,Ae){ue().type!=="IDLE"&&invariant(!1);const Ie=setTimeout(_e,timeForLongPress);pe({type:"PENDING",point:Ae,actions:Re,longPressTimerId:Ie}),xe()},[xe,ue,pe,_e]);useLayoutEffect(function(){return ge(),function(){ce.current();const Ae=ue();Ae.type==="PENDING"&&(clearTimeout(Ae.longPressTimerId),pe(idle))}},[ue,ge,pe]),useLayoutEffect(function(){return bindEvents(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const interactiveTagNames=["input","button","textarea","select","option","optgroup","video","audio"];function isAnInteractiveElement(ne,oe){if(oe==null)return!1;if(interactiveTagNames.includes(oe.tagName.toLowerCase()))return!0;const ue=oe.getAttribute("contenteditable");return ue==="true"||ue===""?!0:oe===ne?!1:isAnInteractiveElement(ne,oe.parentElement)}function isEventInInteractiveElement(ne,oe){const ce=oe.target;return isHtmlElement(ce)?isAnInteractiveElement(ne,ce):!1}var getBorderBoxCenterPosition=ne=>getRect(ne.getBoundingClientRect()).center;function isElement$1(ne){return ne instanceof getWindowFromEl(ne).Element}const supportedMatchesName=(()=>{const ne="matches";return typeof document>"u"?ne:[ne,"msMatchesSelector","webkitMatchesSelector"].find(ue=>ue in Element.prototype)||ne})();function closestPonyfill(ne,oe){return ne==null?null:ne[supportedMatchesName](oe)?ne:closestPonyfill(ne.parentElement,oe)}function closest(ne,oe){return ne.closest?ne.closest(oe):closestPonyfill(ne,oe)}function getSelector(ne){return`[${dragHandle.contextId}="${ne}"]`}function findClosestDragHandleFromEvent(ne,oe){const ce=oe.target;if(!isElement$1(ce))return null;const ue=getSelector(ne),pe=closest(ce,ue);return!pe||!isHtmlElement(pe)?null:pe}function tryGetClosestDraggableIdFromEvent(ne,oe){const ce=findClosestDragHandleFromEvent(ne,oe);return ce?ce.getAttribute(dragHandle.draggableId):null}function findDraggable(ne,oe){const ce=`[${draggable.contextId}="${ne}"]`,pe=querySelectorAll(document,ce).find(me=>me.getAttribute(draggable.id)===oe);return!pe||!isHtmlElement(pe)?null:pe}function preventDefault(ne){ne.preventDefault()}function isActive({expected:ne,phase:oe,isLockActive:ce,shouldWarn:ue}){return!(!ce()||ne!==oe)}function canStart({lockAPI:ne,store:oe,registry:ce,draggableId:ue}){if(ne.isClaimed())return!1;const pe=ce.draggable.findById(ue);return!(!pe||!pe.options.isEnabled||!canStartDrag(oe.getState(),ue))}function tryStart({lockAPI:ne,contextId:oe,store:ce,registry:ue,draggableId:pe,forceSensorStop:me,sourceEvent:ge}){if(!canStart({lockAPI:ne,store:ce,registry:ue,draggableId:pe}))return null;const ve=ue.draggable.getById(pe),xe=findDraggable(oe,ve.descriptor.id);if(!xe||ge&&!ve.options.canDragInteractiveElements&&isEventInInteractiveElement(xe,ge))return null;const _e=ne.claim(me||noop$2$1);let Se="PRE_DRAG";function $e(){return ve.options.shouldRespectForcePress}function Re(){return ne.isActive(_e)}function Ae(We,qe){isActive({expected:We,phase:Se,isLockActive:Re,shouldWarn:!0})&&ce.dispatch(qe())}const Ie=Ae.bind(null,"DRAGGING");function ke(We){function qe(){ne.release(),Se="COMPLETED"}Se!=="PRE_DRAG"&&(qe(),invariant(!1)),ce.dispatch(lift$1(We.liftActionArgs)),Se="DRAGGING";function ze(Ge,Ze={shouldBlockNextClick:!1}){if(We.cleanup(),Ze.shouldBlockNextClick){const Dt=bindEvents(window,[{eventName:"click",fn:preventDefault,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(Dt)}qe(),ce.dispatch(drop$1({reason:Ge}))}return{isActive:()=>isActive({expected:"DRAGGING",phase:Se,isLockActive:Re,shouldWarn:!1}),shouldRespectForcePress:$e,drop:Ge=>ze("DROP",Ge),cancel:Ge=>ze("CANCEL",Ge),...We.actions}}function Be(We){const qe=rafSchd$1(Ge=>{Ie(()=>move({client:Ge}))});return{...ke({liftActionArgs:{id:pe,clientSelection:We,movementMode:"FLUID"},cleanup:()=>qe.cancel(),actions:{move:qe}}),move:qe}}function Ne(){const We={moveUp:()=>Ie(moveUp),moveRight:()=>Ie(moveRight),moveDown:()=>Ie(moveDown),moveLeft:()=>Ie(moveLeft)};return ke({liftActionArgs:{id:pe,clientSelection:getBorderBoxCenterPosition(xe),movementMode:"SNAP"},cleanup:noop$2$1,actions:We})}function Fe(){isActive({expected:"PRE_DRAG",phase:Se,isLockActive:Re,shouldWarn:!0})&&ne.release()}return{isActive:()=>isActive({expected:"PRE_DRAG",phase:Se,isLockActive:Re,shouldWarn:!1}),shouldRespectForcePress:$e,fluidLift:Be,snapLift:Ne,abort:Fe}}const defaultSensors=[useMouseSensor,useKeyboardSensor,useTouchSensor];function useSensorMarshal({contextId:ne,store:oe,registry:ce,customSensors:ue,enableDefaultSensors:pe}){const me=[...pe?defaultSensors:[],...ue||[]],ge=reactExports.useState(()=>create$1())[0],ye=useCallback(function(ke,Be){isDragging(ke)&&!isDragging(Be)&&ge.tryAbandon()},[ge]);useLayoutEffect(function(){let ke=oe.getState();return oe.subscribe(()=>{const Ne=oe.getState();ye(ke,Ne),ke=Ne})},[ge,oe,ye]),useLayoutEffect(()=>ge.tryAbandon,[ge.tryAbandon]);const ve=useCallback(Ie=>canStart({lockAPI:ge,registry:ce,store:oe,draggableId:Ie}),[ge,ce,oe]),xe=useCallback((Ie,ke,Be)=>tryStart({lockAPI:ge,registry:ce,contextId:ne,store:oe,draggableId:Ie,forceSensorStop:ke||null,sourceEvent:Be&&Be.sourceEvent?Be.sourceEvent:null}),[ne,ge,ce,oe]),_e=useCallback(Ie=>tryGetClosestDraggableIdFromEvent(ne,Ie),[ne]),Se=useCallback(Ie=>{const ke=ce.draggable.findById(Ie);return ke?ke.options:null},[ce.draggable]),$e=useCallback(function(){ge.isClaimed()&&(ge.tryAbandon(),oe.getState().phase!=="IDLE"&&oe.dispatch(flush()))},[ge,oe]),Re=useCallback(()=>ge.isClaimed(),[ge]),Ae=useMemo(()=>({canGetLock:ve,tryGetLock:xe,findClosestDraggableId:_e,findOptionsForDraggable:Se,tryReleaseLock:$e,isLockClaimed:Re}),[ve,xe,_e,Se,$e,Re]);for(let Ie=0;Ie({onBeforeCapture:oe=>{const ce=()=>{ne.onBeforeCapture&&ne.onBeforeCapture(oe)};React$2.version.startsWith("16")||React$2.version.startsWith("17")?ce():reactDomExports.flushSync(ce)},onBeforeDragStart:ne.onBeforeDragStart,onDragStart:ne.onDragStart,onDragEnd:ne.onDragEnd,onDragUpdate:ne.onDragUpdate}),createAutoScrollerOptions=ne=>({...defaultAutoScrollerOptions,...ne.autoScrollerOptions,durationDampening:{...defaultAutoScrollerOptions.durationDampening,...ne.autoScrollerOptions}});function getStore(ne){return ne.current||invariant(!1),ne.current}function App$1(ne){const{contextId:oe,setCallbacks:ce,sensors:ue,nonce:pe,dragHandleUsageInstructions:me}=ne,ge=reactExports.useRef(null),ye=usePrevious(ne),ve=useCallback(()=>createResponders(ye.current),[ye]),xe=useCallback(()=>createAutoScrollerOptions(ye.current),[ye]),_e=useAnnouncer(oe),Se=useHiddenTextElement({contextId:oe,text:me}),$e=useStyleMarshal(oe,pe),Re=useCallback(Dt=>{getStore(ge).dispatch(Dt)},[]),Ae=useMemo(()=>bindActionCreators$1({publishWhileDragging,updateDroppableScroll,updateDroppableIsEnabled,updateDroppableIsCombineEnabled,collectionStarting},Re),[Re]),Ie=useRegistry(),ke=useMemo(()=>createDimensionMarshal(Ie,Ae),[Ie,Ae]),Be=useMemo(()=>createAutoScroller({scrollWindow,scrollDroppable:ke.scrollDroppable,getAutoScrollerOptions:xe,...bindActionCreators$1({move},Re)}),[ke.scrollDroppable,Re,xe]),Ne=useFocusMarshal(oe),Fe=useMemo(()=>createStore({announce:_e,autoScroller:Be,dimensionMarshal:ke,focusMarshal:Ne,getResponders:ve,styleMarshal:$e}),[_e,Be,ke,Ne,ve,$e]);ge.current=Fe;const Ue=useCallback(()=>{const Dt=getStore(ge);Dt.getState().phase!=="IDLE"&&Dt.dispatch(flush())},[]),We=useCallback(()=>{const Dt=getStore(ge).getState();return Dt.phase==="DROP_ANIMATING"?!0:Dt.phase==="IDLE"?!1:Dt.isDragging},[]),qe=useMemo(()=>({isDragging:We,tryAbort:Ue}),[We,Ue]);ce(qe);const ze=useCallback(Dt=>canStartDrag(getStore(ge).getState(),Dt),[]),Ge=useCallback(()=>isMovementAllowed(getStore(ge).getState()),[]),Ze=useMemo(()=>({marshal:ke,focus:Ne,contextId:oe,canLift:ze,isMovementAllowed:Ge,dragHandleUsageInstructionsId:Se,registry:Ie}),[oe,ke,Se,Ne,ze,Ge,Ie]);return useSensorMarshal({contextId:oe,store:Fe,registry:Ie,customSensors:ue||null,enableDefaultSensors:ne.enableDefaultSensors!==!1}),reactExports.useEffect(()=>Ue,[Ue]),React$2.createElement(AppContext.Provider,{value:Ze},React$2.createElement(Provider,{context:StoreContext,store:Fe},ne.children))}let count=0;function useDeprecatedUniqueContextId(){return useMemo(()=>`${count++}`,[])}function useUniqueContextId(){return React$2.useId()}var useUniqueContextId$1="useId"in React$2?useUniqueContextId:useDeprecatedUniqueContextId;function DragDropContext(ne){const oe=useUniqueContextId$1(),ce=ne.dragHandleUsageInstructions||preset$1.dragHandleUsageInstructions;return React$2.createElement(ErrorBoundary$1,null,ue=>React$2.createElement(App$1,{nonce:ne.nonce,contextId:oe,setCallbacks:ue,dragHandleUsageInstructions:ce,enableDefaultSensors:ne.enableDefaultSensors,sensors:ne.sensors,onBeforeCapture:ne.onBeforeCapture,onBeforeDragStart:ne.onBeforeDragStart,onDragStart:ne.onDragStart,onDragUpdate:ne.onDragUpdate,onDragEnd:ne.onDragEnd,autoScrollerOptions:ne.autoScrollerOptions},ne.children))}const zIndexOptions={dragging:5e3,dropAnimating:4500},getDraggingTransition=(ne,oe)=>oe?transitions.drop(oe.duration):ne?transitions.snap:transitions.fluid,getDraggingOpacity=(ne,oe)=>{if(ne)return oe?combine$1.opacity.drop:combine$1.opacity.combining},getShouldDraggingAnimate=ne=>ne.forceShouldAnimate!=null?ne.forceShouldAnimate:ne.mode==="SNAP";function getDraggingStyle(ne){const ce=ne.dimension.client,{offset:ue,combineWith:pe,dropping:me}=ne,ge=!!pe,ye=getShouldDraggingAnimate(ne),ve=!!me,xe=ve?transforms.drop(ue,ge):transforms.moveTo(ue);return{position:"fixed",top:ce.marginBox.top,left:ce.marginBox.left,boxSizing:"border-box",width:ce.borderBox.width,height:ce.borderBox.height,transition:getDraggingTransition(ye,me),transform:xe,opacity:getDraggingOpacity(ge,ve),zIndex:ve?zIndexOptions.dropAnimating:zIndexOptions.dragging,pointerEvents:"none"}}function getSecondaryStyle(ne){return{transform:transforms.moveTo(ne.offset),transition:ne.shouldAnimateDisplacement?void 0:"none"}}function getStyle$1(ne){return ne.type==="DRAGGING"?getDraggingStyle(ne):getSecondaryStyle(ne)}function getDimension$1(ne,oe,ce=origin){const ue=window.getComputedStyle(oe),pe=oe.getBoundingClientRect(),me=calculateBox(pe,ue),ge=withScroll(me,ce),ye={client:me,tagName:oe.tagName.toLowerCase(),display:ue.display},ve={x:me.marginBox.width,y:me.marginBox.height};return{descriptor:ne,placeholder:ye,displaceBy:ve,client:me,page:ge}}function useDraggablePublisher(ne){const oe=useUniqueId$1("draggable"),{descriptor:ce,registry:ue,getDraggableRef:pe,canDragInteractiveElements:me,shouldRespectForcePress:ge,isEnabled:ye}=ne,ve=useMemo(()=>({canDragInteractiveElements:me,shouldRespectForcePress:ge,isEnabled:ye}),[me,ye,ge]),xe=useCallback(Re=>{const Ae=pe();return Ae||invariant(!1),getDimension$1(ce,Ae,Re)},[ce,pe]),_e=useMemo(()=>({uniqueId:oe,descriptor:ce,options:ve,getDimension:xe}),[ce,xe,ve,oe]),Se=reactExports.useRef(_e),$e=reactExports.useRef(!0);useLayoutEffect(()=>(ue.draggable.register(Se.current),()=>ue.draggable.unregister(Se.current)),[ue.draggable]),useLayoutEffect(()=>{if($e.current){$e.current=!1;return}const Re=Se.current;Se.current=_e,ue.draggable.update(_e,Re)},[_e,ue.draggable])}var DroppableContext=React$2.createContext(null);function useRequiredContext(ne){const oe=reactExports.useContext(ne);return oe||invariant(!1),oe}function preventHtml5Dnd(ne){ne.preventDefault()}const Draggable=ne=>{const oe=reactExports.useRef(null),ce=useCallback((qe=null)=>{oe.current=qe},[]),ue=useCallback(()=>oe.current,[]),{contextId:pe,dragHandleUsageInstructionsId:me,registry:ge}=useRequiredContext(AppContext),{type:ye,droppableId:ve}=useRequiredContext(DroppableContext),xe=useMemo(()=>({id:ne.draggableId,index:ne.index,type:ye,droppableId:ve}),[ne.draggableId,ne.index,ye,ve]),{children:_e,draggableId:Se,isEnabled:$e,shouldRespectForcePress:Re,canDragInteractiveElements:Ae,isClone:Ie,mapped:ke,dropAnimationFinished:Be}=ne;if(!Ie){const qe=useMemo(()=>({descriptor:xe,registry:ge,getDraggableRef:ue,canDragInteractiveElements:Ae,shouldRespectForcePress:Re,isEnabled:$e}),[xe,ge,ue,Ae,Re,$e]);useDraggablePublisher(qe)}const Ne=useMemo(()=>$e?{tabIndex:0,role:"button","aria-describedby":me,"data-rfd-drag-handle-draggable-id":Se,"data-rfd-drag-handle-context-id":pe,draggable:!1,onDragStart:preventHtml5Dnd}:null,[pe,me,Se,$e]),Fe=useCallback(qe=>{ke.type==="DRAGGING"&&ke.dropping&&qe.propertyName==="transform"&&(React$2.version.startsWith("16")||React$2.version.startsWith("17")?Be():reactDomExports.flushSync(Be))},[Be,ke]),Ue=useMemo(()=>{const qe=getStyle$1(ke),ze=ke.type==="DRAGGING"&&ke.dropping?Fe:void 0;return{innerRef:ce,draggableProps:{"data-rfd-draggable-context-id":pe,"data-rfd-draggable-id":Se,style:qe,onTransitionEnd:ze},dragHandleProps:Ne}},[pe,Ne,Se,ke,Fe,ce]),We=useMemo(()=>({draggableId:xe.id,type:xe.type,source:{index:xe.index,droppableId:xe.droppableId}}),[xe.droppableId,xe.id,xe.index,xe.type]);return React$2.createElement(React$2.Fragment,null,_e(Ue,ke.snapshot,We))};var Draggable$1=Draggable,isStrictEqual=(ne,oe)=>ne===oe,whatIsDraggedOverFromResult=ne=>{const{combine:oe,destination:ce}=ne;return ce?ce.droppableId:oe?oe.droppableId:null};const getCombineWithFromResult=ne=>ne.combine?ne.combine.draggableId:null,getCombineWithFromImpact=ne=>ne.at&&ne.at.type==="COMBINE"?ne.at.combine.draggableId:null;function getDraggableSelector(){const ne=memoizeOne((pe,me)=>({x:pe,y:me})),oe=memoizeOne((pe,me,ge=null,ye=null,ve=null)=>({isDragging:!0,isClone:me,isDropAnimating:!!ve,dropAnimation:ve,mode:pe,draggingOver:ge,combineWith:ye,combineTargetFor:null})),ce=memoizeOne((pe,me,ge,ye,ve=null,xe=null,_e=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:ve,combineWith:xe,mode:me,offset:pe,dimension:ge,forceShouldAnimate:_e,snapshot:oe(me,ye,ve,xe,null)}}));return(pe,me)=>{if(isDragging(pe)){if(pe.critical.draggable.id!==me.draggableId)return null;const ge=pe.current.client.offset,ye=pe.dimensions.draggables[me.draggableId],ve=whatIsDraggedOver(pe.impact),xe=getCombineWithFromImpact(pe.impact),_e=pe.forceShouldAnimate;return ce(ne(ge.x,ge.y),pe.movementMode,ye,me.isClone,ve,xe,_e)}if(pe.phase==="DROP_ANIMATING"){const ge=pe.completed;if(ge.result.draggableId!==me.draggableId)return null;const ye=me.isClone,ve=pe.dimensions.draggables[me.draggableId],xe=ge.result,_e=xe.mode,Se=whatIsDraggedOverFromResult(xe),$e=getCombineWithFromResult(xe),Ae={duration:pe.dropDuration,curve:curves$1.drop,moveTo:pe.newHomeClientOffset,opacity:$e?combine$1.opacity.drop:null,scale:$e?combine$1.scale.drop:null};return{mapped:{type:"DRAGGING",offset:pe.newHomeClientOffset,dimension:ve,dropping:Ae,draggingOver:Se,combineWith:$e,mode:_e,forceShouldAnimate:null,snapshot:oe(_e,ye,Se,$e,Ae)}}}return null}}function getSecondarySnapshot(ne=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:ne,combineWith:null}}const atRest={mapped:{type:"SECONDARY",offset:origin,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:getSecondarySnapshot(null)}};function getSecondarySelector(){const ne=memoizeOne((ge,ye)=>({x:ge,y:ye})),oe=memoizeOne(getSecondarySnapshot),ce=memoizeOne((ge,ye=null,ve)=>({mapped:{type:"SECONDARY",offset:ge,combineTargetFor:ye,shouldAnimateDisplacement:ve,snapshot:oe(ye)}})),ue=ge=>ge?ce(origin,ge,!0):null,pe=(ge,ye,ve,xe)=>{const _e=ve.displaced.visible[ge],Se=!!(xe.inVirtualList&&xe.effected[ge]),$e=tryGetCombine(ve),Re=$e&&$e.draggableId===ge?ye:null;if(!_e){if(!Se)return ue(Re);if(ve.displaced.invisible[ge])return null;const ke=negate(xe.displacedBy.point),Be=ne(ke.x,ke.y);return ce(Be,Re,!0)}if(Se)return ue(Re);const Ae=ve.displacedBy.point,Ie=ne(Ae.x,Ae.y);return ce(Ie,Re,_e.shouldAnimate)};return(ge,ye)=>{if(isDragging(ge))return ge.critical.draggable.id===ye.draggableId?null:pe(ye.draggableId,ge.critical.draggable.id,ge.impact,ge.afterCritical);if(ge.phase==="DROP_ANIMATING"){const ve=ge.completed;return ve.result.draggableId===ye.draggableId?null:pe(ye.draggableId,ve.result.draggableId,ve.impact,ve.afterCritical)}return null}}const makeMapStateToProps$1=()=>{const ne=getDraggableSelector(),oe=getSecondarySelector();return(ue,pe)=>ne(ue,pe)||oe(ue,pe)||atRest},mapDispatchToProps$1={dropAnimationFinished},ConnectedDraggable=connect$1(makeMapStateToProps$1,mapDispatchToProps$1,null,{context:StoreContext,areStatePropsEqual:isStrictEqual})(Draggable$1);var ConnectedDraggable$1=ConnectedDraggable;function PrivateDraggable(ne){return useRequiredContext(DroppableContext).isUsingCloneFor===ne.draggableId&&!ne.isClone?null:React$2.createElement(ConnectedDraggable$1,ne)}function PublicDraggable(ne){const oe=typeof ne.isDragDisabled=="boolean"?!ne.isDragDisabled:!0,ce=!!ne.disableInteractiveElementBlocking,ue=!!ne.shouldRespectForcePress;return React$2.createElement(PrivateDraggable,_extends$2({},ne,{isClone:!1,isEnabled:oe,canDragInteractiveElements:ce,shouldRespectForcePress:ue}))}const isEqual=ne=>oe=>ne===oe,isScroll=isEqual("scroll"),isAuto=isEqual("auto"),isEither=(ne,oe)=>oe(ne.overflowX)||oe(ne.overflowY),isElementScrollable=ne=>{const oe=window.getComputedStyle(ne),ce={overflowX:oe.overflowX,overflowY:oe.overflowY};return isEither(ce,isScroll)||isEither(ce,isAuto)},isBodyScrollable=()=>!1,getClosestScrollable=ne=>ne==null?null:ne===document.body?isBodyScrollable()?ne:null:ne===document.documentElement?null:isElementScrollable(ne)?ne:getClosestScrollable(ne.parentElement);var getScroll=ne=>({x:ne.scrollLeft,y:ne.scrollTop});const getIsFixed=ne=>ne?window.getComputedStyle(ne).position==="fixed"?!0:getIsFixed(ne.parentElement):!1;var getEnv=ne=>{const oe=getClosestScrollable(ne),ce=getIsFixed(ne);return{closestScrollable:oe,isFixedOnPage:ce}},getDroppableDimension=({descriptor:ne,isEnabled:oe,isCombineEnabled:ce,isFixedOnPage:ue,direction:pe,client:me,page:ge,closest:ye})=>{const ve=(()=>{if(!ye)return null;const{scrollSize:$e,client:Re}=ye,Ae=getMaxScroll({scrollHeight:$e.scrollHeight,scrollWidth:$e.scrollWidth,height:Re.paddingBox.height,width:Re.paddingBox.width});return{pageMarginBox:ye.page.marginBox,frameClient:Re,scrollSize:$e,shouldClipSubject:ye.shouldClipSubject,scroll:{initial:ye.scroll,current:ye.scroll,max:Ae,diff:{value:origin,displacement:origin}}}})(),xe=pe==="vertical"?vertical:horizontal,_e=getSubject({page:ge,withPlaceholder:null,axis:xe,frame:ve});return{descriptor:ne,isCombineEnabled:ce,isFixedOnPage:ue,axis:xe,isEnabled:oe,client:me,page:ge,frame:ve,subject:_e}};const getClient=(ne,oe)=>{const ce=getBox(ne);if(!oe||ne!==oe)return ce;const ue=ce.paddingBox.top-oe.scrollTop,pe=ce.paddingBox.left-oe.scrollLeft,me=ue+oe.scrollHeight,ge=pe+oe.scrollWidth,ve=expand({top:ue,right:ge,bottom:me,left:pe},ce.border);return createBox({borderBox:ve,margin:ce.margin,border:ce.border,padding:ce.padding})};var getDimension=({ref:ne,descriptor:oe,env:ce,windowScroll:ue,direction:pe,isDropDisabled:me,isCombineEnabled:ge,shouldClipSubject:ye})=>{const ve=ce.closestScrollable,xe=getClient(ne,ve),_e=withScroll(xe,ue),Se=(()=>{if(!ve)return null;const Re=getBox(ve),Ae={scrollHeight:ve.scrollHeight,scrollWidth:ve.scrollWidth};return{client:Re,page:withScroll(Re,ue),scroll:getScroll(ve),scrollSize:Ae,shouldClipSubject:ye}})();return getDroppableDimension({descriptor:oe,isEnabled:!me,isCombineEnabled:ge,isFixedOnPage:ce.isFixedOnPage,direction:pe,client:xe,page:_e,closest:Se})};const immediate={passive:!1},delayed={passive:!0};var getListenerOptions=ne=>ne.shouldPublishImmediately?immediate:delayed;const getClosestScrollableFromDrag=ne=>ne&&ne.env.closestScrollable||null;function useDroppablePublisher(ne){const oe=reactExports.useRef(null),ce=useRequiredContext(AppContext),ue=useUniqueId$1("droppable"),{registry:pe,marshal:me}=ce,ge=usePrevious(ne),ye=useMemo(()=>({id:ne.droppableId,type:ne.type,mode:ne.mode}),[ne.droppableId,ne.mode,ne.type]),ve=reactExports.useRef(ye),xe=useMemo(()=>memoizeOne((Ue,We)=>{oe.current||invariant(!1);const qe={x:Ue,y:We};me.updateDroppableScroll(ye.id,qe)}),[ye.id,me]),_e=useCallback(()=>{const Ue=oe.current;return!Ue||!Ue.env.closestScrollable?origin:getScroll(Ue.env.closestScrollable)},[]),Se=useCallback(()=>{const Ue=_e();xe(Ue.x,Ue.y)},[_e,xe]),$e=useMemo(()=>rafSchd$1(Se),[Se]),Re=useCallback(()=>{const Ue=oe.current,We=getClosestScrollableFromDrag(Ue);if(Ue&&We||invariant(!1),Ue.scrollOptions.shouldPublishImmediately){Se();return}$e()},[$e,Se]),Ae=useCallback((Ue,We)=>{oe.current&&invariant(!1);const qe=ge.current,ze=qe.getDroppableRef();ze||invariant(!1);const Ge=getEnv(ze),Ze={ref:ze,descriptor:ye,env:Ge,scrollOptions:We};oe.current=Ze;const Dt=getDimension({ref:ze,descriptor:ye,env:Ge,windowScroll:Ue,direction:qe.direction,isDropDisabled:qe.isDropDisabled,isCombineEnabled:qe.isCombineEnabled,shouldClipSubject:!qe.ignoreContainerClipping}),Je=Ge.closestScrollable;return Je&&(Je.setAttribute(scrollContainer.contextId,ce.contextId),Je.addEventListener("scroll",Re,getListenerOptions(Ze.scrollOptions))),Dt},[ce.contextId,ye,Re,ge]),Ie=useCallback(()=>{const Ue=oe.current,We=getClosestScrollableFromDrag(Ue);return Ue&&We||invariant(!1),getScroll(We)},[]),ke=useCallback(()=>{const Ue=oe.current;Ue||invariant(!1);const We=getClosestScrollableFromDrag(Ue);oe.current=null,We&&($e.cancel(),We.removeAttribute(scrollContainer.contextId),We.removeEventListener("scroll",Re,getListenerOptions(Ue.scrollOptions)))},[Re,$e]),Be=useCallback(Ue=>{const We=oe.current;We||invariant(!1);const qe=getClosestScrollableFromDrag(We);qe||invariant(!1),qe.scrollTop+=Ue.y,qe.scrollLeft+=Ue.x},[]),Ne=useMemo(()=>({getDimensionAndWatchScroll:Ae,getScrollWhileDragging:Ie,dragStopped:ke,scroll:Be}),[ke,Ae,Ie,Be]),Fe=useMemo(()=>({uniqueId:ue,descriptor:ye,callbacks:Ne}),[Ne,ye,ue]);useLayoutEffect(()=>(ve.current=Fe.descriptor,pe.droppable.register(Fe),()=>{oe.current&&ke(),pe.droppable.unregister(Fe)}),[Ne,ye,ke,Fe,me,pe.droppable]),useLayoutEffect(()=>{oe.current&&me.updateDroppableIsEnabled(ve.current.id,!ne.isDropDisabled)},[ne.isDropDisabled,me]),useLayoutEffect(()=>{oe.current&&me.updateDroppableIsCombineEnabled(ve.current.id,ne.isCombineEnabled)},[ne.isCombineEnabled,me])}function noop$6(){}const empty$2={width:0,height:0,margin:noSpacing},getSize=({isAnimatingOpenOnMount:ne,placeholder:oe,animate:ce})=>ne||ce==="close"?empty$2:{height:oe.client.borderBox.height,width:oe.client.borderBox.width,margin:oe.client.margin},getStyle=({isAnimatingOpenOnMount:ne,placeholder:oe,animate:ce})=>{const ue=getSize({isAnimatingOpenOnMount:ne,placeholder:oe,animate:ce});return{display:oe.display,boxSizing:"border-box",width:ue.width,height:ue.height,marginTop:ue.margin.top,marginRight:ue.margin.right,marginBottom:ue.margin.bottom,marginLeft:ue.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:ce!=="none"?transitions.placeholder:null}},Placeholder=ne=>{const oe=reactExports.useRef(null),ce=useCallback(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),{animate:ue,onTransitionEnd:pe,onClose:me,contextId:ge}=ne,[ye,ve]=reactExports.useState(ne.animate==="open");reactExports.useEffect(()=>ye?ue!=="open"?(ce(),ve(!1),noop$6):oe.current?noop$6:(oe.current=setTimeout(()=>{oe.current=null,ve(!1)}),ce):noop$6,[ue,ye,ce]);const xe=useCallback(Se=>{Se.propertyName==="height"&&(pe(),ue==="close"&&me())},[ue,me,pe]),_e=getStyle({isAnimatingOpenOnMount:ye,animate:ne.animate,placeholder:ne.placeholder});return React$2.createElement(ne.placeholder.tagName,{style:_e,"data-rfd-placeholder-context-id":ge,onTransitionEnd:xe,ref:ne.innerRef})};var Placeholder$1=React$2.memo(Placeholder);class AnimateInOut extends React$2.PureComponent{constructor(...oe){super(...oe),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(oe,ce){return oe.shouldAnimate?oe.on?{isVisible:!0,data:oe.on,animate:"open"}:ce.isVisible?{isVisible:!0,data:ce.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!oe.on,data:oe.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const oe={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(oe)}}const Droppable=ne=>{const oe=reactExports.useContext(AppContext);oe||invariant(!1);const{contextId:ce,isMovementAllowed:ue}=oe,pe=reactExports.useRef(null),me=reactExports.useRef(null),{children:ge,droppableId:ye,type:ve,mode:xe,direction:_e,ignoreContainerClipping:Se,isDropDisabled:$e,isCombineEnabled:Re,snapshot:Ae,useClone:Ie,updateViewportMaxScroll:ke,getContainerForClone:Be}=ne,Ne=useCallback(()=>pe.current,[]),Fe=useCallback((Je=null)=>{pe.current=Je},[]);useCallback(()=>me.current,[]);const Ue=useCallback((Je=null)=>{me.current=Je},[]),We=useCallback(()=>{ue()&&ke({maxScroll:getMaxWindowScroll()})},[ue,ke]);useDroppablePublisher({droppableId:ye,type:ve,mode:xe,direction:_e,isDropDisabled:$e,isCombineEnabled:Re,ignoreContainerClipping:Se,getDroppableRef:Ne});const qe=useMemo(()=>React$2.createElement(AnimateInOut,{on:ne.placeholder,shouldAnimate:ne.shouldAnimatePlaceholder},({onClose:Je,data:Ut,animate:jt})=>React$2.createElement(Placeholder$1,{placeholder:Ut,onClose:Je,innerRef:Ue,animate:jt,contextId:ce,onTransitionEnd:We})),[ce,We,ne.placeholder,ne.shouldAnimatePlaceholder,Ue]),ze=useMemo(()=>({innerRef:Fe,placeholder:qe,droppableProps:{"data-rfd-droppable-id":ye,"data-rfd-droppable-context-id":ce}}),[ce,ye,qe,Fe]),Ge=Ie?Ie.dragging.draggableId:null,Ze=useMemo(()=>({droppableId:ye,type:ve,isUsingCloneFor:Ge}),[ye,Ge,ve]);function Dt(){if(!Ie)return null;const{dragging:Je,render:Ut}=Ie,jt=React$2.createElement(PrivateDraggable,{draggableId:Je.draggableId,index:Je.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Ke,an)=>Ut(Ke,an,Je));return ReactDOM$1.createPortal(jt,Be())}return React$2.createElement(DroppableContext.Provider,{value:Ze},ge(ze,Ae),Dt())};var Droppable$1=Droppable;function getBody(){return document.body||invariant(!1),document.body}const defaultProps={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:getBody},attachDefaultPropsToOwnProps=ne=>{let oe={...ne},ce;for(ce in defaultProps)ne[ce]===void 0&&(oe={...oe,[ce]:defaultProps[ce]});return oe},isMatchingType=(ne,oe)=>ne===oe.droppable.type,getDraggable=(ne,oe)=>oe.draggables[ne.draggable.id],makeMapStateToProps=()=>{const ne={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},oe={...ne,shouldAnimatePlaceholder:!1},ce=memoizeOne(me=>({draggableId:me.id,type:me.type,source:{index:me.index,droppableId:me.droppableId}})),ue=memoizeOne((me,ge,ye,ve,xe,_e)=>{const Se=xe.descriptor.id;if(xe.descriptor.droppableId===me){const Ae=_e?{render:_e,dragging:ce(xe.descriptor)}:null,Ie={isDraggingOver:ye,draggingOverWith:ye?Se:null,draggingFromThisWith:Se,isUsingPlaceholder:!0};return{placeholder:xe.placeholder,shouldAnimatePlaceholder:!1,snapshot:Ie,useClone:Ae}}if(!ge)return oe;if(!ve)return ne;const Re={isDraggingOver:ye,draggingOverWith:Se,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:xe.placeholder,shouldAnimatePlaceholder:!0,snapshot:Re,useClone:null}});return(me,ge)=>{const ye=attachDefaultPropsToOwnProps(ge),ve=ye.droppableId,xe=ye.type,_e=!ye.isDropDisabled,Se=ye.renderClone;if(isDragging(me)){const $e=me.critical;if(!isMatchingType(xe,$e))return oe;const Re=getDraggable($e,me.dimensions),Ae=whatIsDraggedOver(me.impact)===ve;return ue(ve,_e,Ae,Ae,Re,Se)}if(me.phase==="DROP_ANIMATING"){const $e=me.completed;if(!isMatchingType(xe,$e.critical))return oe;const Re=getDraggable($e.critical,me.dimensions);return ue(ve,_e,whatIsDraggedOverFromResult($e.result)===ve,whatIsDraggedOver($e.impact)===ve,Re,Se)}if(me.phase==="IDLE"&&me.completed&&!me.shouldFlush){const $e=me.completed;if(!isMatchingType(xe,$e.critical))return oe;const Re=whatIsDraggedOver($e.impact)===ve,Ae=!!($e.impact.at&&$e.impact.at.type==="COMBINE"),Ie=$e.critical.droppable.id===ve;return Re?Ae?ne:oe:Ie?ne:oe}return oe}},mapDispatchToProps={updateViewportMaxScroll},ConnectedDroppable=connect$1(makeMapStateToProps,mapDispatchToProps,(ne,oe,ce)=>({...attachDefaultPropsToOwnProps(ce),...ne,...oe}),{context:StoreContext,areStatePropsEqual:isStrictEqual})(Droppable$1);var ConnectedDroppable$1=ConnectedDroppable;const DefaultListEditorInput=reactExports.forwardRef(function({onValueChange:oe,...ce},ue){return jsxRuntimeExports.jsx(InputBase$1,{fullWidth:!0,...ce,placeholder:"Untitled item",inputRef:ue})});function useInitialRender(){const ne=reactExports.useRef(!1),oe=ne.current;return ne.current=!0,!oe}const defaultEditorRenderer=({handle:ne,content:oe,extras:ce})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ne,oe,ce]});function ListEditorField({toggleable:ne,deletable:oe,editable:ce=!0,onChangeItem:ue=()=>{},onDeleteItem:pe=()=>{},extras:me,enabled:ge=!1,editor:ye=jsxRuntimeExports.jsx(DefaultListEditorInput,{}),value:ve,id:xe,i:_e=0,autoFocus:Se,sortable:$e,button:Re=!0,renderEditor:Ae=defaultEditorRenderer}){const Ie=useAcrylic(),ke=usePaper(),[Be,Ne]=reactExports.useState(null),Fe=Re?ButtonBase$1:Box$1;return jsxRuntimeExports.jsx(PublicDraggable,{index:_e,draggableId:`${xe}`,children:(Ue,We)=>jsxRuntimeExports.jsx("div",{ref:Ue.innerRef,...Ue.draggableProps,children:jsxRuntimeExports.jsx(Stack$1,{direction:"row",alignItems:"center",sx:{...Re?{transition:qe=>qe.transitions.create("background"),"&:hover":{background:qe=>qe.palette.action.hover}}:void 0,...We.isDragging?{...ke(1),...Ie}:void 0},children:Ae==null?void 0:Ae({value:ve,onValueChange:qe=>ue(xe??_e,qe,ge),handle:$e&&jsxRuntimeExports.jsx(Flex,{...Ue.dragHandleProps,color:"text.secondary",sx:{flex:0,p:2},children:jsxRuntimeExports.jsx(DragHandleOutlined,{})}),content:jsxRuntimeExports.jsx(Fe,{sx:{flex:1,display:"block",textAlign:"left",px:2},children:reactExports.cloneElement(ye,{onDelete:()=>pe(xe??_e),autoFocus:Se,value:ve,key:xe??_e,onValueChange:qe=>ue(xe??_e,qe,ge),onChange:qe=>ue(xe??_e,qe.target.value,ge),ref:qe=>Ne(qe)})}),extras:jsxRuntimeExports.jsxs(Flex,{sx:{flex:0,px:1},children:[ne&&jsxRuntimeExports.jsx(Switch$2,{color:"primary",edge:"end",onChange:(qe,ze)=>ue(xe??_e,ve,ze),checked:ge}),ce&&jsxRuntimeExports.jsx(IconButton$1,{edge:"end",onClick:()=>{Be!=null&&Be.focus&&Be.focus()},children:jsxRuntimeExports.jsx(EditIcon,{})}),oe&&jsxRuntimeExports.jsx(IconButton$1,{onClick:()=>pe(xe??_e),sx:{color:qe=>qe.palette.text.secondary},children:jsxRuntimeExports.jsx(DeleteIcon,{})}),me&&me(ve)]})})})})})}function reorder(ne,oe,ce){const ue=Array.from(ne),[pe]=ue.splice(oe,1);return ue.splice(ce,0,pe),ue}function Editor(ne){const{addItemLabel:oe="Add Item",UNSAFE_label:ce,UNSAFE_text:ue,onAddItem:pe=()=>{},onDeleteItem:me=()=>{},items:ge=[],placeholder:ye,autoFocus:ve,category:xe,order:_e,onChange:Se,addItemExtras:$e,addable:Re=!0}=ne,Ae=usePaper(),Ie=useInitialRender(),ke=useTheme$1(),[Be,Ne]=reactExports.useState(ge),[Fe,Ue]=reactExports.useState(-1);reactExports.useEffect(()=>{const Ge=setTimeout(()=>{Ne(ge)},ke.transitions.duration.standard);return()=>{clearTimeout(Ge)}},[ge,Ne,ke.transitions.duration.standard]);const We=lodashExports$1.uniqBy([...Be,...ge],Ge=>Ge.id).map(Ge=>ge.find(Ze=>Ge.id===Ze.id)??Ge).map((Ge,Ze)=>{const{enabled:Dt,editor:Je,value:Ut,id:jt}=Ge??{};return{value:Ut,render:Ke=>jsxRuntimeExports.jsx(Collapse$1,{in:!!ge.find(an=>an.id===Ge.id),unmountOnExit:!0,appear:!Ie,mountOnEnter:!0,children:jsxRuntimeExports.jsx(ListEditorField,{...ne,onDeleteItem:an=>{me(an),Ue(-1)},enabled:Dt,editor:Je,value:Ut,id:jt,i:Ze,autoFocus:ve||Ze===Fe,...Ke})}),key:jt,in:!!ge.find(Ke=>Ke.id===Ge.id)}}),qe=lodashExports$1.sortBy(We,Ge=>xe==null?void 0:xe(Ge.value),Ge=>_e==null?void 0:_e(Ge.value)).map(Ge=>({...Ge,render:Ze=>jsxRuntimeExports.jsx(Box$1,{children:Ge.render(Ze)},Ge.key)}));return jsxRuntimeExports.jsx(DragDropContext,{onDragEnd:Ge=>{if(!Ge.destination)return;const Ze=reorder(ge,Ge.source.index,Ge.destination.index);Se==null||Se(Ze),Ne(Ze)},children:jsxRuntimeExports.jsxs(List$2,{subheader:ce||ue?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ListSubheader$1,{disableSticky:!0,children:[ce&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",gutterBottom:!0,color:"textPrimary",children:ce}),ue&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:ke.spacing(3)},children:ue})]})}):void 0,children:[jsxRuntimeExports.jsx(Box$1,{mt:xe?-1:0,children:jsxRuntimeExports.jsx(ConnectedDroppable$1,{droppableId:"list",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!0,children:Ge=>jsxRuntimeExports.jsxs("div",{...Ge.droppableProps,ref:Ge.innerRef,children:[(()=>{const Ze=[];return qe.forEach((Dt,Je)=>{xe&&ze(qe,Je,Dt)&&Ze.push(jsxRuntimeExports.jsx(Collapse$1,{in:ge.some(Ut=>xe(Ut.value)===xe(Dt.value)),appear:!0,children:jsxRuntimeExports.jsx(Box$1,{pl:2,pb:2,pt:1,children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:xe(Dt.value)})})},xe(Dt.value))),Ze.push(Dt.render())}),Ze})(),Ge.placeholder]})})}),jsxRuntimeExports.jsx(Collapse$1,{in:!(ge!=null&&ge.length),children:jsxRuntimeExports.jsx(Box$1,{ml:2,mb:1,pt:xe?1:0,children:jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",children:ye??"No items"})})}),jsxRuntimeExports.jsxs(Stack$1,{p:2,pt:2,gap:2,direction:"row",children:[Re&&jsxRuntimeExports.jsx(MuiButton,{disableElevation:!0,variant:"outlined",startIcon:jsxRuntimeExports.jsx(Add,{}),onClick:()=>{pe(),Ue(ge.length)},sx:{...Ae(1)},children:jsxRuntimeExports.jsx(Box$1,{sx:{color:"text.primary",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:oe})}),$e]})]})});function ze(Ge,Ze,Dt){return!!(xe&&(Ge[Ze-1]===void 0||xe(Ge[Ze-1].value)!==xe(Dt.value)))}}function ListEditor({onChange:ne,value:oe,editor:ce,create:ue,onFocus:pe,...me}){const[ge,ye]=reactExports.useState(oe??[]);function ve(xe){ye(xe),ne==null||ne(xe)}return reactExports.useEffect(()=>{ye(oe??[])},[oe]),jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Editor,{deletable:!0,editable:!1,...me,items:ge.map(xe=>({id:xe.key,value:xe,editor:ce==null?void 0:ce(xe)})),onAddItem:()=>{const xe=nanoid$1();ve==null||ve([...ge,{key:xe,...ue==null?void 0:ue()}]),lodashExports$1.defer(()=>pe==null?void 0:pe(xe))},onDeleteItem:xe=>ve==null?void 0:ve(lodashExports$1.filter(ge,_e=>_e.key!==xe)),onChangeItem:(xe,_e)=>ve==null?void 0:ve(lodashExports$1.map(ge,Se=>Se.key===xe?_e:Se)),onChange:xe=>ve==null?void 0:ve(lodashExports$1.map(xe,_e=>_e.value))})})}const comparators=[{key:"equal",apply:({value:ne,reference:oe})=>ne===oe,needsReference:!0},{key:"less-than",apply:({value:ne,reference:oe})=>nene>oe,needsReference:!0},{key:"changed",apply:({value:ne,property:oe,step:ce,node:ue})=>{if(ue.parent){const pe=lodashExports$1.findLast(ue.parent.events,me=>me.step({value:ye,label:lodashExports$1.startCase(ye)})),onChange:ye=>ue({type:ye==="any"?void 0:ye}),value:ne.type??"any"}),jsxRuntimeExports.jsx(Divider$1,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:lodashExports$1.map(ce,ye=>({value:ye,label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[lodashExports$1.last(ye.split(".")),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Type$2,{color:"text.secondary",variant:"body2",component:"span",children:`$.${ye}`})]})})),onChange:ye=>ue({property:ye}),value:ne.property}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Condition",items:comparators.map(ye=>({value:ye.key,label:lodashExports$1.startCase(ye.key)})),value:((pe=ne.condition)==null?void 0:pe.key)??((me=comparators==null?void 0:comparators[0])==null?void 0:me.key),onChange:ye=>ue({condition:lodashExports$1.find(comparators,{key:ye})})}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(TextField$1,{label:"Reference",fullWidth:!0,defaultValue:`${ne.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:ye=>ue({reference:+ye.target.value}),type:"number",disabled:!((ge=ne.condition)!=null&&ge.needsReference)}),jsxRuntimeExports.jsx(Space,{sx:{px:2}}),jsxRuntimeExports.jsx(Switch,{checked:!!ne.active,onChange:(ye,ve)=>ue({active:ve}),sx:{mr:-4}})]})}function BreakpointListEditor({layer:ne}){var ge,ye,ve;const{layer:oe,setLayer:ce}=useLayer(ne),{breakpoints:ue}=(oe==null?void 0:oe.source)??{};function pe(xe){oe&&ce(produce(oe,_e=>lodashExports$1.set(_e,"source.breakpoints",xe)))}const me=reactExports.useMemo(()=>{var xe,_e,Se;return lodashExports$1.chain((Se=(_e=(xe=oe==null?void 0:oe.source)==null?void 0:xe.trace)==null?void 0:_e.content)==null?void 0:Se.events).flatMap(lodashExports$1.keys).uniq().filter($e=>$e!=="type").value()},[(ve=(ye=(ge=oe==null?void 0:oe.source)==null?void 0:ge.trace)==null?void 0:ye.content)==null?void 0:ve.events]);return jsxRuntimeExports.jsx(Box$1,{sx:{overflow:"auto hidden",width:"100%"},children:jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsx(Box$1,{sx:{minWidth:720,mb:2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,button:!1,icon:null,value:ue,deletable:!0,editable:!1,editor:xe=>jsxRuntimeExports.jsx(BreakpointEditor,{value:xe,properties:me}),create:()=>({active:!0,property:me==null?void 0:me[0],condition:comparators==null?void 0:comparators[0],type:void 0,reference:0}),onChange:xe=>pe(xe),addItemLabel:"Breakpoint",placeholder:"Get started by adding a breakpoint."})})})})}const stepsLayerGuard$1=ne=>!!getController(ne).steps,divider$3=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1,height:ne=>ne.spacing(3),alignSelf:"auto"}});function DebugPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),[me,ge]=reactExports.useState("standard"),{key:ye,setKey:ve,layers:xe,layer:_e,setLayer:Se,allLayers:$e}=useLayer(void 0,stepsLayerGuard$1),{code:Re}=(_e==null?void 0:_e.source)??{};function Ae(Ie){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:Ie})}return jsxRuntimeExports.jsx(TabContext,{value:me,children:jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"debug"}),jsxRuntimeExports.jsx(ne.Title,{children:"Debugger"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:ye,items:lodashExports$1.map($e,Ie=>({id:Ie.key,hidden:!lodashExports$1.find(xe,{key:Ie.key}),name:inferLayerName(Ie)})),onChange:ve,arrow:!0,ellipsis:12}),divider$3,jsxRuntimeExports.jsxs(TabList$1,{onChange:(Ie,ke)=>ge(ke),children:[jsxRuntimeExports.jsx(Tab$1,{label:"Standard",value:"standard",disabled:!_e}),jsxRuntimeExports.jsx(Tab$1,{label:"Advanced",value:"advanced",disabled:!_e})]})]}),jsxRuntimeExports.jsx(ne.Content,{children:_e?jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsxs(Box$1,{pt:6,height:"100%",children:[jsxRuntimeExports.jsx(TabPanel$1,{value:"standard",sx:{p:2},children:jsxRuntimeExports.jsxs(Box$1,{mx:-2,children:[jsxRuntimeExports.jsx(Box$1,{px:2,children:Ae("Breakpoints")}),jsxRuntimeExports.jsx(BreakpointListEditor,{layer:_e==null?void 0:_e.key})]})}),jsxRuntimeExports.jsx(TabPanel$1,{value:"advanced",sx:{p:0,height:"100%"},children:jsxRuntimeExports.jsx(ScriptEditor,{code:Re??makeTemplate(lodashExports$1.values(templates)),onChange:Ie=>_e&&Se(produce(_e,ke=>lodashExports$1.set(ke,"source.code",Ie)))})})]})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(DebuggerIcon,{}),label:"Debugger",secondary:"Configure breakpoints and other debugging options here. First, you'll need to load a trace."})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})})}const scriptRel="modulepreload",assetsURL=function(ne,oe){return new URL(ne,oe).href},seen={},__vitePreload=function(oe,ce,ue){if(!ce||ce.length===0)return oe();const pe=document.getElementsByTagName("link");return Promise.all(ce.map(me=>{if(me=assetsURL(me,ue),me in seen)return;seen[me]=!0;const ge=me.endsWith(".css"),ye=ge?'[rel="stylesheet"]':"";if(!!ue)for(let _e=pe.length-1;_e>=0;_e--){const Se=pe[_e];if(Se.href===me&&(!ge||Se.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${me}"]${ye}`))return;const xe=document.createElement("link");if(xe.rel=ge?"stylesheet":scriptRel,ge||(xe.as="script",xe.crossOrigin=""),xe.href=me,document.head.appendChild(xe),ge)return new Promise((_e,Se)=>{xe.addEventListener("load",_e),xe.addEventListener("error",()=>Se(new Error(`Unable to preload CSS for ${me}`)))})})).then(()=>oe()).catch(me=>{const ge=new Event("vite:preloadError",{cancelable:!0});if(ge.payload=me,window.dispatchEvent(ge),!ge.defaultPrevented)throw me})},EXCLUDED_NAMES=["PropTypes"],getSlotProps=(ne,oe)=>reactExports.Children.toArray(ne).reduce((ce,ue)=>{if(reactExports.isValidElement(ue)){const pe=ue.type.displayName;ce[pe]=ue.props}return ce},{}),getCleanChildren=(ne,oe)=>{const ce=reactExports.Children.toArray(ne).filter(ue=>{if(reactExports.isValidElement(ue)){const pe=ue.type.displayName;return!(oe!=null&&oe.includes(pe))}return!0});return ce.length>0?ce:void 0},isComponentName=ne=>typeof ne=="string"&&!EXCLUDED_NAMES.includes(ne)&&ne.match(/^[A-Z0-9]/),createResultComponent=ne=>reactExports.memo(ce=>{const{children:ue,propagateSlotProps:pe,slotKeys:me=[],...ge}=ce,ye=reactExports.useMemo(()=>getSlotProps(ue),[me,ue]),ve=reactExports.useMemo(()=>getCleanChildren(ue,me),[me,ue]),xe=reactExports.useMemo(()=>({...ge,slotProps:{...pe,...ye}}),[ge,ye,pe]);return reactExports.createElement(ne,xe,ve)}),withSlots=ne=>{const oe=reactExports.memo(createResultComponent(ne));return oe.displayName=`WithSlots(${ne.displayName||ne.name})`,new Proxy(oe,{get(ue,pe,me){var ve;if(pe in ue||typeof pe=="symbol"||!isComponentName(pe))return Reflect.get(ue,pe,me);const ge=((ve=Reflect.get(ue,"defaultProps"))==null?void 0:ve.slotKeys)||[];if(!Reflect.get(ue,pe)){const xe=()=>null;xe.displayName=pe,Reflect.set(ue,pe,xe)}return Reflect.set(ue,"defaultProps",{...ue.defaultProps,slotKeys:[...ge,pe]}),Reflect.get(ue,pe,me)}})};function wait(ne){return new Promise(oe=>lodashExports$1.delay(oe,ne))}async function timed(ne,oe=2500){const ce=lodashExports$1.now();return{result:await Promise.any([ne(),wait(oe)]),delta:lodashExports$1.now()-ce}}const FullscreenModalContext=reactExports.createContext({});function useFullscreenModalContext(){return reactExports.useContext(FullscreenModalContext)}const FullscreenPage=withSlots(({slotProps:ne})=>{var ue,pe,me,ge;const oe=useSmallDisplay(),ce=useAcrylic();return jsxRuntimeExports.jsxs(Stack$1,{sx:{height:oe?"calc(100% - 56px)":"100%",minHeight:"70dvh"},children:[!!((ue=ne.Options)!=null&&ue.children)&&jsxRuntimeExports.jsx(Stack$1,{sx:{minHeight:ye=>ye.spacing(6),flex:0},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{p:0,zIndex:1,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:oe?0:6,...ce,background:ye=>`linear-gradient(to bottom, ${ye.palette.background.paper}, ${alpha$1(ye.palette.background.paper,.75)})`},children:[jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsx(Flex,{sx:{width:"max-content",height:ye=>ye.spacing(6),alignItems:"center",p:1},children:((pe=ne.Options)==null?void 0:pe.children)&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne.Options.children})})}),(me=ne.Extras)==null?void 0:me.children]})}),jsxRuntimeExports.jsx(Box$1,{sx:{bgcolor:"background.paper",mt:-6,flex:1,position:"relative"},children:jsxRuntimeExports.jsx(Scroll,{y:!0,style:{height:"100%",position:"absolute"},children:(ge=ne.Content)==null?void 0:ge.children})})]})});function FullscreenModalHost(){const[{fullscreenModal:ne},oe]=useUIState(),[ce,ue]=reactExports.useState(!1),pe=reactExports.useCallback(async function(){ue(!0),await wait(300),oe(()=>({fullscreenModal:void 0})),ue(!1)},[oe]),me=reactExports.useMemo(()=>({close:pe}),[pe]),ge=ne?pages[ne]:void 0,ye=reactExports.useMemo(()=>{if(ge){const ve=ge.content,xe=withSlots(({slotProps:_e,...Se})=>{var $e,Re,Ae;return jsxRuntimeExports.jsxs(FullscreenPage,{...Se,children:[jsxRuntimeExports.jsx(FullscreenPage.Content,{children:($e=_e.Content)==null?void 0:$e.children}),jsxRuntimeExports.jsx(FullscreenPage.Options,{children:(Re=_e.Options)==null?void 0:Re.children}),jsxRuntimeExports.jsx(FullscreenPage.Extras,{children:(Ae=_e.Extras)==null?void 0:Ae.children})]})});return jsxRuntimeExports.jsx(ve,{template:xe})}},[ne,ge]);return jsxRuntimeExports.jsx(FullscreenModalContext.Provider,{value:me,children:!!ge&&jsxRuntimeExports.jsxs(Modal,{open:!ce,onClose:pe,width:"70vw",children:[jsxRuntimeExports.jsx(ModalAppBar,{onClose:pe,children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:ge.name})}),ye]})})}var download$1={exports:{}};(function(ne,oe){(function(ce,ue){ne.exports=ue()})(commonjsGlobal,function(){return function ce(ue,pe,me){var ge=window,ye="application/octet-stream",ve=me||ye,xe=ue,_e=!pe&&!me&&xe,Se=document.createElement("a"),$e=function(ze){return String(ze)},Re=ge.Blob||ge.MozBlob||ge.WebKitBlob||$e,Ae=pe||"download",Ie,ke;if(Re=Re.call?Re.bind(ge):Blob,String(this)==="true"&&(xe=[xe,ve],ve=xe[0],xe=xe[1]),_e&&_e.length<2048&&(Ae=_e.split("/").pop().split("?")[0],Se.href=_e,Se.href.indexOf(_e)!==-1)){var Be=new XMLHttpRequest;return Be.open("GET",_e,!0),Be.responseType="blob",Be.onload=function(ze){ce(ze.target.response,Ae,ye)},setTimeout(function(){Be.send()},0),Be}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(xe))if(xe.length>1024*1024*1.999&&Re!==$e)xe=We(xe),ve=xe.type||ye;else return navigator.msSaveBlob?navigator.msSaveBlob(We(xe),Ae):qe(xe);else if(/([\x80-\xff])/.test(xe)){var Ne=0,Fe=new Uint8Array(xe.length),Ue=Fe.length;for(Ne;Ne0)throw new Error("Invalid string. Length must be a multiple of 4");var ce=ne.indexOf("=");ce===-1&&(ce=oe);var ue=ce===oe?0:4-ce%4;return[ce,ue]}function byteLength$2(ne){var oe=getLens(ne),ce=oe[0],ue=oe[1];return(ce+ue)*3/4-ue}function _byteLength(ne,oe,ce){return(oe+ce)*3/4-ce}function toByteArray(ne){var oe,ce=getLens(ne),ue=ce[0],pe=ce[1],me=new Arr(_byteLength(ne,ue,pe)),ge=0,ye=pe>0?ue-4:ue,ve;for(ve=0;ve>16&255,me[ge++]=oe>>8&255,me[ge++]=oe&255;return pe===2&&(oe=revLookup[ne.charCodeAt(ve)]<<2|revLookup[ne.charCodeAt(ve+1)]>>4,me[ge++]=oe&255),pe===1&&(oe=revLookup[ne.charCodeAt(ve)]<<10|revLookup[ne.charCodeAt(ve+1)]<<4|revLookup[ne.charCodeAt(ve+2)]>>2,me[ge++]=oe>>8&255,me[ge++]=oe&255),me}function tripletToBase64(ne){return lookup$2[ne>>18&63]+lookup$2[ne>>12&63]+lookup$2[ne>>6&63]+lookup$2[ne&63]}function encodeChunk(ne,oe,ce){for(var ue,pe=[],me=oe;meye?ye:ge+me));return ue===1?(oe=ne[ce-1],pe.push(lookup$2[oe>>2]+lookup$2[oe<<4&63]+"==")):ue===2&&(oe=(ne[ce-2]<<8)+ne[ce-1],pe.push(lookup$2[oe>>10]+lookup$2[oe>>4&63]+lookup$2[oe<<2&63]+"=")),pe.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(ne,oe,ce,ue,pe){var me,ge,ye=pe*8-ue-1,ve=(1<>1,_e=-7,Se=ce?pe-1:0,$e=ce?-1:1,Re=ne[oe+Se];for(Se+=$e,me=Re&(1<<-_e)-1,Re>>=-_e,_e+=ye;_e>0;me=me*256+ne[oe+Se],Se+=$e,_e-=8);for(ge=me&(1<<-_e)-1,me>>=-_e,_e+=ue;_e>0;ge=ge*256+ne[oe+Se],Se+=$e,_e-=8);if(me===0)me=1-xe;else{if(me===ve)return ge?NaN:(Re?-1:1)*(1/0);ge=ge+Math.pow(2,ue),me=me-xe}return(Re?-1:1)*ge*Math.pow(2,me-ue)};ieee754.write=function(ne,oe,ce,ue,pe,me){var ge,ye,ve,xe=me*8-pe-1,_e=(1<>1,$e=pe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Re=ue?0:me-1,Ae=ue?1:-1,Ie=oe<0||oe===0&&1/oe<0?1:0;for(oe=Math.abs(oe),isNaN(oe)||oe===1/0?(ye=isNaN(oe)?1:0,ge=_e):(ge=Math.floor(Math.log(oe)/Math.LN2),oe*(ve=Math.pow(2,-ge))<1&&(ge--,ve*=2),ge+Se>=1?oe+=$e/ve:oe+=$e*Math.pow(2,1-Se),oe*ve>=2&&(ge++,ve/=2),ge+Se>=_e?(ye=0,ge=_e):ge+Se>=1?(ye=(oe*ve-1)*Math.pow(2,pe),ge=ge+Se):(ye=oe*Math.pow(2,Se-1)*Math.pow(2,pe),ge=0));pe>=8;ne[ce+Re]=ye&255,Re+=Ae,ye/=256,pe-=8);for(ge=ge<0;ne[ce+Re]=ge&255,Re+=Ae,ge/=256,xe-=8);ne[ce+Re-Ae]|=Ie*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(ne){const oe=base64Js,ce=ieee754,ue=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ne.Buffer=ye,ne.SlowBuffer=Ne,ne.INSPECT_MAX_BYTES=50;const pe=2147483647;ne.kMaxLength=pe,ye.TYPED_ARRAY_SUPPORT=me(),!ye.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function me(){try{const pn=new Uint8Array(1),tn={foo:function(){return 42}};return Object.setPrototypeOf(tn,Uint8Array.prototype),Object.setPrototypeOf(pn,tn),pn.foo()===42}catch{return!1}}Object.defineProperty(ye.prototype,"parent",{enumerable:!0,get:function(){if(ye.isBuffer(this))return this.buffer}}),Object.defineProperty(ye.prototype,"offset",{enumerable:!0,get:function(){if(ye.isBuffer(this))return this.byteOffset}});function ge(pn){if(pn>pe)throw new RangeError('The value "'+pn+'" is invalid for option "size"');const tn=new Uint8Array(pn);return Object.setPrototypeOf(tn,ye.prototype),tn}function ye(pn,tn,Gt){if(typeof pn=="number"){if(typeof tn=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Se(pn)}return ve(pn,tn,Gt)}ye.poolSize=8192;function ve(pn,tn,Gt){if(typeof pn=="string")return $e(pn,tn);if(ArrayBuffer.isView(pn))return Ae(pn);if(pn==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof pn);if(Kn(pn,ArrayBuffer)||pn&&Kn(pn.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Kn(pn,SharedArrayBuffer)||pn&&Kn(pn.buffer,SharedArrayBuffer)))return Ie(pn,tn,Gt);if(typeof pn=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const bn=pn.valueOf&&pn.valueOf();if(bn!=null&&bn!==pn)return ye.from(bn,tn,Gt);const kn=ke(pn);if(kn)return kn;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof pn[Symbol.toPrimitive]=="function")return ye.from(pn[Symbol.toPrimitive]("string"),tn,Gt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof pn)}ye.from=function(pn,tn,Gt){return ve(pn,tn,Gt)},Object.setPrototypeOf(ye.prototype,Uint8Array.prototype),Object.setPrototypeOf(ye,Uint8Array);function xe(pn){if(typeof pn!="number")throw new TypeError('"size" argument must be of type number');if(pn<0)throw new RangeError('The value "'+pn+'" is invalid for option "size"')}function _e(pn,tn,Gt){return xe(pn),pn<=0?ge(pn):tn!==void 0?typeof Gt=="string"?ge(pn).fill(tn,Gt):ge(pn).fill(tn):ge(pn)}ye.alloc=function(pn,tn,Gt){return _e(pn,tn,Gt)};function Se(pn){return xe(pn),ge(pn<0?0:Be(pn)|0)}ye.allocUnsafe=function(pn){return Se(pn)},ye.allocUnsafeSlow=function(pn){return Se(pn)};function $e(pn,tn){if((typeof tn!="string"||tn==="")&&(tn="utf8"),!ye.isEncoding(tn))throw new TypeError("Unknown encoding: "+tn);const Gt=Fe(pn,tn)|0;let bn=ge(Gt);const kn=bn.write(pn,tn);return kn!==Gt&&(bn=bn.slice(0,kn)),bn}function Re(pn){const tn=pn.length<0?0:Be(pn.length)|0,Gt=ge(tn);for(let bn=0;bn=pe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pe.toString(16)+" bytes");return pn|0}function Ne(pn){return+pn!=pn&&(pn=0),ye.alloc(+pn)}ye.isBuffer=function(tn){return tn!=null&&tn._isBuffer===!0&&tn!==ye.prototype},ye.compare=function(tn,Gt){if(Kn(tn,Uint8Array)&&(tn=ye.from(tn,tn.offset,tn.byteLength)),Kn(Gt,Uint8Array)&&(Gt=ye.from(Gt,Gt.offset,Gt.byteLength)),!ye.isBuffer(tn)||!ye.isBuffer(Gt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(tn===Gt)return 0;let bn=tn.length,kn=Gt.length;for(let jn=0,Wn=Math.min(bn,kn);jnkn.length?(ye.isBuffer(Wn)||(Wn=ye.from(Wn)),Wn.copy(kn,jn)):Uint8Array.prototype.set.call(kn,Wn,jn);else if(ye.isBuffer(Wn))Wn.copy(kn,jn);else throw new TypeError('"list" argument must be an Array of Buffers');jn+=Wn.length}return kn};function Fe(pn,tn){if(ye.isBuffer(pn))return pn.length;if(ArrayBuffer.isView(pn)||Kn(pn,ArrayBuffer))return pn.byteLength;if(typeof pn!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof pn);const Gt=pn.length,bn=arguments.length>2&&arguments[2]===!0;if(!bn&&Gt===0)return 0;let kn=!1;for(;;)switch(tn){case"ascii":case"latin1":case"binary":return Gt;case"utf8":case"utf-8":return Tn(pn).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Gt*2;case"hex":return Gt>>>1;case"base64":return zn(pn).length;default:if(kn)return bn?-1:Tn(pn).length;tn=(""+tn).toLowerCase(),kn=!0}}ye.byteLength=Fe;function Ue(pn,tn,Gt){let bn=!1;if((tn===void 0||tn<0)&&(tn=0),tn>this.length||((Gt===void 0||Gt>this.length)&&(Gt=this.length),Gt<=0)||(Gt>>>=0,tn>>>=0,Gt<=tn))return"";for(pn||(pn="utf8");;)switch(pn){case"hex":return Wt(this,tn,Gt);case"utf8":case"utf-8":return Ke(this,tn,Gt);case"ascii":return en(this,tn,Gt);case"latin1":case"binary":return Kt(this,tn,Gt);case"base64":return jt(this,tn,Gt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return un(this,tn,Gt);default:if(bn)throw new TypeError("Unknown encoding: "+pn);pn=(pn+"").toLowerCase(),bn=!0}}ye.prototype._isBuffer=!0;function We(pn,tn,Gt){const bn=pn[tn];pn[tn]=pn[Gt],pn[Gt]=bn}ye.prototype.swap16=function(){const tn=this.length;if(tn%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Gt=0;GtGt&&(tn+=" ... "),""},ue&&(ye.prototype[ue]=ye.prototype.inspect),ye.prototype.compare=function(tn,Gt,bn,kn,jn){if(Kn(tn,Uint8Array)&&(tn=ye.from(tn,tn.offset,tn.byteLength)),!ye.isBuffer(tn))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof tn);if(Gt===void 0&&(Gt=0),bn===void 0&&(bn=tn?tn.length:0),kn===void 0&&(kn=0),jn===void 0&&(jn=this.length),Gt<0||bn>tn.length||kn<0||jn>this.length)throw new RangeError("out of range index");if(kn>=jn&&Gt>=bn)return 0;if(kn>=jn)return-1;if(Gt>=bn)return 1;if(Gt>>>=0,bn>>>=0,kn>>>=0,jn>>>=0,this===tn)return 0;let Wn=jn-kn,dn=bn-Gt;const Bn=Math.min(Wn,dn),mn=this.slice(kn,jn),Pn=tn.slice(Gt,bn);for(let ur=0;ur2147483647?Gt=2147483647:Gt<-2147483648&&(Gt=-2147483648),Gt=+Gt,Rn(Gt)&&(Gt=kn?0:pn.length-1),Gt<0&&(Gt=pn.length+Gt),Gt>=pn.length){if(kn)return-1;Gt=pn.length-1}else if(Gt<0)if(kn)Gt=0;else return-1;if(typeof tn=="string"&&(tn=ye.from(tn,bn)),ye.isBuffer(tn))return tn.length===0?-1:ze(pn,tn,Gt,bn,kn);if(typeof tn=="number")return tn=tn&255,typeof Uint8Array.prototype.indexOf=="function"?kn?Uint8Array.prototype.indexOf.call(pn,tn,Gt):Uint8Array.prototype.lastIndexOf.call(pn,tn,Gt):ze(pn,[tn],Gt,bn,kn);throw new TypeError("val must be string, number or Buffer")}function ze(pn,tn,Gt,bn,kn){let jn=1,Wn=pn.length,dn=tn.length;if(bn!==void 0&&(bn=String(bn).toLowerCase(),bn==="ucs2"||bn==="ucs-2"||bn==="utf16le"||bn==="utf-16le")){if(pn.length<2||tn.length<2)return-1;jn=2,Wn/=2,dn/=2,Gt/=2}function Bn(Pn,ur){return jn===1?Pn[ur]:Pn.readUInt16BE(ur*jn)}let mn;if(kn){let Pn=-1;for(mn=Gt;mnWn&&(Gt=Wn-dn),mn=Gt;mn>=0;mn--){let Pn=!0;for(let ur=0;urkn&&(bn=kn)):bn=kn;const jn=tn.length;bn>jn/2&&(bn=jn/2);let Wn;for(Wn=0;Wn>>0,isFinite(bn)?(bn=bn>>>0,kn===void 0&&(kn="utf8")):(kn=bn,bn=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const jn=this.length-Gt;if((bn===void 0||bn>jn)&&(bn=jn),tn.length>0&&(bn<0||Gt<0)||Gt>this.length)throw new RangeError("Attempt to write outside buffer bounds");kn||(kn="utf8");let Wn=!1;for(;;)switch(kn){case"hex":return Ge(this,tn,Gt,bn);case"utf8":case"utf-8":return Ze(this,tn,Gt,bn);case"ascii":case"latin1":case"binary":return Dt(this,tn,Gt,bn);case"base64":return Je(this,tn,Gt,bn);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ut(this,tn,Gt,bn);default:if(Wn)throw new TypeError("Unknown encoding: "+kn);kn=(""+kn).toLowerCase(),Wn=!0}},ye.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function jt(pn,tn,Gt){return tn===0&&Gt===pn.length?oe.fromByteArray(pn):oe.fromByteArray(pn.slice(tn,Gt))}function Ke(pn,tn,Gt){Gt=Math.min(pn.length,Gt);const bn=[];let kn=tn;for(;kn239?4:jn>223?3:jn>191?2:1;if(kn+dn<=Gt){let Bn,mn,Pn,ur;switch(dn){case 1:jn<128&&(Wn=jn);break;case 2:Bn=pn[kn+1],(Bn&192)===128&&(ur=(jn&31)<<6|Bn&63,ur>127&&(Wn=ur));break;case 3:Bn=pn[kn+1],mn=pn[kn+2],(Bn&192)===128&&(mn&192)===128&&(ur=(jn&15)<<12|(Bn&63)<<6|mn&63,ur>2047&&(ur<55296||ur>57343)&&(Wn=ur));break;case 4:Bn=pn[kn+1],mn=pn[kn+2],Pn=pn[kn+3],(Bn&192)===128&&(mn&192)===128&&(Pn&192)===128&&(ur=(jn&15)<<18|(Bn&63)<<12|(mn&63)<<6|Pn&63,ur>65535&&ur<1114112&&(Wn=ur))}}Wn===null?(Wn=65533,dn=1):Wn>65535&&(Wn-=65536,bn.push(Wn>>>10&1023|55296),Wn=56320|Wn&1023),bn.push(Wn),kn+=dn}return Zt(bn)}const an=4096;function Zt(pn){const tn=pn.length;if(tn<=an)return String.fromCharCode.apply(String,pn);let Gt="",bn=0;for(;bnbn)&&(Gt=bn);let kn="";for(let jn=tn;jnbn&&(tn=bn),Gt<0?(Gt+=bn,Gt<0&&(Gt=0)):Gt>bn&&(Gt=bn),GtGt)throw new RangeError("Trying to access beyond buffer length")}ye.prototype.readUintLE=ye.prototype.readUIntLE=function(tn,Gt,bn){tn=tn>>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=this[tn],jn=1,Wn=0;for(;++Wn>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=this[tn+--Gt],jn=1;for(;Gt>0&&(jn*=256);)kn+=this[tn+--Gt]*jn;return kn},ye.prototype.readUint8=ye.prototype.readUInt8=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,1,this.length),this[tn]},ye.prototype.readUint16LE=ye.prototype.readUInt16LE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,2,this.length),this[tn]|this[tn+1]<<8},ye.prototype.readUint16BE=ye.prototype.readUInt16BE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,2,this.length),this[tn]<<8|this[tn+1]},ye.prototype.readUint32LE=ye.prototype.readUInt32LE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),(this[tn]|this[tn+1]<<8|this[tn+2]<<16)+this[tn+3]*16777216},ye.prototype.readUint32BE=ye.prototype.readUInt32BE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),this[tn]*16777216+(this[tn+1]<<16|this[tn+2]<<8|this[tn+3])},ye.prototype.readBigUInt64LE=Xn(function(tn){tn=tn>>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=Gt+this[++tn]*2**8+this[++tn]*2**16+this[++tn]*2**24,jn=this[++tn]+this[++tn]*2**8+this[++tn]*2**16+bn*2**24;return BigInt(kn)+(BigInt(jn)<>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=Gt*2**24+this[++tn]*2**16+this[++tn]*2**8+this[++tn],jn=this[++tn]*2**24+this[++tn]*2**16+this[++tn]*2**8+bn;return(BigInt(kn)<>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=this[tn],jn=1,Wn=0;for(;++Wn=jn&&(kn-=Math.pow(2,8*Gt)),kn},ye.prototype.readIntBE=function(tn,Gt,bn){tn=tn>>>0,Gt=Gt>>>0,bn||Xt(tn,Gt,this.length);let kn=Gt,jn=1,Wn=this[tn+--kn];for(;kn>0&&(jn*=256);)Wn+=this[tn+--kn]*jn;return jn*=128,Wn>=jn&&(Wn-=Math.pow(2,8*Gt)),Wn},ye.prototype.readInt8=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,1,this.length),this[tn]&128?(255-this[tn]+1)*-1:this[tn]},ye.prototype.readInt16LE=function(tn,Gt){tn=tn>>>0,Gt||Xt(tn,2,this.length);const bn=this[tn]|this[tn+1]<<8;return bn&32768?bn|4294901760:bn},ye.prototype.readInt16BE=function(tn,Gt){tn=tn>>>0,Gt||Xt(tn,2,this.length);const bn=this[tn+1]|this[tn]<<8;return bn&32768?bn|4294901760:bn},ye.prototype.readInt32LE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),this[tn]|this[tn+1]<<8|this[tn+2]<<16|this[tn+3]<<24},ye.prototype.readInt32BE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),this[tn]<<24|this[tn+1]<<16|this[tn+2]<<8|this[tn+3]},ye.prototype.readBigInt64LE=Xn(function(tn){tn=tn>>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=this[tn+4]+this[tn+5]*2**8+this[tn+6]*2**16+(bn<<24);return(BigInt(kn)<>>0,sn(tn,"offset");const Gt=this[tn],bn=this[tn+7];(Gt===void 0||bn===void 0)&&yn(tn,this.length-8);const kn=(Gt<<24)+this[++tn]*2**16+this[++tn]*2**8+this[++tn];return(BigInt(kn)<>>0,Gt||Xt(tn,4,this.length),ce.read(this,tn,!0,23,4)},ye.prototype.readFloatBE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,4,this.length),ce.read(this,tn,!1,23,4)},ye.prototype.readDoubleLE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,8,this.length),ce.read(this,tn,!0,52,8)},ye.prototype.readDoubleBE=function(tn,Gt){return tn=tn>>>0,Gt||Xt(tn,8,this.length),ce.read(this,tn,!1,52,8)};function nn(pn,tn,Gt,bn,kn,jn){if(!ye.isBuffer(pn))throw new TypeError('"buffer" argument must be a Buffer instance');if(tn>kn||tnpn.length)throw new RangeError("Index out of range")}ye.prototype.writeUintLE=ye.prototype.writeUIntLE=function(tn,Gt,bn,kn){if(tn=+tn,Gt=Gt>>>0,bn=bn>>>0,!kn){const dn=Math.pow(2,8*bn)-1;nn(this,tn,Gt,bn,dn,0)}let jn=1,Wn=0;for(this[Gt]=tn&255;++Wn>>0,bn=bn>>>0,!kn){const dn=Math.pow(2,8*bn)-1;nn(this,tn,Gt,bn,dn,0)}let jn=bn-1,Wn=1;for(this[Gt+jn]=tn&255;--jn>=0&&(Wn*=256);)this[Gt+jn]=tn/Wn&255;return Gt+bn},ye.prototype.writeUint8=ye.prototype.writeUInt8=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,1,255,0),this[Gt]=tn&255,Gt+1},ye.prototype.writeUint16LE=ye.prototype.writeUInt16LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,65535,0),this[Gt]=tn&255,this[Gt+1]=tn>>>8,Gt+2},ye.prototype.writeUint16BE=ye.prototype.writeUInt16BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,65535,0),this[Gt]=tn>>>8,this[Gt+1]=tn&255,Gt+2},ye.prototype.writeUint32LE=ye.prototype.writeUInt32LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,4294967295,0),this[Gt+3]=tn>>>24,this[Gt+2]=tn>>>16,this[Gt+1]=tn>>>8,this[Gt]=tn&255,Gt+4},ye.prototype.writeUint32BE=ye.prototype.writeUInt32BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,4294967295,0),this[Gt]=tn>>>24,this[Gt+1]=tn>>>16,this[Gt+2]=tn>>>8,this[Gt+3]=tn&255,Gt+4};function vn(pn,tn,Gt,bn,kn){Pt(tn,bn,kn,pn,Gt,7);let jn=Number(tn&BigInt(4294967295));pn[Gt++]=jn,jn=jn>>8,pn[Gt++]=jn,jn=jn>>8,pn[Gt++]=jn,jn=jn>>8,pn[Gt++]=jn;let Wn=Number(tn>>BigInt(32)&BigInt(4294967295));return pn[Gt++]=Wn,Wn=Wn>>8,pn[Gt++]=Wn,Wn=Wn>>8,pn[Gt++]=Wn,Wn=Wn>>8,pn[Gt++]=Wn,Gt}function Sn(pn,tn,Gt,bn,kn){Pt(tn,bn,kn,pn,Gt,7);let jn=Number(tn&BigInt(4294967295));pn[Gt+7]=jn,jn=jn>>8,pn[Gt+6]=jn,jn=jn>>8,pn[Gt+5]=jn,jn=jn>>8,pn[Gt+4]=jn;let Wn=Number(tn>>BigInt(32)&BigInt(4294967295));return pn[Gt+3]=Wn,Wn=Wn>>8,pn[Gt+2]=Wn,Wn=Wn>>8,pn[Gt+1]=Wn,Wn=Wn>>8,pn[Gt]=Wn,Gt+8}ye.prototype.writeBigUInt64LE=Xn(function(tn,Gt=0){return vn(this,tn,Gt,BigInt(0),BigInt("0xffffffffffffffff"))}),ye.prototype.writeBigUInt64BE=Xn(function(tn,Gt=0){return Sn(this,tn,Gt,BigInt(0),BigInt("0xffffffffffffffff"))}),ye.prototype.writeIntLE=function(tn,Gt,bn,kn){if(tn=+tn,Gt=Gt>>>0,!kn){const Bn=Math.pow(2,8*bn-1);nn(this,tn,Gt,bn,Bn-1,-Bn)}let jn=0,Wn=1,dn=0;for(this[Gt]=tn&255;++jn>0)-dn&255;return Gt+bn},ye.prototype.writeIntBE=function(tn,Gt,bn,kn){if(tn=+tn,Gt=Gt>>>0,!kn){const Bn=Math.pow(2,8*bn-1);nn(this,tn,Gt,bn,Bn-1,-Bn)}let jn=bn-1,Wn=1,dn=0;for(this[Gt+jn]=tn&255;--jn>=0&&(Wn*=256);)tn<0&&dn===0&&this[Gt+jn+1]!==0&&(dn=1),this[Gt+jn]=(tn/Wn>>0)-dn&255;return Gt+bn},ye.prototype.writeInt8=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,1,127,-128),tn<0&&(tn=255+tn+1),this[Gt]=tn&255,Gt+1},ye.prototype.writeInt16LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,32767,-32768),this[Gt]=tn&255,this[Gt+1]=tn>>>8,Gt+2},ye.prototype.writeInt16BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,2,32767,-32768),this[Gt]=tn>>>8,this[Gt+1]=tn&255,Gt+2},ye.prototype.writeInt32LE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,2147483647,-2147483648),this[Gt]=tn&255,this[Gt+1]=tn>>>8,this[Gt+2]=tn>>>16,this[Gt+3]=tn>>>24,Gt+4},ye.prototype.writeInt32BE=function(tn,Gt,bn){return tn=+tn,Gt=Gt>>>0,bn||nn(this,tn,Gt,4,2147483647,-2147483648),tn<0&&(tn=4294967295+tn+1),this[Gt]=tn>>>24,this[Gt+1]=tn>>>16,this[Gt+2]=tn>>>8,this[Gt+3]=tn&255,Gt+4},ye.prototype.writeBigInt64LE=Xn(function(tn,Gt=0){return vn(this,tn,Gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),ye.prototype.writeBigInt64BE=Xn(function(tn,Gt=0){return Sn(this,tn,Gt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Cn(pn,tn,Gt,bn,kn,jn){if(Gt+bn>pn.length)throw new RangeError("Index out of range");if(Gt<0)throw new RangeError("Index out of range")}function Nt(pn,tn,Gt,bn,kn){return tn=+tn,Gt=Gt>>>0,kn||Cn(pn,tn,Gt,4),ce.write(pn,tn,Gt,bn,23,4),Gt+4}ye.prototype.writeFloatLE=function(tn,Gt,bn){return Nt(this,tn,Gt,!0,bn)},ye.prototype.writeFloatBE=function(tn,Gt,bn){return Nt(this,tn,Gt,!1,bn)};function Yt(pn,tn,Gt,bn,kn){return tn=+tn,Gt=Gt>>>0,kn||Cn(pn,tn,Gt,8),ce.write(pn,tn,Gt,bn,52,8),Gt+8}ye.prototype.writeDoubleLE=function(tn,Gt,bn){return Yt(this,tn,Gt,!0,bn)},ye.prototype.writeDoubleBE=function(tn,Gt,bn){return Yt(this,tn,Gt,!1,bn)},ye.prototype.copy=function(tn,Gt,bn,kn){if(!ye.isBuffer(tn))throw new TypeError("argument should be a Buffer");if(bn||(bn=0),!kn&&kn!==0&&(kn=this.length),Gt>=tn.length&&(Gt=tn.length),Gt||(Gt=0),kn>0&&kn=this.length)throw new RangeError("Index out of range");if(kn<0)throw new RangeError("sourceEnd out of bounds");kn>this.length&&(kn=this.length),tn.length-Gt>>0,bn=bn===void 0?this.length:bn>>>0,tn||(tn=0);let jn;if(typeof tn=="number")for(jn=Gt;jn2**32?kn=Ye(String(Gt)):typeof Gt=="bigint"&&(kn=String(Gt),(Gt>BigInt(2)**BigInt(32)||Gt<-(BigInt(2)**BigInt(32)))&&(kn=Ye(kn)),kn+="n"),bn+=` It must be ${tn}. Received ${kn}`,bn},RangeError);function Ye(pn){let tn="",Gt=pn.length;const bn=pn[0]==="-"?1:0;for(;Gt>=bn+4;Gt-=3)tn=`_${pn.slice(Gt-3,Gt)}${tn}`;return`${pn.slice(0,Gt)}${tn}`}function Xe(pn,tn,Gt){sn(tn,"offset"),(pn[tn]===void 0||pn[tn+Gt]===void 0)&&yn(tn,pn.length-(Gt+1))}function Pt(pn,tn,Gt,bn,kn,jn){if(pn>Gt||pn3?tn===0||tn===BigInt(0)?dn=`>= 0${Wn} and < 2${Wn} ** ${(jn+1)*8}${Wn}`:dn=`>= -(2${Wn} ** ${(jn+1)*8-1}${Wn}) and < 2 ** ${(jn+1)*8-1}${Wn}`:dn=`>= ${tn}${Wn} and <= ${Gt}${Wn}`,new Jt.ERR_OUT_OF_RANGE("value",dn,pn)}Xe(bn,kn,jn)}function sn(pn,tn){if(typeof pn!="number")throw new Jt.ERR_INVALID_ARG_TYPE(tn,"number",pn)}function yn(pn,tn,Gt){throw Math.floor(pn)!==pn?(sn(pn,Gt),new Jt.ERR_OUT_OF_RANGE(Gt||"offset","an integer",pn)):tn<0?new Jt.ERR_BUFFER_OUT_OF_BOUNDS:new Jt.ERR_OUT_OF_RANGE(Gt||"offset",`>= ${Gt?1:0} and <= ${tn}`,pn)}const qt=/[^+/0-9A-Za-z-_]/g;function wn(pn){if(pn=pn.split("=")[0],pn=pn.trim().replace(qt,""),pn.length<2)return"";for(;pn.length%4!==0;)pn=pn+"=";return pn}function Tn(pn,tn){tn=tn||1/0;let Gt;const bn=pn.length;let kn=null;const jn=[];for(let Wn=0;Wn55295&&Gt<57344){if(!kn){if(Gt>56319){(tn-=3)>-1&&jn.push(239,191,189);continue}else if(Wn+1===bn){(tn-=3)>-1&&jn.push(239,191,189);continue}kn=Gt;continue}if(Gt<56320){(tn-=3)>-1&&jn.push(239,191,189),kn=Gt;continue}Gt=(kn-55296<<10|Gt-56320)+65536}else kn&&(tn-=3)>-1&&jn.push(239,191,189);if(kn=null,Gt<128){if((tn-=1)<0)break;jn.push(Gt)}else if(Gt<2048){if((tn-=2)<0)break;jn.push(Gt>>6|192,Gt&63|128)}else if(Gt<65536){if((tn-=3)<0)break;jn.push(Gt>>12|224,Gt>>6&63|128,Gt&63|128)}else if(Gt<1114112){if((tn-=4)<0)break;jn.push(Gt>>18|240,Gt>>12&63|128,Gt>>6&63|128,Gt&63|128)}else throw new Error("Invalid code point")}return jn}function xn(pn){const tn=[];for(let Gt=0;Gt>8,kn=Gt%256,jn.push(kn),jn.push(bn);return jn}function zn(pn){return oe.toByteArray(wn(pn))}function Yn(pn,tn,Gt,bn){let kn;for(kn=0;kn=tn.length||kn>=pn.length);++kn)tn[kn+Gt]=pn[kn];return kn}function Kn(pn,tn){return pn instanceof tn||pn!=null&&pn.constructor!=null&&pn.constructor.name!=null&&pn.constructor.name===tn.name}function Rn(pn){return pn!==pn}const Mn=function(){const pn="0123456789abcdef",tn=new Array(256);for(let Gt=0;Gt<16;++Gt){const bn=Gt*16;for(let kn=0;kn<16;++kn)tn[bn+kn]=pn[Gt]+pn[kn]}return tn}();function Xn(pn){return typeof BigInt>"u"?Jn:pn}function Jn(){throw new Error("BigInt not supported")}})(buffer);const ECMA_SIZES=byte_size,Buffer$2=buffer.Buffer;function preciseStringSizeNode(ne){return 12+4*Math.ceil(ne.length/4)}function isNodeEnvironment(){return!(typeof window<"u"&&typeof document<"u")}function getSizeOfTypedArray(ne){return ne.BYTES_PER_ELEMENT?ne.length*ne.BYTES_PER_ELEMENT:-1}function objectSizeComplex(ne){let oe=0;const ce=-1;try{let ue=ne;if(ne instanceof Map?ue=Object.fromEntries(ne):ne instanceof Set&&(ue=Array.from(ne)),ArrayBuffer.isView(ne))return getSizeOfTypedArray(ne);const pe=JSON.stringify(ue,(me,ge)=>typeof ge=="bigint"||typeof ge=="function"?ge.toString():typeof ge>"u"?"undefined":typeof ge=="symbol"||ge instanceof RegExp?ge.toString():ge);oe=Buffer$2.byteLength(pe,"utf8")}catch(ue){return console.error("Error detected, returning "+ce,ue),ce}return oe}function objectSizeSimple(ne){const oe=[],ce=[ne];let ue=0;for(;ce.length;){const pe=ce.pop();if(typeof pe=="boolean")ue+=ECMA_SIZES.BYTES;else if(typeof pe=="string")isNodeEnvironment()?ue+=preciseStringSizeNode(pe):ue+=pe.length*ECMA_SIZES.STRING;else if(typeof pe=="number")ue+=ECMA_SIZES.NUMBER;else if(typeof pe=="symbol")Symbol.keyFor&&Symbol.keyFor(ne)?ue+=Symbol.keyFor(ne).length*ECMA_SIZES.STRING:ue+=(ne.toString().length-8)*ECMA_SIZES.STRING;else if(typeof pe=="bigint")ue+=Buffer$2.from(pe.toString()).byteLength;else if(typeof pe=="function")ue+=pe.toString().length;else if(typeof pe=="object"&&oe.indexOf(pe)===-1){oe.push(pe);for(const me in pe)ce.push(pe[me])}}return ue}var indexv2=function(ne){let oe=0;return ne!==null&&typeof ne=="object"?oe=objectSizeComplex(ne):oe=objectSizeSimple(ne),oe};const sizeOf=getDefaultExportFromCjs(indexv2);var dist$4={},data={},adjectives={};Object.defineProperty(adjectives,"__esModule",{value:!0});adjectives.default=["other","new","good","old","little","great","small","young","long","black","high","only","big","white","political","right","large","real","sure","different","important","public","possible","full","whole","certain","human","major","military","bad","social","dead","true","economic","open","early","free","national","strong","hard","special","clear","local","private","wrong","late","short","poor","recent","dark","fine","foreign","ready","red","cold","low","heavy","serious","single","personal","difficult","left","blue","federal","necessary","general","easy","likely","beautiful","happy","past","hot","close","common","afraid","simple","natural","main","various","available","nice","present","final","sorry","entire","current","similar","deep","huge","rich","nuclear","empty","strange","quiet","front","wide","modern","concerned","green","very","alone","particular","bright","supposed","basic","medical","aware","total","financial","legal","original","international","soft","alive","interested","tall","warm","popular","tiny","top","normal","powerful","silent","religious","impossible","quick","safe","thin","familiar","gray","fresh","physical","individual","willing","crazy","sick","angry","perfect","tired","wild","moral","brown","dangerous","famous","married","terrible","successful","fair","professional","official","obvious","glad","central","chief","effective","light","complete","interesting","thick","proper","involved","responsible","narrow","civil","industrial","dry","yellow","specific","sharp","sudden","direct","following","growing","significant","traditional","slow","previous","vast","surprised","busy","usual","clean","funny","regular","scientific","ordinary","ancient","senior","sweet","future","annual","secret","equal","independent","wonderful","tough","broad","additional","careful","domestic","brief","enormous","commercial","grand","average","sexual","nervous","pale","immediate","critical","proud","like","complex","separate","considerable","still","extra","expensive","guilty","active","mad","asleep","wooden","cool","presidential","apparent","weak","essential","living","pretty","cultural","useful","actual","unusual","daily","potential","wet","solid","lovely","comfortable","formal","outside","massive","sad","corporate","distant","loose","rare","stupid","visible","liberal","flat","pleased","pure","curious","practical","upper","technical","male","appropriate","fat","just","due","mere","handsome","mental","conservative","positive","leading","naked","false","drunk","dirty","friendly","constant","well","used","emotional","internal","odd","historical","female","ill","broken","capable","southern","pleasant","bare","minor","eager","lucky","urban","steady","fiscal","rough","primary","reasonable","typical","inner","favorite","attractive","slight","innocent","limited","straight","pink","excellent","double","dramatic","violent","honest","electric","fellow","substantial","opposite","awful","severe","joint","armed","hungry","remarkable","increased","gentle","illegal","middle","bitter","mass","permanent","increasing","damn","golden","correct","intense","round","northern","proposed","so-called","criminal","healthy","plain","vital","blind","native","intellectual","unknown","extreme","existing","raw","prime","brilliant","sensitive","extraordinary","sufficient","remaining","ultimate","unique","royal","initial","negative","fundamental","nearby","smart","strategic","educational","unlikely","smooth","modest","conventional","giant","scared","cheap","dear","delicate","anxious","valuable","standard","desperate","lonely","diplomatic","firm","wise","principal","congressional","occasional","ugly","vice","radical","faint","working","absolute","intelligent","racial","mutual","silly","fast","musical","tight","complicated","numerous","crucial","square","contemporary","bloody","western","endless","inevitable","environmental","constitutional","rapid","worried","lost","genuine","temporary","democratic","rural","regional","given","painful","literary","chemical","sophisticated","decent","academic","awake","conscious","revolutionary","surprising","elderly","agricultural","psychological","pregnant","live","adequate","superior","grateful","prominent","frightened","remote","overall","stiff","harsh","electronic","spiritual","okay","closed","excited","convinced","long-term","unexpected","dull","evident","civilian","mysterious","romantic","impressive","continuing","exciting","logical","peculiar","exact","widespread","foolish","extensive","evil","continued","confident","generous","legislative","stable","vulnerable","elegant","embarrassed","hostile","efficient","blond","dumb","advanced","defensive","outer","neat","estimated","wealthy","dying","loud","creative","acceptable","unhappy","sheer","competitive","concrete","reluctant","precious","tremendous","burning","precise","uncertain","holy","artificial","vague","ideal","universal","moderate","subtle","mild","peaceful","assistant","invisible","casual","crowded","crude","running","classic","controversial","ridiculous","frequent","grim","accurate","detailed","goddamn","fun","fierce","cruel","incredible","blank","dim","suitable","classical","elaborate","collective","eastern","legitimate","aggressive","rear","administrative","automatic","dependent","ashamed","distinct","fit","clever","brave","ethnic","maximum","relative","primitive","uncomfortable","profound","sacred","biological","identical","furious","loyal","rational","mechanical","mean","naval","noble","ambitious","purple","historic","dominant","suburban","developing","calm","frozen","subsequent","charming","damp","fixed","rigid","offensive","electrical","shy","continuous","urgent","weary","immense","splendid","downtown","uneasy","disappointed","helpless","voluntary","polite","junior","gross","striking","overwhelming","unconscious","steep","outstanding","tender","tragic","costly","miserable","near","useless","welcome","external","helpful","weekly","middle-aged","suspicious","old-fashioned","technological","damned","awkward","visual","organized","ideological","orange","horrible","strict","magnificent","deadly","dusty","mighty","puzzled","bold","global","passing","magic","fond","judicial","missing","definite","changing","rubber","theoretical","satisfied","promising","abstract","excessive","comparable","fatal","distinguished","inadequate","slender","artistic","known","sympathetic","favorable","cheerful","faithful","delighted","unnecessary","sole","cautious","productive","reliable","patient","sensible","desirable","depressed","atomic","able","instant","relevant","alien","spectacular","lesser","swift","comic","enthusiastic","marvelous","experimental","weird","retired","fascinating","content","medieval","inclined","bored","ruling","flying","consistent","organic","alleged","grave","smiling","realistic","amazing","exotic","symbolic","confused","underground","spare","philosophical","vigorous","troubled","shallow","amused","lively","genetic","impatient","brutal","solar","unfair","formidable","tense","unfortunate","minimum","sleeping","secondary","shiny","jealous","insane","gay","vivid","wounded","hurt","intimate","monthly","sour","socialist","worthy","preliminary","colonial","middle-class","alternative","influential","unpleasant","comprehensive","devoted","upset","secure","absurd","neutral","frightening","profitable","fragile","civilized","slim","partial","added","fearful","optimistic","isolated","eternal","vocal","beloved","alert","verbal","rising","skilled","antique","municipal","written","restless","outdoor","governmental","driving","sore","informal","loving","retail","hidden","determined","monetary","convenient","thoughtful","colored","progressive","bizarre","sweeping","fancy","expected","fantastic","editorial","intact","bottom","multiple","well-known","nasty","protective","acute","combined","related","fortunate","earnest","divine","passionate","icy","noisy","vicious","dreadful","apt","boring","unprecedented","decisive","sunny","marked","experienced","disturbing","satisfactory","sober","random","electoral","shocked","deliberate","coming","orderly","surrounding","unwilling","inherent","mixed","naive","dense","hopeless","aesthetic","supreme","encouraging","institutional","solemn","stubborn","required","relaxed","bald","frantic","exclusive","rotten","filthy","flexible","explicit","glorious","lean","ignorant","extended","embarrassing","architectural","mortal","corrupt","hopeful","regulatory","valid","characteristic","tribal","capitalist","diverse","functional","improved","ironic","graceful","unaware","respectable","eligible","lousy","established","postwar","objective","wary","elementary","moving","superb","cute","minimal","meaningful","notable","structural","developed","rolling","fashionable","persistent","distinctive","terrific","thorough","skeptical","secular","chronic","level","everyday","visiting","infinite","short-term","terrorist","youthful","unemployed","forced","liquid","explosive","rude","colorful","renewed","semantic","astonishing","passive","heroic","gleaming","indifferent","vertical","prior","anonymous","absent","customary","mobile","uniform","solitary","probable","amazed","petty","bleak","athletic","tentative","harmless","ample","right-wing","polished","obscure","sincere","dried","intensive","equivalent","convincing","idle","vacant","mature","amusing","competent","ominous","savage","motionless","tropical","blunt","drunken","delicious","lazy","ragged","longtime","nationwide","startling","civic","freezing","muscular","circular","imperial","irrelevant","countless","gloomy","startled","disastrous","skinny","hollow","upward","ethical","underlying","careless","wholesale","abandoned","unfamiliar","mandatory","imaginary","bewildered","annoyed","magnetic","dazzling","lengthy","stern","surgical","clinical","full-time","metropolitan","moist","unlike","doubtful","prosperous","keen","awesome","humble","interior","psychiatric","clumsy","outraged","theatrical","educated","gigantic","scattered","privileged","sleepy","battered","meaningless","predictable","gradual","miniature","radioactive","prospective","aging","destructive","authentic","portable","bearded","balanced","shining","spontaneous","bureaucratic","inferior","sturdy","cynical","exquisite","talented","immune","imaginative","ripe","shared","kind","parliamentary","glowing","frail","astonished","forward","inside","operational","faded","closing","pro","coastal","shrewd","preoccupied","celebrated","wicked","bourgeois","marginal","transparent","dynamic","psychic","plump","coarse","bleeding","striped","eventual","residential","hysterical","pathetic","planned","fake","imminent","sentimental","stunning","worldwide","militant","sizable","representative","incapable","provincial","poetic","injured","tactical","selfish","winning","foul","repeated","novel","dubious","part-time","abrupt","lone","overseas","grey","varied","cooperative","muddy","scheduled","legendary","arrogant","conspicuous","varying","devastating","vulgar","martial","amateur","mathematical","deaf","scarce","specialized","honorable","outrageous","confidential","fallen","goddamned","five-year","feminine","monstrous","brisk","systematic","exhausted","frank","lunar","daring","shadowy","respected","stark","accepted","successive","pending","prolonged","unseen","uniformed","wretched","sullen","arbitrary","drastic","crooked","resulting","intricate","unpredictable","printed","utter","satisfying","delightful","linguistic","shabby","statistical","accessible","prestigious","trivial","waiting","futile","prepared","aged","misleading","cognitive","shocking","childish","elected","magical","forthcoming","exceptional","gifted","stricken","fiery","cardboard","shaky","conflicting","commanding","starving","accustomed","rocky","long-range","floating","sinister","potent","phony","lasting","understandable","curved","barren","lethal","toxic","deserted","ambiguous","notorious","synthetic","worthwhile","imported","intent","reduced","painted","taut","sociological","questionable","crisp","pointed","harmful","horizontal","rival","somber","benign","prevailing","selected","organizational","excess","dedicated","veteran","implicit","prudent","plausible","confusing","smoking","large-scale","subdued","constructive","marital","scarlet","rugged","darkened","untouched","above","matching","covert","communal","sticky","affluent","energetic","stale","controlled","qualified","reminiscent","shut","blonde","handy","ritual","straightforward","terminal","dizzy","sane","twisted","occupied","finished","opposing","sly","depressing","irregular","marine","communist","obscene","wrinkled","unsuccessful","gracious","static","consecutive","reserve","exposed","scholarly","sleek","reckless","oral","comforting","pressing","swollen","viable","carved","obsessed","projected","hideous","unthinkable","mock","susceptible","respective","goddam","downward","memorable","worn","raised","glittering","beneficial","lingering","patriotic","stunned","hairy","worrying","lighted","sexy","abundant","tangled","perpetual","irresistible","terrified","compelling","unmistakable","feeble","uneven","trained","folded","relentless","killed","gorgeous","conservation","serene","eerie","premature","dismal","competing","risky","unacceptable","indirect","witty","muffled","feasible","interstate","heated","uncommon","accidental","queer","innovative","parallel","fried","unnatural","cracked","persuasive","integrated","ongoing","homosexual","sound","fertile","canned","preceding","worldly","onstage","declining","advisory","juvenile","slippery","numb","postal","olive","eccentric","lay","chilly","shrill","ceremonial","registered","boiling","contradictory","irresponsible","then","industrialized","obsolete","rusty","inflationary","split","discreet","intolerable","barefoot","territorial","outspoken","audible","adverse","associate","impending","decorative","luminous","two-year","expanding","unchanged","outstretched","momentary","good-looking","cunning","overnight","sprawling","unbelievable","bland","liable","terrifying","televised","appealing","breathless","alarming","supporting","greasy","affirmative","guiding","homeless","triumphant","rainy","stolen","empirical","timid","provocative","knowledgeable","pragmatic","touching","desired","amiable","attempted","humane","adjacent","superficial","greedy","assorted","elusive","ruthless","lush","soothing","imposing","preferred","lavish","pervasive","managing","sandy","inappropriate","desolate","nude","reassuring","shimmering","first-class","unfinished","insistent","comparative","conceivable","admirable","courageous","aristocratic","meager","subjective","vain","disgusted","dual","towering","responsive","ailing","compact","torn","sortal","entertaining","dreary","metallic","tedious","irrational","immoral","teen-age","interim","jagged","selective","volatile","cozy","unanimous","unlimited","hired","cosmic","indoor","retarded","gold","fabulous","dignified","long-distance","high-school","classified","luxurious","insufficient","pious","incomplete","oblivious","imperialist","stately","lifelong","subordinate","extravagant","intrinsic","unpopular","scant","surplus","radiant","ruined","grotesque","hazardous","disabled","intriguing","worthless","reported","hoarse","utmost","muted","bony","disgusting","monumental","pleasing","sterile","agreeable","three-year","tricky","lucrative","respectful","inexpensive","bulky","troublesome","affectionate","coherent","unreasonable","nineteenth-century","curly","indispensable","nursing","incompetent","governing","alternate","suspected","left-wing","refined","overt","chilling","virtual","devoid","perverse","enduring","outright","overhead","unnoticed","nonprofit","pointless","appalling","dental","chosen","enlightened","robust","commonplace","damaging","conscientious","eloquent","erratic","applied","merry","ardent","flowing","incoming","chaotic","noticeable","pitiful","locked","swelling","definitive","homemade","super","pronounced","kindly","prone","attentive","unstable","unrelated","charitable","armored","unclear","tangible","medium","winding","slick","credible","frustrating","shifting","spacious","day-to-day","surviving","expanded","arid","unwanted","unbearable","hesitant","recognizable","multinational","abdominal","murderous","glossy","mute","working-class","insignificant","ingenious","masculine","blessed","gaunt","miraculous","unconstitutional","parental","rigorous","bodily","impersonal","backward","computerized","four-year","unmarried","wry","resident","luxury","high-level","partisan","powerless","seasonal","self-conscious","triple","onetime","ecological","periodic","racist","exaggerated","facial","erotic","unreal","durable","manual","rounded","concentrated","literal","mystical","stimulating","staggering","tempting","last-minute","erect","feudal","head","emerging","hind","brooding","candid","paranoid","defective","linear","immortal","shattered","unsure","swinging","compatible","ghastly","investigative","rosy","convicted","sensational","committed","makeshift","tolerant","forceful","supernatural","joyous","limp","improper","hanging","sliding","renowned","tattered","nonexistent","supportive","frustrated","undercover","handicapped","apprehensive","plentiful","authoritative","sustained","disappointing","hereditary","photographic","impoverished","ornate","respiratory","substantive","acting","nutritional","unofficial","innumerable","prevalent","dire","menacing","outward","brittle","hasty","sparkling","sled","geographical","therapeutic","melancholy","adolescent","hearty","disturbed","sweaty","poisonous","paid","ineffective","humorous","burly","rebellious","reddish","stout","teenage","eminent","rhythmic","physiological","guaranteed","opaque","folding","fleeting","full-scale","low-income","infectious","stringent","stained","beige","stirring","soaring","glamorous","airborne","improbable","austere","anticipated","designated","oval","restrictive","yearly","precarious","relieved","said","feverish","occupational","holding","speculative","abnormal","challenging","healing","boyish","forbidding","divorced","famed","sluggish","struggling","united","undesirable","steaming","consulting","answering","recreational","accompanying","cramped","journalistic","neighboring","fictional","chopped","phenomenal","bankrupt","illicit","advancing","upcoming","racing","protected","padded","venerable","fuzzy","behavioral","roast","mocking","reactionary","inefficient","packed","sloppy","sparse","foster","revealing","reverse","gaping","blue-collar","thankful","down","unimportant","traveling","corresponding","maternal","autonomous","conceptual","smoky","baked","stuffed","murky","totalitarian","ghostly","seeming","flickering","sensual","clenched","offshore","stinging","oppressive","strained","messy","executive","evolutionary","theological","damaged","unrealistic","rectangular","off","mainstream","benevolent","thirsty","blinding","loaded","applicable","unused","crushed","tan","factual","involuntary","brand-new","akin","scary","modified","mindless","born","feminist","integral","uncanny","aloof","spreading","watery","playful","stocky","wasted","compulsory","indignant","pertinent","incredulous","simultaneous","turbulent","framed","aching","falling","cardiac","trim","silvery","accused","pastoral","barbed","adjoining","inspired","courteous","skillful","majestic","gilded","published","perennial","upright","seasoned","continual","papal","victorious","optical","ecstatic","agonizing","shameful","expressive","inconsistent","insulting","cloudy","defiant","restricted","approaching","aggregate","orthodox","unified","all-out","wooded","nationalist","favored","lofty","assured","smug","earthly","improving","instrumental","stray","clandestine","managerial","animated","intended","flawed","bent","clerical","outgoing","righteous","unspoken","poignant","faulty","defeated","authoritarian","treacherous","catastrophic","refreshing","unidentified","suicidal","sickly","disciplined","meticulous","preferable","trusted","hectic","husky","distraught","select","snowy","ferocious","crumpled","humiliating","divided","crippled","infamous","chic","broke","sovereign","continental","idealistic","first-rate","guarded","learned","nameless","runaway","metaphysical","senseless","boiled","needy","silver","recorded","polar","real-estate","stormy","incomprehensible","wiry","raging","composite","flamboyant","crimson","reproductive","intermediate","ubiquitous","repressive","hefty","listening","good-natured","parochial","stylish","high-tech","flaming","coronary","overweight","bathing","three-day","tidy","beleaguered","manifest","ludicrous","indigenous","adamant","placid","inept","exuberant","stony","salty","seductive","accomplished","impassive","grazing","congenial","misguided","wide-eyed","revised","bass","sonic","budgetary","halfway","ensuing","admiring","palpable","nightly","hooded","best-known","eighteenth-century","dissident","morbid","incumbent","demanding","inexperienced","hazy","revolving","rented","disadvantaged","innate","dietary","minute","cultivated","sealed","contemptuous","rhetorical","conciliatory","articulate","jobless","macho","forgotten","lifeless","proven","latent","secretive","perilous","token","graphic","alcoholic","overdue","permissible","shattering","preventive","illiterate","back","atmospheric","thermal","quaint","negotiated","preposterous","temporal","restrained","triangular","mayoral","spatial","heady","biblical","fitting","pessimistic","mammoth","allied","failed","intuitive","nagging","tidal","angular","speechless","finishing","protracted","watchful","businesslike","automated","versatile","booming","pouring","misty","deceptive","sunken","singular","suspended","unworthy","immigrant","expressionless","airy","mournful","neurotic","cubic","unauthorized","economical","fund-raising","captive","blatant","far-reaching","subversive","imperfect","jolly","inaccurate","resentful","strenuous","suffering","hardened","malicious","unjust","perceptive","newborn","promised","differing","virgin","alarmed","grassy","frivolous","apologetic","wasteful","endangered","unarmed","adept","unavoidable","approved","trembling","stuck","high-ranking","crushing","prescribed","dependable","fragrant","expansive","unfriendly","covered","bemused","digital","probing","sloping","man-made","festive","unilateral","unmarked","bipartisan","statewide","burgeoning","devout","sickening","mediocre","adventurous","elevated","suggestive","accountable","virtuous","lame","heavenly","bruised","unbroken","irritable","affected","inconceivable","sometime","vile","baggy","timely","glistening","imagined","unprepared","unresolved","windy","humanitarian","overriding","detached","annoying","narrative","interminable","appalled","penal","unsatisfactory","instinctive","variable","cumulative","obedient","deficient","colossal","unaffected","extinct","routine","microscopic","compassionate","nominal","forlorn","distorted","mistaken","enclosed","infected","fervent","analogous","frigid","instructive","appointed","one-way","gnarled","problematic","sardonic","two-hour","hypothetical","prompt","anguished","electromagnetic","sensuous","homely","beaten","malignant","rotting","concealed","peripheral","creaking","impeccable","khaki","grinning","irreversible","rampant","wondrous","inward","manufactured","grisly","cooked","discriminatory","cerebral","knowing","auxiliary","operative","losing","genial","phonetic","ecclesiastical","sarcastic","incorrect","ruddy","well-to-do","inexplicable","unreliable","developmental","woolen","agitated","lyrical","consequent","calculated","molecular","pompous","present-day","shaggy","even","inhuman","sublime","diagnostic","manly","raucous","balding","after","bilateral","mounted","blackened","assembled","separated","gaudy","evangelical","darling","juicy","impotent","receptive","irritating","pulmonary","dazed","cross-country","unavailable","parked","habitual","lexical","lowered","unwise","planetary","throbbing","enigmatic","superstitious","threatening","manned","childlike","sporting","right-hand","adult","reflective","white-haired","discernible","celestial","prodigious","translucent","equitable","epic","frayed","arduous","flimsy","penetrating","howling","disparate","alike","all-time","deformed","comical","inert","procedural","resistant","vibrant","geographic","wistful","specified","rightful","spirited","unborn","enjoyable","regal","cumbersome","burned","frenzied","gubernatorial","deteriorating","haunted","evasive","neglected","anthropological","inescapable","clear-cut","visionary","bloated","accumulated","agrarian","pained","dwindling","heightened","gray-haired","distressing","grinding","insecure","archaic","piercing","fluent","leisurely","giddy","slimy","oncoming","short-lived","spinal","wholesome","unanswered","illegitimate","staunch","two-day","rumpled","speedy","soaked","rocking","invaluable","gallant","tacit","finite","inviting","sporadic","powdered","cheery","volcanic","optional","mischievous","flowered","contagious","automotive","inflated","mythic","analytical","infrared","two-week","binding","ancestral","dissatisfied","upstate","veritable","unaccustomed","oily","monotonous","seated","feeding","fluorescent","undue","impassioned","picturesque","vocational","tranquil","tumultuous","rustic","patterned","two-story","pagan","flash","playing","exhilarating","maiden","three-dimensional","mythical","thriving","drab","black-and-white","honorary","dingy","founding","imperative","indistinguishable","lightweight","avid","dreamy","everlasting","obsessive","tional","homogeneous","inner-city","changed","tame","colorless","haggard","implacable","altered","unequal","focal","perceptual","literate","priceless","diminishing","harmonious","dark-haired","fatty","squat","undecided","banal","fruitful","pioneering","innocuous","cordial","rewarding","unsafe","maritime","overcrowded","timeless","fledgling","nostalgic","abreast","one-time","humid","astronomical","one-man","deepening","blazing","fleshy","dishonest","succeeding","qualitative","needless","rickety","joyful","stated","ambivalent","hybrid","six-month","limiting","workable","sleepless","unpaid","mundane","flashy","stagnant","bumper","recurring","sinful","immaculate","synonymous","measured","thrilling","long-standing","unruly","bewildering","unfit","edgy","numerical","sumptuous","fragmented","puffy","elastic","high-pitched","momentous","woven","unsteady","unnamed","cosmetic","snap","impenetrable","floral","waving","promotional","tenuous","lonesome","embroidered","strident","cherished","aghast","fundamentalist","white-collar","afloat","disruptive","law-enforcement","gathered","indefinite","intervening","publicized","geometric","disciplinary","descriptive","wavy","edible","disgruntled","obligatory","untrue","amber","snug","resolute","awed","simplistic","grandiose","crippling","high-speed","mounting","glaring","small-town","cavernous","hushed","wage-price","demographic","diseased","unpublished","causal","defenseless","sheltered","dormant","compulsive","loved","willful","truthful","punitive","disposable","ajar","drowsy","statutory","tanned","proprietary","informed","unheard","decision-making","transient","unlawful","dour","negligible","underwater","optimum","illusory","imaginable","borrowed","divergent","looking","exempt","contentious","forbidden","cowardly","masked","crazed","silken","parched","furry","wandering","insensitive","over-all","elated","waxed","veiled","envious","insidious","scrawny","unwarranted","lithe","abrasive","pretentious","far-off","murdered","deft","prickly","musty","shapeless","incongruous","gruesome","honored","perceived","grieving","unspecified","dizzying","privy","noteworthy","charred","median","fearless","twisting","unattractive","flawless","welcoming","flushed","hardy","glum","scenic","devious","recurrent","distasteful","jubilant","ballistic","hilarious","naughty","bustling","discarded","pristine","exemplary","fading","complacent","incessant","engaging","twentieth-century","protectionist","rudimentary","traumatic","steamy","emphatic","hard-line","teeming","generating","stuffy","connecting","stationary","genteel","populist","supple","hateful","retrospective","glazed","lawful","arched","tiresome","lucid","reserved","pivotal","grimy","surly","anti-Soviet","contrary","quarterly","old-time","residual","spiral","decaying","threatened","docile","appreciative","jovial","fascist","worrisome","red-haired","undisturbed","creamy","well-dressed","serial","existential","mountainous","pastel","self-sufficient","spoken","express","tasty","maroon","infrequent","deceased","full-fledged","transitional","leafy","gravitational","furtive","prophetic","nasal","unwelcome","troubling","immobile","merciful","uncontrollable","impartial","unfavorable","attendant","associated","high-rise","vascular","fateful","concerted","rash","stubby","paramount","impulsive","fraudulent","drooping","reciprocal","usable","fast-food","touchy","astute","oversized","mottled","slack","fruitless","unhealthy","decorated","shady","shaped","fanciful","quivering","charismatic","sordid","oppressed","inaccessible","fastidious","brazen","gloved","crumbling","underdeveloped","scarred","rambling","incipient","remedial","derelict","incompatible","fanatical","smoked","secondhand","hypnotic","failing","marching","flattened","paradoxical","unskilled","esthetic","tolerable","pungent","substitute","soggy","terse","tiring","fictitious","manageable","inventive","haughty","normative","premier","grudging","vested","exhausting","cross-legged","self-evident","away","horrified","prolific","incoherent","quantitative","full-length","year-round","unkind","provisional","exterior","brash","inconclusive","landed","breathtaking","acrid","noted","resultant","long-time","resounding","lovable","hypocritical","plush","foggy","acknowledged","idiotic","tracking","ceramic","taxable","enterprising","flashing","wee","barbaric","deafening","orbital","lurid","dated","hated","buoyant","mating","pictorial","overlapping","lax","archetypal","manic","limitless","puzzling","condescending","hapless","meek","faceless","uncommitted","horrid","greenish","unorthodox","unending","accelerated","day-care","undeniable","bushy","searing","fearsome","unharmed","divisive","overpowering","diving","telling","determining","uptight","cast","enlarged","ebullient","disagreeable","insatiable","grown-up","demented","puffing","inconvenient","uncontrolled","inland","repulsive","unintelligible","blue-eyed","pallid","nonviolent","dilapidated","unyielding","astounded","marvellous","low-cost","purposeful","courtly","predominant","conversational","erroneous","resourceful","converted","disconcerting","oblique","dreaded","indicative","silky","six-year","front-page","biting","flowering","sunlit","licensed","unspeakable","adrift","awash","identifiable","girlish","zealous","spooky","uncompromising","deserving","driven","certified","unlucky","temperate","budding","impractical","public-relations","inflexible","sensory","pornographic","outlandish","resonant","belligerent","wan","leftover","spotted","soybean","easygoing","vengeful","proportional","inaugural","dank","screaming","heterosexual","sliced","year-old","considerate","thunderous","distressed","warring","assertive","foreseeable","psychotic","intermittent","anti-Communist","generalized","unable","molten","excruciating","illustrious","voluminous","offending","trustworthy","grating","laughing","one-year","industrious","uninterrupted","dashing","speaking","metabolic","flattering","one-sided","ineffectual","primal","digestive","taped","floppy","jaunty","practiced","walled","hospitable","dutiful","melodramatic","intestinal","cluttered","conclusive","complementary","unprotected","buzzing","attributable","tasteless","forthright","wily","hourly","delayed","sweating","affable","studied","chubby","thyroid","chilled","conducive","childless","faltering","authorized","buried","land-based","observable","hurried","curving","dismayed","pernicious","upturned","believable","questioning","syndicated","pharmaceutical","high-risk","resigned","discrete","likable","imprisoned","cocky","outdated","autocratic","ablaze","askew","grammatical","wintry","incidental","matter-of-fact","disputed","exorbitant","low-level","sodden","skeletal","disproportionate","soiled","cellular","ephemeral","perfunctory","inconsequential","flourishing","intentional","two-way","elemental","whispered","four-day","stinking","informative","tenacious","outlying","virulent","horrendous","horrifying","burnt","longstanding","senile","unmoving","deprived","interpersonal","intimidating","posh","dainty","portly","nondescript","inquisitive","exiled","capricious","scandalous","severed","debilitating","widowed","horny","sallow","up-to-date","self-contained","carefree","boisterous","coordinated","anti-Semitic","superfluous","metric","expressed","enchanting","disorderly","paternal","wanton","frightful","free-lance","extremist","lined","scornful","inseparable","obese","ponderous","imperious","indistinct","adrenal","belated","rippling","valiant","livid","mystic","cracking","subterranean","invading","rusted","esoteric","red-faced","segregated","lanky","departmental","allergic","predatory","enforced","anti-inflation","implied","flagrant","best-selling","haphazard","trailing","seedy","real-life","unannounced","utilitarian","roving","despairing","immature","simulated","embattled","poisoned","patronizing","baffled","centralized","weathered","weeping","mutilated","painstaking","tax-exempt","socioeconomic","tearful","stringy","projecting","low-key","single-minded","shadowed","vehement","darn","fluffy","apocalyptic","completed","intelligible","furnished","elongated","worsening","eclectic","bacterial","earthy","sagging","wide-ranging","face-to-face","settled","dogmatic","anti","secluded","baffling","coy","pathological","echoing","bridal","autobiographical","instantaneous","ornamental","satirical","voluptuous","movable","kinetic","merciless","tireless","three-month","unconcerned","impromptu","turning","follow-up","retaliatory","arcane","waterproof","justifiable","glassy","unearthly","shuttered","inverted","bogus","petrified","simmering","guided","gritty","widening","generic","pretrial","returning","boundless","swirling","northeastern","swell","tive","minuscule","estranged","upbeat","explanatory","repetitive","repressed","vindictive","shrinking","canny","little-known","hydraulic","unrelenting","looming","supersonic","justified","lukewarm","unmoved","blurred","double-breasted","sanitary","unforgettable","diligent","unconventional","ashen","wordless","stainless","inlaid","irritated","spotless","pudgy","yellowish","lateral","adopted","lowly","obnoxious","utopian","called","unimaginable","hairless","foregoing","opulent","garish","nocturnal","rousing","unexplained","cosmopolitan","milky","medium-sized","all-night","bloodshot","rueful","hard-working","crafty","familial","iced","violet","arctic","ceaseless","exasperated","warped","aquatic","gruff","terrestrial","contrasting","egalitarian","needful","spent","untrained","escalating","liberated","long-haired","abortive","syntactic","consummate","lumpy","spoiled","ten-year-old","talkative","whimsical","weighty","audio","inflammatory","deplorable","spicy","corrugated","morose","sobering","southwestern","three-year-old","methodical","prehistoric","carpeted","smelly","processed","overheated","interstellar","agile","approximate","sadistic","living-room","irate","smashed","frontal","venereal","indiscriminate","suggested","cultured","creeping","recognized","toothless","handmade","mellow","fetal","disinterested","gratifying","trusting","small-scale","intravenous","crashing","exhaustive","afire","clammy","sleazy","florid","heartless","transcendent","restored","demonic","abusive","avowed","shrunken","objectionable","tailored","arms-control","listless","polluted","palatable","funded","elective","entrenched","classy","operatic","daunting","roaring","preferential","languid","three-hour","virile","inspiring","enhanced","scrupulous","bottomless","ginger","wispy","advantageous","rapt","umbilical","uphill","ordered","enraged","detrimental","curt","exalted","hard-pressed","intangible","fussy","forgiving","facile","populous","condemned","mashed","hard-boiled","introductory","rowdy","switching","perplexing","spilled","southeastern","undulating","fractured","inherited","inscrutable","measurable","stunted","hormonal","stylized","hierarchical","air-conditioned","aimless","subsidized","paying","symmetrical","nomadic","cloudless","reigning","thatched","perceptible","anesthetic","anti-American","miscellaneous","homesick","preparatory","seven-year","big-city","decadent","searching","all-important","inanimate","senatorial","diminutive","soft-spoken","contingent","dusky","smashing","precipitous","bulging","standardized","biographical","restive","indecent","upper-class","ecumenical","interchangeable","lumbering","fascinated","untidy","indulgent","leaden","wanted","endemic","doomed","wanting","receiving","engaged","unparalleled","abbreviated","malevolent","wishful","carnival","world-wide","protruding","resplendent","stranded","structured","biased","frosty","northwestern","viral","mindful","paved","indeterminate","painless","second-floor","geological","permissive","downhill","unsuspecting","expectant","fabled","jittery","windowless","evocative","unsolved","disoriented","monastic","soluble","misshapen","antiquated","repugnant","non-Communist","retiring","shaded","combative","high-powered","resilient","antagonistic","starched","vice-presidential","speckled","lopsided","bluish","late-night","prim","unrestrained","almighty","tyrannical","unkempt","menstrual","bleached","overgrown","idiosyncratic","shoddy","hallowed","trying","halting","princely","drugged","gratuitous","descending","fatherly","avant-garde","laborious","pinched","disguised","caustic","bespectacled","handwritten","goodly","itinerant","cryptic","undisclosed","affordable","outmoded","expedient","moody","tepid","firsthand","digging","elitist","observed","chartered","slain","five-day","unimpressed","tactful","idyllic","prostrate","ramshackle","expert","deferred","undistinguished","prized","transatlantic","crystalline","tacky","haunting","nutritious","bereft","turquoise","time-consuming","sanguine","culinary","fraught","precocious","assigned","scrambled","advisable","nationalistic","long-awaited","unwrapped","unchallenged","circumstantial","pleasurable","compressed","humanistic","unforeseen","diversified","frenetic","disapproving","proletarian","conspiratorial","featureless","going","commendable","no-nonsense","chipped","surreal","salient","pissed","insurmountable","backstage","contented","indebted","adoring","one-room","prewar","potted","accelerating","thorny","possessive","abiding","ever-increasing","bloodless","high-technology","counterproductive","attracting","entrepreneurial","cooling","unoccupied","craggy","leathery","degenerate","additive","weakened","quilted","untold","incandescent","intractable","middle-income","abject","self-made","gaseous","anal","displaced","unabashed","immutable","fluttering","ten-year","bearable","stamped","darkening","beefy","petite","charging","high-quality","left-hand","age-old","checkered","stupendous","priestly","loath","endearing","exacting","correctional","freak","sneaky","disgraceful","unholy","oriental","wayward","societal","hard-core","bilingual","flipping","staid","paramilitary","heartfelt","shapely","kosher","heedless","incurable","controlling","in-house","choral","manicured","cardinal","inconspicuous","steely","vanishing","misplaced","centre-fire","enchanted","unfounded","wrecked","womanly","delirious","deposed","panicky","differential","tawny","articulated","coded","wide-open","unregulated","lenient","feathered","simplified","beguiling","sectarian","producing","tiled","inorganic","frosted","lusty","scented","rotating","grievous","dissimilar","salaried","unequivocal","strangled","grubby","alluring","downcast","restraining","unjustified","contaminated","lacy","cinematic","second-class","splintered","adorable","derisive","state-owned","requisite","fleeing","uncomplicated","motherly","inter","high-heeled","climatic","republican","unqualified","leveraged","intercontinental","uncharacteristic","compositional","unwritten","patriarchal","brusque","unresponsive","replete","corrective","reflected","scraping","doctoral","premium","deductible","alternating","amorous","overjoyed","recalcitrant","presumptuous","vaulted","declared","inexorable","groggy","diminished","restful","retroactive","presumed","monolithic","curtained","tortured","ground","trendy","brassy","prosaic","inactive","chaste","bumpy","aggrieved","corny","centrist","trapped","noxious","jerky","concomitant","withholding","poorly","stolid","unguarded","methodological","primordial","retreating","telescopic","sidelong","off-duty","pleated","dissenting","agreed","double-action","optimal","plaintive","banned","kindred","quintessential","impervious","jumping","disenchanted","observant","congested","second-rate","reasoned","extrinsic","infantile","transitory","coveted","small-time","doctrinal","incomparable","jaded","special-interest","sociable","shameless","coloured","ascending","fraternal","queasy","wont","exhilarated","salted","disquieting","listed","unchanging","nine-year-old","unrestricted","uppermost","reputable","dummy","skimpy","crusty","corrosive","bubbling","decrepit","unsuitable","snarling","destitute","illuminating","systemic","material","unwashed","rushing","dialectical","jeweled","attached","liberating","judicious","errant","vanished","worn-out","erstwhile","uninformed","twelve-year-old","longterm","petulant","twin","self-righteous","afflicted","snappy","tantamount","sworn","unethical","drained","hydroelectric","perplexed","logistical","concentric","unifying","lunatic","invincible","diffident","inexhaustible","discouraging","dreamlike","artful","rolled","suppressed","secretarial","smoldering","redundant","forensic","million-dollar","self-styled","earned","weightless","signed","compensatory","glacial","unmanned","stalwart","funky","intensified","uninterested","submerged","urbane","glib","ascetic","contractual","warlike","high-priced","diagonal","cylindrical","gargantuan","illuminated","unconditional","hulking","supplementary","dictatorial","puny","sedate","moonlit","eight-year-old","gullible","counterfeit","alienated","spinning","analytic","nimble","adaptive","individualistic","numbered","blissful","insolent","supplemental","delectable","inordinate","unbalanced","tormented","unchecked","aspiring","punishing","self-serving","crossed","discretionary","box-office","snow-covered","improvised","squalid","orphaned","grizzled","unsmiling","disappearing","affiliated","readable","blocking","bullish","contending","burned-out","bloodied","subsidiary","complimentary","unclean","scanty","uprooted","farfetched","solicitous","regulated","threadbare","choppy","ever-present","negligent","nonstop","one-day","wild-eyed","infuriating","vivacious","abominable","wrought","inaudible","braided","transcendental","desultory","climactic","appellate","interlocking","submissive","unmatched","dapper","demeaning","adaptable","well-meaning","lustrous","tax-free","ungrateful","gentlemanly","missed","loathsome","incalculable","blistering","amenable","tremulous","massed","nonpartisan","unsettled","three-story","succulent","trite","masterful","reticent","unsettling","proverbial","strapping","spurious","invulnerable","paltry","embryonic","repeating","neural","sultry","metaphorical","foreign-policy","linked","pubic","beaming","ministerial","phantom","quizzical","hilly","cold-blooded","gregarious","three-piece","untroubled","bisexual","pensive","unpretentious","exploratory","unscathed","irrepressible","pelvic","newfound","starry","corned","overworked","illogical","unfaithful","interrelated","saintly","overcast","connected","ungainly","organizing","carnal","philosophic","nationalized","fickle","ultraviolet","crass","undeveloped","unprofitable","sheepish","archaeological","out-of-town","balmy","spongy","infallible","callous","scathing","rheumatic","audacious","participating","swarthy","hand-held","comatose","modernist","stellar","antinuclear","delinquent","time-honored","presiding","relaxing","high-pressure","impetuous","hypodermic","fringed","favourite","unscrupulous","inspirational","mystified","wobbly","intrepid","deferential","burdensome","stored","supervisory","seventeenth-century","six-day","interdependent","updated","all-powerful","unitary","stand-up","laconic","penniless","steadfast","dogged","scholastic","convertible","mingled","sorrowful","symptomatic","stylistic","well-intentioned","consuming","sketchy","weakening","generative","atrocious","first-quarter","irrevocable","charged","stoned","dividing","apathetic","debatable","uncomprehending","overhanging","galloping","kinky","uncritical","suave","undisputed","spiky","inarticulate","extracurricular","guttural","impressed","departing","yellowed","discontented","adroit","high-fiber","second-hand","blinking","formless","unsavory","new-found","withered","collected","menial","unobserved","flabby","afterward","vanquished","stained-glass","hour-long","bittersweet","invalid","incriminating","commensurate","all-American","assumed","tried","cursory","absorbing","clearing","confirmed","stressful","depleted","eight-year","participatory","stripped","concave","regrettable","fortified","effortless","regressive","irreverent","collegiate","defunct","grainy","inhospitable","gripping","grizzly","restoring","arterial","busted","indomitable","demure","rabid","headlong","blue-green","bound","breezy","materialistic","uneducated","scruffy","cohesive","full-blown","cranky","motivated","mauve","hardworking","melodic","genital","decorous","comely","rife","purported","hurtful","six-foot","macabre","odious","convulsive","well-trained","heterogeneous","curled","pearly","spindly","latter-day","innermost","clipped","checked","masterly","laughable","naturalistic","tinkling","impudent","fitful","illustrated","speeding","roasted","in-depth","helluva","vigilant","empty-handed","forged","wrought-iron","disgraced","agonized","infirm","preserving","tasteful","onerous","shredded","impregnable","slanted","tainted","opened","first-time","machine-gun","bottled","seismic","fetid","saturated","insubstantial","full-page","aromatic","stingy","promiscuous","unlit","regimental","spellbound","streamlined","bereaved","ruffled","creepy","treasured","ensconced","one-party","well-educated","pert","mercantile","all-purpose","voracious","tortuous","despised","unadorned","offhand","qualifying","manipulative","indelible","well-established","revolting","ethereal","roasting","prohibitive","domed","whipped","overstuffed","garrulous","skittish","revived","heartening","jumpy","grilled","melted","unfocused","spectral","unproductive","top-level","life-size","three-way","negotiable","disloyal","turn-of-the-century","four-hour","unopened","devilish","amorphous","antiseptic","sharpened","primeval","unrecognizable","ineligible","expendable","deathly","auspicious","insoluble","inimical","unquestioned","far-flung","medicinal","deep-seated","formative","iridescent","fragmentary","distinguishable","auburn","closed-circuit","emeritus","third-floor","hazel","tumbling","departed","obstinate","portentous","quixotic","scorched","adjustable","winged","intrusive","taxing","high-ceilinged","barbarous","decreasing","sleeveless","unattended","tight-lipped","concluding","unobtrusive","starved","quirky","big-time","sooty","copious","stalled","scriptural","unconvincing","earthen","throaty","august","extant","sexist","exultant","cancerous","psychedelic","yielding","matched","chunky","unfathomable","concise","admitting","knitted","projective","euphoric","garbled","divisional","despondent","recommended","passable","vegetarian","indefatigable","irreparable","feisty","untenable","contrite","angelic","reputed","untimely","dejected","appreciable","remembered","hellish","rear-view","open-air","ill-fated","nonpolitical","factional","separatist","contributing","post-war","uneventful","metaphoric","unsound","unwitting","venomous","harried","engraved","collapsing","reformist","thematic","inclusive","cheering","springy","obliging","contemplative","unbridled","state-run","reflex","allegorical","geopolitical","disembodied","issuing","bountiful","alright","overbearing","muddled","congenital","distinguishing","absorbed","tart","french","autumnal","verifiable","grueling","crackling","aft","punishable","freckled","indestructible","imprecise","hard-nosed","thoughtless","through","proficient","pent-up","never-ending","hunted","defensible","arresting","across-the-board","spotty","orchestral","undefined","stacked","implausible","antitank","unwary","inflamed","sacrificial","oil-producing","leaky","mint","chronological","conquering","jumbo","three-week","addictive","uninhibited","substandard","contracting","degenerative","triumphal","flowery","cardiovascular","shaken","undefeated","unassuming","luscious","unperturbed","gleeful","sentencing","brawny","perfumed","mild-mannered","healthful","left-handed","rancid","well-defined","unmanageable","drowning","clinging","anachronistic","revered","enriched","capitalistic","good-by","invigorating","practicing","unsold","long-legged","unruffled","aboriginal","inane","bedraggled","early-morning","run-down","straight-backed","reverent","acquired","bestselling","top-secret","woolly","foolhardy","sticking","blue-black","impassable","overcome","coiled","front-line","tinted","acquisitive","slatted","octagonal","receding","investing","doctrinaire","all-white","caring","prejudiced","slow-moving","circulating","science-fiction","shortsighted","disaffected","lawless","chastened","lewd","rubbery","foaming","unsympathetic","ladylike","betrayed","neurological","shouting","good-sized","electrostatic","untoward","flabbergasted","citywide","unanticipated","knotted","whitewashed","year-end","enticing","migratory","multicolored","hashish","ascorbic","topless","heathen","spherical","filmy","deviant","centennial","proportionate","instructional","contrived","savvy","over-the-counter","fast-moving","measuring","uptown","compliant","favourable","unforgivable","undamaged","psychoanalytic","gebling","bubbly","ready-made","caged","ostentatious","superhuman","busing","cream-colored","self-destructive","ostensible","cobbled","whirling","released","showy","baleful","red-hot","named","monogamous","fallow","disdainful","cyclical","long-running","pitiless","diffuse","omnipresent","mossy","cutting","astounding","lyric","dark-blue","unsophisticated","indigent","coincidental","imperceptible","veterinary","coercive","multilateral","ageless","law-abiding","functioning","beneficent","crawling","overturned","steamed","comprehensible","oil-rich","undetected","ribbed","nautical","textured","fast-growing","nauseous","vaunted","paralyzed","maimed","short-range","impure","unintended","practicable","intermediate-range","unfulfilled","behind-the-scenes","backhand","voluble","goofy","apolitical","contraceptive","waning","blasted","sundry","profane","binary","rock-and-roll","ruinous","open-ended","next-door","withering","conical","flustered","decided","able-bodied","round-trip","decreased","half-empty","sponsored","riotous","stereotyped","five-minute","irreplaceable","harrowing","uninteresting","salutary","frugal","disjointed","cupped","freshwater","shaven","ravenous","bulbous","stepped-up","swaying","two-room","valued","planted","bright-eyed","unreadable","trucking","infatuated","dysfunctional","pinkish","futuristic","airtight","unseemly","sizzling","mercurial","conic","unfettered","undisciplined","unrecognized","well-publicized","income-tax","self-appointed","ice-cold","biochemical","contemptible","barefooted","droll","mythological","tree-lined","rearing","luxuriant","heartbreaking","tufted","well-organized","selfless","world-class","unwieldy","contested","rasping","downright","ingratiating","self-proclaimed","parasitic","graying","reformed","cautionary","untested","beaded","maniacal","eucalyptus","pliable","air-conditioning","moot","traceable","anti-abortion","antisocial","reprehensible","self-imposed","yellowing","teasing","porous","ersatz","unwavering","untouchable","underprivileged","auditory","escaping","subservient","unspoiled","anterior","fatuous","lordly","infernal","bouncing","taboo","orthopedic","spiteful","surging","nuts","esteemed","outlawed","pushy","displeased","self-confident","attainable","bowed","cast-iron","despicable","unconvinced","famished","coed","bygone","nonaligned","sectional","typed","squeaky","disparaging","cut-rate","heart-shaped","offbeat","velvety","well-worn","upsetting","leery","long-lost","horse-drawn","puritanical","payable","fertilized","predicted","allowable","peaceable","soundless","marshy","discordant","intoxicating","concurrent","uncut","tantalizing","pedagogical","accursed","two-man","connective","hawkish","ripped","cleared","double-digit","unencumbered","yawning","manifold","stopped","untreated","subliminal","grayish","gory","upper-middle-class","avenging","self-fulfilling","equatorial","saucy","barred","arch","midwestern","blue-gray","tarnished","leafless","incisive","unearned","botanical","feline","extraneous","prep","intransigent","change-minimizing","insurgent","acrimonious","thermonuclear","blue-chip","crummy","acoustic","oversize","fated","galactic","cantankerous","ill-advised","detectable","lower-class","sacrosanct","palatial","conditional","insulated","step-by-step","nebulous","two-dimensional","well-heeled","bronchial","subatomic","semifinal","first-year","dark-eyed","tinny","attacking","indecisive","anatomical","brotherly","blooming","sinuous","meditative","socalled","rheumatoid","received","bleary","half-naked","leaded","woody","averse","shuddering","door-to-door","heretical","suspect","untapped","ravaged","decentralized","rutted","ineffable","intolerant","mechanized","fortuitous","equestrian","seven-year-old","darting","consoling","modern-day","ground-floor","emblematic","lurking","two-year-old","purplish","disorganized","vaudeville","circulatory","eight-hour","presentable","anarchic","unsatisfied","labored","maudlin","trampled","gibberish","unaccountable","sedentary","heavy-duty","thrilled","tutoring","self-centered","do-it-yourself","inquiring","uncaring","disillusioned","bloodstained","surface-to-air","consular","subconscious","four-year-old","collaborative","terraced","figurative","sinewy","horn-rimmed","impertinent","hit-and-run","standby","medium-size","peremptory","incremental","first-aid","dyed","centrifugal","omnipotent","lascivious","two-month","unionized","discredited","mass-produced","feathery","self-indulgent","liturgical","enviable","fifteen-year-old","buxom","abashed","urinary","newsworthy","flailing","beastly","undiscovered","strong-willed","prenatal","brownish","announced","flaky","washed","nightmarish","broad-shouldered","short-sleeved","two-bit","self-assured","whitish","suffocating","black-haired","full-size","self-help","created","uninhabited","smokeless","no-fault","unfashionable","mushy","forested","adhesive","creased","insufferable","down-to-earth","trifling","landless","disreputable","self-effacing","sporty","confined","adoptive","monogrammed","motley","duplicate","silver-haired","rejected","undifferentiated","blasphemous","institutionalized","blue-and-white","hip","winsome","button-down","discerning","abused","clean-cut","bracing","self-supporting","unsupported","premarital","flattered","studious","repetitious","marketable","anemic","meaty","airless","unhurried","galvanized","feal","peace-keeping","rapacious","bulletproof","well-placed","helmeted","packaged","court-ordered","aggravated","gastrointestinal","hand-to-hand","sixteen-year-old","fretful","fourth-quarter","conquered","satiric","nutty","befuddled","humorless","pitched","burnished","mirrored","fishy","fluted","conditioned","military-industrial","one-story","barbarian","branching","dynastic","unthinking","unconscionable","hunched","post-World","capital","putative","incendiary","shaving","topical","self-satisfied","farcical","narcissistic","kneeling","born-again","old-line","amateurish","ill-fitting","scaly","unpainted","eroding"];var nouns={};Object.defineProperty(nouns,"__esModule",{value:!0});nouns.default=["man","world","hand","room","face","thing","place","door","woman","house","money","father","government","country","mother","water","state","family","voice","fact","moment","power","city","business","war","school","system","car","number","office","point","body","wife","air","mind","girl","home","company","table","group","boy","problem","bed","death","hair","child","sense","job","light","question","idea","law","word","party","food","floor","book","reason","story","son","heart","friend","interest","right","town","history","land","program","game","control","matter","policy","oil","window","nation","position","ground","blood","action","wall","street","husband","fire","mouth","arm","sound","service","chance","information","price","building","road","paper","court","attention","space","trouble","form","society","art","market","force","effect","nature","chair","period","order","television","president","tax","field","glass","thought","industry","process","phone","plan","center","truth","couple","decision","change","eye","campaign","issue","situation","effort","report","sun","experience","peace","letter","level","energy","role","development","result","evidence","meeting","smile","support","baby","team","show","community","brother","picture","kitchen","production","press","study","daughter","director","dinner","class","defense","piece","record","desk","stage","earth","movement","future","board","security","sea","horse","language","public","church","course","bill","river","coffee","wind","bank","corner","committee","pain","help","answer","subject","hospital","film","economy","trade","feeling","member","apartment","ship","silence","seat","gold","education","leader","pressure","doctor","shoulder","sight","scene","figure","crowd","fear","telephone","labor","success","population","style","station","value","sky","growth","foot","radio","sign","strength","capital","neck","college","budget","breath","choice","direction","guy","agreement","speech","skin","will","amount","plane","practice","marriage","audience","movie","gun","living","hall","concern","income","quality","dog","cause","hotel","race","difference","stone","box","army","trip","distance","attack","chairman","election","presence","computer","science","color","theory","spring","machine","purpose","organization","material","image","tree","surface","officer","administration","act","statement","battle","page","suit","lady","play","stock","list","freedom","bar","relationship","farm","authority","student","conference","ball","structure","nose","plant","career","wood","basis","deal","source","chest","message","stuff","middle","sister","drink","majority","sex","store","trial","character","boat","union","animal","ice","front","firm","heat","hope","rock","weight","disease","spirit","memory","king","response","manner","opinion","operation","increase","lawyer","expression","kid","bag","department","crime","train","executive","aid","dream","beginning","rain","prison","conversation","shirt","lunch","possibility","pleasure","management","danger","rule","throat","wine","behavior","return","hat","surprise","snow","property","flight","training","ability","project","camp","range","approach","agency","treatment","reality","village","bottle","attempt","crisis","drug","violence","inflation","enemy","responsibility","opposition","newspaper","victory","dress","condition","darkness","opportunity","account","degree","pocket","performance","manager","visit","threat","failure","brain","driver","charge","beer","coat","shot","metal","activity","influence","intelligence","bit","official","existence","example","truck","note","construction","shape","event","screen","faith","safety","path","culture","chief","relief","grass","contract","product","investment","weather","soul","murder","bedroom","magazine","model","cup","leg","traffic","writer","beauty","song","share","cancer","patient","credit","club","argument","speed","quarter","design","desire","vision","candidate","bottom","pattern","date","finger","teacher","tea","section","article","flesh","island","balance","spot","meaning","technology","crew","proposal","leadership","concept","object","impact","guard","analysis","birth","shop","knife","advantage","generation","appearance","variety","anger","religion","reaction","fight","star","exchange","agent","investigation","milk","judge","silver","region","steel","ear","sugar","strike","youth","hole","thinking","attitude","supply","start","jacket","jury","taste","secretary","mountain","confidence","master","artist","spokesman","demand","cigarette","track","captain","network","whole","university","conflict","noise","smoke","commission","mirror","accident","plastic","garden","debate","interview","command","tradition","protection","dust","watch","lead","solution","measure","motion","discussion","mission","opening","respect","extent","struggle","goal","tongue","moon","author","iron","breakfast","competition","cover","legislation","environment","sake","justice","fuel","hill","key","length","shock","band","version","contact","engine","settlement","mistake","restaurant","revolution","estate","camera","beach","post","pool","fashion","football","border","touch","laughter","title","background","principle","strategy","roof","forest","philosophy","entrance","pause","doubt","bird","tape","belief","card","ring","occasion","wheel","capacity","cat","collection","passage","writing","bridge","owner","novel","pride","damage","contrast","judgment","gift","division","professor","bathroom","plate","explanation","smell","district","park","wave","player","present","theater","atmosphere","emergency","leather","impression","painting","neighborhood","block","function","circle","sentence","priest","method","warning","editor","ceiling","target","tour","gate","site","baseball","airport","shadow","walk","approval","gesture","individual","difficulty","attorney","criticism","affair","request","doorway","reputation","minority","consumer","notion","general","convention","being","honor","partner","chain","commitment","weapon","joke","coal","meal","reading","detail","library","debt","other","mail","drive","fellow","profit","soldier","forehead","housing","excitement","soil","literature","pilot","dance","reform","volume","scale","imagination","challenge","desert","secret","poet","cabin","average","factor","corn","check","wonder","absence","search","wedding","yard","hero","address","confusion","fool","package","victim","fault","platform","democracy","regime","terror","nurse","stream","offer","medicine","flow","grain","row","county","self","glance","humor","promise","employment","advance","planet","recreation","trail","chicken","storm","creature","mass","stand","ass","gaze","poetry","coast","lake","council","breast","corridor","conclusion","talent","tension","reporter","cut","appeal","total","belt","jail","passion","mayor","claim","combination","highway","wire","rifle","cheek","frame","exercise","incident","testimony","ticket","coach","connection","expert","disaster","valley","minister","deck","territory","chin","universe","independence","counter","resistance","cell","governor","salt","elevator","loan","release","schedule","porch","sheet","cloth","personality","actor","bomb","temperature","bench","break","code","journey","childhood","emphasis","aspect","pot","branch","identity","guest","arrival","recognition","hearing","lap","diet","factory","horror","fence","survey","fate","habit","lobby","bone","routine","discovery","comment","burden","treaty","knee","route","cry","ocean","fund","map","signal","ride","bear","deficit","height","element","sword","birthday","standing","cream","panel","fighting","travel","grandfather","creation","appointment","chapter","funeral","phrase","shore","planning","couch","survival","engineer","wagon","suggestion","waste","guilt","chamber","commander","clock","establishment","flag","content","supper","consciousness","proof","pack","beard","portion","comfort","resolution","sunlight","substance","benefit","honey","protest","prayer","stick","description","device","cloud","display","uniform","gasoline","tail","satisfaction","blanket","mess","consumption","drop","invasion","theme","mystery","belly","association","prospect","port","pipe","reference","skill","rear","heaven","destruction","worker","concentration","file","flat","cab","consideration","uncle","customer","laugh","radiation","favor","studio","boss","transportation","wage","fortune","tent","poem","procedure","clerk","surgery","percentage","expense","cap","household","match","bunch","column","intention","cousin","involvement","host","definition","wheat","permission","can","warmth","draft","silk","aide","lip","conviction","rope","illness","instrument","gap","string","adult","sweat","lover","evil","faculty","enthusiasm","farmer","missile","grin","tank","expansion","emotion","waist","discipline","distinction","technique","profession","wisdom","square","laboratory","tie","review","stranger","communication","pile","arrangement","palm","ceremony","tower","sympathy","deputy","script","nomination","friendship","institution","pass","civilization","magic","client","standard","significance","sport","defeat","announcement","reduction","grandmother","bowl","closet","genius","league","citizen","delivery","button","necessity","reader","lesson","trust","green","experiment","escape","craft","pistol","limit","witness","error","assistant","grace","salary","alarm","fist","potential","withdrawal","phase","bell","perspective","rose","score","amendment","fever","tip","god","crop","vehicle","barn","symbol","tale","exception","shift","scheme","suicide","tendency","logic","license","pollution","trend","bath","focus","producer","distribution","cotton","alternative","vacation","muscle","cycle","steam","palace","harm","location","beef","shame","policeman","compromise","tube","participation","fat","item","curiosity","blade","membership","lord","departure","shade","acid","enterprise","jet","selection","jungle","bond","retirement","alliance","bow","railroad","soup","airline","divorce","sofa","gear","gentleman","robe","plot","speaker","examination","egg","handful","recovery","embassy","entry","bastard","improvement","grip","invitation","barrel","context","controversy","fiction","revenue","reply","garage","crash","collar","landscape","grief","pen","teaching","angle","trunk","acceptance","recession","abortion","explosion","application","counsel","dignity","paint","landing","mixture","triumph","stove","winner","summit","thumb","depth","feature","setting","payment","grave","notice","museum","cop","graduate","sidewalk","taxi","trick","lamp","photograph","index","tray","essence","empire","tragedy","alcohol","flower","phenomenon","contribution","shower","castle","cross","booth","lawn","intensity","abuse","determination","passenger","opera","publication","wrist","hint","learning","punishment","ad","skirt","servant","prisoner","physician","midst","purse","rank","neighbor","elbow","contempt","round","cave","coverage","weakness","panic","basketball","juice","shooting","exposure","brick","miracle","unity","accent","coalition","fur","envelope","horizon","glory","stress","delight","politician","conscience","despair","rail","virtue","parent","dispute","killing","corruption","pound","core","stake","proportion","assault","curtain","efficiency","infant","count","suspicion","complex","formation","lock","entertainment","conduct","wit","outcome","shuttle","companion","discrimination","aunt","anxiety","shelter","confrontation","tool","climate","peak","cage","darling","assumption","stability","well","flame","marketing","currency","electricity","text","regulation","comedy","automobile","scientist","cake","scandal","contest","glow","cigar","arrest","brush","boom","basement","document","assembly","output","hut","slave","marble","breathing","pitch","loyalty","affection","resignation","guide","frustration","bureau","adviser","fleet","sector","privacy","awareness","fantasy","speculation","queen","tide","brass","formula","curve","zone","skull","sin","cable","corporation","foundation","achievement","countryside","monster","killer","strain","mask","breeze","whiskey","gang","rhythm","interpretation","basket","extension","tissue","satellite","doctrine","motor","hunger","intervention","kiss","fee","portrait","drawer","analyst","economist","reflection","visitor","transit","reception","provision","slope","sheriff","tunnel","complaint","devil","liquor","throne","hook","temple","tribe","preparation","handle","shoe","origin","helicopter","ruling","injury","crack","flash","gown","jaw","hallway","consequence","depression","subway","leave","drawing","cabinet","initiative","embarrassment","holiday","wilderness","towel","purchase","indication","sink","morality","impulse","rent","enforcement","utility","detective","comparison","critic","dish","hack","photo","crown","operator","conspiracy","rhetoric","bull","inquiry","humanity","demonstration","grade","alley","male","plain","pillow","remark","beast","seed","observation","guerrilla","straw","occupation","champion","excuse","possession","kingdom","snake","nerve","roll","horn","objective","cargo","mate","offense","resort","sequence","apple","bullet","presidency","strip","stroke","pig","print","champagne","saddle","dialogue","suitcase","protein","cook","quantity","toilet","chill","ranch","squad","priority","concert","van","adventure","representative","custom","shell","pension","prince","wound","video","courtroom","suffering","clay","actress","pencil","assignment","shelf","primary","waiter","charm","wool","sweater","soap","psychology","widow","delay","obligation","therapy","sergeant","shortage","myth","collapse","delegation","wish","perception","receiver","sauce","painter","reach","dear","fabric","carrier","ladder","hatred","dancing","cottage","opponent","dealer","prosecution","whisper","spread","poll","beam","exhibition","sigh","fog","harbor","successor","relation","gallery","prize","fireplace","fighter","pit","representation","prosecutor","liberty","bargaining","ownership","root","tin","celebration","stretch","nightmare","transport","link","diplomat","flood","architect","peasant","female","lab","category","inside","tune","carpet","mercy","fraud","introduction","facility","net","temper","rug","conception","eating","legend","tourist","refusal","disappointment","sensation","innocence","transfer","powder","parade","pursuit","parlor","pine","orbit","promotion","senator","colony","cart","interior","productivity","trap","identification","ambition","hip","admiration","corpse","emperor","patch","realm","barrier","ambassador","carriage","residence","maid","gathering","switch","lieutenant","sorrow","contrary","legislature","cliff","lightning","ritual","mist","salad","separation","flour","continent","poison","elite","radar","assessment","outfit","ideology","pad","exile","praise","employee","succession","gain","illusion","option","gravity","journalist","businessman","constitution","singer","sentiment","scope","transition","warrior","cast","march","herd","intent","inspection","episode","uncertainty","spell","isolation","observer","glimpse","privilege","spy","toy","thread","margin","anniversary","irony","organ","lecture","misery","needle","revolver","composition","admission","odor","candy","bid","classroom","bride","vitamin","refrigerator","sandwich","subcommittee","rescue","lad","defendant","blast","angel","compartment","vegetable","minimum","violation","agony","edition","compensation","evolution","treasure","salesman","log","clinic","layer","pitcher","publisher","suite","estimate","airplane","tournament","trace","hammer","reward","broadcasting","running","raid","specialist","mortgage","oak","pole","rocket","aisle","brandy","bureaucracy","mustache","vessel","penalty","export","orange","ignorance","hostility","integration","motive","ban","consultant","timing","equivalent","patrol","liver","assassination","instruction","leaf","railway","freeze","mention","designer","daylight","velvet","amusement","bush","fly","cloak","copper","orchestra","mechanism","chocolate","instinct","circuit","feed","courtyard","mob","profile","bombing","retreat","favorite","revenge","infection","historian","theatre","consent","bucket","mill","insult","pregnancy","psychiatrist","employer","presentation","swing","removal","financing","destiny","label","finish","ghost","channel","equality","requirement","dock","statue","doll","fan","mistress","oven","rim","scent","restraint","frontier","twin","framework","surveillance","diamond","pie","lion","cord","posture","wallet","stool","rally","realization","banker","invention","province","colonel","ally","inspiration","encounter","makeup","certainty","venture","takeover","daddy","ratio","fatigue","verdict","pardon","caution","scream","sleeve","coin","album","acquisition","laundry","transformation","handkerchief","candle","terminal","elephant","madness","appetite","rod","manufacturer","voyage","locker","pulse","indictment","riot","giant","sample","heritage","instance","hay","cure","clan","navy","monopoly","photographer","cowboy","bishop","linen","sacrifice","mortality","dilemma","frequency","harmony","junk","component","bargain","dragon","ruler","replacement","maker","blessing","resentment","surge","costume","editorial","mansion","hood","cellar","bout","driveway","championship","ambulance","sickness","guitar","rejection","compound","launch","journal","sculpture","preference","balcony","lid","toast","chart","motel","agenda","sadness","dimension","verse","scholar","submarine","confession","carbon","thunder","canal","socialism","merchant","bolt","insight","tub","topic","wolf","ridge","shed","gambling","arrow","con","lodge","bicycle","complexity","liberation","disorder","urge","circulation","pickup","distress","spine","romance","anticipation","military","lamb","gloom","pond","republic","ballet","bankruptcy","appreciation","rebellion","custody","feast","fluid","expedition","altar","recipe","array","anguish","harvest","sack","fraction","loneliness","trailer","notebook","surgeon","slip","festival","inability","pan","clearing","making","revival","rack","flashlight","sociology","heir","segment","moonlight","reign","exploration","burst","pet","charity","bundle","assurance","murderer","thrust","conservation","confirmation","outrage","quest","grant","perfection","liquid","stance","jar","essay","addition","diplomacy","rat","outlook","capability","broadcast","cocktail","breeding","immigration","optimism","urgency","helmet","correspondent","breakdown","domain","dressing","dancer","pork","colleague","crystal","insistence","guarantee","lane","dependence","chapel","transmission","hunt","turkey","veto","canoe","interference","sailor","arena","refuge","attraction","thesis","waitress","trigger","founder","briefcase","scholarship","commissioner","stack","lift","greeting","mining","partnership","cane","devotion","thief","troop","menu","finance","coincidence","sleeping","picnic","lounge","dose","jeep","brand","reasoning","proposition","administrator","cylinder","execution","commodity","drum","bronze","staircase","pin","whistle","robbery","catch","thigh","descent","canyon","ballot","shotgun","curb","nod","continuity","shaft","guess","gossip","jurisdiction","revolt","worry","recording","repair","saw","suspect","dome","globe","runway","resident","cemetery","conversion","black","passport","cease-fire","imitation","salvation","cement","creek","nephew","buddy","lung","embrace","ink","simplicity","sunset","astonishment","butt","oath","typewriter","outline","tribute","deadline","hostage","underwear","revelation","reluctance","dread","nest","nut","disposal","disclosure","destination","terrain","procession","recommendation","recorder","potato","ramp","accounting","bat","precision","heap","justification","fork","idiot","biography","prey","ivory","rumor","toll","robot","mix","glare","seal","sweep","haven","bike","courtesy","interaction","secrecy","ham","superiority","synagogue","calendar","ledge","engagement","lace","timber","turmoil","tooth","perfume","magnitude","veteran","lemon","cutting","tomb","accord","ammunition","spear","hunter","acquaintance","grocery","coming","pump","reservation","slide","award","institute","fringe","freight","accuracy","spectrum","ski","diameter","battery","desperation","pounding","variation","ankle","pepper","encouragement","cathedral","expectation","calf","monkey","suburb","rabbit","objection","dismay","boot","pipeline","lust","firing","aggression","ghetto","armor","merger","sphere","texture","moisture","kidney","broker","auction","hose","patent","hesitation","mound","cruise","goat","declaration","regret","conductor","terrace","contention","crap","manuscript","incentive","buyer","gin","principal","steak","novelist","criminal","heel","intellectual","conservative","quarterback","collector","motorcycle","refugee","punch","cluster","clown","preacher","torture","headache","pact","lump","buying","flavor","toe","spectacle","apron","banner","convenience","import","attendant","kindness","verge","dairy","umbrella","dam","inventory","turning","homeland","remainder","gum","plight","container","diversity","drought","reporting","biology","chemistry","curse","scar","merit","spray","reactor","shield","clarity","bamboo","metaphor","vocabulary","runner","luxury","diagnosis","bunk","white","statute","knock","garment","breed","railing","zoo","rival","supermarket","streak","pavement","discomfort","congregation","twilight","bacon","slot","scarf","dime","charter","grammar","theft","sensitivity","mainland","classification","coffin","rider","competence","adoption","reserve","fascination","specialty","mike","temptation","yield","evaluation","passing","intimacy","translation","philosopher","cafe","sitting","superintendent","pill","housewife","signature","correspondence","siege","inn","leftist","injustice","assertion","restoration","registration","farmhouse","denial","endorsement","predecessor","final","demon","greed","transaction","repression","mattress","nobility","embargo","bosom","gym","tenure","addiction","apology","double","litter","nail","incidence","merchandise","volunteer","labour","basin","fiber","whip","payroll","microphone","cruelty","ax","supervisor","resource","maturity","resemblance","cult","stadium","limousine","welcome","knot","probability","menace","nominee","characteristic","stare","vodka","obsession","nursery","paragraph","discourse","candidacy","battlefield","saint","hierarchy","precedent","imperialism","pope","intake","burial","freshman","rebel","mandate","clause","tile","electorate","torch","adjustment","implication","farewell","curriculum","fountain","satin","subsidiary","humiliation","slaughter","discount","crest","princess","asset","greenhouse","reorganization","irritation","ending","messenger","jealousy","breakthrough","mineral","baggage","mouse","tiger","memorandum","kit","substitute","paradise","stride","deed","accumulation","pledge","hull","projection","apprehension","glue","excellence","composer","decay","ditch","slice","beating","syndrome","parole","pony","saying","vulnerability","rental","wax","renewal","disk","athlete","warehouse","organism","disagreement","suspension","documentary","soda","availability","dedication","delegate","reminder","domination","leap","span","obstacle","counselor","taxation","grandson","banana","rehabilitation","stamp","anchor","diary","tunic","boycott","meadow","backyard","dismissal","rating","disc","glove","pasture","catalogue","inspector","exploitation","missionary","density","sail","excess","chemical","disposition","headline","wartime","atom","bartender","blue","wash","shark","negotiation","monument","mom","faction","echo","tomato","scrap","expenditure","plague","fortress","web","briefing","luncheon","vanity","ribbon","nostalgia","drill","frown","dioxide","sovereignty","sweetheart","cot","tag","laser","purity","melody","sanctuary","citizenship","poster","pal","marketplace","girlfriend","programme","retaliation","researcher","allowance","bedside","yacht","scenario","concession","offering","instructor","motivation","litigation","tolerance","puzzle","compliance","duration","quarrel","aura","crusade","salute","intellect","debut","eternity","monastery","immunity","flock","choir","stern","medal","meter","auditorium","equity","fairy","windshield","mare","conquest","razor","push","kick","battalion","generosity","whale","den","mama","emptiness","hysteria","hillside","ideal","landlord","stem","drain","temperament","orientation","spoon","associate","ash","wig","elimination","bark","boost","activist","stature","liar","vein","tract","telegram","completion","pizza","urine","hollow","ordeal","admiral","psychologist","rehearsal","questioning","musician","installation","ministry","puppet","axe","nitrogen","contractor","poker","arch","tractor","reverse","relative","buffalo","deployment","outbreak","pier","veil","summary","courthouse","academy","confinement","catastrophe","technician","specimen","bachelor","lobster","tyranny","discharge","graduation","shout","monitor","traveler","dope","user","vegetation","deposit","investigator","attic","rabbi","reversal","knight","innovation","probe","altitude","legacy","raft","boyfriend","twist","plaza","paradox","witch","folly","physicist","prophet","threshold","plaster","dentist","telescope","vault","climax","parish","balloon","probation","prescription","liability","wheelchair","blackness","colour","booze","exhibit","vest","abundance","hatch","sketch","cartoon","horseback","investor","violin","hazard","trader","stall","healing","prejudice","scorn","rum","accomplishment","limb","produce","epidemic","tumor","camel","starvation","insect","tenderness","cockpit","maximum","patriotism","chauffeur","parliament","capsule","deficiency","massacre","dessert","bail","meditation","petition","hypothesis","ruin","voter","wait","saving","imprisonment","nationalism","lawsuit","surrender","celebrity","contradiction","disgrace","betrayal","slogan","thrill","enjoyment","narrative","canopy","might","vaccine","fort","stereo","hearth","relaxation","asshole","avenue","fright","drift","width","guardian","portfolio","longing","brutality","frenzy","chaplain","chop","tactic","viewpoint","chip","banquet","closing","re-election","impeachment","wardrobe","cradle","facade","finding","tangle","adaptation","hamburger","analogy","fancy","counterpart","dissent","skepticism","gut","advocate","granite","equation","slump","vice-president","nap","foam","buildup","geography","scratch","major","preservation","folder","entity","defiance","nickel","monarchy","shack","teaspoon","chase","remedy","disappearance","foreman","seller","rag","youngster","allegiance","earthquake","columnist","goose","feather","bulb","imagery","bomber","overcoat","harassment","outsider","maze","reproduction","printing","reconciliation","kinship","grease","harp","parallel","stew","particle","accusation","criterion","garlic","boundary","scalp","recess","bearing","warrant","dictatorship","breach","bladder","elegance","fervor","disapproval","monk","tweed","loser","hen","shrug","junta","disguise","gulf","landmark","bourbon","reconstruction","decency","register","feat","hostess","workshop","accommodation","wreck","referendum","viewer","niece","flank","autopsy","boarding","grove","decoration","stain","cape","prophecy","bubble","asylum","commentary","grandeur","subsidy","seizure","badge","limitation","armchair","pro","spark","blaze","centre","split","peril","fusion","goodbye","ringing","solitude","handwriting","crossing","onion","rubber","forefinger","bait","solidarity","measurement","multitude","dump","novelty","truce","perimeter","alien","decree","opposite","constituency","maneuver","ransom","supplier","performer","murmur","coordination","hobby","dough","lantern","cherry","fox","quota","deterioration","flaw","millionaire","raincoat","skeleton","bum","washing","plantation","spotlight","arsenal","villa","sermon","compliment","podium","collision","ratification","jam","loft","theology","escort","tyrant","ore","caste","brokerage","lighter","screw","inheritance","eagle","annoyance","napkin","rationale","flurry","mall","dresser","autobiography","slate","cheer","sulfur","assortment","memorial","electron","detachment","addict","shrine","mold","rookie","astronaut","diesel","neon","heroine","clash","recollection","sweetness","complexion","stewardess","adversary","trance","virgin","screening","classic","nuisance","uprising","shipment","mug","stairway","supporter","famine","stench","click","stupidity","bug","throw","lumber","current","mentality","regiment","galaxy","patron","tap","mischief","contingent","gospel","racket","liaison","honeymoon","foliage","leak","doom","irrigation","mechanic","chef","viewing","swamp","void","mule","lottery","pastor","steward","ranking","survivor","tuition","medication","misunderstanding","prediction","forum","oppression","ale","expanse","consultation","pawn","attachment","franchise","intercom","chunk","mat","pioneer","prairie","familiarity","undergraduate","tenant","chimney","cereal","thirst","pub","packet","aftermath","outburst","habitat","federation","deduction","pageant","circumstance","discontent","microscope","sausage","coma","want","intersection","detention","shrimp","deception","illustration","manipulation","ecstasy","dash","eyebrow","ray","persuasion","builder","injunction","foe","inclination","precinct","slab","anthropologist","amnesty","loaf","radical","intrusion","dwelling","calculation","paperback","usage","paste","ashtray","shovel","capture","ferry","preoccupation","joint","filing","spit","womb","puff","quilt","squadron","playwright","rotation","lease","brilliance","burn","cough","spouse","assassin","flu","cabbage","reliance","console","carpenter","dependency","advertisement","lipstick","mahogany","disadvantage","holder","furnace","certificate","alienation","collaboration","extinction","austerity","pupil","tenor","foyer","bluff","whisky","similarity","pouch","chant","nun","hike","babe","com","input","pianist","treason","brake","shake","dividend","repetition","fisherman","pinch","persecution","brightness","disdain","sunrise","gleam","premise","shawl","kettle","forecast","recipient","strap","outlet","chalk","plywood","nickname","fulfillment","doorbell","keyboard","peanut","knob","compass","interval","intuition","clearance","format","shuffling","dent","ambush","chatter","lettuce","harness","hiring","ache","continuation","fit","friction","pretense","velocity","tavern","abdomen","scout","splendor","barber","flap","plateau","hedge","raising","visa","dictator","housekeeper","cafeteria","enrollment","sailing","ingenuity","limp","bard","consistency","ordinance","bathrobe","gauge","strand","taxpayer","spider","coward","reservoir","brigade","self-interest","crackdown","crib","hum","roommate","traitor","blend","kitten","setup","dagger","sophistication","clout","goddess","disability","touchdown","fertilizer","punk","agitation","seminar","hitter","crust","comprehension","nightgown","gamble","freak","stump","microwave","lever","libel","playground","exhaust","abstraction","picket","diversion","advancement","bourgeoisie","coordinator","myriad","dial","diagram","sensibility","donor","endurance","prominence","playgroup","transmitter","revision","consolation","storyteller","jewel","mourning","burglary","competitor","narrator","verb","butterfly","rationality","ant","mister","satire","placement","reunion","plunge","comb","commuter","carving","hormone","creator","swim","clip","necklace","frost","fix","allocation","thickness","happening","disruption","caravan","rodeo","axis","submission","insanity","protocol","caller","porcelain","aristocracy","interrogation","boyhood","muzzle","delicacy","teenager","undertaking","textile","tailor","defence","comeback","zero","wizard","cupboard","cynicism","behaviour","holster","bulletin","broom","receptionist","listener","exemption","flicker","exam","treasury","hug","interruption","no","drugstore","roast","trifle","jerk","exclusion","inmate","contra","permit","gene","melancholy","alcoholic","trainer","perspiration","instability","doorman","deterrent","occurrence","hem","pricing","wear","hog","cushion","commune","courtship","paradigm","down","participant","triangle","apprentice","prevention","forearm","symptom","flush","newcomer","announcer","gorge","frog","platoon","hawk","rivalry","trench","geometry","clubhouse","feller","hymn","dictionary","showing","homicide","crow","pneumonia","gourmet","flannel","congress","dislike","illumination","jockey","superpower","papa","absorption","fragment","catalog","genre","hypocrisy","duel","cone","organizer","fraternity","cubicle","hardship","restriction","gasp","authorization","partition","barrage","groan","waterfront","aerial","cinema","proximity","mockery","compulsion","slum","default","evacuation","fugitive","carton","chariot","masterpiece","nylon","dialect","tee","bathtub","congressman","vapor","disturbance","mailbox","take","groin","moss","shepherd","formulation","foreigner","solo","elder","textbook","predicament","trait","reef","intruder","captivity","commotion","farce","royalty","exasperation","developer","expulsion","plaid","believer","migration","gal","fitness","idealism","galley","offensive","hometown","sophomore","clump","launching","mast","slowdown","generator","make-up","mount","worm","chuckle","prototype","catcher","crotch","interpreter","graveyard","mane","premium","cuisine","jeopardy","reassurance","vantage","condemnation","vase","blackout","token","abandonment","maple","magician","bust","syrup","cassette","pick","madman","cleaner","throng","hanging","riding","villain","squeeze","wallpaper","lime","blur","modification","clatter","anonymity","lineup","polish","accountant","setback","neutrality","modernization","borrowing","kill","dwarf","amateur","expectancy","donkey","fella","contamination","ballroom","kidnapping","popcorn","entourage","crook","ambiguity","coral","roadside","fragrance","slack","spectator","stimulation","groom","rattle","synthesis","tan","skipper","distrust","siren","spin","revulsion","signing","booster","savage","glamour","flute","civilian","flask","tug","misfortune","therapist","plug","standpoint","weed","ecology","footing","patio","decor","malpractice","residue","passageway","chopper","batch","acceleration","depot","quarry","hound","pilgrimage","deference","splash","heartbeat","rap","wedge","indicator","pretext","make","saloon","clientele","poisoning","hemisphere","grotto","ignition","cover-up","ape","transcript","blizzard","crab","ration","puck","propriety","hunch","madam","imbalance","jug","manual","raise","silhouette","sponsor","bore","volcano","crate","humility","devaluation","rocker","rainbow","chap","informant","freezer","limestone","guise","valve","appraisal","handicap","correction","bra","sinking","turnout","manure","pail","cardinal","grape","bee","rumble","miner","dissatisfaction","pamphlet","plaque","chat","injection","pulpit","platter","symphony","molecule","rib","pyramid","shudder","dissolution","vinegar","calling","acreage","chick","cuff","scrub","orphan","porter","saucer","antenna","trophy","rig","convent","good-bye","troupe","ploy","niche","veal","semester","contender","grenade","hilt","spiral","stink","marathon","boulder","treasurer","cookie","peninsula","freeway","rainfall","showdown","parody","telling","statesman","decrease","symbolism","pillar","tremor","penetration","carcass","breadth","psyche","hiss","suppression","pottery","dormitory","scare","overtime","bean","schoolteacher","timetable","buzzer","mesh","jack","marshal","windfall","lance","uterus","inconvenience","chrome","brute","gardener","whim","pearl","fold","trim","ravine","critique","adultery","stretcher","trolley","elevation","worthy","vibration","bracelet","plank","jelly","foil","wrestling","colon","layout","quotation","sting","son-in-law","jargon","likeness","knack","defect","sedan","tilt","chore","moratorium","convoy","piety","acknowledgment","formality","thud","blockade","chord","hush","takeoff","lining","marsh","manifestation","humidity","ingredient","crater","liking","pigeon","abolition","granddaughter","vintage","flourish","playoff","prostitute","prick","oblivion","sociologist","helping","locomotive","contraction","bookstore","surrogate","hippie","sherry","scotch","packing","wink","spasm","conglomerate","ensemble","dugout","insider","sect","inclusion","feedback","trumpet","massage","constituent","brotherhood","directory","newsletter","comrade","grid","turtle","restructuring","reel","spur","comet","dummy","combustion","moustache","oversight","motto","mantle","handshake","mouthful","monologue","buffet","miss","crunch","waking","gray","exaggeration","gait","clutch","courier","hangar","dive","curator","ridicule","diaphragm","tow","projector","eclipse","parcel","lure","transplant","township","squash","commentator","mentor","gutter","stint","treat","germ","infinity","impasse","burglar","proprietor","tariff","dispatch","torment","dove","superstition","going","tempo","warden","sponge","rooster","barge","gorilla","draw","wharf","stallion","countenance","orchard","navigation","tar","biographer","wheelbarrow","imposition","hurricane","stronghold","distortion","starter","rash","feud","parting","interviewer","wrongdoing","lavender","low","leash","envoy","stairwell","backup","doorstep","negotiator","heading","excursion","sewer","endeavor","backbone","rite","vine","gypsy","directive","defender","scoring","esteem","torrent","gland","consortium","nightclub","swell","employe","obscenity","cavity","pulp","lifestyle","butler","peach","tack","fossil","glitter","liner","destroyer","flyer","individuality","roller","outcry","felony","artery","cruiser","bedding","dude","bounty","blindness","bodyguard","corral","coroner","spice","martini","contingency","gag","serving","wail","wrench","sock","safe","spite","broth","trustee","moth","vice","gender","cartel","casting","puppy","prohibition","ox","sculptor","treachery","stir","printer","audit","brim","handbag","lobbyist","jolt","comedian","distraction","challenger","telegraph","homage","evasion","detector","filling","overhead","cartridge","walnut","sonar","puddle","quake","flooding","crescent","thrift","following","tanker","stoop","clergyman","opener","latitude","anatomy","convertible","arbitration","leukemia","absurdity","stab","biologist","baseman","fuse","specialization","carnival","scarcity","gangster","stalemate","trickle","mallet","working","receipt","charcoal","mortar","drainage","mother-in-law","regularity","emigration","plasma","condominium","muck","workplace","roster","stroll","softness","serpent","owl","infield","sill","swallow","backdrop","fidelity","historiography","thicket","baking","omen","yell","functioning","bribe","dynasty","trough","pudding","alcove","ancestor","ripple","flint","bracket","cube","pasta","proxy","groove","commercial","holocaust","countess","scroll","bang","planting","premiere","norm","bloom","gunman","vow","arithmetic","accelerator","postcard","relish","semblance","whine","inventor","sarcasm","designation","pat","symmetry","quiet","chisel","experimentation","cutter","differentiation","stud","apathy","relay","seminary","escalation","life-style","coil","mythology","futility","intimidation","childbirth","flare","glint","rue","mural","whiff","deposition","vogue","animation","migrant","caretaker","dot","mediator","lookout","captive","blackboard","pocketbook","recourse","negation","plaintiff","shriek","obstruction","latch","manor","casualty","grunt","gambler","erection","nationality","epic","starch","delusion","linkage","provocation","avalanche","offender","melodrama","contentment","appropriation","tonic","salon","accompaniment","paranoia","grimace","communion","cancellation","pendulum","shoreline","hail","refinery","subtlety","videotape","commando","repertoire","refinement","dryer","rust","lapse","haircut","errand","ailment","reanimation","ther","tab","prom","contemplation","bin","gilt","bunker","protector","sage","hilltop","hue","blueprint","correlation","brochure","roadway","arson","remnant","breaking","bouquet","exertion","garrison","beneficiary","colt","turbulence","refuse","bravery","indulgence","assimilation","coastline","livelihood","swarm","configuration","lecturer","paw","upheaval","switchboard","sub","claw","downfall","dye","immigrant","specter","deprivation","shrink","marker","sampling","fellowship","beak","pantry","mouthpiece","gratification","qualification","finality","debacle","extortion","chieftain","speaking","totalitarianism","mole","incumbent","jumper","crush","stubble","terrorist","comic","farmland","contributor","gravy","blossom","keeper","craftsman","pavilion","obscurity","loading","affiliation","vacancy","proclamation","gaiety","yarn","enclosure","clamor","sucker","recruitment","subversion","boiler","emblem","spade","stocking","staple","vocation","sling","maniac","musket","primitive","periphery","idol","snack","antique","redemption","listing","airliner","bandage","bulge","glimmer","priesthood","diner","astronomer","ovation","kindergarten","module","lifting","radiator","booklet","resurrection","precaution","affinity","thinker","quote","turbine","tally","vise","landslide","bakery","portal","majesty","abyss","admirer","turnaround","airfield","wastebasket","lapel","pennant","complication","slick","initiation","rustle","hearse","schooner","carrot","inscription","wench","embryo","vet","poise","disintegration","procurement","speck","kite","vent","plow","homosexual","membrane","waterfall","teevee","matron","utterance","buffer","memoir","cork","recital","loathing","cameraman","throttle","insecurity","trooper","hinge","hoard","umpire","slug","mountainside","affliction","pastime","felt","sentry","denomination","mushroom","linebacker","parachute","teller","fender","trademark","specification","harem","plum","metabolism","certification","neutron","organisation","heresy","relocation","payoff","lizard","termination","dropout","torpedo","stepmother","helm","resonance","heed","progression","braid","cardboard","walkout","shiver","gust","foreground","replica","repertory","sparkle","seam","bump","substitution","rapport","casket","dew","squirrel","palate","hitch","rebirth","reverie","boon","pirate","foresight","vinyl","delta","moat","presumption","tablespoon","aroma","digging","heartland","healer","malaise","creed","archway","exterior","screenplay","examiner","parity","copyright","strawberry","outpost","bookcase","cashmere","bikini","sheaf","pastry","respite","divinity","impossibility","legislator","saga","thump","inauguration","seaman","degradation","strategist","emerald","anthem","affront","burner","entrepreneur","thorn","marvel","stair","cavern","swivel","outlaw","underside","cleanup","fin","catalyst","forage","tapestry","dosage","covering","proletariat","turnover","notch","misconduct","onslaught","upbringing","coyote","bumper","champ","creep","boxer","mileage","vigil","fodder","occupant","dashboard","rarity","centerpiece","consul","ascent","paddle","martyr","doctorate","runoff","grudge","tattoo","robber","carbine","holding","oratory","distributor","heavyweight","footnote","terminology","infrastructure","drummer","chili","tableau","dung","magnet","deceit","caricature","itch","refund","cripple","rectangle","mortal","ancestry","inequality","generalization","furor","relativity","jukebox","dune","endowment","pathology","calibre","subpoena","attrition","hump","congestion","reflex","hoax","honour","herb","mantel","articulation","washer","judgement","brace","printout","helper","wording","crisp","shortstop","boulevard","characterization","cashier","matrix","documentation","deadlock","oyster","chasm","outing","expiration","heater","nutrient","beacon","bile","grievance","janitor","skyline","patrolman","juncture","antagonism","rump","hardwood","solace","warhead","assent","litany","enactment","chimpanzee","rye","feeding","suede","coke","inference","ivy","mosquito","eruption","symposium","variable","cooler","filter","storeroom","mailing","chancellor","beggar","antiquity","inertia","motif","absentee","float","blush","embankment","riverbank","demeanor","vampire","disciple","inadequacy","reinforcement","pedestrian","persona","berserker","tumult","incline","beaver","grill","morgue","denim","wreath","grouping","relic","syndicate","rancher","idiom","hegemony","seating","affirmation","physiology","repose","blight","jest","turret","slit","goalie","clarification","avoidance","volley","redhead","inefficiency","folklore","embodiment","afterthought","steer","cyanide","digestion","continuum","mania","giggle","buggy","willow","pantomime","fireman","growl","devastation","navel","halo","yearning","laborer","alligator","prelude","verification","brown","bead","midget","sleeper","riddle","portrayal","counterattack","lectern","tutor","chestnut","remembrance","aversion","taking","billing","regimen","translator","headmaster","duke","ace","snort","fanfare","imprint","calamity","exposition","cedar","intrigue","transistor","bowel","boardwalk","tramp","ornament","sticker","processor","voltage","sovereign","whistling","orgasm","caliber","exuberance","snout","enclave","kilt","bombardment","corporal","overhaul","syllable","curfew","layman","consolidation","insignia","mediocrity","coherence","hospitalization","flick","pew","coloring","sanction","baritone","radicalism","savagery","pallet","stead","cadet","shutdown","supplement","unicorn","stepfather","excise","spelling","rebound","puzzlement","tenement","souvenir","veneer","safari","quartet","whirlwind","hamlet","practitioner","parasite","installment","emission","kissing","chronology","mosque","chairmanship","blonde","steamer","caption","shave","standstill","maiden","polling","condor","twinge","campfire","drinker","exhilaration","seafood","gala","crane","hickory","cathode","graph","orgy","deliberation","planner","marrow","bud","mediation","cutoff","tit","tic","parchment","noun","culprit","lair","showcase","hangover","chemist","aggregate","thriller","smack","efficacy","smear","heiress","crank","fig","finale","pea","staging","die","rebuke","curry","scum","potency","acclaim","collateral","schoolboy","canteen","radius","deportation","grate","madame","mop","pronunciation","sheen","respiration","breakup","professional","omission","gunshot","ugliness","fanatic","barbecue","dorm","trot","flattery","stereotype","hatchet","capitalist","purge","brew","totality","fern","enzyme","plumber","subscription","cholera","bruise","forge","nipple","commencement","superstar","ether","gem","sash","extraction","spaceship","golfer","realist","encampment","necktie","repayment","skillet","darky","disparity","bedspread","haul","questionnaire","promoter","wand","windowsill","victor","rector","enamel","hoop","coronation","patriot","chandelier","watchdog","glade","renovation","goblet","zipper","communique","crevice","motorcade","sequel","scourge","serum","single","icebox","junction","cache","berth","streetcar","syringe","antithesis","bureaucrat","blacksmith","oval","bun","loot","fiasco","tomahawk","ulcer","pinball","jersey","asthma","brook","pedestal","feeder","soot","inevitability","alteration","carrying","showroom","gimmick","lunatic","gall","fir","borough","hash","woe","controller","sponsorship","applicant","twig","screaming","librarian","intermission","sister-in-law","bushel","inflammation","pomp","vial","extravagance","pate","prostate","dolphin","tuxedo","mathematician","guinea","veranda","aperture","disillusionment","gavel","dating","knocking","oasis","nebula","woodland","yellow","ambivalence","hardness","oxide","socket","wasteland","leopard","blazer","follower","asking","urn","weaving","swimmer","closure","dart","loudspeaker","bazaar","bog","transfusion","reproach","sham","parka","affiliate","scowl","primate","attacker","rink","funnel","spate","elaboration","legality","tablet","heyday","tripod","bully","sharpness","demolition","flip","dandy","appliance","slant","sentimentality","knoll","gloss","defection","explorer","ram","stupor","clone","baton","cohesion","bearer","penance","bandit","aberration","gallop","swirl","coconut","spree","pedal","detergent","canon","teen","brood","phonograph","tabletop","enlargement","sniper","cohort","fable","rising","spill","affidavit","imperative","snapshot","apparition","stunt","wristwatch","chute","teammate","carelessness","over","stripe","postponement","rapture","savior","pacifist","admonition","pear","junkie","surcharge","wavelength","horseman","hag","confessional","comptroller","orthodoxy","financier","snarl","cliche","refreshment","incest","adolescent","teapot","seaweed","drilling","roadblock","antibody","sheath","pallor","constable","misuse","arcade","lee","keep","anarchist","watering","rhyme","exclamation","backseat","great-grandfather","han","pod","daughter-in-law","mailman","alphabet","sloop","reckoning","grower","simulation","homer","birthplace","ence","actuality","depletion","novice","diffusion","concealment","cadre","pathway","fungus","ouster","loner","autograph","descendant","aspiration","better","sick","variant","fragmentation","pesticide","frigate","bestseller","propensity","foul","senate","trouser","airstrip","insurrection","chronicle","coating","stigma","toothbrush","pumpkin","apprenticeship","widower","paycheck","query","teen-ager","shifting","informer","doorknob","ardor","pebble","finesse","scrapbook","fiddle","dowager","sod","wrap","turtleneck","clipboard","rogue","mutiny","suitor","bulkhead","babble","fad","billboard","beverage","hairline","grille","exporter","pathologist","mesa","goblin","scapegoat","crucifix","backpack","observance","forgery","dungeon","methodology","gauze","bonanza","inkling","beret","shouting","ex-wife","wickedness","toil","preview","porridge","cornerstone","scanner","smoker","rebate","mite","brawl","axle","easel","allegation","grab","parrot","antidote","drawl","hijacker","telltale","venom","el","baron","intermediary","seduction","birch","contour","redistribution","cam","protagonist","enmity","hulk","stockbroker","decorator","cookbook","protege","mage","cricket","smock","apex","cortex","modem","shareholder","lament","determinism","rift","tablecloth","trajectory","preface","sneer","gamma","rendition","insemination","aristocrat","hare","labyrinth","thaw","invalid","staffer","alpha","fingernail","medic","crutch","entertainer","jade","eminence","discrepancy","yawn","flea","ledger","orphanage","getaway","manifesto","hijacking","incarnation","elm","adobe","spruce","gist","grit","boar","oracle","mobilization","cantor","crypt","cutback","musical","fallacy","corduroy","fray","racetrack","buckle","foreboding","pest","clap","ber","notation","peek","sow","ballad","brat","constellation","lard","industrialist","hunk","assailant","splinter","bridegroom","dip","fixture","cadence","watchman","windmill","prerogative","drawback","bungalow","heaving","nationalization","mating","writ","rationalization","milking","modernism","landlady","calculator","animosity","workout","skirmish","glycogen","discord","portico","vestibule","renegade","overdose","iceberg","lineage","mosaic","liturgy","watershed","playing","lobe","dowel","ranger","dossier","anvil","co-operation","satchel","fa","corollary","bridle","gateway","brothel","monotony","vendor","mysticism","saucepan","accomplice","hernia","guild","pup","hoof","sparrow","dreamer","craving","outpouring","blink","overlap","duct","brownstone","maneuvering","stagger","foothold","craze","monsoon","induction","handgun","scan","constraint","citadel","rigidity","anecdote","halter","occupancy","rightist","convict","tribunal","stalk","waterway","debtor","yoke","audition","inconsistency","peg","sliver","midwife","premonition","ruby","conduit","excavation","fart","condenser","hop","poodle","upsurge","attainment","stitch","crimson","anomaly","backlog","yeast","chimp","awning","gig","parable","drumming","tiptoe","prow","bypass","crease","reformer","intestine","counterpoint","enormity","anthology","rudder","shroud","magistrate","twitch","commonwealth","circumference","stuffing","sweating","scattering","lender","dripping","legion","refrain","mummy","covenant","morbidity","prop","initial","alignment","licence","infusion","unification","rebuttal","adjective","humour","larceny","mistrust","horde","assemblage","delinquency","testament","convert","patrician","dissension","cider","infidelity","bonnet","displacement","crackle","edifice","conciliation","bondage","schizophrenia","embroidery","standoff","monotone","oddity","mobile","tornado","semicircle","panorama","ex","ping","yogurt","screech","underdog","quay","tai-pan","extract","podesta","ticking","shrubbery","backside","communicator","sorcerer","interlude","dominion","battleground","taboo","blunder","conjecture","drone","cove","maverick","secondary","companionway","rook","gauntlet","ordering","violinist","rooftop","slash","thermometer","vomit","anteroom","deity","nave","acquittal","talker","reed","concussion","malfunction","tundra","cub","anemia","constructivist","cocoon","divide","keeping","percussion","freighter","noose","narcotic","expediency","grandchild","gully","innkeeper","pigment","bloodstream","quiver","alderman","halftime","stable","fission","aggressor","denunciation","abduction","expressway","uniformity","faucet","buff","broiler","allusion","jock","spike","herald","polyester","genocide","fer","parapet","classmate","tinge","sandstone","lurch","skunk","huddle","mum","tranquilizer","pharmacy","susceptibility","penicillin","lark","hoe","lily","hanger","headset","john","appointee","advisor","twine","slumber","magnetism","schoolgirl","smash","screwdriver","newsman","sleet","cleavage","lacquer","milestone","commandant","crick","splitting","rosary","edict","hurdle","fixation","appendix","lock-mechanism","eyelid","swath","fingerprint","carbohydrate","tick","magnate","heck","sailboat","donation","malady","polishing","clipping","collective","sensuality","loom","swagger","facet","variance","mean","walkway","aptitude","prodigy","solemnity","understatement","ebb","scoop","wrapper","narration","icon","prerequisite","planter","gash","interplay","evangelist","drip","vulgarity","subdivision","backwater","euphemism","lotion","corpus","broadcaster","toothpaste","curmudgeon","fo","thong","thatch","baptism","peacock","workman","downturn","scoundrel","machete","creak","five-year-old","dissertation","dishwasher","pimp","electrician","tycoon","otter","shove","snail","rendering","nobleman","booking","pronghorn","deadpan","shutter","escalator","girdle","fling","hire","alibi","flop","stampede","prognosis","itinerary","cologne","spoonful","detour","violet","watcher","falsehood","hype","locale","estimation","propeller","squaw","pickle","lass","pun","racist","scratching","rout","downpour","casing","complacency","camper","equator","reticence","learner","outcast","brunette","improvisation","stag","maxim","loophole","livery","blasphemy","shoot","solvent","misdemeanor","buyout","tiller","jetliner","checkbook","awakening","sideboard","romanticism","squire","newsstand","nuance","consulate","excrement","reprisal","bastion","beginner","obituary","softball","conjunction","scripture","phalanx","vindication","grub","swig","inaction","redwood","scabbard","bonfire","casserole","ovulation","unreality","totem","palette","choreographer","peasantry","skyscraper","penitentiary","outfield","melon","bounce","yolk","diver","archbishop","plurality","amber","recurrence","adulation","piston","insurgency","stoan","coop","tart","eyeball","toss","giveaway","cross-examination","dissident","hermit","ruse","ture","pore","leaving","dowry","gunner","epitome","snowstorm","summation","switchblade","crock","ity","frock","luster","piazza","rotor","impropriety","pivot","blender","immediacy","borrower","slaying","feminist","preserve","bidder","depiction","parasol","clover","intern","asteroid","stub","barricade","medley","multiplier","smirk","knapsack","hank","cognac","headway","treatise","homestead","troublemaker","giraffe","mover","allotment","drowning","naturalist","orderly","attribute","scalpel","shipyard","estrogen","educator","enrichment","grandstand","sire","perversion","sideline","landowner","confidant","gel","deviation","clemency","liberal","bigotry","filly","six-year-old","lifeguard","shred","adversity","shelling","pineapple","referee","knockout","jigsaw","retailer","extremity","outgrowth","amplifier","sinner","campground","teasing","steamboat","turban","mutton","cobra","contraption","chopping","schoolhouse","varnish","pane","observatory","ballerina","czar","immensity","lethargy","reimbursement","undershirt","concierge","fracture","variability","accordion","slime","meanness","gelding","practicality","advertiser","graft","gull","stockholder","pilgrim","hooker","puritan","benediction","barbershop","stanza","hallmark","mishap","harpy","silage","enchantment","whirlpool","conditioner","gadget","divestiture","lathe","incarceration","amalgam","antibiotic","annexation","martyrdom","pyre","shank","alert","shale","artifact","interchange","mystic","meet","grinding","triple","boutique","antagonist","fermentation","twinkle","sweetie","shin","creditor","amulet","pall","posse","homeowner","skier","vastness","smith","allegory","oxidation","cracker","levy","ark","sporophyte","enthusiast","snob","spinster","searchlight","waistband","lorry","repeat","reprieve","slalom","respirator","visor","reviewer","putt","miscalculation","shortfall","concourse","dialectic","native","hairdresser","normality","immorality","sprinkling","allure","lick","drudgery","habitation","gondola","vista","ice-cream","cheerleader","predator","countdown","juxtaposition","stumbling","muffler","derby","timer","salvage","boast","cabbie","clam","windbreaker","retardation","antelope","shampoo","raccoon","bible","glider","momma","valise","coffeepot","emissary","compression","grail","guideline","lavatory","glaze","outpatient","thunderstorm","foray","co-op","valet","baker","sycamore","thumbnail","nozzle","timidity","orator","liquidation","spokeswoman","militant","jig","naivete","motorist","dumping","armpit","margarine","exultation","headboard","plume","amplitude","flutter","pronouncement","finery","trepidation","airing","coupon","knuckle","gametophyte","deathbed","extermination","alleyway","hybrid","gambit","nova","binge","original","froth","lighthouse","coolant","continuance","collaborator","fuselage","profanity","whirl","saber","filmmaker","checkup","shaman","rancor","retort","earring","sieve","post-mortem","implantation","conceit","simplification","vat","proficiency","deluge","kiosk","outlay","tantrum","flooring","veterinarian","fireball","carousel","bandanna","glacier","censure","citation","oar","fridge","metamorphosis","superior","approximation","girth","tirade","grocer","holdup","forward","snobbery","cleansing","replay","recitation","facsimile","patter","jubilation","snare","frailty","rampage","pick-up","overture","tumble","residency","prevalence","repository","reentry","battleship","mutation","hammock","importation","thug","semiconductor","ballast","spurt","extreme","artichoke","convergence","circular","rigor","realignment","physique","handbook","bugle","precipice","sauna","whorehouse","skater","furcot","volatility","valuation","barbarian","peddler","layoff","overall","deliverance","chromosome","innuendo","lexicon","empress","polarization","dictum","fitting","impediment","piracy","crocodile","cucumber","keel","sitcom","hypocrite","roaring","encroachment","steamship","resin","fairway","eyewitness","broadside","washroom","sighting","mantra","swan","supposition","governess","upswing","rep","solicitude","rustling","invocation","heather","rectory","orchid","brocade","raiser","invective","fragility","acronym","ostrich","col","absolutism","vicar","psychotherapy","navigator","cartoonist","doe","landfill","invader","werowance","ble","flatness","locality","druid","visitation","headlight","rapist","benefactor","colonization","excerpt","nick","kangaroo","pink","buy","cascade","campsite","slander","headdress","topcoat","causality","karma","trestle","atheist","checkpoint","renunciation","eater","payload","pointer","theologian","beet","undertaker","lineman","hart","gourd","doubling","shuffle","cabaret","periscope","bodice","shootout","grandma","wildcat","proton","dioxin","sorcery","torchlight","stopover","executioner","collage","mesquite","reincarnation","kidnaping","programmer","disloyalty","muslin","throb","mint","aquarium","tel","eccentricity","purification","kerchief","warranty","rigging","breeder","nite","conservatory","fastball","magnification","spa","favour","regeneration","incision","saxophone","detriment","scam","android","coloration","bunny","restitution","rake","serf","despotism","pollen","sidewinder","upstart","revisionist","birthright","multiple","lifeline","queue","follow-up","swipe","boardinghouse","armament","travesty","stirrup","caper","chloride","crepe","primer","clich","inflection","skid","repudiation","serve","spire","peep","inducement","clothesline","fabrication","morsel","spleen","coon","bustle","crossword","back-up","assessor","biopsy","sidecar","hassle","shingle","tint","fixing","collarbone","taint","pusher","gestation","mantelpiece","vaulting","ra","peat","indignity","adequacy","genus","scrape","scaffolding","serial","neurologist","duffel","cipher","rote","horseshoe","bulldog","electrode","joker","juror","fibre","misconception","rut","connoisseur","flowering","op","flirtation","highlander","wisp","sounding","bugger","pharmacist","doughnut","toaster","pinnacle","slob","promenade","amphitheater","singsong","beau","whimper","importer","locket","watermelon","marking","beta","co-author","crossbow","atrocity","desktop","inhibition","draught","rowboat","volleyball","snowfall","extravaganza","teddy","miscarriage","storefront","toxicity","abode","hearty","handyman","centurion","phrasing","anachronism","newspaperman","annex","walker","till","volition","tributary","close-up","nook","cleric","ferment","proverb","inlet","heretic","waistcoat","duet","sniff","crewman","campaigner","wearing","grizzly","p","optimist","placard","overflow","pedigree","clang","brig","cinder","bunting","wag","dishonor","denominator","gong","siding","trilogy","deli","fluoride","questioner","squat","competency","partisan","putter","entree","cynic","tombstone","scoreboard","biscuit","souffle","homecoming","overseer","hideout","brewery","emancipation","interface","premier","auditor","troll","conscription","stout","trucker","beetle","dealing","bookkeeper","build-up","yardstick","da","polity","wick","wrinkle","private","outflow","borderline","outfielder","visage","leper","chiffon","arbor","weave","barnyard","checklist","granny","insensitivity","ex-husband","barometer","rupture","infirmary","desertion","wonderment","encyclopedia","slaughterhouse","nostril","ineptitude","implant","infatuation","laundromat","warship","rub","benchmark","polygraph","dinghy","behind","tween","filibuster","wearer","crayon","sensor","hustler","sinew","progeny","dig","pediatrician","foursome","buckskin","cornfield","safeguard","divergence","ting","coupling","dislocation","the","immersion","purchaser","cleft","overhang","booty","scuffle","rattlesnake","teacup","retinue","hallucination","potion","yeshiva","tapping","rip","multiplication","canister","gallantry","morn","thermostat","grind","aviator","ecosystem","pariah","recruit","vestige","ro","phosphate","abomination","laurel","sweatshirt","vaccination","psychoanalyst","blind","psychosis","sidekick","shopkeeper","theorist","delicatessen","sheepskin","billionaire","receptacle","salami","paddock","glen","beech","leer","mime","ty","perfectionist","seedling","wil","bind","intolerance","dint","plural","rouge","skylight","mammy","drab","microcosm","sole","organist","court-martial","matinee","bulwark","must","expatriate","stethoscope","daydream","backer","godfather","breech","artifice","auxiliary","adventurer","atrium","counterman","idiocy","grotesque","dishonesty","runaway","digit","baseline","reflector","preamble","sellout","falcon","scribe","retainer","louse","grapevine","sojourn","lash","marquee","schoolmaster","squeak","squeal","shooter","townhouse","nationalist","billiard","backfield","auctioneer","aria","avant-garde","hostler","smattering","giving","coaster","arraignment","duo","malignancy","throwback","doc","turnabout","seeker","deletion","vernacular","bulldozer","tedium","hustle","raspberry","estrangement","mutilation","styling","incinerator","wrong","shortcut","mastectomy","infringement","bonding","timbre","cameo","workroom","grassland","spraying","cooperative","tarpaulin","determinant","thyme","innocent","clique","racer","leakage","conflagration","jingle","duplicity","diaper","conqueror","committeeman","robin","reprimand","marina","cross-section","flagship","denouement","recluse","homemaker","moron","rind","gent","magnificence","dispatcher","detonation","harbour","toddler","rotunda","sedition","fell","dolly","laureate","woodsman","syndication","clot","guitarist","blemish","password","overview","eggplant","incantation","drapery","incapacity","florist","hive","civility","mod","screenwriter","intoxication","barman","ern","furrow","cant","clapboard","tumbler","walkie-talkie","pajama","vortex","defenseman","hostel","subjugation","interception","armory","fanaticism","sibling","inhalation","undercurrent","husk","mead","maw","padlock","abnormality","penguin","undersecretary","damnation","independent","airlift","peel","schoolroom","rascal","fingertip","cartilage","dichotomy","blank","lingo","clasp","racquet","acknowledgement","rebuff","bier","aerosol","taping","checkout","arse","thoroughfare","pelt","copse","keg","fissure","tern","mirage","blockbuster","balm","arbiter","shutout","schism","fluff","circumcision","insertion","pseudonym","heathen","eulogy","snowball","penthouse","kinsman","gebling","regulator","proponent","yearbook","barbarism","mutt","reopening","paunch","governorship","differential","airship","subscriber","alloy","adjunct","impairment","incongruity","pheasant","grownup","predicate","loo","sleigh","seer","flitter","sunburn","plebiscite","stockade","pout","sledge","stipulation","lordship","bayonet","wretch","vulture","postman","breaker","newsroom","consort","grinder","ballpoint","tequila","unpleasantness","wrapping","squall","adage","monograph","privation","streetlight","hilarity","sacrament","diminution","mannequin","duplication","banishment","rasp","biochemist","goatee","cranberry","sultan","blip","disservice","idealist","middleman","shaping","apocalypse","strut","oligarchy","moor","zombie","certitude","javelin","azure","turnpike","forger","commode","bleach","sideshow","banister","closeup","dysentery","steeple","offence","commandment","furlough","best-seller","filament","mountaintop","censor","snowmobile","kaleidoscope","elf","imp","slipper","lunacy","telecast","nanny","kernel","eventuality","subordination","sonnet","nitrate","foal","prank","expropriation","fedora","zigzag","resale","namesake","highlight","supplication","concurrence","medallion","jailer","loin","tread","quill","cardigan","prune","slur","surtax","internist","strait","smuggler","panacea","turd","wanderer","crude","darlin","epitaph","docking","seashore","cheeseburger","netting","provider","dispenser","intonation","marching","caress","hootch","morass","chum","sanctum","headband","powerhouse","axiom","terrier","springboard","tot","latrine","toad","clink","herbicide","figger","hick","manger","poppy","chaise","archetype","undoing","beehive","illustrator","withholding","sterility","paddy","coven","custodian","half-life","embezzlement","armoire","kickoff","possessor","rectum","sit","daisy","housecoat","pollster","policewoman","ointment","expressionist","stockpile","bombshell","impresario","co-pilot","chessboard","dazzle","scepter","archdiocese","linguist","odyssey","capitol","accession","lute","liter","multimillionaire","decoy","warp","conveyor","grandpa","ance","mumble","betterment","bullfighter","chador","ampule","indiscretion","shake-up","clarinet","catapult","normalcy","shanty","dinosaur","epithet","tang","scaffold","immunization","repairman","suntan","mu","environmentalist","nightcap","tempest","artisan","orbiter","spiel","needlepoint","geologist","humanist","stutter","perplexity","roundup","concoction","treadmill","cacophony","antipathy","blackberry","bloodbath","brassiere","allergy","hitchhiker","grunting","choke","sitter","elixir","ba","repatriation","whack","decanter","crusader","burlap","incursion","lyric","compilation","seaport","coachman","philanthropy","secretion","collie","inquest","taper","moral","quartermaster","jeweler","salutation","confluence","gullet","tram","hideaway","by-product","drybone","copulation","divorcee","mausoleum","peeling","annuity","set-up","skiff","neurosis","windpipe","buoy","glide","archaeologist","pendant","junkyard","bullhorn","porthole","quandary","irrationality","acidity","pragmatist","derivation","stylist","duplicate","panther","brigadier","introspection","depravity","keynote","vexation","psi","weighing","deserter","speculator","teak","armful","remission","precursor","sorghum","harmonica","olive","gangway","contraband","defector","purgatory","genie","expedient","crowbar","desecration","bathhouse","enhancement","tenet","seasoning","wrangling","downhill","venue","tracery","dictation","bailout","undertone","pecker","prep","forerunner","bandstand","letdown","luminosity","tonnage","catwalk","brunch","sapphire","ballplayer","wineglass","readout","genealogy","horsepower","messiah","blackjack","hemorrhage","damask","registry","gunwale","jerkin","humorist","bowler","tingle","engraving","chauvinist","spirituality","eyepiece","twang","constancy","blot","blob","chard","highschool","sportswriter","tiara","domino","contestant","migraine","newscast","mainstay","hammering","tracker","wager","offshoot","buster","informality","python","felon","imperfection","slag","convulsion","sedative","cellblock","punt","headwaiter","outhouse","monstrosity","nonwhite","override","raisin","inversion","pancake","flavour","cataract","reclamation","churchyard","pidgin","suction","chanting","aggravation","dynamo","pee","fistful","hogan","byproduct","brooch","lullaby","workday","slop","silencer","dealership","earner","anchorman","pittance","crumb","custard","rainstorm","tote","mulch","mason","earl","barroom","levee","discouragement","falsity","compressor","lodging","gynecologist","divination","calico","bibliography","cyclone","senor","gatehouse","lagoon","squirt","artwork","songwriter","derivative","supernova","divan","photon","surety","cobbler","fatality","gout","eleven-year-old","ent","cropping","mainspring","prism","confederation","weaver","neighbour","yuppie","muffin","juniper","ovum","lesbian","pi","shimmer","fax","increment","co-ordination","splashing","thanksgiving","exaltation","confiscation","fairy-tale","fudge","brief","priestess","re-creation","hydrocarbon","ford","usurper","maelstrom","spaceport","swordsman","vegetarian","newness","grad","potter","manservant","fullback","fiend","giver","subculture","debutante","striving","scorer","catechism","charger","armada","blond","paign","handball","wince","appetizer","guidebook","jog","millet","hoot","inferno","pardner","mash","mousse","mammography","launcher","battering","predilection","portent","beep","exhortation","notification","warm-up","diatribe","panda","menstruation","telex","revitalization","workingman","cordon","charmer","fumble","hamper","moralist","settler","chowder","ley","mannerism","drunkard","posting","turquoise","elasticity","abbot","bookie","tusk","paragon","precondition","rollback","lunge","conundrum","eviction","sealer","cellist","cosmology","turntable","outside","fortification","nightstand","spook","shoemaker","sac","sulfate","isle","antigen","steed","bacterium","utopia","stunner","hillock","clove","irritant","tat","memento","rung","gaffe","portraiture","solicitor","rodent","barter","intensification","gallbladder","condom","antiquarian","peck","cheering","meteor","inflow","stenographer","blinking","icing","jackass","dweller","fiesta","irrelevance","harpoon","appendage","stipend","mommy","cassock","microfilm","dead-end","vermouth","scarecrow","fielder","referral","mart","burger","ticker","hindrance","coverlet","speedboat","wafer","sluice","bellboy","hangout","figurehead","midterm","petticoat","matador","skein","beholder","flier","waiver","flotilla","smudge","inequity","mixer","sulfide","banality","roach","billy","tailgate","gaggle","softening","loincloth","gore","bib","chrissake","changer","muse","longitude","tourney","mil","aorta","poop","regression","soviet","placing","winch","apostle","constant","squabble","blimp","abdication","porpoise","puncture","workbench","parameter","conventionalist","flagpole","unfairness","reptile","typist","bookshop","hesitancy","strongman","headland","sprint","manhole","blowing","archipelago","ideologue","slouch","poke","gush","stratum","mulatto","echelon","postmaster","sheik","emigre","alto","affectation","rad","climber","deerskin","bower","idolatry","reciprocity","sweet","wasp","dissection","baby-sitter","purple","toothpick","lyre","archer","sprawl","councilor","contrivance","flake","kynd","suffocation","damp","ware","travail","candelabra","wrestler","patina","moaning","paisley","recruiter","moderator","respondent","marmalade","bellow","harpsichord","atrophy","ejector","jetty","stripper","monorail","dramatist","hysterectomy","riverbed","revaluation","stoppage","conspirator","fetish","sunflower","cognition","scrim","rec","retriever","aphrodisiac","redneck","palsy","pullover","flywheel","roundness","peculiarity","ernment","nectar","ruck","swimsuit","curd","underclass","polka","conservationist","mire","drumbeat","cinch","cordiality","deacon","speechwriter","purr","gelatin","muddle","booby","solid","cloakroom","stopwatch","sportsman","burlesque","overload","mademoiselle","divider","bailiff","handout","ordination","stiff","languor","paperweight","opiate","snap","causation","mower","perversity","snatch","touchstone","self-indulgence","shrub","interceptor","mammoth","proceeding","cheekbone","spoke","repellent","cardiologist","reminiscence","sprinter","evocation","postscript","enlistment","blotter","troika","dacha","cabdriver","fund-raiser","switching","para","tendon","fireside","effigy","leech","veneration","reek","schoolyard","pellet","shellac","weasel","jab","carcinogen","restroom","cauliflower","levity","caftan","topside","fruitcake","bickering","drawing-room","dovetail","culvert","chateau","bugging","tinker","hobo","corset","automaker","actualization","oration","handhold","nutmeg","tentacle","quicksand","handler","panoply","bowhead","testimonial","mammal","bellhop","devotee","technicality","trainee","mongrel","newscaster","aggregation","footpath","fawn","accreditation","heave","jib","rationalist","vendetta","midpoint","buckboard","screwball","hatchway","disinfectant","cramp","causeway","tease","corkscrew","sledgehammer","sloth","materialist","mogul","stopper","bevel","carbonate","berry","snore","throwaway","agribusiness","rerun","guillotine","nip","computation","keyhole","storybook","watercolor","cer","porcupine","urging","cockroach","esse","headman","settee","usher","short","obstetrician","faggot","ballpark","palisade","whimsy","co-owner","spout","nub","pectin","dun","cypress","trombone","scat","lite","dame","quip","invisibility","baboon","sneeze","swish","originator","biennial","newsreel","chameleon","dressmaker","storehouse","trapping","statistician","bloke","helmsman","ewe","drape","trump","great-grandmother","cloister","caterer","grounding","hotbed","life-span","urinal","funk","bedchamber","boudoir","theoretician","oddball","nameplate","raven","ditty","canary","anticommunist","reconsideration","playboy","skate","transparency","uplift","six-pack","rambling","commendation","wimp","pestilence","sufferer","kelp","counterforce","self-doubt","deformity","croak","marine","marksman","directorate","reversion","stimulant","dence","beloved","eraser","slurry","tracing","bigot","compendium","entitlement","monolith","misrepresentation","darkroom","nutshell","torque","concubine","peephole","lesion","bogey","spindle","birdie","nugget","tenon","supercomputer","weakling","provenance","vowel","empiricist","filet","co-founder","prelate","onlooker","tricycle","sax","catheter","accessory","fresco","prod","oscillator","self-image","refraction","excretion","prance","insurer","cask","impersonation","rangeland","toothache","magnum","accuser","rubbing","carver","carnation","masquerade","pervert","trapdoor","shaker","mittee","tux","poignancy","payday","captor","couplet","mutant","jogger","raider","dilution","sickle","prowl","blister","reassessment","infirmity","matchmaker","workload","restaurateur","tuning","wiretap","perpetrator","davenport","lamppost","inductivist","affect","sterilization","booming","rucksack","repurchase","starship","bystander","taker","spaniel","teletype","cuckoo","sneaker","aspen","soundtrack","sacrilege","surname","succor","co-chairman","anticlimax","hopper","jumpsuit","rinse","rummy","cigaret","washcloth","butchery","almond","cooker","implement","effluent","cheat","threshing","silicone","draining","vector","shopper","dandelion","pecking","brazier","cobblestone","slugger","sacrificer","airlock","lunchroom","zebra","ejection","cutthroat","wizardry","crony","kennel","internship","cohabitation","omelet","wheelhouse","redundancy","schema","psychopath","buttock","grasshopper","playmate","lamentation","socialite","cornucopia","lichen","coterie","warlord","discomfiture","frieze","montage","traveller","curvature","condensation","vineyard","scraper","generality","archive","half-sister","gangplank","intimation","doublet","pleading","tome","quadrangle","connotation","lifeboat","blueberry","coinage","prospector","bash","disciplinarian","dualism","bookshelf","adjutant","clod","apportionment","footbridge","tourniquet","spore","slicker","jetport","magenta","schizophrenic","oilman","harbinger","trespass","merry-go-round","sabra","old-timer","vigilante","melanoma","torpor","gliding","refutation","dab","jurist","plumage","kitty","cauldron","abbey","jasmine","lefty","cabal","detonator","retiree","abatement","clamp","roost","councilman","halfback","centimeter","shirttail","whispering","stratagem","exponent","cheesecake","truism","jaunt","node","ironclad","undertow","self-portrait","urchin","idealization","splendour","antechamber","living-room","sampler","friar","irregularity","lateness","playback","binder","washbasin","tummy","capitulation","felicity","canter","birthrate","earthenware","kitchenette","foundry","ladle","babushka","chlorophyll","adjournment","villager","recrimination","hotshot","blaster","pruning","soloist","hummingbird","recuperation","bequest","hemlock","cottonwood","drawbridge","alternation","malt","interconnection","mugger","tuft","keystone","riverboat","thrall","ayatollah","highland","mistrial","bunkhouse","anesthesiologist","dredging","anode","salsa","prizefighter","neckline","chile","foreclosure","cola","digression","scythe","lout","chamberlain","minefield","sabbatical","appraiser","isotope","demarcation","garnet","buzzard","repulsion","lowland","snifter","bending","weekly","dispensation","botanist","sari","stabbing","ovary","skullcap","journeyman","thievery","look-alike","parson","heartbreak","distillate","neophyte","blower","storekeeper","firmament","taxicab","corona","fusillade","publicist","resume","breather","casement","smokestack","interrogator","outcropping","mecca","dilettante","shoestring","belch","behemoth","negligee","heath","smut","negative","fistfight","regent","incumbency","curragh","toga","ministration","turnip","beamer","stepladder","loon","businesswoman","jumbo","whining","spoor","posturing","parlour","concertina","alkali","rampart","chime","warmup","taffeta","hyena","firehouse","sweetener","guessing","pronoun","madhouse","lioness","breadwinner","diocese","escarpment","mimic","retina","larder","gnat","hothouse","ponytail","markup","bevy","revocation","depressive","garner","redefinition","lifter","stateroom","nutritionist","isolationist","surveyor","polemic","ornamentation","gouge","counterweight","thrower","illegality","joining","lumberyard","wholesaler","obeisance","stagecoach","substage","lockup","nudge","rejoinder","compost","carburetor","peacemaker","prologue","swinger","right-of-way","precipitate","sprinkler","crone","valentine","vassal","tabloid","minstrel","nursemaid","attribution","courtier","docket","spool","convocation","serviceman","letterhead","zealot","negro","cackle","masthead","dispersion","underwriting","armload","noodle","squawk","periodical","reformation","boa","starlet","about-face","ejaculation","encore","harangue","woodpile","earlobe","reaffirmation","handlebar","compunction","contemporary","midriff","nimbus","householder","postgraduate","quirk","innovator","sneak","straitjacket","pussycat","belle","kidnapper","spacing","laying","standout","estuary","duster","jackpot","motorboat","welterweight","kicker","expectant","revue","senior","epistemology","yeoman","firearm","granddaddy","projectile","stammer","crossfire","toxin","hookup","phantom","transgression","flagstone","acuity","twick","acolyte","directorship","corpsman","worktable","mammogram","wart","liqueur","unbutton","receivership","duchess","delinquent","picker","earphone","blare","promontory","formalism","infamy","operative","hock","crusher","megaphone","retrenchment","chaser","dementia","wane","triviality","quadrant","curate","pairing","forging","dermatologist","mango","bon","moccasin","hayloft","marionette","seedship","ooze","interloper","twill","solicitation","trowel","professorship","scrimmage","scrawl","blockage","parkway","motorman","snapper","transcription","vasectomy","binary","flagon","choirboy","butte","throbbing","bound","thunderbolt","dike","cowbell","elect","prodding","lynching","rant","drifter","snot","preservative","brogue","tary","tortoise","lattice","strudel","composite","churn","median","neurosurgeon","mariner","kiln","boarder","ama","petal","friendly","clearinghouse","swastika","filler","enquiry","dispensary","chump","archeologist","rescuer","dy","draftsman","snicker","shakedown","romp","construct","conclave","winery","polarity","breakin","wailing","gurgle","bedroll","commissar","albatross","shading","peal","taverna","chicanery","has-been","waistline","oaf","satirist","faint","myosin","dimple","landfall","fornication","smithy","tough","gunboat","busboy","cassava","poplar","discontinuity","obelisk","blubber","demonstrator","meltdown","abolitionist","thorax","holler","pimple","sending","druggist","indirection","leotard","ken","showman","despot","ombudsman","lyricist","dearie","lumberjack","gaff","pagan","cremation","infarction","sturgeon","publican","bottleneck","chambermaid","pectoral","purser","godsend","whisk","canard","concentrate","copter","shipwreck","laundering","clipper","notepad","jackal","indentation","basilica","adhesive","mermaid","knighthood","personage","omelette","whoosh","embellishment","misgiving","tracer","brawling","crucifixion","steal","transference","sleight","threesome","windowpane","bereavement","viceroy","betrothal","refresher","seagull","jay","needler","discoverer","goiter","caterpillar","impostor","diminutive","cation","playpen","amputation","confidante","dockside","inquisition","chronicler","seamstress","lath","absolutist","cadaver","perusal","subterfuge","self-satisfaction","sawmill","agitator","shortcoming","breakwater","microcomputer","lima","greatcoat","mahout","prima","undress","superstructure","stopgap","moo","bio","fret","pomposity","bough","autocracy","anchorage","samovar","gen","burrow","rosebud","segregationist","mortise","hydrant","postmortem","oversimplification","entryway","paintbrush","rea","balustrade","chuck","trumpeter","ferret","opportunist","pinnace","salamander","transom","mace","individualist","synthesizer","thoroughbred","cupola","tomboy","ensign","bottling","whir","poultice","entranceway","saver","gurdwara","renegotiation","tossing","ruffle","footprint","skeptic","birthmark","tailspin","kickback","chalice","plagiarism","passer","inhumanity","ceremonial","sapling","babysitter","creeper","galleon","bellman","holly","hacienda","cur","transplantation","scab","ballgame","demotion","flimsy","hovel","lug","layup","firefighter","gravestone","nymph","cajole","tickle","boxcar","secession","refractor","somersault","personification","treacle","tutorial","voucher","thimble","stickler","front-runner","paroxysm","exorcism","psalm","infestation","scrubbing","castor","peppermint","orchestration","extremist","oppressor","lode","prompting","watchword","swindle","statehouse","floater","nightdress","bloak","elegy","woodshed","trembling","banning","adornment","redoubt","lightweight","postulate","anti-Semite","tasting","viewscreen","sentinel","nation-state","heft","nurture","villainy","manhunt","invoice","sprig","self-denial","selector","piglet","commemoration","crucible","piper","curtsy","lackey","breastplate","gadfly","octave","epilogue","self-examination","thyroid","apologist","chemise","super","figment","waif","essayist","brewer","miniature","sediment","cannibal","tulip","caramel","caseload","synonym","analogue","ver","shirtwaist","cornerback","insecticide","debauchery","lien","strangulation","intricacy","guesthouse","crumbling","glassware","cachet","thumping","damper","colonist","frolic","ogre","heist","sorting","pawl","muttering","refill","cowl","imbecile","painkiller","garter","creole","overpass","simile","potpourri","piling","predisposition","corsage","mobster","sandal","aphorism","vice-chairman","heartache","converter","pecan","ecologist","substrate","quagmire","trenchcoat","voyce","overstatement","soapbox","rediscovery","effusion","agronomist","firecracker","haunt","murmuring","henhouse","fluctuation","signora","mulberry","hoist","bullfight","discotheque","finder","tureen","hairstyle","dignitary","consummation","spar","pogrom","beeper","read","outboard","sho","skit","impurity","sadist","parafoil","bouncer","spender","locust","boardroom","burnout","inoculation","surfeit","welder","propagandist","mortuary","pessimist","equivalence","juke","spatter","incubator","reproof","gulch","notary","speedometer","lodger","mitt","southpaw","footman","amity","bloodline","cleaver","coffeehouse","confederate","assist","ation","lecher","abrasion","daybed","knit","laddie","forfeit","kebele","filigree","frisbee","cantina","oscillation","countryman","juggler","scion","acrobat","hourglass","realtor","onyx","pettiness","chancellery","footfall","slippage","mandarin","eral","lob","impertinence","providence","dom","idyll","democrat","deferral","sorority","slamming","badger","mutter","ling","strobe","explosive","municipality","crossover","bedstead","spatula","tug-of-war","goon","pauper","lation","sacking","alder","nightstick","salve","infraction","prowler","falsification","pant","drunk","rumbling","ce","minuet","plaything","yelling","kiddie","duction","buttress","carapace","sobbing","insufficiency","prig","bidet","bloodhound","madwoman","buffoon","vignette","doorjamb","caprice","gable","converse","cad","creche","mullah","spectre","spotter","ingenue","chalet","automatic","stash","truckload","tailback","static","productivist","dissipation","haunch","nag","awl","self-delusion","rattler","blacklist","beagle","trapeze","obstinacy","fiddler","theorem","rearrangement","changeover","reassignment","courtesan","fillet","nay","cutout","luncheonette","purveyor","incitement","remarriage","amelioration","executor","buttonhole","duality","churchman","sickroom","farmstead","jester","perfidy","cuticle","weal","snub","pretension","roadbed","furnishing","quickie","workweek","conveyance","pseudopatient","turbocharger","fleece","abbreviation","spigot","leaflet","great-aunt","ninny","beaker","experimenter","validation","inhabitant","grading","cantaloupe","potentiality","flue","commoner","playroom","readjustment","boathouse","vivacity","brakeman","petitioner","singularity","gage","delineation","fester","paratrooper","font","pitchfork","signifier","crossbar","playhouse","tripe","stylus","pacemaker","clustering","hone","runt","emporium","ragtag","aneurysm","trapper","pulley","thrashing","candlestick","checkerboard","swoop","surcoat","dystrophy","bristle","beck","toolbox","hunchback","subcompact","doze","seaway","disclaimer","arbitrator","miller","crackpot","loafer","instigation","sen","bale","skim","skip","dollop","tender","oeuvre","goner","sor","tort","cropland","profundity","caf","zoom","gabardine","quack","cataclysm","condolence","foxhole","circlet","brave","misfit","bivouac","artificiality","dachshund","puke","bagel","sortie","nomad","opal","ethnicity","firebox","ratchet","cud","worsted","squabbling","cheque","jean","avatar","dirge","footstool","velour","barrister","pression","microchip","coda","reappraisal","cess","hangman","centenary","plough","broomstick","headstone","tormentor","sore","rathorn","voyeur","world-view","co-star","warren","fail","deflation","noble","fleck","saleswoman","hap","machinist","waffle","tom","ell","prefab","suckling","guardhouse","sabre","entanglement","integrator","quarterly","paraffin","heifer","frivolity","good","bougainvillea","excommunication","distillation","cyclist","meteorologist","rubric","cul-de-sac","misnomer","phobia","demagogue","bloodletting","raconteur","ger","astrologer","zygote","counterrevolution","reinstatement","anchovy","getup","tryout","scullery","turnstile","cyst","mustang","gaslight","self-deception","emanation","grown-up","escapade","versity","fishery","paprika","grailstone","gurney","fount","holdout","licensee","jackknife","asterisk","still","fundamentalist","humbug","repast","christening","butternut","miniskirt","fortune-teller","spillway","ference","salver","payout","nodule","high","tugboat","gizzard","sympathizer","fibrillation","incompatibility","dodge","trove","mercenary","pigtail","matchbook","masterwork","barb","endeavour","confection","ephor","yarmulke","char","mimeograph","holdover","subtitle","saddlebag","metronome","tine","testicle","caveat","etching","auntie","guarantor","ringer","airman","boatman","carnivore","armband","polder","tryst","lem","sitting-room","barrow","reappearance","pastiche","bankroll","stroller","saxophonist","blanc","redesign","plotting","gruel","juicer","slat","scooter","socialist","gradient","ember","scorecard","remembering","bo","forecaster","flirt","backache","parakeet","pixie","guffaw","anesthetist","logjam","pursuer","physiologist","follicle","coverall","patsy","bunt","lubricant","jawbone","numeral","mourner","rune","bettor","solder","nitrite","rime","pinstripe","pistachio","monocle","equivocation","crystallization","twit","two-year-old","toupee","eyelash","recognizance","cy","sophistry","seesaw","loony","do-gooder","dusting","commonality","yearling","disbarment","self-congratulation","tsar","vagabond","rhinestone","viper","planetoid","crochet","laird","flatland","prompt","catamaran","wigwam","mainframe","shivering","stringer","vane","iniquity","hoodlum","tableware","smelter","overlay","umber","placenta","yew","right-hander","laggard","cornice","philanthropist","scouring","dissenter","mainsail","showplace","conch","sentimentalist","protectorate","sanitarium","truancy","angler","showpiece","carotene","pollutant","diabetic","hairbrush","videodisc","intellectualist","pothole","setter","tense","grader","kneecap","birdbath","dell","typhoid","tuba","torturer","commie","houseboat","revelry","medalist","hinterland","jowl","splotch","sable","mouf","ripoff","coolie","streetlamp","damn","sharecropper","oral","schoolmate","commander-in-chief","capitalization","flex","shtetl","chenille","pullback","pharaoh","claret","fulfilment","glower","remuneration","internationalist","pap","pediment","sonata","toke","co-director","dollhouse","salesgirl","greenback","analog","ofa","freelancer","hairpin","aphasia","kicking","bummer","lawmaker","thickening","juggernaut","comma","sander","claimant","triad","rhizome","prolongation","placer","transvestite","faceplate","shortening","coffle","surfer","greengrocer","roughage","nudist","dumbbell","coiffure","pinky","ex-President","start-up","bobby","sidearm","paean","raiment","conceptualization","surmise","agnostic","cranny","tassel","infarct","pitchman","minor","stationmaster","sublet","puter","dramatization","mounting","washstand","counsellor","penknife","curtailment","remake","millimeter","sextant","vocalist","blowup","walleye","pickax","fanny","ascendant","brushing","highball","bandleader","winning","godmother","horoscope","disequilibrium","run-up","grazer","sandbar","motorbike","hassock","piggy","teat","reprise","wheeling","psychotherapist","calabash","cob","relativist","packer","slayer","digger","banshee","autocrat","knave","muskrat","extinguisher","foreleg","sobriquet","hospice","accretion","mastermind","figurine","newsmagazine","epidemiologist","pic","minaret","dereliction","city-state","jawline","escapist","legation","weatherman","sinker","cabby","guardrail","objector","timepiece","cistern","werewolf","decadent","harlot","epiphany","bricklayer","doorkeeper","obsidian","bedpost","constriction","refectory","blackbird","enforcer","riposte","schmuck","squab","pop-up","handrail","sandbag","superman","underbelly","alarmist","sesame","paratroop","droplet","proclivity","theorizing","quark","tactician","sundae","poolhall","behaviorist","dipper","postmark","co-conspirator","carload","electrocution","mould","goodnight","appendectomy","statuette","coefficient","cornet","scolding","prude","platitude","carport","lilac","geisha","foist","mitigation","percussionist","lechery","wyrm","charlatan","tussle","slough","jamb","twister","lakeshore","scavenger","pinkie","changeling","pinhead","muster","exploring","fief","critter","haystack","skimmer","geyser","stumble","update","tabernacle","gargoyle","projectionist","requisite","suffix","ramrod","betrayer","perience","tance","fluting","flare-up","fatherland","guardianship","douche","good-night","trawler","headsman","stoplight","operetta","spend","hater","teakettle","geneticist","particular","wardroom","slider","deuce","gingham","telethon","acclamation","centrifuge","workstation","pretender","prong","lampshade","ureter","hiccup","acetate","molding","wallop","vagrant","three-star","carafe","blowout","equinox","rave","junior","spoof","confessor","troubleshooter","braggart","judgeship","rapier","landmass","stoic","cuckold","inheritor","forester","jangle","gymnast","wingman","stein","gnome","drumstick","whatnot","yachtsman","realty","glob","by-election","academic","deflection","knocker","wondering","mugging","petit","frosting","pillowcase","panelling","grendel","tribune","tabulation","simulator","whaler","stork","gill","cavalcade","workhorse","locksmith","preppie","henchman","countertop","groundcar","puree","wellspring","debasement","prankster","tration","insert","put-down","typer","chartreuse","crematorium","headpiece","noncom","wipe","drove","sportscaster","impersonator","shrew","twitching","loader","magnolia","dropping","functionary","dissonance","cudgel","forfeiture","glutton","reject","doubleheader","tarp","suburbanite","afghan","chaperone","bas-relief","oscilloscope","imposter","newel","trusteeship","shocker","cannonball","half-breed","woodpecker","tumbleweed","snip","consignment","left-hander","spoil","also-ran","exhalation","signification","tester","ashram","gardenia","deductible","frontline","subtraction","bowstring","upland","bearskin","gramophone","mock-up","serenade","mix-up","extrapolation","tidbit","semaphore","banging","dogwood","carol","mapping","exchanger","ignominy","retraction","videocassette","precept","sirloin","mortification","pagoda","belfry","cubbyhole","mindstone","greyhound","clank","snowbank","instep","sanatorium","savanna","longshoreman","copier","nightshirt","boatyard","brigand","usurpation","understudy","interrelationship","undercarriage","sulphate","quasar","marshmallow","thrush","sweeper","alleviation","feint","chimera","infidel","modifier","perennial","simpleton","gridiron","overlord","airway","binding","abstention","algorithm","amalgamation","ascension","herdsman","lollipop","pastel","laminate","tendril","synopsis","drawstring","intermarriage","restorer","swoon","firefight","civilisation","self-criticism","hanky","ventricle","jot","interferon","circel","avenger","stepson","amethyst","beachhead","loggia","sizzle","burp","watchtower","endearment","dryad","prefect","tong","croissant","blocker","brioche","thistle","sunburst","savor","dumpling","checker","soliloquy","marketer","wheeze","molar","oboe","inbound","masochist","superficiality","tabby","outcrop","deputation","bassist","particularity","strop","thang","doggy","zation","ghoul","domestic","frostbite","relapse","floorboard","clicking","paraphrase","sinkhole","pushcart","overdraft","spinnaker","sourdough","sweatshop","meteorite","lander","caboose","junket","planer","iguana","brouhaha","reaper","sharpshooter","eggshell","self-sacrifice","minnow","skyrocket","connexion","effrontery","oblong","biker","flinch","cog","bullock","retrial","underwriter","gentlewoman","noggin","sissy","collect","dogmatism","sweatsuit","biplane","polariser","server","hiker","electrolyte","thunderclap","bronc","snooze","mascot","sherbet","carillon","decal","womanizer","underground","tailcoat","worshipper","automaton","proscription","sleuth","honeybee","abutment","foller","palladium","partake","jailing","counterfeit","pompadour","moneymaker","acacia","monthly","geographer","doghouse","bludgeon","fitter","conservator","indecency","atoll","fife","acquit","barracuda","mortician","striker","plait","untruth","hoarding","eighteen-wheeler","shakeup","grounder","abuser","hamstring","parishioner","cherub","cubist","antler","kisser","shunt","cravat","admixture","whinny","scorpion","amenity","matchup","spacer","settling","insinuation","possum","tenancy","girder","adapter","mousetrap","cubble","steppe","hypochondriac","covey","whipping","taunt","pocketful","pug","panhandle","conga","citron","foul-up","plaint","nouveau","oilskin","meridian","lifer","bolster","wren","gripe","mountaineer","transceiver","treetop","hex","harrow","tampering","photocopy","redskin","cesspool","barrette","cleanser","missive","breakfront","mini","ridgeline","semi","pasha","byword","phoneme","seducer","miser","cookstove","limerick","cummerbund","labourer","ascot","wraith","tarantula","toffee","pituitary","liana","cleat","line-up","helix","highboy","bicep","partment","coed","expletive","dumpster","deferment","progenitor","sandbox","mignon","typhoon","sublimation","backdoor","alchemist","pacifier","insomniac","hairpiece","lintel","indemnity","blurb","republican","electrocardiogram","futurist","recliner","mote","sketchbook","fulcrum","gratuity","aqueduct","adherent","masque","sundial","template","handmaiden","hedgehog","coding","corsair","solstice","orifice","sonobuoy","prizewinner","spinner","townsman","rosette","mind-set","unkindness","pushover","bility","infielder","hutch","erasure","parallelism","avowal","fastness","broadcloth","hellhole","grandparent","toehold","ident","sleepwalker","watching","aerie","database","mismatch","hombre","scrambler","spoiler","putdown","rookery","spinoff","ringleader","duchy","sealskin","transformer","doggie","bedsheet","cowhide","ceramic","prostration","cheroot","houseboy","giantess","tomcat","speedster","basalt","minicomputer","rapacity","spaceman","in-law","equerry","humpback","academician","harvester","fairground","ream","carat","entreaty","groundswell","obfuscation","provocateur","fugue","denigration","rifleman","manipulator","panting","synod","glitch","nightie","goaltender","kingpin","comforter","anesthetic","klaxon","hijack","orb","hostelry","gladiator","misadventure","bombard","fixity","tanner","stringency","wonderland","x-ray","plainclothesman","roadhouse","travelogue","gasket","nibble","hacking","nude","tincture","receptor","fink","schoolmarm","washtub","homesteader","hacker","portiere","hatbox","tamer","howitzer","grouper","frontage","amoeba","clime","flashback","teamster","accolade","polluter","officeholder","inpatient","altercation","reverberation","coproduction","phosphor","substation","bandana","sapper","preserver","pigeonhole","prefecture","milkman","avocation","argyle","amphetamine","linker","leviathan","hamster","bondsman","comer","bumpkin","sheikh","beefsteak","tyke","discoloration","kingmaker","quotient","excision","whitey","asymmetry","trill","discourtesy","bleat","hatching","crier","creel","seabed","witticism","riser","lurcher","moviemaker","pantsuit","linchpin","deformation","deodorant","soybean","washboard","egotist","underpass","dysfunction","tingling","barstool","paramour","udder","microbe","radiologist","qualm","welt","salesperson","signpost","sepulcher","lumpectomy","slaver","shopgirl","peregrine","siesta","reiteration","profligacy","iodide","iconoclast","rollcall","fillip","oratorio","splat","incoherence","accompanist","motorcar","nunnery","busybody","carryall","nettle","jaguar","pretence","odometer","potentate","mussel","prophetess","monetarist","proach","typescript","hacksaw","broadsword","miter","fatty","terrarium","archangel","powerboat","stooge","cannery","pylon","pulsation","misstep","yucca","hearthstone","rumour","lockout","toboggan","trampoline","concatenation","debility","acorn","forklift","psion","dragonet","ligament","folio","tie-up","picking","swatch","arrowhead","martinet","fisher","quintet","ellipse","sumbitch","legitimation","nightwatch","hardback","schemer","conversationalist","collectivist","reallocation","diorama","cutaway","point-of-view","cattleman","abscess","talc","incubus","dribble","sis","rhododendron","rolling","spiderweb","nonsmoker","crissake","refusenik","save","obstructionist","suture","parenthesis","reefer","great-grandson","steelworker","bumblebee","bullfrog","festivity","embolism","defeatist","tankard","ferryman","garret","co-worker","consonant","copywriter","bookseller","compress","dogfight","embezzler","quiche","liege","dissector","taskmaster","prosthesis","emulsion","spitball","modulation","squint","retelling","baiting","whirr","air-conditioner","individuation","geezer","aspirant","pensioner","re-enactment","flapper","looker","marshland","sexton","adverb","coenzyme","misapprehension","inaccuracy","barmaid","beautician","daredevil","racehorse","oxford","spume","busload","tradesman","manicure","propellant","apothecary","ruffian","titillation","instigator","siting","ringmaster","enumeration","twirl","bookmaker","technocrat","mouth-harp","quaver","icehouse","ventilator","roadster","subpena","carter","comedienne","savannah","milkmaid","pumper","signer","deadbeat","cofounder","bootlegger","tribesman","wildfire","shard","hailstorm","struction","routing","dolmen","idiosyncrasy","poniard","honky-tonk","spendthrift","draftee","hermaphrodite","pinafore","roundabout","frill","redeployment","ophthalmologist","caldron","reinvestment","troubadour","fjord","leave-taking","elongation","clinch","trinket","suasion","neutralist","finalist","whiplash","ventriloquist","violator","monarchist","spanking","grindstone","initiator","standard-bearer","sender","atelier","distemper","ingot","frontiersman","altarpiece","endgame","homily","synapse","pillbox","ochre","scimitar","jubilee","presentiment","tation","aggrandizement","truncheon","damsel","fallibility","papaya","piggyback","puppeteer","workhouse","nightingale","entomologist","wicket","debriefing","logician","moorland","minimalist","matte","skirmishing","tonality","maidservant","yam","gatekeeper","whammy","drudge","angora","garland","manoeuvre","moviegoer","slingshot","titan","re-evaluation","ironwork","ambassadorship","lanch","pollination","riage","vocalization","brawler","shaving","particulate","inhaler","impoundment","surfboard","waterman","almanac","pepperoni","kook","colonnade","infantryman","scruple","functionalist","wisecrack","conscript","boor","bannister","pretzel","analgesic","firebrand","microprocessor","frame-up","guardsman","teetotaler","broad","pallbearer","airframe","wrangle","backboard","knockdown","reparation","poorhouse","milkshake","battlement","dragonfly","paymaster","snuffler","crudeness","nerd","blockhouse","donut","backhoe","principality","dimmer","wounding","collier","beater","footlocker","barkeep","absurdist","brickwork","great-uncle","rumination","appellation","joiner","hydrolysis","interlocutor","raindrop","hardtop","groping","cymbal","miscellany","pomegranate","hearer","abortionist","corncob","shoal","dunce","bellowing","bridgehead","mangrove","blotch","boxwood","briar","which","trickster","epileptic","dependent","encumbrance","claque","pickpocket","half-truth","bilge","overrun","caveman","posterior","derriere","sty","maggot","vibrator","imbecility","hang-up","syllogism","blindfold","sunbeam","chrysanthemum","amour","ne'er-do-well","odour","flowerpot","satrap","reconnoiter","tonsillectomy","clampdown","coliseum","menage","warbler","hubcap","crudity","baseboard","lithograph","homeroom","stanchion","amphitheatre","disquisition","commonplace","feedlot","reprint","shire","kraken","careerist","goatskin","worldview","waddle","washout","doormat","diadem","sniffer","spat","superhighway","snooper","libation","zoologist","subtext","bailiwick","exterminator","popsicle","actuary","cabinetmaker","swami","contraceptive","softener","margarita","hatter","tention","earpiece","dormer","timberland","katun","crooner","one-liner","adjudication","snitch","referent","subset","disavowal","starburst","merchantman","dalliance","polymer","hypnotist","monogram","peerage","claymore","satyr","twerp","matchstick","rubber-stamp","clapper","exhibitionist","warhorse","eatery","seashell","radish","router","dinette","trombonist","rivet","requiem","breakaway","hard-liner","locator","shindig","corrective","truffle","whelp","expediter","savant","mitten","canton","wobble","misinterpretation","fense","headwrap","conciliator","chine","topping","assemblyman","divine","scuffling","boomlet","dervish","yellow-green","stockyard","hummock","trimming","royalist","calumny","vandal","prickle","strikeout","apologia","afterburner","hunker","flippancy","fop","embrasure","hornet","tithe","oilfield","lawman","turnkey","fledgling","coauthor","blowpipe","subjectivist","backstop","fishbowl","bedpan","sedge","protrusion","crybaby","freedman","seminarian","spacesuit","tautology","footstep","fiveyear","stoneware","mance","generalist","quitter","domicile","requisition","seance","cabana","wastrel","underling","looter","glassful","wallow","boater","disharmony","shiksa","herringbone","flyleaf","eyesore","lawnmower","walk-up","hemline","wiggle","posing","whirring","cropper","reappointment","psychodrama","shaver","orthodontist","granary","extrovert","calfskin","thinning","foghorn","trainload","carbide","metier","harpist","minim","ballcarrier","rayon","bursting","flipper","fastening","mullet","exploit","squatter","nullity","commodore","newlywed","eavesdropper","chiropractor","miler","arsonist","wrecker","transmutation","incompetency","subcontractor","tress","meatball","bobcat","distributorship","camcorder","pasty","glimmering","groaning","classicist","stakeout","supplicant","repeater","crackling","cryptographer","croupier","honeycomb","insincerity","inhibitor","mystification","greaser","barker","anthill","barbarity","strangle","myrtle","segmentation","marlin","capon","toenail","flip-flop","auger","blasphemer","dipping","pawnshop","penumbra","mohole","bauble","rube","flophouse","triplicate","sardine","master-mason","fang","brainstorm","derangement","hanker","molestation","smokescreen","cavalryman","edging","layover","signalman","clavicle","crewcut","tricolor","cochairman","liberationist","foreskin","bleacher","semi-circle","quince","flatcar","abattoir","farmboy","tibia","thrum","conformist","southerner","docudrama","whorl","break-up","conglomeration","exhibitor","bramble","cutie","woodchuck","compatriot","stole","tuner","housemother","dharma","femme","teahouse","banquette","bottomland","arranger","philistine","vacillation","chiton","retch","caddie","reissue","teaser","swampland","deejay","libertarian","pegboard","greenhorn","dork","cellmate","jobber","wishbone","millstone","haunting","blow-up","snorkel","snowplow","trespasser","punter","snowflake","snowdrift","gunnysack","surround","evergreen","clog","radioisotope","cougar","pundit","wattle","subgroup","oviduct","mixup","misstatement","sulfite","pansy","splint","counterproposal","pulsar","remove","landau","four-year-old","rebbe","disconnection","neomort","exegesis","meteoroid","meringue","sheepherder","radioman","strumpet","opment","millionth","speakeasy","conformation","cultivator","goof","annual","gazelle","demitasse","fishhook","preferment","homebody","skewer","chancre","sorbet","hologram","rivulet","oldster","prisoner-of-war","tulle","riff","restatement","debit","emplacement","repre","invariance","half-circle","objectivist","passer-by","scarlet","flail","impala","persimmon","purist","gation","burgher","snowman","starling","barony","annulment","lifespan","herder","embolden","swathe","ex-convict","trouper","half-wit","fuchsia","grange","ricochet","stinker","opacity","colander","absorber","armadillo","pleasantry","noncommunist","taxiway","overtone","debater","taillight","advisement","birdcage","baroness","aureole","breakout","colouring","astrophysicist","flatboat","stilt","eyeshade","barbell","deliverer","fishnet","prise","jackrabbit","manifold","chattel","jimmy","workshirt","thornbush","chatty","frisson","recount","patentee","oceanographer","forepaw","murderess","whalebone","frontrunner","cerebrum","jector","militiaman","lobsterman","earthling","clean","swindler","scree","begat","doorsill","housedress","strangler","shantytown","roughhouse","scenarist","foothill","contaminant","hamadryad","phony","fairyland","seascape","treble","prodigality","hobble","gantry","backroom","enticement","sawhorse","interviewee","cliffside","dustpan","scrubber","imbroglio","acquaintanceship","woodworker","aesthete","octogenarian","mauling","archivist","pungency","interweaving","jabber","bassinet","doubler","torte","linkup","outdoorsman","fixer","caddy","fumbling","defile","meristem","microbiologist","urologist","stovepipe","tambourine","constructionist","egomaniac","adjuster","liniment","impiety","timeline","cowgirl","sinecure","chillun","foreword","frat","retary","bagpipe","coif","visualization","colleen","shirtmaker","flounce","adder","riffle","underboss","reinterpretation","bender","seeding","fiver","sicken","decoder","holothete","figuring","stave","earplug","acrylic","epigraph","fairytale","flasher","sally","inkwell","nitwit","hussy","constrictor","stabilizer","stickup","seaplane","shimmy","dredge","updraft","speciality","insulator","frond","storyboard","shill","rafter","blowgun","dukedom","favourite","populist","striper","blowtorch","mallard","licking","poetess","tetracycline","ad-lib","toxicologist","fencer","gnawing","eration","photocell","golem","heirloom","penitence","gence","latecomer","broil","outdistance","howler","canine","replenishment","traditionalist","emcee","eyeglass","billow","eyelet","khaki","assignation","tepee","buccaneer","bellyache","parkland","musicologist","phaeton","spirochete","lanyard","mischance","tobacconist","blusher","castaway","meson","bouillabaisse","scrivener","stinger","life-cycle","harridan","motivator","mooring","crimp","inlay","purveyance","vertical","jackhammer","strongbox","dishpan","cobweb","couturier","chalkboard","basilisk","duckling","penitent","footrest","tangent","facing","peroration","floodlight","nouvelle","truss","sprite","drier","esplanade","banding","insulter","dialog","pincer","battlefront","missal","hayseed","parvenu","baronet","shipwright","whisker","no-hitter","double-dealing","moire","conjurer","rickshaw","crevasse","switchback","nicety","provincialism","novella","liberator","biggie","tune-up","ferryboat","remover","twosome","loveseat","tektite","sharpener","cartwheel","diva","flirting","disproportion","tortilla","rover","whodunit","birder","parley","birdsong","fiefdom","augury","harrier","tamale","judging","snakebite","diagnostician","tannin","qualifier","cheetah","distillery","protester","stockroom","factotum","newswoman","cosmopolitan","iridescence","aeroplane","toddy","co-defendant","parry","duocorn","boasting","elector","clarinetist","undergarment","psych","supergiant","armature","environ","collectivity","keepsake","gunfighter","wingspan","perforation","worshiper","groupie","cityscape","worrier","shipload","scallop","hatchery","portraitist","screamer","blaspheme","pacer","presenter","malcontent","seine","equivalency","scriptwriter","lieve","discard","bantam","centaur","typology","loiter","nigguh","drubbing","airfoil","curio","grandmaster","finisher","luminary","alliteration","phantasy","blooper","fasting","samba","gearbox","islet","apricot","smidgen","inset","firestorm","madcap","seedbed","gunsight","forelock","disjunction","writhing","huckleberry","abstract","squirm","ironist","monosaccharide","pushbutton","terracotta","artiste","showgirl","cornea","temptress","popularization","free-fall","scribbling","conviviality","flange","thwack","droop","rower","sweatband","gopher","mandolin","slobber","stricture","calyx","dietician","rehash","padre","ancient","dotage","jacaranda","pensione","contravention","undulation","ironworker","currant","hankie","face-lift","anthropoid","depressant","war-horse","tithing","greeter","matchbox","woodcutter","magpie","wayfarer","handcuff","lawgiver","traverse","minion","cavalier","sonarman","defoliant","scamp","snowshoe","polyp","gainer","honkie","bottler","halloo","amputee","ontology","bromide","brisket","goodie","tavern-keeper","choker","preaching","molester","tonsure","recapitulation","aviary","stevedore","raffle","bootstrap","angiogram","plantain","tipper","hooting","seismometer","persecutor","lobotomy","pigsty","virologist","gamete","presbytery","stepping-stone","dressing-room","cyclamate","chipmunk","platelet","flogging","tuber","reservist","blinker","demographer","turncoat","demesne","fancier","ideologist","self-justification","bucketful","m'lord","rapping","bestiality","irrelevancy","oiler","mackinaw","flutist","trafficker","categorization","pram","world-system","cathouse","deceiver","idjit","double-take","reformulation","brushfire","separator","neigh","whimpering","crisscross","regurgitation","auteur","backwash","refiner","broadsheet","hedonist","recitative","nonentity","codger","tinting","policymaker","tutu","boondoggle","entrant","wok","small","boatload","searcher","taMing","sycophant","substructure","megalomaniac","rusher","saleslady","registrar","blackguard","neckerchief","oldie","clinician","flushing","pinwheel","dition","charioteer","beastie","stridency","verity","eyedropper","canvass","desperado","teardrop","farmyard","mannerist","macaw","valedictorian","whopper","pertinence","assay","puncher","manse","anatomist","dishtowel","nuke","egalitarian","tribulation","cinematographer","sailer","icicle","legume","spiritualist","nativist","these","progressive","blastocyst","harpooner","pedant","instrumentality","connector","masseur","vertebra","moonshiner","bowsprit","grabber","stele","clanking","renter","antihero","bankbook","jailbird","handicraft","fighter-bomber","streamer","retardant","wallflower","flamethrower","agate","cairn","bantamweight","agglomeration","roustabout","linden","roughneck","formance","moray","cession","rashness","capstone","derailment","declivity","snowfield","talon","haymaker","abductor","diffuser","geosector","camisole"];Object.defineProperty(data,"__esModule",{value:!0});data.nouns=data.adjectives=void 0;const adjectives_1=adjectives;data.adjectives=adjectives_1.default;const nouns_1=nouns;data.nouns=nouns_1.default;const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(__viteBrowserExternal$1);(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.nouns=ne.adjectives=ne.uniqueUsernameGenerator=ne.generateUsername=ne.generateFromEmail=void 0;const oe=data,ce=require$$0$1,ue=(xe,_e)=>{const $e=(0,ce.randomBytes)(4).readUInt32BE(0);return xe+$e%(_e-xe+1)},pe=xe=>{let _e;switch(xe){case 1:_e=Math.floor(ue(1,9)).toString();break;case 2:_e=Math.floor(ue(10,90)).toString();break;case 3:_e=Math.floor(ue(100,900)).toString();break;case 4:_e=Math.floor(ue(1e3,9e3)).toString();break;case 5:_e=Math.floor(ue(1e4,9e4)).toString();break;case 6:_e=Math.floor(ue(1e5,9e5)).toString();break;default:_e="";break}return _e};function me(xe,_e){return xe.replace(/@.+/,"").replace(/[&/\\#,+()$~%._@'":*?<>{}]/g,"")+pe(_e)}ne.generateFromEmail=me;function ge(xe,_e,Se,$e){const Re=oe.nouns[Math.floor(Math.random()*oe.nouns.length)],Ae=$e?$e.replace(/\s{2,}/g," ").replace(/\s/g,xe??"").toLocaleLowerCase():oe.adjectives[Math.floor(Math.random()*oe.adjectives.length)];let Ie;return xe?Ie=Ae+xe+Re+pe(_e):Ie=Ae+Re+pe(_e),Se?Ie.substring(0,Se):Ie}ne.generateUsername=ge;function ye(xe){if(xe.dictionaries){const _e=Ie=>xe.dictionaries[Ie][ue(0,xe.dictionaries[Ie].length-1)],Se=xe.dictionaries.length,$e=xe.separator||"";let Re="";for(let Ie=0;IelodashExports$1.pick(ne,"workspaceMeta");function minimise(ne,oe){var ce;return{UIState:compressUIState(ne),layers:{layers:(ce=oe==null?void 0:oe.layers)==null?void 0:ce.map(ue=>{var me,ge;const pe=getController(ue);return{...ue,source:{type:(me=ue.source)==null?void 0:me.type,...(ge=pe==null?void 0:pe.compress)==null?void 0:ge.call(pe,ue.source)}}})}}}function useWorkspace(){const ne=useSnackbar(),[oe,ce]=useLayers(),[ue,pe]=useUIState(),me=useBusyState("workspace");return reactExports.useMemo(()=>({load:async ge=>{const ye=ge??await r$6({accept:acceptedFormats,strict:!0});return ye&&isWorkspaceFile(ye)?(await me(async()=>{const ve=isCompressedFile(ye)?await decompressBinaryAsync(new Uint8Array(await ye.arrayBuffer())):await ye.text(),xe=await parseYamlAsync(ve);xe&&(ce(()=>xe.layers),pe(()=>xe.UIState))},`Opening workspace (${formatByte(ye.size)})`),!0):!1},save:async(ge,ye)=>{ne("Saving workspace...");const ve=JSON.stringify(minimise(ue,oe)),xe=ye??dist$4.generateUsername("-");if(ge){const _e=`${xe}.workspace.json`;return download(ve,_e,"application/json"),ne("Workspace saved",_e),{name:_e,size:byteLength$1(ve)}}else{const _e=`${xe}.workspace`,Se=await compressBinaryAsync(ve);return download(Se,_e,"application/octet-stream"),ne("Workspace saved",_e),{name:_e,size:Se.byteLength}}},estimateWorkspaceSize:memoizee$1(ge=>sizeOf(minimise(ue,oe))*(ge?1:LZ_COMPRESSION_RATIO))}),[oe,ue])}function isCompressedFile(ne){return ne.name.endsWith(".workspace")}function isWorkspaceFile(ne){return!!lodashExports$1.find(acceptedFormats,oe=>ne.name.endsWith(oe))}function isWorkspace(ne){return!!lodashExports$1.find(acceptedFormats,oe=>ne.endsWith(oe))}const name="Posthoc",version="1.2.4",version_name="1.2.4; early May 2024",repository="https://github.com/ShortestPathLab/posthoc-app",changelog="http://posthoc.pathfinding.ai/blog",docs="https://posthoc.pathfinding.ai/docs/overview",homepage="https://posthoc.pathfinding.ai";function _typeof(ne){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(oe){return typeof oe}:_typeof=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},_typeof(ne)}function _classCallCheck(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function _defineProperties(ne,oe){for(var ce=0;ce"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(ne,oe,ce){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(pe,me,ge){var ye=[null];ye.push.apply(ye,me);var ve=Function.bind.apply(pe,ye),xe=new ve;return ge&&_setPrototypeOf(xe,ge.prototype),xe},_construct.apply(null,arguments)}function _isNativeFunction(ne){return Function.toString.call(ne).indexOf("[native code]")!==-1}function _wrapNativeSuper(ne){var oe=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(ue){if(ue===null||!_isNativeFunction(ue))return ue;if(typeof ue!="function")throw new TypeError("Super expression must either be null or a function");if(typeof oe<"u"){if(oe.has(ue))return oe.get(ue);oe.set(ue,pe)}function pe(){return _construct(ue,arguments,_getPrototypeOf(this).constructor)}return pe.prototype=Object.create(ue.prototype,{constructor:{value:pe,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(pe,ue)},_wrapNativeSuper(ne)}function _assertThisInitialized(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function _possibleConstructorReturn(ne,oe){return oe&&(typeof oe=="object"||typeof oe=="function")?oe:_assertThisInitialized(ne)}function _createSuper(ne){var oe=_isNativeReflectConstruct();return function(){var ue=_getPrototypeOf(ne),pe;if(oe){var me=_getPrototypeOf(this).constructor;pe=Reflect.construct(ue,arguments,me)}else pe=ue.apply(this,arguments);return _possibleConstructorReturn(this,pe)}}function _superPropBase(ne,oe){for(;!Object.prototype.hasOwnProperty.call(ne,oe)&&(ne=_getPrototypeOf(ne),ne!==null););return ne}function _get(ne,oe,ce){return typeof Reflect<"u"&&Reflect.get?_get=Reflect.get:_get=function(pe,me,ge){var ye=_superPropBase(pe,me);if(ye){var ve=Object.getOwnPropertyDescriptor(ye,me);return ve.get?ve.get.call(ge):ve.value}},_get(ne,oe,ce||ne)}function _slicedToArray(ne,oe){return _arrayWithHoles(ne)||_iterableToArrayLimit(ne,oe)||_unsupportedIterableToArray(ne,oe)||_nonIterableRest()}function _toArray(ne){return _arrayWithHoles(ne)||_iterableToArray(ne)||_unsupportedIterableToArray(ne)||_nonIterableRest()}function _arrayWithHoles(ne){if(Array.isArray(ne))return ne}function _iterableToArray(ne){if(typeof Symbol<"u"&&Symbol.iterator in Object(ne))return Array.from(ne)}function _iterableToArrayLimit(ne,oe){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ne)))){var ce=[],ue=!0,pe=!1,me=void 0;try{for(var ge=ne[Symbol.iterator](),ye;!(ue=(ye=ge.next()).done)&&(ce.push(ye.value),!(oe&&ce.length===oe));ue=!0);}catch(ve){pe=!0,me=ve}finally{try{!ue&&ge.return!=null&&ge.return()}finally{if(pe)throw me}}return ce}}function _unsupportedIterableToArray(ne,oe){if(ne){if(typeof ne=="string")return _arrayLikeToArray(ne,oe);var ce=Object.prototype.toString.call(ne).slice(8,-1);if(ce==="Object"&&ne.constructor&&(ce=ne.constructor.name),ce==="Map"||ce==="Set")return Array.from(ne);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return _arrayLikeToArray(ne,oe)}}function _arrayLikeToArray(ne,oe){(oe==null||oe>ne.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce{const ne=document.querySelector("head");return ne||invariant(!1),ne},createStyleEl=ne=>{const oe=document.createElement("style");return ne&&oe.setAttribute("nonce",ne),oe.type="text/css",oe};function useStyleMarshal(ne,oe){const ce=useMemo(()=>getStyles$1(ne),[ne]),ue=reactExports.useRef(null),pe=reactExports.useRef(null),me=useCallback(memoizeOne(Se=>{const $e=pe.current;$e||invariant(!1),$e.textContent=Se}),[]),ge=useCallback(Se=>{const $e=ue.current;$e||invariant(!1),$e.textContent=Se},[]);useLayoutEffect(()=>{!ue.current&&!pe.current||invariant(!1);const Se=createStyleEl(oe),$e=createStyleEl(oe);return ue.current=Se,pe.current=$e,Se.setAttribute(`${prefix$2}-always`,ne),$e.setAttribute(`${prefix$2}-dynamic`,ne),getHead().appendChild(Se),getHead().appendChild($e),ge(ce.always),me(ce.resting),()=>{const Re=Ae=>{const Ie=Ae.current;Ie||invariant(!1),getHead().removeChild(Ie),Ae.current=null};Re(ue),Re(pe)}},[oe,ge,me,ce.always,ce.resting,ne]);const ye=useCallback(()=>me(ce.dragging),[me,ce.dragging]),ve=useCallback(Se=>{if(Se==="DROP"){me(ce.dropAnimating);return}me(ce.userCancel)},[me,ce.dropAnimating,ce.userCancel]),xe=useCallback(()=>{pe.current&&me(ce.resting)},[me,ce.resting]);return useMemo(()=>({dragging:ye,dropping:ve,resting:xe}),[ye,ve,xe])}function querySelectorAll(ne,oe){return Array.from(ne.querySelectorAll(oe))}var getWindowFromEl=ne=>ne&&ne.ownerDocument&&ne.ownerDocument.defaultView?ne.ownerDocument.defaultView:window;function isHtmlElement(ne){return ne instanceof getWindowFromEl(ne).HTMLElement}function findDragHandle(ne,oe){const ce=`[${dragHandle.contextId}="${ne}"]`,ue=querySelectorAll(document,ce);if(!ue.length)return null;const pe=ue.find(me=>me.getAttribute(dragHandle.draggableId)===oe);return!pe||!isHtmlElement(pe)?null:pe}function useFocusMarshal(ne){const oe=reactExports.useRef({}),ce=reactExports.useRef(null),ue=reactExports.useRef(null),pe=reactExports.useRef(!1),me=useCallback(function($e,Re){const Ae={id:$e,focus:Re};return oe.current[$e]=Ae,function(){const ke=oe.current;ke[$e]!==Ae&&delete ke[$e]}},[]),ge=useCallback(function($e){const Re=findDragHandle(ne,$e);Re&&Re!==document.activeElement&&Re.focus()},[ne]),ye=useCallback(function($e,Re){ce.current===$e&&(ce.current=Re)},[]),ve=useCallback(function(){ue.current||pe.current&&(ue.current=requestAnimationFrame(()=>{ue.current=null;const $e=ce.current;$e&&ge($e)}))},[ge]),xe=useCallback(function($e){ce.current=null;const Re=document.activeElement;Re&&Re.getAttribute(dragHandle.draggableId)===$e&&(ce.current=$e)},[]);return useLayoutEffect(()=>(pe.current=!0,function(){pe.current=!1;const $e=ue.current;$e&&cancelAnimationFrame($e)}),[]),useMemo(()=>({register:me,tryRecordFocus:xe,tryRestoreFocusRecorded:ve,tryShiftRecord:ye}),[me,xe,ve,ye])}function createRegistry(){const ne={draggables:{},droppables:{}},oe=[];function ce(Se){return oe.push(Se),function(){const Re=oe.indexOf(Se);Re!==-1&&oe.splice(Re,1)}}function ue(Se){oe.length&&oe.forEach($e=>$e(Se))}function pe(Se){return ne.draggables[Se]||null}function me(Se){const $e=pe(Se);return $e||invariant(!1),$e}const ge={register:Se=>{ne.draggables[Se.descriptor.id]=Se,ue({type:"ADDITION",value:Se})},update:(Se,$e)=>{const Re=ne.draggables[$e.descriptor.id];Re&&Re.uniqueId===Se.uniqueId&&(delete ne.draggables[$e.descriptor.id],ne.draggables[Se.descriptor.id]=Se)},unregister:Se=>{const $e=Se.descriptor.id,Re=pe($e);Re&&Se.uniqueId===Re.uniqueId&&(delete ne.draggables[$e],ne.droppables[Se.descriptor.droppableId]&&ue({type:"REMOVAL",value:Se}))},getById:me,findById:pe,exists:Se=>!!pe(Se),getAllByType:Se=>Object.values(ne.draggables).filter($e=>$e.descriptor.type===Se)};function ye(Se){return ne.droppables[Se]||null}function ve(Se){const $e=ye(Se);return $e||invariant(!1),$e}const xe={register:Se=>{ne.droppables[Se.descriptor.id]=Se},unregister:Se=>{const $e=ye(Se.descriptor.id);$e&&Se.uniqueId===$e.uniqueId&&delete ne.droppables[Se.descriptor.id]},getById:ve,findById:ye,exists:Se=>!!ye(Se),getAllByType:Se=>Object.values(ne.droppables).filter($e=>$e.descriptor.type===Se)};function _e(){ne.draggables={},ne.droppables={},oe.length=0}return{draggable:ge,droppable:xe,subscribe:ce,clean:_e}}function useRegistry(){const ne=useMemo(createRegistry,[]);return reactExports.useEffect(()=>function(){React$2.version.startsWith("16")||React$2.version.startsWith("17")?requestAnimationFrame(ne.clean):ne.clean()},[ne]),ne}var StoreContext=React$2.createContext(null),getBodyElement=()=>{const ne=document.body;return ne||invariant(!1),ne};const visuallyHidden={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var visuallyHidden$1=visuallyHidden;const getId=ne=>`rfd-announcement-${ne}`;function useAnnouncer(ne){const oe=useMemo(()=>getId(ne),[ne]),ce=reactExports.useRef(null);return reactExports.useEffect(function(){const me=document.createElement("div");return ce.current=me,me.id=oe,me.setAttribute("aria-live","assertive"),me.setAttribute("aria-atomic","true"),_extends$2(me.style,visuallyHidden$1),getBodyElement().appendChild(me),function(){setTimeout(function(){const ve=getBodyElement();ve.contains(me)&&ve.removeChild(me),me===ce.current&&(ce.current=null)})}},[oe]),useCallback(pe=>{const me=ce.current;if(me){me.textContent=pe;return}},[])}let count$1=0;const defaults$2={separator:"::"};function useDeprecatedUniqueId(ne,oe=defaults$2){return useMemo(()=>`${ne}${oe.separator}${count$1++}`,[oe.separator,ne])}function useUniqueId(ne,oe=defaults$2){const ce=React$2.useId();return useMemo(()=>`${ne}${oe.separator}${ce}`,[oe.separator,ne,ce])}var useUniqueId$1="useId"in React$2?useUniqueId:useDeprecatedUniqueId;function getElementId({contextId:ne,uniqueId:oe}){return`rfd-hidden-text-${ne}-${oe}`}function useHiddenTextElement({contextId:ne,text:oe}){const ce=useUniqueId$1("hidden-text",{separator:"-"}),ue=useMemo(()=>getElementId({contextId:ne,uniqueId:ce}),[ce,ne]);return reactExports.useEffect(function(){const me=document.createElement("div");return me.id=ue,me.textContent=oe,me.style.display="none",getBodyElement().appendChild(me),function(){const ye=getBodyElement();ye.contains(me)&&ye.removeChild(me)}},[ue,oe]),ue}var AppContext=React$2.createContext(null);function usePrevious(ne){const oe=reactExports.useRef(ne);return reactExports.useEffect(()=>{oe.current=ne}),oe}function create$1(){let ne=null;function oe(){return!!ne}function ce(ge){return ge===ne}function ue(ge){ne&&invariant(!1);const ye={abandon:ge};return ne=ye,ye}function pe(){ne||invariant(!1),ne=null}function me(){ne&&(ne.abandon(),pe())}return{isClaimed:oe,isActive:ce,claim:ue,release:pe,tryAbandon:me}}function isDragging(ne){return ne.phase==="IDLE"||ne.phase==="DROP_ANIMATING"?!1:ne.isDragging}const tab=9,enter=13,escape$1=27,space=32,pageUp=33,pageDown=34,end=35,home=36,arrowLeft=37,arrowUp=38,arrowRight=39,arrowDown=40,preventedKeys={[enter]:!0,[tab]:!0};var preventStandardKeyEvents=ne=>{preventedKeys[ne.keyCode]&&ne.preventDefault()};const supportedEventName=(()=>{const ne="visibilitychange";return typeof document>"u"?ne:[ne,`ms${ne}`,`webkit${ne}`,`moz${ne}`,`o${ne}`].find(ue=>`on${ue}`in document)||ne})();var supportedPageVisibilityEventName=supportedEventName;const primaryButton=0,sloppyClickThreshold=5;function isSloppyClickThresholdExceeded(ne,oe){return Math.abs(oe.x-ne.x)>=sloppyClickThreshold||Math.abs(oe.y-ne.y)>=sloppyClickThreshold}const idle$1={type:"IDLE"};function getCaptureBindings({cancel:ne,completed:oe,getPhase:ce,setPhase:ue}){return[{eventName:"mousemove",fn:pe=>{const{button:me,clientX:ge,clientY:ye}=pe;if(me!==primaryButton)return;const ve={x:ge,y:ye},xe=ce();if(xe.type==="DRAGGING"){pe.preventDefault(),xe.actions.move(ve);return}xe.type!=="PENDING"&&invariant(!1);const _e=xe.point;if(!isSloppyClickThresholdExceeded(_e,ve))return;pe.preventDefault();const Se=xe.actions.fluidLift(ve);ue({type:"DRAGGING",actions:Se})}},{eventName:"mouseup",fn:pe=>{const me=ce();if(me.type!=="DRAGGING"){ne();return}pe.preventDefault(),me.actions.drop({shouldBlockNextClick:!0}),oe()}},{eventName:"mousedown",fn:pe=>{ce().type==="DRAGGING"&&pe.preventDefault(),ne()}},{eventName:"keydown",fn:pe=>{if(ce().type==="PENDING"){ne();return}if(pe.keyCode===escape$1){pe.preventDefault(),ne();return}preventStandardKeyEvents(pe)}},{eventName:"resize",fn:ne},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{ce().type==="PENDING"&&ne()}},{eventName:"webkitmouseforcedown",fn:pe=>{const me=ce();if(me.type==="IDLE"&&invariant(!1),me.actions.shouldRespectForcePress()){ne();return}pe.preventDefault()}},{eventName:supportedPageVisibilityEventName,fn:ne}]}function useMouseSensor(ne){const oe=reactExports.useRef(idle$1),ce=reactExports.useRef(noop$2$1),ue=useMemo(()=>({eventName:"mousedown",fn:function(Se){if(Se.defaultPrevented||Se.button!==primaryButton||Se.ctrlKey||Se.metaKey||Se.shiftKey||Se.altKey)return;const $e=ne.findClosestDraggableId(Se);if(!$e)return;const Re=ne.tryGetLock($e,ge,{sourceEvent:Se});if(!Re)return;Se.preventDefault();const Ae={x:Se.clientX,y:Se.clientY};ce.current(),xe(Re,Ae)}}),[ne]),pe=useMemo(()=>({eventName:"webkitmouseforcewillbegin",fn:_e=>{if(_e.defaultPrevented)return;const Se=ne.findClosestDraggableId(_e);if(!Se)return;const $e=ne.findOptionsForDraggable(Se);$e&&($e.shouldRespectForcePress||ne.canGetLock(Se)&&_e.preventDefault())}}),[ne]),me=useCallback(function(){const Se={passive:!1,capture:!0};ce.current=bindEvents(window,[pe,ue],Se)},[pe,ue]),ge=useCallback(()=>{oe.current.type!=="IDLE"&&(oe.current=idle$1,ce.current(),me())},[me]),ye=useCallback(()=>{const _e=oe.current;ge(),_e.type==="DRAGGING"&&_e.actions.cancel({shouldBlockNextClick:!0}),_e.type==="PENDING"&&_e.actions.abort()},[ge]),ve=useCallback(function(){const Se={capture:!0,passive:!1},$e=getCaptureBindings({cancel:ye,completed:ge,getPhase:()=>oe.current,setPhase:Re=>{oe.current=Re}});ce.current=bindEvents(window,$e,Se)},[ye,ge]),xe=useCallback(function(Se,$e){oe.current.type!=="IDLE"&&invariant(!1),oe.current={type:"PENDING",point:$e,actions:Se},ve()},[ve]);useLayoutEffect(function(){return me(),function(){ce.current()}},[me])}function noop$1$1(){}const scrollJumpKeys={[pageDown]:!0,[pageUp]:!0,[home]:!0,[end]:!0};function getDraggingBindings(ne,oe){function ce(){oe(),ne.cancel()}function ue(){oe(),ne.drop()}return[{eventName:"keydown",fn:pe=>{if(pe.keyCode===escape$1){pe.preventDefault(),ce();return}if(pe.keyCode===space){pe.preventDefault(),ue();return}if(pe.keyCode===arrowDown){pe.preventDefault(),ne.moveDown();return}if(pe.keyCode===arrowUp){pe.preventDefault(),ne.moveUp();return}if(pe.keyCode===arrowRight){pe.preventDefault(),ne.moveRight();return}if(pe.keyCode===arrowLeft){pe.preventDefault(),ne.moveLeft();return}if(scrollJumpKeys[pe.keyCode]){pe.preventDefault();return}preventStandardKeyEvents(pe)}},{eventName:"mousedown",fn:ce},{eventName:"mouseup",fn:ce},{eventName:"click",fn:ce},{eventName:"touchstart",fn:ce},{eventName:"resize",fn:ce},{eventName:"wheel",fn:ce,options:{passive:!0}},{eventName:supportedPageVisibilityEventName,fn:ce}]}function useKeyboardSensor(ne){const oe=reactExports.useRef(noop$1$1),ce=useMemo(()=>({eventName:"keydown",fn:function(me){if(me.defaultPrevented||me.keyCode!==space)return;const ge=ne.findClosestDraggableId(me);if(!ge)return;const ye=ne.tryGetLock(ge,_e,{sourceEvent:me});if(!ye)return;me.preventDefault();let ve=!0;const xe=ye.snapLift();oe.current();function _e(){ve||invariant(!1),ve=!1,oe.current(),ue()}oe.current=bindEvents(window,getDraggingBindings(xe,_e),{capture:!0,passive:!1})}}),[ne]),ue=useCallback(function(){const me={passive:!1,capture:!0};oe.current=bindEvents(window,[ce],me)},[ce]);useLayoutEffect(function(){return ue(),function(){oe.current()}},[ue])}const idle={type:"IDLE"},timeForLongPress=120,forcePressThreshold=.15;function getWindowBindings({cancel:ne,getPhase:oe}){return[{eventName:"orientationchange",fn:ne},{eventName:"resize",fn:ne},{eventName:"contextmenu",fn:ce=>{ce.preventDefault()}},{eventName:"keydown",fn:ce=>{if(oe().type!=="DRAGGING"){ne();return}ce.keyCode===escape$1&&ce.preventDefault(),ne()}},{eventName:supportedPageVisibilityEventName,fn:ne}]}function getHandleBindings({cancel:ne,completed:oe,getPhase:ce}){return[{eventName:"touchmove",options:{capture:!1},fn:ue=>{const pe=ce();if(pe.type!=="DRAGGING"){ne();return}pe.hasMoved=!0;const{clientX:me,clientY:ge}=ue.touches[0],ye={x:me,y:ge};ue.preventDefault(),pe.actions.move(ye)}},{eventName:"touchend",fn:ue=>{const pe=ce();if(pe.type!=="DRAGGING"){ne();return}ue.preventDefault(),pe.actions.drop({shouldBlockNextClick:!0}),oe()}},{eventName:"touchcancel",fn:ue=>{if(ce().type!=="DRAGGING"){ne();return}ue.preventDefault(),ne()}},{eventName:"touchforcechange",fn:ue=>{const pe=ce();pe.type==="IDLE"&&invariant(!1);const me=ue.touches[0];if(!me||!(me.force>=forcePressThreshold))return;const ye=pe.actions.shouldRespectForcePress();if(pe.type==="PENDING"){ye&&ne();return}if(ye){if(pe.hasMoved){ue.preventDefault();return}ne();return}ue.preventDefault()}},{eventName:supportedPageVisibilityEventName,fn:ne}]}function useTouchSensor(ne){const oe=reactExports.useRef(idle),ce=reactExports.useRef(noop$2$1),ue=useCallback(function(){return oe.current},[]),pe=useCallback(function(Re){oe.current=Re},[]),me=useMemo(()=>({eventName:"touchstart",fn:function(Re){if(Re.defaultPrevented)return;const Ae=ne.findClosestDraggableId(Re);if(!Ae)return;const Ie=ne.tryGetLock(Ae,ye,{sourceEvent:Re});if(!Ie)return;const ke=Re.touches[0],{clientX:Be,clientY:Ne}=ke,Fe={x:Be,y:Ne};ce.current(),Se(Ie,Fe)}}),[ne]),ge=useCallback(function(){const Re={capture:!0,passive:!1};ce.current=bindEvents(window,[me],Re)},[me]),ye=useCallback(()=>{const $e=oe.current;$e.type!=="IDLE"&&($e.type==="PENDING"&&clearTimeout($e.longPressTimerId),pe(idle),ce.current(),ge())},[ge,pe]),ve=useCallback(()=>{const $e=oe.current;ye(),$e.type==="DRAGGING"&&$e.actions.cancel({shouldBlockNextClick:!0}),$e.type==="PENDING"&&$e.actions.abort()},[ye]),xe=useCallback(function(){const Re={capture:!0,passive:!1},Ae={cancel:ve,completed:ye,getPhase:ue},Ie=bindEvents(window,getHandleBindings(Ae),Re),ke=bindEvents(window,getWindowBindings(Ae),Re);ce.current=function(){Ie(),ke()}},[ve,ue,ye]),_e=useCallback(function(){const Re=ue();Re.type!=="PENDING"&&invariant(!1);const Ae=Re.actions.fluidLift(Re.point);pe({type:"DRAGGING",actions:Ae,hasMoved:!1})},[ue,pe]),Se=useCallback(function(Re,Ae){ue().type!=="IDLE"&&invariant(!1);const Ie=setTimeout(_e,timeForLongPress);pe({type:"PENDING",point:Ae,actions:Re,longPressTimerId:Ie}),xe()},[xe,ue,pe,_e]);useLayoutEffect(function(){return ge(),function(){ce.current();const Ae=ue();Ae.type==="PENDING"&&(clearTimeout(Ae.longPressTimerId),pe(idle))}},[ue,ge,pe]),useLayoutEffect(function(){return bindEvents(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const interactiveTagNames=["input","button","textarea","select","option","optgroup","video","audio"];function isAnInteractiveElement(ne,oe){if(oe==null)return!1;if(interactiveTagNames.includes(oe.tagName.toLowerCase()))return!0;const ue=oe.getAttribute("contenteditable");return ue==="true"||ue===""?!0:oe===ne?!1:isAnInteractiveElement(ne,oe.parentElement)}function isEventInInteractiveElement(ne,oe){const ce=oe.target;return isHtmlElement(ce)?isAnInteractiveElement(ne,ce):!1}var getBorderBoxCenterPosition=ne=>getRect(ne.getBoundingClientRect()).center;function isElement$1(ne){return ne instanceof getWindowFromEl(ne).Element}const supportedMatchesName=(()=>{const ne="matches";return typeof document>"u"?ne:[ne,"msMatchesSelector","webkitMatchesSelector"].find(ue=>ue in Element.prototype)||ne})();function closestPonyfill(ne,oe){return ne==null?null:ne[supportedMatchesName](oe)?ne:closestPonyfill(ne.parentElement,oe)}function closest(ne,oe){return ne.closest?ne.closest(oe):closestPonyfill(ne,oe)}function getSelector(ne){return`[${dragHandle.contextId}="${ne}"]`}function findClosestDragHandleFromEvent(ne,oe){const ce=oe.target;if(!isElement$1(ce))return null;const ue=getSelector(ne),pe=closest(ce,ue);return!pe||!isHtmlElement(pe)?null:pe}function tryGetClosestDraggableIdFromEvent(ne,oe){const ce=findClosestDragHandleFromEvent(ne,oe);return ce?ce.getAttribute(dragHandle.draggableId):null}function findDraggable(ne,oe){const ce=`[${draggable.contextId}="${ne}"]`,pe=querySelectorAll(document,ce).find(me=>me.getAttribute(draggable.id)===oe);return!pe||!isHtmlElement(pe)?null:pe}function preventDefault(ne){ne.preventDefault()}function isActive({expected:ne,phase:oe,isLockActive:ce,shouldWarn:ue}){return!(!ce()||ne!==oe)}function canStart({lockAPI:ne,store:oe,registry:ce,draggableId:ue}){if(ne.isClaimed())return!1;const pe=ce.draggable.findById(ue);return!(!pe||!pe.options.isEnabled||!canStartDrag(oe.getState(),ue))}function tryStart({lockAPI:ne,contextId:oe,store:ce,registry:ue,draggableId:pe,forceSensorStop:me,sourceEvent:ge}){if(!canStart({lockAPI:ne,store:ce,registry:ue,draggableId:pe}))return null;const ve=ue.draggable.getById(pe),xe=findDraggable(oe,ve.descriptor.id);if(!xe||ge&&!ve.options.canDragInteractiveElements&&isEventInInteractiveElement(xe,ge))return null;const _e=ne.claim(me||noop$2$1);let Se="PRE_DRAG";function $e(){return ve.options.shouldRespectForcePress}function Re(){return ne.isActive(_e)}function Ae(We,qe){isActive({expected:We,phase:Se,isLockActive:Re,shouldWarn:!0})&&ce.dispatch(qe())}const Ie=Ae.bind(null,"DRAGGING");function ke(We){function qe(){ne.release(),Se="COMPLETED"}Se!=="PRE_DRAG"&&(qe(),invariant(!1)),ce.dispatch(lift$1(We.liftActionArgs)),Se="DRAGGING";function ze(Ge,Ze={shouldBlockNextClick:!1}){if(We.cleanup(),Ze.shouldBlockNextClick){const Dt=bindEvents(window,[{eventName:"click",fn:preventDefault,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(Dt)}qe(),ce.dispatch(drop$1({reason:Ge}))}return{isActive:()=>isActive({expected:"DRAGGING",phase:Se,isLockActive:Re,shouldWarn:!1}),shouldRespectForcePress:$e,drop:Ge=>ze("DROP",Ge),cancel:Ge=>ze("CANCEL",Ge),...We.actions}}function Be(We){const qe=rafSchd$1(Ge=>{Ie(()=>move({client:Ge}))});return{...ke({liftActionArgs:{id:pe,clientSelection:We,movementMode:"FLUID"},cleanup:()=>qe.cancel(),actions:{move:qe}}),move:qe}}function Ne(){const We={moveUp:()=>Ie(moveUp),moveRight:()=>Ie(moveRight),moveDown:()=>Ie(moveDown),moveLeft:()=>Ie(moveLeft)};return ke({liftActionArgs:{id:pe,clientSelection:getBorderBoxCenterPosition(xe),movementMode:"SNAP"},cleanup:noop$2$1,actions:We})}function Fe(){isActive({expected:"PRE_DRAG",phase:Se,isLockActive:Re,shouldWarn:!0})&&ne.release()}return{isActive:()=>isActive({expected:"PRE_DRAG",phase:Se,isLockActive:Re,shouldWarn:!1}),shouldRespectForcePress:$e,fluidLift:Be,snapLift:Ne,abort:Fe}}const defaultSensors=[useMouseSensor,useKeyboardSensor,useTouchSensor];function useSensorMarshal({contextId:ne,store:oe,registry:ce,customSensors:ue,enableDefaultSensors:pe}){const me=[...pe?defaultSensors:[],...ue||[]],ge=reactExports.useState(()=>create$1())[0],ye=useCallback(function(ke,Be){isDragging(ke)&&!isDragging(Be)&&ge.tryAbandon()},[ge]);useLayoutEffect(function(){let ke=oe.getState();return oe.subscribe(()=>{const Ne=oe.getState();ye(ke,Ne),ke=Ne})},[ge,oe,ye]),useLayoutEffect(()=>ge.tryAbandon,[ge.tryAbandon]);const ve=useCallback(Ie=>canStart({lockAPI:ge,registry:ce,store:oe,draggableId:Ie}),[ge,ce,oe]),xe=useCallback((Ie,ke,Be)=>tryStart({lockAPI:ge,registry:ce,contextId:ne,store:oe,draggableId:Ie,forceSensorStop:ke||null,sourceEvent:Be&&Be.sourceEvent?Be.sourceEvent:null}),[ne,ge,ce,oe]),_e=useCallback(Ie=>tryGetClosestDraggableIdFromEvent(ne,Ie),[ne]),Se=useCallback(Ie=>{const ke=ce.draggable.findById(Ie);return ke?ke.options:null},[ce.draggable]),$e=useCallback(function(){ge.isClaimed()&&(ge.tryAbandon(),oe.getState().phase!=="IDLE"&&oe.dispatch(flush()))},[ge,oe]),Re=useCallback(()=>ge.isClaimed(),[ge]),Ae=useMemo(()=>({canGetLock:ve,tryGetLock:xe,findClosestDraggableId:_e,findOptionsForDraggable:Se,tryReleaseLock:$e,isLockClaimed:Re}),[ve,xe,_e,Se,$e,Re]);for(let Ie=0;Ie({onBeforeCapture:oe=>{const ce=()=>{ne.onBeforeCapture&&ne.onBeforeCapture(oe)};React$2.version.startsWith("16")||React$2.version.startsWith("17")?ce():reactDomExports.flushSync(ce)},onBeforeDragStart:ne.onBeforeDragStart,onDragStart:ne.onDragStart,onDragEnd:ne.onDragEnd,onDragUpdate:ne.onDragUpdate}),createAutoScrollerOptions=ne=>({...defaultAutoScrollerOptions,...ne.autoScrollerOptions,durationDampening:{...defaultAutoScrollerOptions.durationDampening,...ne.autoScrollerOptions}});function getStore(ne){return ne.current||invariant(!1),ne.current}function App$1(ne){const{contextId:oe,setCallbacks:ce,sensors:ue,nonce:pe,dragHandleUsageInstructions:me}=ne,ge=reactExports.useRef(null),ye=usePrevious(ne),ve=useCallback(()=>createResponders(ye.current),[ye]),xe=useCallback(()=>createAutoScrollerOptions(ye.current),[ye]),_e=useAnnouncer(oe),Se=useHiddenTextElement({contextId:oe,text:me}),$e=useStyleMarshal(oe,pe),Re=useCallback(Dt=>{getStore(ge).dispatch(Dt)},[]),Ae=useMemo(()=>bindActionCreators$1({publishWhileDragging,updateDroppableScroll,updateDroppableIsEnabled,updateDroppableIsCombineEnabled,collectionStarting},Re),[Re]),Ie=useRegistry(),ke=useMemo(()=>createDimensionMarshal(Ie,Ae),[Ie,Ae]),Be=useMemo(()=>createAutoScroller({scrollWindow,scrollDroppable:ke.scrollDroppable,getAutoScrollerOptions:xe,...bindActionCreators$1({move},Re)}),[ke.scrollDroppable,Re,xe]),Ne=useFocusMarshal(oe),Fe=useMemo(()=>createStore({announce:_e,autoScroller:Be,dimensionMarshal:ke,focusMarshal:Ne,getResponders:ve,styleMarshal:$e}),[_e,Be,ke,Ne,ve,$e]);ge.current=Fe;const Ue=useCallback(()=>{const Dt=getStore(ge);Dt.getState().phase!=="IDLE"&&Dt.dispatch(flush())},[]),We=useCallback(()=>{const Dt=getStore(ge).getState();return Dt.phase==="DROP_ANIMATING"?!0:Dt.phase==="IDLE"?!1:Dt.isDragging},[]),qe=useMemo(()=>({isDragging:We,tryAbort:Ue}),[We,Ue]);ce(qe);const ze=useCallback(Dt=>canStartDrag(getStore(ge).getState(),Dt),[]),Ge=useCallback(()=>isMovementAllowed(getStore(ge).getState()),[]),Ze=useMemo(()=>({marshal:ke,focus:Ne,contextId:oe,canLift:ze,isMovementAllowed:Ge,dragHandleUsageInstructionsId:Se,registry:Ie}),[oe,ke,Se,Ne,ze,Ge,Ie]);return useSensorMarshal({contextId:oe,store:Fe,registry:Ie,customSensors:ue||null,enableDefaultSensors:ne.enableDefaultSensors!==!1}),reactExports.useEffect(()=>Ue,[Ue]),React$2.createElement(AppContext.Provider,{value:Ze},React$2.createElement(Provider,{context:StoreContext,store:Fe},ne.children))}let count=0;function useDeprecatedUniqueContextId(){return useMemo(()=>`${count++}`,[])}function useUniqueContextId(){return React$2.useId()}var useUniqueContextId$1="useId"in React$2?useUniqueContextId:useDeprecatedUniqueContextId;function DragDropContext(ne){const oe=useUniqueContextId$1(),ce=ne.dragHandleUsageInstructions||preset$1.dragHandleUsageInstructions;return React$2.createElement(ErrorBoundary$1,null,ue=>React$2.createElement(App$1,{nonce:ne.nonce,contextId:oe,setCallbacks:ue,dragHandleUsageInstructions:ce,enableDefaultSensors:ne.enableDefaultSensors,sensors:ne.sensors,onBeforeCapture:ne.onBeforeCapture,onBeforeDragStart:ne.onBeforeDragStart,onDragStart:ne.onDragStart,onDragUpdate:ne.onDragUpdate,onDragEnd:ne.onDragEnd,autoScrollerOptions:ne.autoScrollerOptions},ne.children))}const zIndexOptions={dragging:5e3,dropAnimating:4500},getDraggingTransition=(ne,oe)=>oe?transitions.drop(oe.duration):ne?transitions.snap:transitions.fluid,getDraggingOpacity=(ne,oe)=>{if(ne)return oe?combine$1.opacity.drop:combine$1.opacity.combining},getShouldDraggingAnimate=ne=>ne.forceShouldAnimate!=null?ne.forceShouldAnimate:ne.mode==="SNAP";function getDraggingStyle(ne){const ce=ne.dimension.client,{offset:ue,combineWith:pe,dropping:me}=ne,ge=!!pe,ye=getShouldDraggingAnimate(ne),ve=!!me,xe=ve?transforms.drop(ue,ge):transforms.moveTo(ue);return{position:"fixed",top:ce.marginBox.top,left:ce.marginBox.left,boxSizing:"border-box",width:ce.borderBox.width,height:ce.borderBox.height,transition:getDraggingTransition(ye,me),transform:xe,opacity:getDraggingOpacity(ge,ve),zIndex:ve?zIndexOptions.dropAnimating:zIndexOptions.dragging,pointerEvents:"none"}}function getSecondaryStyle(ne){return{transform:transforms.moveTo(ne.offset),transition:ne.shouldAnimateDisplacement?void 0:"none"}}function getStyle$1(ne){return ne.type==="DRAGGING"?getDraggingStyle(ne):getSecondaryStyle(ne)}function getDimension$1(ne,oe,ce=origin){const ue=window.getComputedStyle(oe),pe=oe.getBoundingClientRect(),me=calculateBox(pe,ue),ge=withScroll(me,ce),ye={client:me,tagName:oe.tagName.toLowerCase(),display:ue.display},ve={x:me.marginBox.width,y:me.marginBox.height};return{descriptor:ne,placeholder:ye,displaceBy:ve,client:me,page:ge}}function useDraggablePublisher(ne){const oe=useUniqueId$1("draggable"),{descriptor:ce,registry:ue,getDraggableRef:pe,canDragInteractiveElements:me,shouldRespectForcePress:ge,isEnabled:ye}=ne,ve=useMemo(()=>({canDragInteractiveElements:me,shouldRespectForcePress:ge,isEnabled:ye}),[me,ye,ge]),xe=useCallback(Re=>{const Ae=pe();return Ae||invariant(!1),getDimension$1(ce,Ae,Re)},[ce,pe]),_e=useMemo(()=>({uniqueId:oe,descriptor:ce,options:ve,getDimension:xe}),[ce,xe,ve,oe]),Se=reactExports.useRef(_e),$e=reactExports.useRef(!0);useLayoutEffect(()=>(ue.draggable.register(Se.current),()=>ue.draggable.unregister(Se.current)),[ue.draggable]),useLayoutEffect(()=>{if($e.current){$e.current=!1;return}const Re=Se.current;Se.current=_e,ue.draggable.update(_e,Re)},[_e,ue.draggable])}var DroppableContext=React$2.createContext(null);function useRequiredContext(ne){const oe=reactExports.useContext(ne);return oe||invariant(!1),oe}function preventHtml5Dnd(ne){ne.preventDefault()}const Draggable=ne=>{const oe=reactExports.useRef(null),ce=useCallback((qe=null)=>{oe.current=qe},[]),ue=useCallback(()=>oe.current,[]),{contextId:pe,dragHandleUsageInstructionsId:me,registry:ge}=useRequiredContext(AppContext),{type:ye,droppableId:ve}=useRequiredContext(DroppableContext),xe=useMemo(()=>({id:ne.draggableId,index:ne.index,type:ye,droppableId:ve}),[ne.draggableId,ne.index,ye,ve]),{children:_e,draggableId:Se,isEnabled:$e,shouldRespectForcePress:Re,canDragInteractiveElements:Ae,isClone:Ie,mapped:ke,dropAnimationFinished:Be}=ne;if(!Ie){const qe=useMemo(()=>({descriptor:xe,registry:ge,getDraggableRef:ue,canDragInteractiveElements:Ae,shouldRespectForcePress:Re,isEnabled:$e}),[xe,ge,ue,Ae,Re,$e]);useDraggablePublisher(qe)}const Ne=useMemo(()=>$e?{tabIndex:0,role:"button","aria-describedby":me,"data-rfd-drag-handle-draggable-id":Se,"data-rfd-drag-handle-context-id":pe,draggable:!1,onDragStart:preventHtml5Dnd}:null,[pe,me,Se,$e]),Fe=useCallback(qe=>{ke.type==="DRAGGING"&&ke.dropping&&qe.propertyName==="transform"&&(React$2.version.startsWith("16")||React$2.version.startsWith("17")?Be():reactDomExports.flushSync(Be))},[Be,ke]),Ue=useMemo(()=>{const qe=getStyle$1(ke),ze=ke.type==="DRAGGING"&&ke.dropping?Fe:void 0;return{innerRef:ce,draggableProps:{"data-rfd-draggable-context-id":pe,"data-rfd-draggable-id":Se,style:qe,onTransitionEnd:ze},dragHandleProps:Ne}},[pe,Ne,Se,ke,Fe,ce]),We=useMemo(()=>({draggableId:xe.id,type:xe.type,source:{index:xe.index,droppableId:xe.droppableId}}),[xe.droppableId,xe.id,xe.index,xe.type]);return React$2.createElement(React$2.Fragment,null,_e(Ue,ke.snapshot,We))};var Draggable$1=Draggable,isStrictEqual=(ne,oe)=>ne===oe,whatIsDraggedOverFromResult=ne=>{const{combine:oe,destination:ce}=ne;return ce?ce.droppableId:oe?oe.droppableId:null};const getCombineWithFromResult=ne=>ne.combine?ne.combine.draggableId:null,getCombineWithFromImpact=ne=>ne.at&&ne.at.type==="COMBINE"?ne.at.combine.draggableId:null;function getDraggableSelector(){const ne=memoizeOne((pe,me)=>({x:pe,y:me})),oe=memoizeOne((pe,me,ge=null,ye=null,ve=null)=>({isDragging:!0,isClone:me,isDropAnimating:!!ve,dropAnimation:ve,mode:pe,draggingOver:ge,combineWith:ye,combineTargetFor:null})),ce=memoizeOne((pe,me,ge,ye,ve=null,xe=null,_e=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:ve,combineWith:xe,mode:me,offset:pe,dimension:ge,forceShouldAnimate:_e,snapshot:oe(me,ye,ve,xe,null)}}));return(pe,me)=>{if(isDragging(pe)){if(pe.critical.draggable.id!==me.draggableId)return null;const ge=pe.current.client.offset,ye=pe.dimensions.draggables[me.draggableId],ve=whatIsDraggedOver(pe.impact),xe=getCombineWithFromImpact(pe.impact),_e=pe.forceShouldAnimate;return ce(ne(ge.x,ge.y),pe.movementMode,ye,me.isClone,ve,xe,_e)}if(pe.phase==="DROP_ANIMATING"){const ge=pe.completed;if(ge.result.draggableId!==me.draggableId)return null;const ye=me.isClone,ve=pe.dimensions.draggables[me.draggableId],xe=ge.result,_e=xe.mode,Se=whatIsDraggedOverFromResult(xe),$e=getCombineWithFromResult(xe),Ae={duration:pe.dropDuration,curve:curves$1.drop,moveTo:pe.newHomeClientOffset,opacity:$e?combine$1.opacity.drop:null,scale:$e?combine$1.scale.drop:null};return{mapped:{type:"DRAGGING",offset:pe.newHomeClientOffset,dimension:ve,dropping:Ae,draggingOver:Se,combineWith:$e,mode:_e,forceShouldAnimate:null,snapshot:oe(_e,ye,Se,$e,Ae)}}}return null}}function getSecondarySnapshot(ne=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:ne,combineWith:null}}const atRest={mapped:{type:"SECONDARY",offset:origin,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:getSecondarySnapshot(null)}};function getSecondarySelector(){const ne=memoizeOne((ge,ye)=>({x:ge,y:ye})),oe=memoizeOne(getSecondarySnapshot),ce=memoizeOne((ge,ye=null,ve)=>({mapped:{type:"SECONDARY",offset:ge,combineTargetFor:ye,shouldAnimateDisplacement:ve,snapshot:oe(ye)}})),ue=ge=>ge?ce(origin,ge,!0):null,pe=(ge,ye,ve,xe)=>{const _e=ve.displaced.visible[ge],Se=!!(xe.inVirtualList&&xe.effected[ge]),$e=tryGetCombine(ve),Re=$e&&$e.draggableId===ge?ye:null;if(!_e){if(!Se)return ue(Re);if(ve.displaced.invisible[ge])return null;const ke=negate(xe.displacedBy.point),Be=ne(ke.x,ke.y);return ce(Be,Re,!0)}if(Se)return ue(Re);const Ae=ve.displacedBy.point,Ie=ne(Ae.x,Ae.y);return ce(Ie,Re,_e.shouldAnimate)};return(ge,ye)=>{if(isDragging(ge))return ge.critical.draggable.id===ye.draggableId?null:pe(ye.draggableId,ge.critical.draggable.id,ge.impact,ge.afterCritical);if(ge.phase==="DROP_ANIMATING"){const ve=ge.completed;return ve.result.draggableId===ye.draggableId?null:pe(ye.draggableId,ve.result.draggableId,ve.impact,ve.afterCritical)}return null}}const makeMapStateToProps$1=()=>{const ne=getDraggableSelector(),oe=getSecondarySelector();return(ue,pe)=>ne(ue,pe)||oe(ue,pe)||atRest},mapDispatchToProps$1={dropAnimationFinished},ConnectedDraggable=connect$1(makeMapStateToProps$1,mapDispatchToProps$1,null,{context:StoreContext,areStatePropsEqual:isStrictEqual})(Draggable$1);var ConnectedDraggable$1=ConnectedDraggable;function PrivateDraggable(ne){return useRequiredContext(DroppableContext).isUsingCloneFor===ne.draggableId&&!ne.isClone?null:React$2.createElement(ConnectedDraggable$1,ne)}function PublicDraggable(ne){const oe=typeof ne.isDragDisabled=="boolean"?!ne.isDragDisabled:!0,ce=!!ne.disableInteractiveElementBlocking,ue=!!ne.shouldRespectForcePress;return React$2.createElement(PrivateDraggable,_extends$2({},ne,{isClone:!1,isEnabled:oe,canDragInteractiveElements:ce,shouldRespectForcePress:ue}))}const isEqual=ne=>oe=>ne===oe,isScroll=isEqual("scroll"),isAuto=isEqual("auto"),isEither=(ne,oe)=>oe(ne.overflowX)||oe(ne.overflowY),isElementScrollable=ne=>{const oe=window.getComputedStyle(ne),ce={overflowX:oe.overflowX,overflowY:oe.overflowY};return isEither(ce,isScroll)||isEither(ce,isAuto)},isBodyScrollable=()=>!1,getClosestScrollable=ne=>ne==null?null:ne===document.body?isBodyScrollable()?ne:null:ne===document.documentElement?null:isElementScrollable(ne)?ne:getClosestScrollable(ne.parentElement);var getScroll=ne=>({x:ne.scrollLeft,y:ne.scrollTop});const getIsFixed=ne=>ne?window.getComputedStyle(ne).position==="fixed"?!0:getIsFixed(ne.parentElement):!1;var getEnv=ne=>{const oe=getClosestScrollable(ne),ce=getIsFixed(ne);return{closestScrollable:oe,isFixedOnPage:ce}},getDroppableDimension=({descriptor:ne,isEnabled:oe,isCombineEnabled:ce,isFixedOnPage:ue,direction:pe,client:me,page:ge,closest:ye})=>{const ve=(()=>{if(!ye)return null;const{scrollSize:$e,client:Re}=ye,Ae=getMaxScroll({scrollHeight:$e.scrollHeight,scrollWidth:$e.scrollWidth,height:Re.paddingBox.height,width:Re.paddingBox.width});return{pageMarginBox:ye.page.marginBox,frameClient:Re,scrollSize:$e,shouldClipSubject:ye.shouldClipSubject,scroll:{initial:ye.scroll,current:ye.scroll,max:Ae,diff:{value:origin,displacement:origin}}}})(),xe=pe==="vertical"?vertical:horizontal,_e=getSubject({page:ge,withPlaceholder:null,axis:xe,frame:ve});return{descriptor:ne,isCombineEnabled:ce,isFixedOnPage:ue,axis:xe,isEnabled:oe,client:me,page:ge,frame:ve,subject:_e}};const getClient=(ne,oe)=>{const ce=getBox(ne);if(!oe||ne!==oe)return ce;const ue=ce.paddingBox.top-oe.scrollTop,pe=ce.paddingBox.left-oe.scrollLeft,me=ue+oe.scrollHeight,ge=pe+oe.scrollWidth,ve=expand({top:ue,right:ge,bottom:me,left:pe},ce.border);return createBox({borderBox:ve,margin:ce.margin,border:ce.border,padding:ce.padding})};var getDimension=({ref:ne,descriptor:oe,env:ce,windowScroll:ue,direction:pe,isDropDisabled:me,isCombineEnabled:ge,shouldClipSubject:ye})=>{const ve=ce.closestScrollable,xe=getClient(ne,ve),_e=withScroll(xe,ue),Se=(()=>{if(!ve)return null;const Re=getBox(ve),Ae={scrollHeight:ve.scrollHeight,scrollWidth:ve.scrollWidth};return{client:Re,page:withScroll(Re,ue),scroll:getScroll(ve),scrollSize:Ae,shouldClipSubject:ye}})();return getDroppableDimension({descriptor:oe,isEnabled:!me,isCombineEnabled:ge,isFixedOnPage:ce.isFixedOnPage,direction:pe,client:xe,page:_e,closest:Se})};const immediate={passive:!1},delayed={passive:!0};var getListenerOptions=ne=>ne.shouldPublishImmediately?immediate:delayed;const getClosestScrollableFromDrag=ne=>ne&&ne.env.closestScrollable||null;function useDroppablePublisher(ne){const oe=reactExports.useRef(null),ce=useRequiredContext(AppContext),ue=useUniqueId$1("droppable"),{registry:pe,marshal:me}=ce,ge=usePrevious(ne),ye=useMemo(()=>({id:ne.droppableId,type:ne.type,mode:ne.mode}),[ne.droppableId,ne.mode,ne.type]),ve=reactExports.useRef(ye),xe=useMemo(()=>memoizeOne((Ue,We)=>{oe.current||invariant(!1);const qe={x:Ue,y:We};me.updateDroppableScroll(ye.id,qe)}),[ye.id,me]),_e=useCallback(()=>{const Ue=oe.current;return!Ue||!Ue.env.closestScrollable?origin:getScroll(Ue.env.closestScrollable)},[]),Se=useCallback(()=>{const Ue=_e();xe(Ue.x,Ue.y)},[_e,xe]),$e=useMemo(()=>rafSchd$1(Se),[Se]),Re=useCallback(()=>{const Ue=oe.current,We=getClosestScrollableFromDrag(Ue);if(Ue&&We||invariant(!1),Ue.scrollOptions.shouldPublishImmediately){Se();return}$e()},[$e,Se]),Ae=useCallback((Ue,We)=>{oe.current&&invariant(!1);const qe=ge.current,ze=qe.getDroppableRef();ze||invariant(!1);const Ge=getEnv(ze),Ze={ref:ze,descriptor:ye,env:Ge,scrollOptions:We};oe.current=Ze;const Dt=getDimension({ref:ze,descriptor:ye,env:Ge,windowScroll:Ue,direction:qe.direction,isDropDisabled:qe.isDropDisabled,isCombineEnabled:qe.isCombineEnabled,shouldClipSubject:!qe.ignoreContainerClipping}),Je=Ge.closestScrollable;return Je&&(Je.setAttribute(scrollContainer.contextId,ce.contextId),Je.addEventListener("scroll",Re,getListenerOptions(Ze.scrollOptions))),Dt},[ce.contextId,ye,Re,ge]),Ie=useCallback(()=>{const Ue=oe.current,We=getClosestScrollableFromDrag(Ue);return Ue&&We||invariant(!1),getScroll(We)},[]),ke=useCallback(()=>{const Ue=oe.current;Ue||invariant(!1);const We=getClosestScrollableFromDrag(Ue);oe.current=null,We&&($e.cancel(),We.removeAttribute(scrollContainer.contextId),We.removeEventListener("scroll",Re,getListenerOptions(Ue.scrollOptions)))},[Re,$e]),Be=useCallback(Ue=>{const We=oe.current;We||invariant(!1);const qe=getClosestScrollableFromDrag(We);qe||invariant(!1),qe.scrollTop+=Ue.y,qe.scrollLeft+=Ue.x},[]),Ne=useMemo(()=>({getDimensionAndWatchScroll:Ae,getScrollWhileDragging:Ie,dragStopped:ke,scroll:Be}),[ke,Ae,Ie,Be]),Fe=useMemo(()=>({uniqueId:ue,descriptor:ye,callbacks:Ne}),[Ne,ye,ue]);useLayoutEffect(()=>(ve.current=Fe.descriptor,pe.droppable.register(Fe),()=>{oe.current&&ke(),pe.droppable.unregister(Fe)}),[Ne,ye,ke,Fe,me,pe.droppable]),useLayoutEffect(()=>{oe.current&&me.updateDroppableIsEnabled(ve.current.id,!ne.isDropDisabled)},[ne.isDropDisabled,me]),useLayoutEffect(()=>{oe.current&&me.updateDroppableIsCombineEnabled(ve.current.id,ne.isCombineEnabled)},[ne.isCombineEnabled,me])}function noop$6(){}const empty$2={width:0,height:0,margin:noSpacing},getSize=({isAnimatingOpenOnMount:ne,placeholder:oe,animate:ce})=>ne||ce==="close"?empty$2:{height:oe.client.borderBox.height,width:oe.client.borderBox.width,margin:oe.client.margin},getStyle=({isAnimatingOpenOnMount:ne,placeholder:oe,animate:ce})=>{const ue=getSize({isAnimatingOpenOnMount:ne,placeholder:oe,animate:ce});return{display:oe.display,boxSizing:"border-box",width:ue.width,height:ue.height,marginTop:ue.margin.top,marginRight:ue.margin.right,marginBottom:ue.margin.bottom,marginLeft:ue.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:ce!=="none"?transitions.placeholder:null}},Placeholder=ne=>{const oe=reactExports.useRef(null),ce=useCallback(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),{animate:ue,onTransitionEnd:pe,onClose:me,contextId:ge}=ne,[ye,ve]=reactExports.useState(ne.animate==="open");reactExports.useEffect(()=>ye?ue!=="open"?(ce(),ve(!1),noop$6):oe.current?noop$6:(oe.current=setTimeout(()=>{oe.current=null,ve(!1)}),ce):noop$6,[ue,ye,ce]);const xe=useCallback(Se=>{Se.propertyName==="height"&&(pe(),ue==="close"&&me())},[ue,me,pe]),_e=getStyle({isAnimatingOpenOnMount:ye,animate:ne.animate,placeholder:ne.placeholder});return React$2.createElement(ne.placeholder.tagName,{style:_e,"data-rfd-placeholder-context-id":ge,onTransitionEnd:xe,ref:ne.innerRef})};var Placeholder$1=React$2.memo(Placeholder);class AnimateInOut extends React$2.PureComponent{constructor(...oe){super(...oe),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(oe,ce){return oe.shouldAnimate?oe.on?{isVisible:!0,data:oe.on,animate:"open"}:ce.isVisible?{isVisible:!0,data:ce.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!oe.on,data:oe.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const oe={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(oe)}}const Droppable=ne=>{const oe=reactExports.useContext(AppContext);oe||invariant(!1);const{contextId:ce,isMovementAllowed:ue}=oe,pe=reactExports.useRef(null),me=reactExports.useRef(null),{children:ge,droppableId:ye,type:ve,mode:xe,direction:_e,ignoreContainerClipping:Se,isDropDisabled:$e,isCombineEnabled:Re,snapshot:Ae,useClone:Ie,updateViewportMaxScroll:ke,getContainerForClone:Be}=ne,Ne=useCallback(()=>pe.current,[]),Fe=useCallback((Je=null)=>{pe.current=Je},[]);useCallback(()=>me.current,[]);const Ue=useCallback((Je=null)=>{me.current=Je},[]),We=useCallback(()=>{ue()&&ke({maxScroll:getMaxWindowScroll()})},[ue,ke]);useDroppablePublisher({droppableId:ye,type:ve,mode:xe,direction:_e,isDropDisabled:$e,isCombineEnabled:Re,ignoreContainerClipping:Se,getDroppableRef:Ne});const qe=useMemo(()=>React$2.createElement(AnimateInOut,{on:ne.placeholder,shouldAnimate:ne.shouldAnimatePlaceholder},({onClose:Je,data:Ut,animate:jt})=>React$2.createElement(Placeholder$1,{placeholder:Ut,onClose:Je,innerRef:Ue,animate:jt,contextId:ce,onTransitionEnd:We})),[ce,We,ne.placeholder,ne.shouldAnimatePlaceholder,Ue]),ze=useMemo(()=>({innerRef:Fe,placeholder:qe,droppableProps:{"data-rfd-droppable-id":ye,"data-rfd-droppable-context-id":ce}}),[ce,ye,qe,Fe]),Ge=Ie?Ie.dragging.draggableId:null,Ze=useMemo(()=>({droppableId:ye,type:ve,isUsingCloneFor:Ge}),[ye,Ge,ve]);function Dt(){if(!Ie)return null;const{dragging:Je,render:Ut}=Ie,jt=React$2.createElement(PrivateDraggable,{draggableId:Je.draggableId,index:Je.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Ke,an)=>Ut(Ke,an,Je));return ReactDOM$1.createPortal(jt,Be())}return React$2.createElement(DroppableContext.Provider,{value:Ze},ge(ze,Ae),Dt())};var Droppable$1=Droppable;function getBody(){return document.body||invariant(!1),document.body}const defaultProps={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:getBody},attachDefaultPropsToOwnProps=ne=>{let oe={...ne},ce;for(ce in defaultProps)ne[ce]===void 0&&(oe={...oe,[ce]:defaultProps[ce]});return oe},isMatchingType=(ne,oe)=>ne===oe.droppable.type,getDraggable=(ne,oe)=>oe.draggables[ne.draggable.id],makeMapStateToProps=()=>{const ne={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},oe={...ne,shouldAnimatePlaceholder:!1},ce=memoizeOne(me=>({draggableId:me.id,type:me.type,source:{index:me.index,droppableId:me.droppableId}})),ue=memoizeOne((me,ge,ye,ve,xe,_e)=>{const Se=xe.descriptor.id;if(xe.descriptor.droppableId===me){const Ae=_e?{render:_e,dragging:ce(xe.descriptor)}:null,Ie={isDraggingOver:ye,draggingOverWith:ye?Se:null,draggingFromThisWith:Se,isUsingPlaceholder:!0};return{placeholder:xe.placeholder,shouldAnimatePlaceholder:!1,snapshot:Ie,useClone:Ae}}if(!ge)return oe;if(!ve)return ne;const Re={isDraggingOver:ye,draggingOverWith:Se,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:xe.placeholder,shouldAnimatePlaceholder:!0,snapshot:Re,useClone:null}});return(me,ge)=>{const ye=attachDefaultPropsToOwnProps(ge),ve=ye.droppableId,xe=ye.type,_e=!ye.isDropDisabled,Se=ye.renderClone;if(isDragging(me)){const $e=me.critical;if(!isMatchingType(xe,$e))return oe;const Re=getDraggable($e,me.dimensions),Ae=whatIsDraggedOver(me.impact)===ve;return ue(ve,_e,Ae,Ae,Re,Se)}if(me.phase==="DROP_ANIMATING"){const $e=me.completed;if(!isMatchingType(xe,$e.critical))return oe;const Re=getDraggable($e.critical,me.dimensions);return ue(ve,_e,whatIsDraggedOverFromResult($e.result)===ve,whatIsDraggedOver($e.impact)===ve,Re,Se)}if(me.phase==="IDLE"&&me.completed&&!me.shouldFlush){const $e=me.completed;if(!isMatchingType(xe,$e.critical))return oe;const Re=whatIsDraggedOver($e.impact)===ve,Ae=!!($e.impact.at&&$e.impact.at.type==="COMBINE"),Ie=$e.critical.droppable.id===ve;return Re?Ae?ne:oe:Ie?ne:oe}return oe}},mapDispatchToProps={updateViewportMaxScroll},ConnectedDroppable=connect$1(makeMapStateToProps,mapDispatchToProps,(ne,oe,ce)=>({...attachDefaultPropsToOwnProps(ce),...ne,...oe}),{context:StoreContext,areStatePropsEqual:isStrictEqual})(Droppable$1);var ConnectedDroppable$1=ConnectedDroppable;const DefaultListEditorInput=reactExports.forwardRef(function({onValueChange:oe,...ce},ue){return jsxRuntimeExports.jsx(InputBase$1,{fullWidth:!0,...ce,placeholder:"Untitled item",inputRef:ue})});function useInitialRender(){const ne=reactExports.useRef(!1),oe=ne.current;return ne.current=!0,!oe}const defaultEditorRenderer=({handle:ne,content:oe,extras:ce})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ne,oe,ce]});function ListEditorField({toggleable:ne,deletable:oe,editable:ce=!0,onChangeItem:ue=()=>{},onDeleteItem:pe=()=>{},extras:me,enabled:ge=!1,editor:ye=jsxRuntimeExports.jsx(DefaultListEditorInput,{}),value:ve,id:xe,i:_e=0,autoFocus:Se,sortable:$e,button:Re=!0,renderEditor:Ae=defaultEditorRenderer}){const Ie=useAcrylic(),ke=usePaper(),[Be,Ne]=reactExports.useState(null),Fe=Re?ButtonBase$1:Box$1;return jsxRuntimeExports.jsx(PublicDraggable,{index:_e,draggableId:`${xe}`,children:(Ue,We)=>jsxRuntimeExports.jsx("div",{ref:Ue.innerRef,...Ue.draggableProps,children:jsxRuntimeExports.jsx(Stack$1,{direction:"row",alignItems:"center",sx:{...Re?{transition:qe=>qe.transitions.create("background"),"&:hover":{background:qe=>qe.palette.action.hover}}:void 0,...We.isDragging?{...ke(1),...Ie}:void 0},children:Ae==null?void 0:Ae({value:ve,onValueChange:qe=>ue(xe??_e,qe,ge),handle:$e&&jsxRuntimeExports.jsx(Flex,{...Ue.dragHandleProps,color:"text.secondary",sx:{flex:0,p:2},children:jsxRuntimeExports.jsx(DragHandleOutlined,{})}),content:jsxRuntimeExports.jsx(Fe,{sx:{flex:1,display:"block",textAlign:"left",px:2},children:reactExports.cloneElement(ye,{onDelete:()=>pe(xe??_e),autoFocus:Se,value:ve,key:xe??_e,onValueChange:qe=>ue(xe??_e,qe,ge),onChange:qe=>ue(xe??_e,qe.target.value,ge),ref:qe=>Ne(qe)})}),extras:jsxRuntimeExports.jsxs(Flex,{sx:{flex:0,px:1},children:[ne&&jsxRuntimeExports.jsx(Switch$2,{color:"primary",edge:"end",onChange:(qe,ze)=>ue(xe??_e,ve,ze),checked:ge}),ce&&jsxRuntimeExports.jsx(IconButton$1,{edge:"end",onClick:()=>{Be!=null&&Be.focus&&Be.focus()},children:jsxRuntimeExports.jsx(EditIcon,{})}),oe&&jsxRuntimeExports.jsx(IconButton$1,{onClick:()=>pe(xe??_e),sx:{color:qe=>qe.palette.text.secondary},children:jsxRuntimeExports.jsx(DeleteIcon,{})}),me&&me(ve)]})})})})})}function reorder(ne,oe,ce){const ue=Array.from(ne),[pe]=ue.splice(oe,1);return ue.splice(ce,0,pe),ue}function Editor(ne){const{addItemLabel:oe="Add Item",UNSAFE_label:ce,UNSAFE_text:ue,onAddItem:pe=()=>{},onDeleteItem:me=()=>{},items:ge=[],placeholder:ye,autoFocus:ve,category:xe,order:_e,onChange:Se,addItemExtras:$e,addable:Re=!0}=ne,Ae=usePaper(),Ie=useInitialRender(),ke=useTheme$1(),[Be,Ne]=reactExports.useState(ge),[Fe,Ue]=reactExports.useState(-1);reactExports.useEffect(()=>{const Ge=setTimeout(()=>{Ne(ge)},ke.transitions.duration.standard);return()=>{clearTimeout(Ge)}},[ge,Ne,ke.transitions.duration.standard]);const We=lodashExports$1.uniqBy([...Be,...ge],Ge=>Ge.id).map(Ge=>ge.find(Ze=>Ge.id===Ze.id)??Ge).map((Ge,Ze)=>{const{enabled:Dt,editor:Je,value:Ut,id:jt}=Ge??{};return{value:Ut,render:Ke=>jsxRuntimeExports.jsx(Collapse$1,{in:!!ge.find(an=>an.id===Ge.id),unmountOnExit:!0,appear:!Ie,mountOnEnter:!0,children:jsxRuntimeExports.jsx(ListEditorField,{...ne,onDeleteItem:an=>{me(an),Ue(-1)},enabled:Dt,editor:Je,value:Ut,id:jt,i:Ze,autoFocus:ve||Ze===Fe,...Ke})}),key:jt,in:!!ge.find(Ke=>Ke.id===Ge.id)}}),qe=lodashExports$1.sortBy(We,Ge=>xe==null?void 0:xe(Ge.value),Ge=>_e==null?void 0:_e(Ge.value)).map(Ge=>({...Ge,render:Ze=>jsxRuntimeExports.jsx(Box$1,{children:Ge.render(Ze)},Ge.key)}));return jsxRuntimeExports.jsx(DragDropContext,{onDragEnd:Ge=>{if(!Ge.destination)return;const Ze=reorder(ge,Ge.source.index,Ge.destination.index);Se==null||Se(Ze),Ne(Ze)},children:jsxRuntimeExports.jsxs(List$2,{subheader:ce||ue?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ListSubheader$1,{disableSticky:!0,children:[ce&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",gutterBottom:!0,color:"textPrimary",children:ce}),ue&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",gutterBottom:!0,style:{marginBottom:ke.spacing(3)},children:ue})]})}):void 0,children:[jsxRuntimeExports.jsx(Box$1,{mt:xe?-1:0,children:jsxRuntimeExports.jsx(ConnectedDroppable$1,{droppableId:"list",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!0,children:Ge=>jsxRuntimeExports.jsxs("div",{...Ge.droppableProps,ref:Ge.innerRef,children:[(()=>{const Ze=[];return qe.forEach((Dt,Je)=>{xe&&ze(qe,Je,Dt)&&Ze.push(jsxRuntimeExports.jsx(Collapse$1,{in:ge.some(Ut=>xe(Ut.value)===xe(Dt.value)),appear:!0,children:jsxRuntimeExports.jsx(Box$1,{pl:2,pb:2,pt:1,children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:xe(Dt.value)})})},xe(Dt.value))),Ze.push(Dt.render())}),Ze})(),Ge.placeholder]})})}),jsxRuntimeExports.jsx(Collapse$1,{in:!(ge!=null&&ge.length),children:jsxRuntimeExports.jsx(Box$1,{ml:2,mb:1,pt:xe?1:0,children:jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",children:ye??"No items"})})}),jsxRuntimeExports.jsxs(Stack$1,{p:2,pt:2,gap:2,direction:"row",children:[Re&&jsxRuntimeExports.jsx(Button$2,{disableElevation:!0,variant:"outlined",startIcon:jsxRuntimeExports.jsx(Add,{}),onClick:()=>{pe(),Ue(ge.length)},sx:{...Ae(1)},children:jsxRuntimeExports.jsx(Box$1,{sx:{color:"text.primary",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:oe})}),$e]})]})});function ze(Ge,Ze,Dt){return!!(xe&&(Ge[Ze-1]===void 0||xe(Ge[Ze-1].value)!==xe(Dt.value)))}}function ListEditor({onChange:ne,value:oe,editor:ce,create:ue,onFocus:pe,...me}){const[ge,ye]=reactExports.useState(oe??[]);function ve(xe){ye(xe),ne==null||ne(xe)}return reactExports.useEffect(()=>{ye(oe??[])},[oe]),jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Editor,{deletable:!0,editable:!1,...me,items:ge.map(xe=>({id:xe.key,value:xe,editor:ce==null?void 0:ce(xe)})),onAddItem:()=>{const xe=nanoid$1();ve==null||ve([...ge,{key:xe,...ue==null?void 0:ue()}]),lodashExports$1.defer(()=>pe==null?void 0:pe(xe))},onDeleteItem:xe=>ve==null?void 0:ve(lodashExports$1.filter(ge,_e=>_e.key!==xe)),onChangeItem:(xe,_e)=>ve==null?void 0:ve(lodashExports$1.map(ge,Se=>Se.key===xe?_e:Se)),onChange:xe=>ve==null?void 0:ve(lodashExports$1.map(xe,_e=>_e.value))})})}const comparators=[{key:"equal",apply:({value:ne,reference:oe})=>ne===oe,needsReference:!0},{key:"less-than",apply:({value:ne,reference:oe})=>nene>oe,needsReference:!0},{key:"changed",apply:({value:ne,property:oe,step:ce,node:ue})=>{if(ue.parent){const pe=lodashExports$1.findLast(ue.parent.events,me=>me.step({value:ye,label:lodashExports$1.startCase(ye)})),onChange:ye=>ue({type:ye==="any"?void 0:ye}),value:ne.type??"any"}),jsxRuntimeExports.jsx(Divider$1,{flexItem:!0,orientation:"vertical",sx:{mx:2}}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Property",sx:{minWidth:140,textOverflow:"ellipsis",whiteSpace:"nowrap"},items:lodashExports$1.map(ce,ye=>({value:ye,label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[lodashExports$1.last(ye.split(".")),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Type$2,{color:"text.secondary",variant:"body2",component:"span",children:`$.${ye}`})]})})),onChange:ye=>ue({property:ye}),value:ne.property}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Condition",items:comparators.map(ye=>({value:ye.key,label:lodashExports$1.startCase(ye.key)})),value:((pe=ne.condition)==null?void 0:pe.key)??((me=comparators==null?void 0:comparators[0])==null?void 0:me.key),onChange:ye=>ue({condition:lodashExports$1.find(comparators,{key:ye})})}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(TextField$1,{label:"Reference",fullWidth:!0,defaultValue:`${ne.reference??0}`,variant:"filled",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},onChange:ye=>ue({reference:+ye.target.value}),type:"number",disabled:!((ge=ne.condition)!=null&&ge.needsReference)}),jsxRuntimeExports.jsx(Space,{sx:{px:2}}),jsxRuntimeExports.jsx(Switch,{checked:!!ne.active,onChange:(ye,ve)=>ue({active:ve}),sx:{mr:-4}})]})}function BreakpointListEditor({layer:ne}){var ge,ye,ve;const{layer:oe,setLayer:ce}=useLayer(ne),{breakpoints:ue}=(oe==null?void 0:oe.source)??{};function pe(xe){oe&&ce(produce(oe,_e=>lodashExports$1.set(_e,"source.breakpoints",xe)))}const me=reactExports.useMemo(()=>{var xe,_e,Se;return lodashExports$1.chain((Se=(_e=(xe=oe==null?void 0:oe.source)==null?void 0:xe.trace)==null?void 0:_e.content)==null?void 0:Se.events).flatMap(lodashExports$1.keys).uniq().filter($e=>$e!=="type").value()},[(ve=(ye=(ge=oe==null?void 0:oe.source)==null?void 0:ge.trace)==null?void 0:ye.content)==null?void 0:ve.events]);return jsxRuntimeExports.jsx(Box$1,{sx:{overflow:"auto hidden",width:"100%"},children:jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsx(Box$1,{sx:{minWidth:720,mb:2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,button:!1,icon:null,value:ue,deletable:!0,editable:!1,editor:xe=>jsxRuntimeExports.jsx(BreakpointEditor,{value:xe,properties:me}),create:()=>({active:!0,property:me==null?void 0:me[0],condition:comparators==null?void 0:comparators[0],type:void 0,reference:0}),onChange:xe=>pe(xe),addItemLabel:"Breakpoint",placeholder:"Get started by adding a breakpoint."})})})})}const stepsLayerGuard$1=ne=>!!getController(ne).steps,divider$3=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1,height:ne=>ne.spacing(3),alignSelf:"auto"}});function DebugPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),[me,ge]=reactExports.useState("standard"),{key:ye,setKey:ve,layers:xe,layer:_e,setLayer:Se,allLayers:$e}=useLayer(void 0,stepsLayerGuard$1),{code:Re}=(_e==null?void 0:_e.source)??{};function Ae(Ie){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:Ie})}return jsxRuntimeExports.jsx(TabContext,{value:me,children:jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"debug"}),jsxRuntimeExports.jsx(ne.Title,{children:"Debugger"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:ye,items:lodashExports$1.map($e,Ie=>({id:Ie.key,hidden:!lodashExports$1.find(xe,{key:Ie.key}),name:inferLayerName(Ie)})),onChange:ve,arrow:!0,ellipsis:12}),divider$3,jsxRuntimeExports.jsxs(TabList$1,{onChange:(Ie,ke)=>ge(ke),children:[jsxRuntimeExports.jsx(Tab$1,{label:"Standard",value:"standard",disabled:!_e}),jsxRuntimeExports.jsx(Tab$1,{label:"Advanced",value:"advanced",disabled:!_e})]})]}),jsxRuntimeExports.jsx(ne.Content,{children:_e?jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsxs(Box$1,{pt:6,height:"100%",children:[jsxRuntimeExports.jsx(TabPanel$1,{value:"standard",sx:{p:2},children:jsxRuntimeExports.jsxs(Box$1,{mx:-2,children:[jsxRuntimeExports.jsx(Box$1,{px:2,children:Ae("Breakpoints")}),jsxRuntimeExports.jsx(BreakpointListEditor,{layer:_e==null?void 0:_e.key})]})}),jsxRuntimeExports.jsx(TabPanel$1,{value:"advanced",sx:{p:0,height:"100%"},children:jsxRuntimeExports.jsx(TrustedContent,{children:jsxRuntimeExports.jsx(ScriptEditor,{code:Re??makeTemplate(lodashExports$1.values(templates)),onChange:Ie=>_e&&Se(produce(_e,ke=>lodashExports$1.set(ke,"source.code",Ie)))})})})]})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(DebuggerIcon,{}),label:"Debugger",secondary:"Configure breakpoints and other debugging options here. First, you'll need to load a trace."})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})})}const scriptRel="modulepreload",assetsURL=function(ne,oe){return new URL(ne,oe).href},seen={},__vitePreload=function(oe,ce,ue){if(!ce||ce.length===0)return oe();const pe=document.getElementsByTagName("link");return Promise.all(ce.map(me=>{if(me=assetsURL(me,ue),me in seen)return;seen[me]=!0;const ge=me.endsWith(".css"),ye=ge?'[rel="stylesheet"]':"";if(!!ue)for(let _e=pe.length-1;_e>=0;_e--){const Se=pe[_e];if(Se.href===me&&(!ge||Se.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${me}"]${ye}`))return;const xe=document.createElement("link");if(xe.rel=ge?"stylesheet":scriptRel,ge||(xe.as="script",xe.crossOrigin=""),xe.href=me,document.head.appendChild(xe),ge)return new Promise((_e,Se)=>{xe.addEventListener("load",_e),xe.addEventListener("error",()=>Se(new Error(`Unable to preload CSS for ${me}`)))})})).then(()=>oe()).catch(me=>{const ge=new Event("vite:preloadError",{cancelable:!0});if(ge.payload=me,window.dispatchEvent(ge),!ge.defaultPrevented)throw me})},EXCLUDED_NAMES=["PropTypes"],getSlotProps=(ne,oe)=>reactExports.Children.toArray(ne).reduce((ce,ue)=>{if(reactExports.isValidElement(ue)){const pe=ue.type.displayName;ce[pe]=ue.props}return ce},{}),getCleanChildren=(ne,oe)=>{const ce=reactExports.Children.toArray(ne).filter(ue=>{if(reactExports.isValidElement(ue)){const pe=ue.type.displayName;return!(oe!=null&&oe.includes(pe))}return!0});return ce.length>0?ce:void 0},isComponentName=ne=>typeof ne=="string"&&!EXCLUDED_NAMES.includes(ne)&&ne.match(/^[A-Z0-9]/),createResultComponent=ne=>reactExports.memo(ce=>{const{children:ue,propagateSlotProps:pe,slotKeys:me=[],...ge}=ce,ye=reactExports.useMemo(()=>getSlotProps(ue),[me,ue]),ve=reactExports.useMemo(()=>getCleanChildren(ue,me),[me,ue]),xe=reactExports.useMemo(()=>({...ge,slotProps:{...pe,...ye}}),[ge,ye,pe]);return reactExports.createElement(ne,xe,ve)}),withSlots=ne=>{const oe=reactExports.memo(createResultComponent(ne));return oe.displayName=`WithSlots(${ne.displayName||ne.name})`,new Proxy(oe,{get(ue,pe,me){var ve;if(pe in ue||typeof pe=="symbol"||!isComponentName(pe))return Reflect.get(ue,pe,me);const ge=((ve=Reflect.get(ue,"defaultProps"))==null?void 0:ve.slotKeys)||[];if(!Reflect.get(ue,pe)){const xe=()=>null;xe.displayName=pe,Reflect.set(ue,pe,xe)}return Reflect.set(ue,"defaultProps",{...ue.defaultProps,slotKeys:[...ge,pe]}),Reflect.get(ue,pe,me)}})};function wait(ne){return new Promise(oe=>lodashExports$1.delay(oe,ne))}async function timed(ne,oe=2500){const ce=lodashExports$1.now();return{result:await Promise.any([ne(),wait(oe)]),delta:lodashExports$1.now()-ce}}const FullscreenModalContext=reactExports.createContext({});function useFullscreenModalContext(){return reactExports.useContext(FullscreenModalContext)}const FullscreenPage=withSlots(({slotProps:ne})=>{var ue,pe,me,ge;const oe=useSmallDisplay(),ce=useAcrylic();return jsxRuntimeExports.jsxs(Stack$1,{sx:{height:oe?"calc(100% - 56px)":"100%",minHeight:"70dvh"},children:[!!((ue=ne.Options)!=null&&ue.children)&&jsxRuntimeExports.jsx(Stack$1,{sx:{minHeight:ye=>ye.spacing(6),flex:0},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{p:0,zIndex:1,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:oe?0:6,...ce,background:ye=>`linear-gradient(to bottom, ${ye.palette.background.paper}, ${alpha$1(ye.palette.background.paper,.75)})`},children:[jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsx(Flex,{sx:{width:"max-content",height:ye=>ye.spacing(6),alignItems:"center",p:1},children:((pe=ne.Options)==null?void 0:pe.children)&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne.Options.children})})}),(me=ne.Extras)==null?void 0:me.children]})}),jsxRuntimeExports.jsx(Box$1,{sx:{bgcolor:"background.paper",mt:-6,flex:1,position:"relative"},children:jsxRuntimeExports.jsx(Scroll,{y:!0,style:{height:"100%",position:"absolute"},children:(ge=ne.Content)==null?void 0:ge.children})})]})});function FullscreenModalHost(){const[{fullscreenModal:ne},oe]=useUIState(),[ce,ue]=reactExports.useState(!1),pe=reactExports.useCallback(async function(){ue(!0),await wait(300),oe(()=>({fullscreenModal:void 0})),ue(!1)},[oe]),me=reactExports.useMemo(()=>({close:pe}),[pe]),ge=ne?pages[ne]:void 0,ye=reactExports.useMemo(()=>{if(ge){const ve=ge.content,xe=withSlots(({slotProps:_e,...Se})=>{var $e,Re,Ae;return jsxRuntimeExports.jsxs(FullscreenPage,{...Se,children:[jsxRuntimeExports.jsx(FullscreenPage.Content,{children:($e=_e.Content)==null?void 0:$e.children}),jsxRuntimeExports.jsx(FullscreenPage.Options,{children:(Re=_e.Options)==null?void 0:Re.children}),jsxRuntimeExports.jsx(FullscreenPage.Extras,{children:(Ae=_e.Extras)==null?void 0:Ae.children})]})});return jsxRuntimeExports.jsx(ve,{template:xe})}},[ne,ge]);return jsxRuntimeExports.jsx(FullscreenModalContext.Provider,{value:me,children:!!ge&&jsxRuntimeExports.jsxs(Modal,{open:!ce,onClose:pe,width:"70vw",children:[jsxRuntimeExports.jsx(ModalAppBar,{onClose:pe,children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:ge.name})}),ye]})})}const name="Posthoc",version="1.2.4",version_name="1.2.4; early May 2024",repository="https://github.com/ShortestPathLab/posthoc-app",changelog="http://posthoc.pathfinding.ai/blog",docs="https://posthoc.pathfinding.ai/docs/overview",homepage="https://posthoc.pathfinding.ai";function _typeof(ne){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(oe){return typeof oe}:_typeof=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},_typeof(ne)}function _classCallCheck(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function _defineProperties(ne,oe){for(var ce=0;ce"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(ne,oe,ce){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(pe,me,ge){var ye=[null];ye.push.apply(ye,me);var ve=Function.bind.apply(pe,ye),xe=new ve;return ge&&_setPrototypeOf(xe,ge.prototype),xe},_construct.apply(null,arguments)}function _isNativeFunction(ne){return Function.toString.call(ne).indexOf("[native code]")!==-1}function _wrapNativeSuper(ne){var oe=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(ue){if(ue===null||!_isNativeFunction(ue))return ue;if(typeof ue!="function")throw new TypeError("Super expression must either be null or a function");if(typeof oe<"u"){if(oe.has(ue))return oe.get(ue);oe.set(ue,pe)}function pe(){return _construct(ue,arguments,_getPrototypeOf(this).constructor)}return pe.prototype=Object.create(ue.prototype,{constructor:{value:pe,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(pe,ue)},_wrapNativeSuper(ne)}function _assertThisInitialized(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function _possibleConstructorReturn(ne,oe){return oe&&(typeof oe=="object"||typeof oe=="function")?oe:_assertThisInitialized(ne)}function _createSuper(ne){var oe=_isNativeReflectConstruct();return function(){var ue=_getPrototypeOf(ne),pe;if(oe){var me=_getPrototypeOf(this).constructor;pe=Reflect.construct(ue,arguments,me)}else pe=ue.apply(this,arguments);return _possibleConstructorReturn(this,pe)}}function _superPropBase(ne,oe){for(;!Object.prototype.hasOwnProperty.call(ne,oe)&&(ne=_getPrototypeOf(ne),ne!==null););return ne}function _get(ne,oe,ce){return typeof Reflect<"u"&&Reflect.get?_get=Reflect.get:_get=function(pe,me,ge){var ye=_superPropBase(pe,me);if(ye){var ve=Object.getOwnPropertyDescriptor(ye,me);return ve.get?ve.get.call(ge):ve.value}},_get(ne,oe,ce||ne)}function _slicedToArray(ne,oe){return _arrayWithHoles(ne)||_iterableToArrayLimit(ne,oe)||_unsupportedIterableToArray(ne,oe)||_nonIterableRest()}function _toArray(ne){return _arrayWithHoles(ne)||_iterableToArray(ne)||_unsupportedIterableToArray(ne)||_nonIterableRest()}function _arrayWithHoles(ne){if(Array.isArray(ne))return ne}function _iterableToArray(ne){if(typeof Symbol<"u"&&Symbol.iterator in Object(ne))return Array.from(ne)}function _iterableToArrayLimit(ne,oe){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ne)))){var ce=[],ue=!0,pe=!1,me=void 0;try{for(var ge=ne[Symbol.iterator](),ye;!(ue=(ye=ge.next()).done)&&(ce.push(ye.value),!(oe&&ce.length===oe));ue=!0);}catch(ve){pe=!0,me=ve}finally{try{!ue&&ge.return!=null&&ge.return()}finally{if(pe)throw me}}return ce}}function _unsupportedIterableToArray(ne,oe){if(ne){if(typeof ne=="string")return _arrayLikeToArray(ne,oe);var ce=Object.prototype.toString.call(ne).slice(8,-1);if(ce==="Object"&&ne.constructor&&(ce=ne.constructor.name),ce==="Map"||ce==="Set")return Array.from(ne);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return _arrayLikeToArray(ne,oe)}}function _arrayLikeToArray(ne,oe){(oe==null||oe>ne.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce"u"||ne[Symbol.iterator]==null){if(Array.isArray(ne)||(ce=_unsupportedIterableToArray(ne))||oe&&ne&&typeof ne.length=="number"){ce&&(ne=ce);var ue=0,pe=function(){};return{s:pe,n:function(){return ue>=ne.length?{done:!0}:{done:!1,value:ne[ue++]}},e:function(ve){throw ve},f:pe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me=!0,ge=!1,ye;return{s:function(){ce=ne[Symbol.iterator]()},n:function(){var ve=ce.next();return me=ve.done,ve},e:function(ve){ge=!0,ye=ve},f:function(){try{!me&&ce.return!=null&&ce.return()}finally{if(ge)throw ye}}}}var Char={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},Type={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},defaultTagPrefix="tag:yaml.org,2002:",defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function findLineStarts(ne){for(var oe=[0],ce=ne.indexOf(` `);ce!==-1;)ce+=1,oe.push(ce),ce=ne.indexOf(` @@ -1219,7 +1219,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\ `){var Ne="Implicit keys of flow sequence pairs need to be on a single line";ne.errors.push(new YAMLSemanticError(ve,Ne));break}}}else me=null;ge=null,pe=!1,ye=null}else if(ye==="["||Se!=="]"||xe1){var me="Each pair must have its own sequence indicator";throw new YAMLSemanticError(oe,me)}var ge=pe.items[0]||new Pair;pe.commentBefore&&(ge.commentBefore=ge.commentBefore?"".concat(pe.commentBefore,` `).concat(ge.commentBefore):pe.commentBefore),pe.comment&&(ge.comment=ge.comment?"".concat(pe.comment,` -`).concat(ge.comment):pe.comment),pe=ge}ce.items[ue]=pe instanceof Pair?pe:new Pair(pe)}}return ce}function createPairs(ne,oe,ce){var ue=new YAMLSeq(ne);ue.tag="tag:yaml.org,2002:pairs";var pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value,ye=void 0,ve=void 0;if(Array.isArray(ge))if(ge.length===2)ye=ge[0],ve=ge[1];else throw new TypeError("Expected [key, value] tuple: ".concat(ge));else if(ge&&ge instanceof Object){var xe=Object.keys(ge);if(xe.length===1)ye=xe[0],ve=ge[ye];else throw new TypeError("Expected { key: value } tuple: ".concat(ge))}else ye=ge;var _e=ne.createPair(ye,ve,ce);ue.items.push(_e)}}catch(Se){pe.e(Se)}finally{pe.f()}return ue}var pairs={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:parsePairs,createNode:createPairs},YAMLOMap=function(ne){_inherits(ce,ne);var oe=_createSuper(ce);function ce(){var ue;return _classCallCheck(this,ce),ue=oe.call(this),_defineProperty(_assertThisInitialized(ue),"add",YAMLMap.prototype.add.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"delete",YAMLMap.prototype.delete.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"get",YAMLMap.prototype.get.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"has",YAMLMap.prototype.has.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"set",YAMLMap.prototype.set.bind(_assertThisInitialized(ue))),ue.tag=ce.tag,ue}return _createClass(ce,[{key:"toJSON",value:function(pe,me){var ge=new Map;me&&me.onCreate&&me.onCreate(ge);var ye=_createForOfIteratorHelper(this.items),ve;try{for(ye.s();!(ve=ye.n()).done;){var xe=ve.value,_e=void 0,Se=void 0;if(xe instanceof Pair?(_e=toJSON(xe.key,"",me),Se=toJSON(xe.value,_e,me)):_e=toJSON(xe,"",me),ge.has(_e))throw new Error("Ordered maps must not include duplicate keys");ge.set(_e,Se)}}catch($e){ye.e($e)}finally{ye.f()}return ge}}]),ce}(YAMLSeq);_defineProperty(YAMLOMap,"tag","tag:yaml.org,2002:omap");function parseOMap(ne,oe){var ce=parsePairs(ne,oe),ue=[],pe=_createForOfIteratorHelper(ce.items),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value.key;if(ge instanceof Scalar)if(ue.includes(ge.value)){var ye="Ordered maps must not include duplicate keys";throw new YAMLSemanticError(oe,ye)}else ue.push(ge.value)}}catch(ve){pe.e(ve)}finally{pe.f()}return Object.assign(new YAMLOMap,ce)}function createOMap(ne,oe,ce){var ue=createPairs(ne,oe,ce),pe=new YAMLOMap;return pe.items=ue.items,pe}var omap={identify:function(oe){return oe instanceof Map},nodeClass:YAMLOMap,default:!1,tag:"tag:yaml.org,2002:omap",resolve:parseOMap,createNode:createOMap},YAMLSet=function(ne){_inherits(ce,ne);var oe=_createSuper(ce);function ce(){var ue;return _classCallCheck(this,ce),ue=oe.call(this),ue.tag=ce.tag,ue}return _createClass(ce,[{key:"add",value:function(pe){var me=pe instanceof Pair?pe:new Pair(pe),ge=findPair(this.items,me.key);ge||this.items.push(me)}},{key:"get",value:function(pe,me){var ge=findPair(this.items,pe);return!me&&ge instanceof Pair?ge.key instanceof Scalar?ge.key.value:ge.key:ge}},{key:"set",value:function(pe,me){if(typeof me!="boolean")throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(_typeof(me)));var ge=findPair(this.items,pe);ge&&!me?this.items.splice(this.items.indexOf(ge),1):!ge&&me&&this.items.push(new Pair(pe))}},{key:"toJSON",value:function(pe,me){return _get(_getPrototypeOf(ce.prototype),"toJSON",this).call(this,pe,me,Set)}},{key:"toString",value:function(pe,me,ge){if(!pe)return JSON.stringify(this);if(this.hasAllNullValues())return _get(_getPrototypeOf(ce.prototype),"toString",this).call(this,pe,me,ge);throw new Error("Set items must all have null values")}}]),ce}(YAMLMap);_defineProperty(YAMLSet,"tag","tag:yaml.org,2002:set");function parseSet(ne,oe){var ce=resolveMap(ne,oe);if(!ce.hasAllNullValues())throw new YAMLSemanticError(oe,"Set items must all have null values");return Object.assign(new YAMLSet,ce)}function createSet(ne,oe,ce){var ue=new YAMLSet,pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value;ue.items.push(ne.createPair(ge,null,ce))}}catch(ye){pe.e(ye)}finally{pe.f()}return ue}var set$3={identify:function(oe){return oe instanceof Set},nodeClass:YAMLSet,default:!1,tag:"tag:yaml.org,2002:set",resolve:parseSet,createNode:createSet},parseSexagesimal=function(oe,ce){var ue=ce.split(":").reduce(function(pe,me){return pe*60+Number(me)},0);return oe==="-"?-ue:ue},stringifySexagesimal=function(oe){var ce=oe.value;if(isNaN(ce)||!isFinite(ce))return stringifyNumber(ce);var ue="";ce<0&&(ue="-",ce=Math.abs(ce));var pe=[ce%60];return ce<60?pe.unshift(0):(ce=Math.round((ce-pe[0])/60),pe.unshift(ce%60),ce>=60&&(ce=Math.round((ce-pe[0])/60),pe.unshift(ce))),ue+pe.map(function(me){return me<10?"0"+String(me):String(me)}).join(":").replace(/000000\d*$/,"")},intTime={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(oe,ce,ue){return parseSexagesimal(ce,ue.replace(/_/g,""))},stringify:stringifySexagesimal},floatTime={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(oe,ce,ue){return parseSexagesimal(ce,ue.replace(/_/g,""))},stringify:stringifySexagesimal},timestamp={identify:function(oe){return oe instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(oe,ce,ue,pe,me,ge,ye,ve,xe){ve&&(ve=(ve+"00").substr(1,3));var _e=Date.UTC(ce,ue-1,pe,me||0,ge||0,ye||0,ve||0);if(xe&&xe!=="Z"){var Se=parseSexagesimal(xe[0],xe.slice(1));Math.abs(Se)<30&&(Se*=60),_e-=6e4*Se}return new Date(_e)},stringify:function(oe){var ce=oe.value;return ce.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function shouldWarn(ne){var oe=typeof process<"u"&&process.env||{};return ne?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!oe.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!oe.YAML_SILENCE_WARNINGS}function warn(ne,oe){if(shouldWarn(!1)){var ce=typeof process<"u"&&process.emitWarning;ce?ce(ne,oe):console.warn(oe?"".concat(oe,": ").concat(ne):ne)}}var warned={};function warnOptionDeprecation(ne,oe){if(!warned[ne]&&shouldWarn(!0)){warned[ne]=!0;var ce="The option '".concat(ne,"' will be removed in a future release");ce+=oe?", use '".concat(oe,"' instead."):".",warn(ce,"DeprecationWarning")}}function createMap(ne,oe,ce){var ue=new YAMLMap(ne);if(oe instanceof Map){var pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=_slicedToArray(me.value,2),ye=ge[0],ve=ge[1];ue.items.push(ne.createPair(ye,ve,ce))}}catch($e){pe.e($e)}finally{pe.f()}}else if(oe&&_typeof(oe)==="object")for(var xe=0,_e=Object.keys(oe);xe<_e.length;xe++){var Se=_e[xe];ue.items.push(ne.createPair(Se,oe[Se],ce))}return typeof ne.sortMapEntries=="function"&&ue.items.sort(ne.sortMapEntries),ue}var map$6={createNode:createMap,default:!0,nodeClass:YAMLMap,tag:"tag:yaml.org,2002:map",resolve:resolveMap};function createSeq(ne,oe,ce){var ue=new YAMLSeq(ne);if(oe&&oe[Symbol.iterator]){var pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value,ye=ne.createNode(ge,ce.wrapScalars,null,ce);ue.items.push(ye)}}catch(ve){pe.e(ve)}finally{pe.f()}}return ue}var seq={createNode:createSeq,default:!0,nodeClass:YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:resolveSeq},string={identify:function(oe){return typeof oe=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:resolveString,stringify:function(oe,ce,ue,pe){return ce=Object.assign({actualString:!0},ce),stringifyString(oe,ce,ue,pe)},options:strOptions},failsafe=[map$6,seq,string],intIdentify$2=function(oe){return typeof oe=="bigint"||Number.isInteger(oe)},intResolve$1=function(oe,ce,ue){return intOptions.asBigInt?BigInt(oe):parseInt(ce,ue)};function intStringify$1(ne,oe,ce){var ue=ne.value;return intIdentify$2(ue)&&ue>=0?ce+ue.toString(oe):stringifyNumber(ne)}var nullObj={identify:function(oe){return oe==null},createNode:function(oe,ce,ue){return ue.wrapScalars?new Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:nullOptions,stringify:function(){return nullOptions.nullStr}},boolObj={identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(oe){return oe[0]==="t"||oe[0]==="T"},options:boolOptions,stringify:function(oe){var ce=oe.value;return ce?boolOptions.trueStr:boolOptions.falseStr}},octObj={identify:function(oe){return intIdentify$2(oe)&&oe>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(oe,ce){return intResolve$1(oe,ce,8)},options:intOptions,stringify:function(oe){return intStringify$1(oe,8,"0o")}},intObj={identify:intIdentify$2,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(oe){return intResolve$1(oe,oe,10)},options:intOptions,stringify:stringifyNumber},hexObj={identify:function(oe){return intIdentify$2(oe)&&oe>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(oe,ce){return intResolve$1(oe,ce,16)},options:intOptions,stringify:function(oe){return intStringify$1(oe,16,"0x")}},nanObj={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(oe,ce){return ce?NaN:oe[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:stringifyNumber},expObj={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(oe){return parseFloat(oe)},stringify:function(oe){var ce=oe.value;return Number(ce).toExponential()}},floatObj={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(oe,ce,ue){var pe=ce||ue,me=new Scalar(parseFloat(oe));return pe&&pe[pe.length-1]==="0"&&(me.minFractionDigits=pe.length),me},stringify:stringifyNumber},core=failsafe.concat([nullObj,boolObj,octObj,intObj,hexObj,nanObj,expObj,floatObj]),intIdentify$1=function(oe){return typeof oe=="bigint"||Number.isInteger(oe)},stringifyJSON=function(oe){var ce=oe.value;return JSON.stringify(ce)},json=[map$6,seq,{identify:function(oe){return typeof oe=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:resolveString,stringify:stringifyJSON},{identify:function(oe){return oe==null},createNode:function(oe,ce,ue){return ue.wrapScalars?new Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:stringifyJSON},{identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(oe){return oe==="true"},stringify:stringifyJSON},{identify:intIdentify$1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(oe){return intOptions.asBigInt?BigInt(oe):parseInt(oe,10)},stringify:function(oe){var ce=oe.value;return intIdentify$1(ce)?ce.toString():JSON.stringify(ce)}},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(oe){return parseFloat(oe)},stringify:stringifyJSON}];json.scalarFallback=function(ne){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(ne)))};var boolStringify=function(oe){var ce=oe.value;return ce?boolOptions.trueStr:boolOptions.falseStr},intIdentify=function(oe){return typeof oe=="bigint"||Number.isInteger(oe)};function intResolve(ne,oe,ce){var ue=oe.replace(/_/g,"");if(intOptions.asBigInt){switch(ce){case 2:ue="0b".concat(ue);break;case 8:ue="0o".concat(ue);break;case 16:ue="0x".concat(ue);break}var pe=BigInt(ue);return ne==="-"?BigInt(-1)*pe:pe}var me=parseInt(ue,ce);return ne==="-"?-1*me:me}function intStringify(ne,oe,ce){var ue=ne.value;if(intIdentify(ue)){var pe=ue.toString(oe);return ue<0?"-"+ce+pe.substr(1):ce+pe}return stringifyNumber(ne)}var yaml11=failsafe.concat([{identify:function(oe){return oe==null},createNode:function(oe,ce,ue){return ue.wrapScalars?new Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:nullOptions,stringify:function(){return nullOptions.nullStr}},{identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:boolOptions,stringify:boolStringify},{identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:boolOptions,stringify:boolStringify},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,2)},stringify:function(oe){return intStringify(oe,2,"0b")}},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,8)},stringify:function(oe){return intStringify(oe,8,"0")}},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,10)},stringify:stringifyNumber},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,16)},stringify:function(oe){return intStringify(oe,16,"0x")}},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(oe,ce){return ce?NaN:oe[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:stringifyNumber},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(oe){return parseFloat(oe.replace(/_/g,""))},stringify:function(oe){var ce=oe.value;return Number(ce).toExponential()}},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(oe,ce){var ue=new Scalar(parseFloat(oe.replace(/_/g,"")));if(ce){var pe=ce.replace(/_/g,"");pe[pe.length-1]==="0"&&(ue.minFractionDigits=pe.length)}return ue},stringify:stringifyNumber}],binary,omap,pairs,set$3,intTime,floatTime,timestamp),schemas={core,failsafe,json,yaml11},tags={binary,bool:boolObj,float:floatObj,floatExp:expObj,floatNaN:nanObj,floatTime,int:intObj,intHex:hexObj,intOct:octObj,intTime,map:map$6,null:nullObj,omap,pairs,seq,set:set$3,timestamp};function findTagObject(ne,oe,ce){if(oe){var ue=ce.filter(function(me){return me.tag===oe}),pe=ue.find(function(me){return!me.format})||ue[0];if(!pe)throw new Error("Tag ".concat(oe," not found"));return pe}return ce.find(function(me){return(me.identify&&me.identify(ne)||me.class&&ne instanceof me.class)&&!me.format})}function createNode$2(ne,oe,ce){if(ne instanceof Node$2)return ne;var ue=ce.defaultPrefix,pe=ce.onTagObj,me=ce.prevObjects,ge=ce.schema,ye=ce.wrapScalars;oe&&oe.startsWith("!!")&&(oe=ue+oe.slice(2));var ve=findTagObject(ne,oe,ge.tags);if(!ve){if(typeof ne.toJSON=="function"&&(ne=ne.toJSON()),!ne||_typeof(ne)!=="object")return ye?new Scalar(ne):ne;ve=ne instanceof Map?map$6:ne[Symbol.iterator]?seq:map$6}pe&&(pe(ve),delete ce.onTagObj);var xe={value:void 0,node:void 0};if(ne&&_typeof(ne)==="object"&&me){var _e=me.get(ne);if(_e){var Se=new Alias(_e);return ce.aliasNodes.push(Se),Se}xe.value=ne,me.set(ne,xe)}return xe.node=ve.createNode?ve.createNode(ce.schema,ne,ce):ye?new Scalar(ne):ne,oe&&xe.node instanceof Node$2&&(xe.node.tag=oe),xe.node}function getSchemaTags(ne,oe,ce,ue){var pe=ne[ue.replace(/\W/g,"")];if(!pe){var me=Object.keys(ne).map(function(Re){return JSON.stringify(Re)}).join(", ");throw new Error('Unknown schema "'.concat(ue,'"; use one of ').concat(me))}if(Array.isArray(ce)){var ge=_createForOfIteratorHelper(ce),ye;try{for(ge.s();!(ye=ge.n()).done;){var ve=ye.value;pe=pe.concat(ve)}}catch(Re){ge.e(Re)}finally{ge.f()}}else typeof ce=="function"&&(pe=ce(pe.slice()));for(var xe=0;xece.key?1:0},Schema=function(){function ne(oe){var ce=oe.customTags,ue=oe.merge,pe=oe.schema,me=oe.sortMapEntries,ge=oe.tags;_classCallCheck(this,ne),this.merge=!!ue,this.name=pe,this.sortMapEntries=me===!0?sortMapEntriesByKey:me||null,!ce&&ge&&warnOptionDeprecation("tags","customTags"),this.tags=getSchemaTags(schemas,tags,ce||ge,pe)}return _createClass(ne,[{key:"createNode",value:function(ce,ue,pe,me){var ge={defaultPrefix:ne.defaultPrefix,schema:this,wrapScalars:ue},ye=me?Object.assign(me,ge):ge;return createNode$2(ce,pe,ye)}},{key:"createPair",value:function(ce,ue,pe){pe||(pe={wrapScalars:!0});var me=this.createNode(ce,pe.wrapScalars,null,pe),ge=this.createNode(ue,pe.wrapScalars,null,pe);return new Pair(me,ge)}}]),ne}();_defineProperty(Schema,"defaultPrefix",defaultTagPrefix);_defineProperty(Schema,"defaultTags",defaultTags);var defaultOptions={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},scalarOptions={get binary(){return binaryOptions},set binary(ne){Object.assign(binaryOptions,ne)},get bool(){return boolOptions},set bool(ne){Object.assign(boolOptions,ne)},get int(){return intOptions},set int(ne){Object.assign(intOptions,ne)},get null(){return nullOptions},set null(ne){Object.assign(nullOptions,ne)},get str(){return strOptions},set str(ne){Object.assign(strOptions,ne)}},documentOptions={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:defaultTagPrefix}]}};function stringifyTag(ne,oe){if((ne.version||ne.options.version)==="1.0"){var ce=oe.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(ce)return"!"+ce[1];var ue=oe.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return ue?"!".concat(ue[1],"/").concat(ue[2]):"!".concat(oe.replace(/^tag:/,""))}var pe=ne.tagPrefixes.find(function(ye){return oe.indexOf(ye.prefix)===0});if(!pe){var me=ne.getDefaults().tagPrefixes;pe=me&&me.find(function(ye){return oe.indexOf(ye.prefix)===0})}if(!pe)return oe[0]==="!"?oe:"!<".concat(oe,">");var ge=oe.substr(pe.prefix.length).replace(/[!,[\]{}]/g,function(ye){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[ye]});return pe.handle+ge}function getTagObject(ne,oe){if(oe instanceof Alias)return Alias;if(oe.tag){var ce=ne.filter(function(ye){return ye.tag===oe.tag});if(ce.length>0)return ce.find(function(ye){return ye.format===oe.format})||ce[0]}var ue,pe;if(oe instanceof Scalar){pe=oe.value;var me=ne.filter(function(ye){return ye.identify&&ye.identify(pe)||ye.class&&pe instanceof ye.class});ue=me.find(function(ye){return ye.format===oe.format})||me.find(function(ye){return!ye.format})}else pe=oe,ue=ne.find(function(ye){return ye.nodeClass&&pe instanceof ye.nodeClass});if(!ue){var ge=pe&&pe.constructor?pe.constructor.name:_typeof(pe);throw new Error("Tag not resolved for ".concat(ge," value"))}return ue}function stringifyProps(ne,oe,ce){var ue=ce.anchors,pe=ce.doc,me=[],ge=pe.anchors.getName(ne);return ge&&(ue[ge]=ne,me.push("&".concat(ge))),ne.tag?me.push(stringifyTag(pe,ne.tag)):oe.default||me.push(stringifyTag(pe,oe.tag)),me.join(" ")}function stringify$1$1(ne,oe,ce,ue){var pe=oe.doc,me=pe.anchors,ge=pe.schema,ye;if(!(ne instanceof Node$2)){var ve={aliasNodes:[],onTagObj:function(ke){return ye=ke},prevObjects:new Map};ne=ge.createNode(ne,!0,null,ve);var xe=_createForOfIteratorHelper(ve.aliasNodes),_e;try{for(xe.s();!(_e=xe.n()).done;){var Se=_e.value;Se.source=Se.source.node;var $e=me.getName(Se.source);$e||($e=me.newName(),me.map[$e]=Se.source)}}catch(Ie){xe.e(Ie)}finally{xe.f()}}if(ne instanceof Pair)return ne.toString(oe,ce,ue);ye||(ye=getTagObject(ge.tags,ne));var Re=stringifyProps(ne,ye,oe);Re.length>0&&(oe.indentAtStart=(oe.indentAtStart||0)+Re.length+1);var Ae=typeof ye.stringify=="function"?ye.stringify(ne,oe,ce,ue):ne instanceof Scalar?stringifyString(ne,oe,ce,ue):ne.toString(oe,ce,ue);return Re?ne instanceof Scalar||Ae[0]==="{"||Ae[0]==="["?"".concat(Re," ").concat(Ae):"".concat(Re,` +`).concat(ge.comment):pe.comment),pe=ge}ce.items[ue]=pe instanceof Pair?pe:new Pair(pe)}}return ce}function createPairs(ne,oe,ce){var ue=new YAMLSeq(ne);ue.tag="tag:yaml.org,2002:pairs";var pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value,ye=void 0,ve=void 0;if(Array.isArray(ge))if(ge.length===2)ye=ge[0],ve=ge[1];else throw new TypeError("Expected [key, value] tuple: ".concat(ge));else if(ge&&ge instanceof Object){var xe=Object.keys(ge);if(xe.length===1)ye=xe[0],ve=ge[ye];else throw new TypeError("Expected { key: value } tuple: ".concat(ge))}else ye=ge;var _e=ne.createPair(ye,ve,ce);ue.items.push(_e)}}catch(Se){pe.e(Se)}finally{pe.f()}return ue}var pairs={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:parsePairs,createNode:createPairs},YAMLOMap=function(ne){_inherits(ce,ne);var oe=_createSuper(ce);function ce(){var ue;return _classCallCheck(this,ce),ue=oe.call(this),_defineProperty(_assertThisInitialized(ue),"add",YAMLMap.prototype.add.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"delete",YAMLMap.prototype.delete.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"get",YAMLMap.prototype.get.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"has",YAMLMap.prototype.has.bind(_assertThisInitialized(ue))),_defineProperty(_assertThisInitialized(ue),"set",YAMLMap.prototype.set.bind(_assertThisInitialized(ue))),ue.tag=ce.tag,ue}return _createClass(ce,[{key:"toJSON",value:function(pe,me){var ge=new Map;me&&me.onCreate&&me.onCreate(ge);var ye=_createForOfIteratorHelper(this.items),ve;try{for(ye.s();!(ve=ye.n()).done;){var xe=ve.value,_e=void 0,Se=void 0;if(xe instanceof Pair?(_e=toJSON(xe.key,"",me),Se=toJSON(xe.value,_e,me)):_e=toJSON(xe,"",me),ge.has(_e))throw new Error("Ordered maps must not include duplicate keys");ge.set(_e,Se)}}catch($e){ye.e($e)}finally{ye.f()}return ge}}]),ce}(YAMLSeq);_defineProperty(YAMLOMap,"tag","tag:yaml.org,2002:omap");function parseOMap(ne,oe){var ce=parsePairs(ne,oe),ue=[],pe=_createForOfIteratorHelper(ce.items),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value.key;if(ge instanceof Scalar)if(ue.includes(ge.value)){var ye="Ordered maps must not include duplicate keys";throw new YAMLSemanticError(oe,ye)}else ue.push(ge.value)}}catch(ve){pe.e(ve)}finally{pe.f()}return Object.assign(new YAMLOMap,ce)}function createOMap(ne,oe,ce){var ue=createPairs(ne,oe,ce),pe=new YAMLOMap;return pe.items=ue.items,pe}var omap={identify:function(oe){return oe instanceof Map},nodeClass:YAMLOMap,default:!1,tag:"tag:yaml.org,2002:omap",resolve:parseOMap,createNode:createOMap},YAMLSet=function(ne){_inherits(ce,ne);var oe=_createSuper(ce);function ce(){var ue;return _classCallCheck(this,ce),ue=oe.call(this),ue.tag=ce.tag,ue}return _createClass(ce,[{key:"add",value:function(pe){var me=pe instanceof Pair?pe:new Pair(pe),ge=findPair(this.items,me.key);ge||this.items.push(me)}},{key:"get",value:function(pe,me){var ge=findPair(this.items,pe);return!me&&ge instanceof Pair?ge.key instanceof Scalar?ge.key.value:ge.key:ge}},{key:"set",value:function(pe,me){if(typeof me!="boolean")throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(_typeof(me)));var ge=findPair(this.items,pe);ge&&!me?this.items.splice(this.items.indexOf(ge),1):!ge&&me&&this.items.push(new Pair(pe))}},{key:"toJSON",value:function(pe,me){return _get(_getPrototypeOf(ce.prototype),"toJSON",this).call(this,pe,me,Set)}},{key:"toString",value:function(pe,me,ge){if(!pe)return JSON.stringify(this);if(this.hasAllNullValues())return _get(_getPrototypeOf(ce.prototype),"toString",this).call(this,pe,me,ge);throw new Error("Set items must all have null values")}}]),ce}(YAMLMap);_defineProperty(YAMLSet,"tag","tag:yaml.org,2002:set");function parseSet(ne,oe){var ce=resolveMap(ne,oe);if(!ce.hasAllNullValues())throw new YAMLSemanticError(oe,"Set items must all have null values");return Object.assign(new YAMLSet,ce)}function createSet(ne,oe,ce){var ue=new YAMLSet,pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value;ue.items.push(ne.createPair(ge,null,ce))}}catch(ye){pe.e(ye)}finally{pe.f()}return ue}var set$1={identify:function(oe){return oe instanceof Set},nodeClass:YAMLSet,default:!1,tag:"tag:yaml.org,2002:set",resolve:parseSet,createNode:createSet},parseSexagesimal=function(oe,ce){var ue=ce.split(":").reduce(function(pe,me){return pe*60+Number(me)},0);return oe==="-"?-ue:ue},stringifySexagesimal=function(oe){var ce=oe.value;if(isNaN(ce)||!isFinite(ce))return stringifyNumber(ce);var ue="";ce<0&&(ue="-",ce=Math.abs(ce));var pe=[ce%60];return ce<60?pe.unshift(0):(ce=Math.round((ce-pe[0])/60),pe.unshift(ce%60),ce>=60&&(ce=Math.round((ce-pe[0])/60),pe.unshift(ce))),ue+pe.map(function(me){return me<10?"0"+String(me):String(me)}).join(":").replace(/000000\d*$/,"")},intTime={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(oe,ce,ue){return parseSexagesimal(ce,ue.replace(/_/g,""))},stringify:stringifySexagesimal},floatTime={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(oe,ce,ue){return parseSexagesimal(ce,ue.replace(/_/g,""))},stringify:stringifySexagesimal},timestamp={identify:function(oe){return oe instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(oe,ce,ue,pe,me,ge,ye,ve,xe){ve&&(ve=(ve+"00").substr(1,3));var _e=Date.UTC(ce,ue-1,pe,me||0,ge||0,ye||0,ve||0);if(xe&&xe!=="Z"){var Se=parseSexagesimal(xe[0],xe.slice(1));Math.abs(Se)<30&&(Se*=60),_e-=6e4*Se}return new Date(_e)},stringify:function(oe){var ce=oe.value;return ce.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function shouldWarn(ne){var oe=typeof process<"u"&&process.env||{};return ne?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!oe.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!oe.YAML_SILENCE_WARNINGS}function warn(ne,oe){if(shouldWarn(!1)){var ce=typeof process<"u"&&process.emitWarning;ce?ce(ne,oe):console.warn(oe?"".concat(oe,": ").concat(ne):ne)}}var warned={};function warnOptionDeprecation(ne,oe){if(!warned[ne]&&shouldWarn(!0)){warned[ne]=!0;var ce="The option '".concat(ne,"' will be removed in a future release");ce+=oe?", use '".concat(oe,"' instead."):".",warn(ce,"DeprecationWarning")}}function createMap(ne,oe,ce){var ue=new YAMLMap(ne);if(oe instanceof Map){var pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=_slicedToArray(me.value,2),ye=ge[0],ve=ge[1];ue.items.push(ne.createPair(ye,ve,ce))}}catch($e){pe.e($e)}finally{pe.f()}}else if(oe&&_typeof(oe)==="object")for(var xe=0,_e=Object.keys(oe);xe<_e.length;xe++){var Se=_e[xe];ue.items.push(ne.createPair(Se,oe[Se],ce))}return typeof ne.sortMapEntries=="function"&&ue.items.sort(ne.sortMapEntries),ue}var map$6={createNode:createMap,default:!0,nodeClass:YAMLMap,tag:"tag:yaml.org,2002:map",resolve:resolveMap};function createSeq(ne,oe,ce){var ue=new YAMLSeq(ne);if(oe&&oe[Symbol.iterator]){var pe=_createForOfIteratorHelper(oe),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value,ye=ne.createNode(ge,ce.wrapScalars,null,ce);ue.items.push(ye)}}catch(ve){pe.e(ve)}finally{pe.f()}}return ue}var seq={createNode:createSeq,default:!0,nodeClass:YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:resolveSeq},string={identify:function(oe){return typeof oe=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:resolveString,stringify:function(oe,ce,ue,pe){return ce=Object.assign({actualString:!0},ce),stringifyString(oe,ce,ue,pe)},options:strOptions},failsafe=[map$6,seq,string],intIdentify$2=function(oe){return typeof oe=="bigint"||Number.isInteger(oe)},intResolve$1=function(oe,ce,ue){return intOptions.asBigInt?BigInt(oe):parseInt(ce,ue)};function intStringify$1(ne,oe,ce){var ue=ne.value;return intIdentify$2(ue)&&ue>=0?ce+ue.toString(oe):stringifyNumber(ne)}var nullObj={identify:function(oe){return oe==null},createNode:function(oe,ce,ue){return ue.wrapScalars?new Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:nullOptions,stringify:function(){return nullOptions.nullStr}},boolObj={identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(oe){return oe[0]==="t"||oe[0]==="T"},options:boolOptions,stringify:function(oe){var ce=oe.value;return ce?boolOptions.trueStr:boolOptions.falseStr}},octObj={identify:function(oe){return intIdentify$2(oe)&&oe>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(oe,ce){return intResolve$1(oe,ce,8)},options:intOptions,stringify:function(oe){return intStringify$1(oe,8,"0o")}},intObj={identify:intIdentify$2,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(oe){return intResolve$1(oe,oe,10)},options:intOptions,stringify:stringifyNumber},hexObj={identify:function(oe){return intIdentify$2(oe)&&oe>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(oe,ce){return intResolve$1(oe,ce,16)},options:intOptions,stringify:function(oe){return intStringify$1(oe,16,"0x")}},nanObj={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(oe,ce){return ce?NaN:oe[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:stringifyNumber},expObj={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(oe){return parseFloat(oe)},stringify:function(oe){var ce=oe.value;return Number(ce).toExponential()}},floatObj={identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(oe,ce,ue){var pe=ce||ue,me=new Scalar(parseFloat(oe));return pe&&pe[pe.length-1]==="0"&&(me.minFractionDigits=pe.length),me},stringify:stringifyNumber},core=failsafe.concat([nullObj,boolObj,octObj,intObj,hexObj,nanObj,expObj,floatObj]),intIdentify$1=function(oe){return typeof oe=="bigint"||Number.isInteger(oe)},stringifyJSON=function(oe){var ce=oe.value;return JSON.stringify(ce)},json=[map$6,seq,{identify:function(oe){return typeof oe=="string"},default:!0,tag:"tag:yaml.org,2002:str",resolve:resolveString,stringify:stringifyJSON},{identify:function(oe){return oe==null},createNode:function(oe,ce,ue){return ue.wrapScalars?new Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:stringifyJSON},{identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(oe){return oe==="true"},stringify:stringifyJSON},{identify:intIdentify$1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(oe){return intOptions.asBigInt?BigInt(oe):parseInt(oe,10)},stringify:function(oe){var ce=oe.value;return intIdentify$1(ce)?ce.toString():JSON.stringify(ce)}},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(oe){return parseFloat(oe)},stringify:stringifyJSON}];json.scalarFallback=function(ne){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(ne)))};var boolStringify=function(oe){var ce=oe.value;return ce?boolOptions.trueStr:boolOptions.falseStr},intIdentify=function(oe){return typeof oe=="bigint"||Number.isInteger(oe)};function intResolve(ne,oe,ce){var ue=oe.replace(/_/g,"");if(intOptions.asBigInt){switch(ce){case 2:ue="0b".concat(ue);break;case 8:ue="0o".concat(ue);break;case 16:ue="0x".concat(ue);break}var pe=BigInt(ue);return ne==="-"?BigInt(-1)*pe:pe}var me=parseInt(ue,ce);return ne==="-"?-1*me:me}function intStringify(ne,oe,ce){var ue=ne.value;if(intIdentify(ue)){var pe=ue.toString(oe);return ue<0?"-"+ce+pe.substr(1):ce+pe}return stringifyNumber(ne)}var yaml11=failsafe.concat([{identify:function(oe){return oe==null},createNode:function(oe,ce,ue){return ue.wrapScalars?new Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:nullOptions,stringify:function(){return nullOptions.nullStr}},{identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:boolOptions,stringify:boolStringify},{identify:function(oe){return typeof oe=="boolean"},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:boolOptions,stringify:boolStringify},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,2)},stringify:function(oe){return intStringify(oe,2,"0b")}},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,8)},stringify:function(oe){return intStringify(oe,8,"0")}},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,10)},stringify:stringifyNumber},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(oe,ce,ue){return intResolve(ce,ue,16)},stringify:function(oe){return intStringify(oe,16,"0x")}},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(oe,ce){return ce?NaN:oe[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:stringifyNumber},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(oe){return parseFloat(oe.replace(/_/g,""))},stringify:function(oe){var ce=oe.value;return Number(ce).toExponential()}},{identify:function(oe){return typeof oe=="number"},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(oe,ce){var ue=new Scalar(parseFloat(oe.replace(/_/g,"")));if(ce){var pe=ce.replace(/_/g,"");pe[pe.length-1]==="0"&&(ue.minFractionDigits=pe.length)}return ue},stringify:stringifyNumber}],binary,omap,pairs,set$1,intTime,floatTime,timestamp),schemas={core,failsafe,json,yaml11},tags={binary,bool:boolObj,float:floatObj,floatExp:expObj,floatNaN:nanObj,floatTime,int:intObj,intHex:hexObj,intOct:octObj,intTime,map:map$6,null:nullObj,omap,pairs,seq,set:set$1,timestamp};function findTagObject(ne,oe,ce){if(oe){var ue=ce.filter(function(me){return me.tag===oe}),pe=ue.find(function(me){return!me.format})||ue[0];if(!pe)throw new Error("Tag ".concat(oe," not found"));return pe}return ce.find(function(me){return(me.identify&&me.identify(ne)||me.class&&ne instanceof me.class)&&!me.format})}function createNode$2(ne,oe,ce){if(ne instanceof Node$2)return ne;var ue=ce.defaultPrefix,pe=ce.onTagObj,me=ce.prevObjects,ge=ce.schema,ye=ce.wrapScalars;oe&&oe.startsWith("!!")&&(oe=ue+oe.slice(2));var ve=findTagObject(ne,oe,ge.tags);if(!ve){if(typeof ne.toJSON=="function"&&(ne=ne.toJSON()),!ne||_typeof(ne)!=="object")return ye?new Scalar(ne):ne;ve=ne instanceof Map?map$6:ne[Symbol.iterator]?seq:map$6}pe&&(pe(ve),delete ce.onTagObj);var xe={value:void 0,node:void 0};if(ne&&_typeof(ne)==="object"&&me){var _e=me.get(ne);if(_e){var Se=new Alias(_e);return ce.aliasNodes.push(Se),Se}xe.value=ne,me.set(ne,xe)}return xe.node=ve.createNode?ve.createNode(ce.schema,ne,ce):ye?new Scalar(ne):ne,oe&&xe.node instanceof Node$2&&(xe.node.tag=oe),xe.node}function getSchemaTags(ne,oe,ce,ue){var pe=ne[ue.replace(/\W/g,"")];if(!pe){var me=Object.keys(ne).map(function(Re){return JSON.stringify(Re)}).join(", ");throw new Error('Unknown schema "'.concat(ue,'"; use one of ').concat(me))}if(Array.isArray(ce)){var ge=_createForOfIteratorHelper(ce),ye;try{for(ge.s();!(ye=ge.n()).done;){var ve=ye.value;pe=pe.concat(ve)}}catch(Re){ge.e(Re)}finally{ge.f()}}else typeof ce=="function"&&(pe=ce(pe.slice()));for(var xe=0;xece.key?1:0},Schema=function(){function ne(oe){var ce=oe.customTags,ue=oe.merge,pe=oe.schema,me=oe.sortMapEntries,ge=oe.tags;_classCallCheck(this,ne),this.merge=!!ue,this.name=pe,this.sortMapEntries=me===!0?sortMapEntriesByKey:me||null,!ce&&ge&&warnOptionDeprecation("tags","customTags"),this.tags=getSchemaTags(schemas,tags,ce||ge,pe)}return _createClass(ne,[{key:"createNode",value:function(ce,ue,pe,me){var ge={defaultPrefix:ne.defaultPrefix,schema:this,wrapScalars:ue},ye=me?Object.assign(me,ge):ge;return createNode$2(ce,pe,ye)}},{key:"createPair",value:function(ce,ue,pe){pe||(pe={wrapScalars:!0});var me=this.createNode(ce,pe.wrapScalars,null,pe),ge=this.createNode(ue,pe.wrapScalars,null,pe);return new Pair(me,ge)}}]),ne}();_defineProperty(Schema,"defaultPrefix",defaultTagPrefix);_defineProperty(Schema,"defaultTags",defaultTags);var defaultOptions={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},scalarOptions={get binary(){return binaryOptions},set binary(ne){Object.assign(binaryOptions,ne)},get bool(){return boolOptions},set bool(ne){Object.assign(boolOptions,ne)},get int(){return intOptions},set int(ne){Object.assign(intOptions,ne)},get null(){return nullOptions},set null(ne){Object.assign(nullOptions,ne)},get str(){return strOptions},set str(ne){Object.assign(strOptions,ne)}},documentOptions={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:defaultTagPrefix}]}};function stringifyTag(ne,oe){if((ne.version||ne.options.version)==="1.0"){var ce=oe.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(ce)return"!"+ce[1];var ue=oe.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return ue?"!".concat(ue[1],"/").concat(ue[2]):"!".concat(oe.replace(/^tag:/,""))}var pe=ne.tagPrefixes.find(function(ye){return oe.indexOf(ye.prefix)===0});if(!pe){var me=ne.getDefaults().tagPrefixes;pe=me&&me.find(function(ye){return oe.indexOf(ye.prefix)===0})}if(!pe)return oe[0]==="!"?oe:"!<".concat(oe,">");var ge=oe.substr(pe.prefix.length).replace(/[!,[\]{}]/g,function(ye){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[ye]});return pe.handle+ge}function getTagObject(ne,oe){if(oe instanceof Alias)return Alias;if(oe.tag){var ce=ne.filter(function(ye){return ye.tag===oe.tag});if(ce.length>0)return ce.find(function(ye){return ye.format===oe.format})||ce[0]}var ue,pe;if(oe instanceof Scalar){pe=oe.value;var me=ne.filter(function(ye){return ye.identify&&ye.identify(pe)||ye.class&&pe instanceof ye.class});ue=me.find(function(ye){return ye.format===oe.format})||me.find(function(ye){return!ye.format})}else pe=oe,ue=ne.find(function(ye){return ye.nodeClass&&pe instanceof ye.nodeClass});if(!ue){var ge=pe&&pe.constructor?pe.constructor.name:_typeof(pe);throw new Error("Tag not resolved for ".concat(ge," value"))}return ue}function stringifyProps(ne,oe,ce){var ue=ce.anchors,pe=ce.doc,me=[],ge=pe.anchors.getName(ne);return ge&&(ue[ge]=ne,me.push("&".concat(ge))),ne.tag?me.push(stringifyTag(pe,ne.tag)):oe.default||me.push(stringifyTag(pe,oe.tag)),me.join(" ")}function stringify$1$1(ne,oe,ce,ue){var pe=oe.doc,me=pe.anchors,ge=pe.schema,ye;if(!(ne instanceof Node$2)){var ve={aliasNodes:[],onTagObj:function(ke){return ye=ke},prevObjects:new Map};ne=ge.createNode(ne,!0,null,ve);var xe=_createForOfIteratorHelper(ve.aliasNodes),_e;try{for(xe.s();!(_e=xe.n()).done;){var Se=_e.value;Se.source=Se.source.node;var $e=me.getName(Se.source);$e||($e=me.newName(),me.map[$e]=Se.source)}}catch(Ie){xe.e(Ie)}finally{xe.f()}}if(ne instanceof Pair)return ne.toString(oe,ce,ue);ye||(ye=getTagObject(ge.tags,ne));var Re=stringifyProps(ne,ye,oe);Re.length>0&&(oe.indentAtStart=(oe.indentAtStart||0)+Re.length+1);var Ae=typeof ye.stringify=="function"?ye.stringify(ne,oe,ce,ue):ne instanceof Scalar?stringifyString(ne,oe,ce,ue):ne.toString(oe,ce,ue);return Re?ne instanceof Scalar||Ae[0]==="{"||Ae[0]==="["?"".concat(Re," ").concat(Ae):"".concat(Re,` `).concat(oe.indent).concat(Ae):Ae}var Anchors=function(){function ne(oe){_classCallCheck(this,ne),_defineProperty(this,"map",Object.create(null)),this.prefix=oe}return _createClass(ne,[{key:"createAlias",value:function(ce,ue){return this.setAnchor(ce,ue),new Alias(ce)}},{key:"createMergePair",value:function(){for(var ce=this,ue=new Merge,pe=arguments.length,me=new Array(pe),ge=0;ge0&&!ne.commentBefore&&(ne.commentBefore=ce.before.join(` `),ce.before=[]))}}catch(Re){me.e(Re)}finally{me.f()}if(ne.contents=ue||null,!ue)ne.comment=ce.before.concat(ce.after).join(` `)||null;else{var Se=ce.before.join(` @@ -1228,7 +1228,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\ `)||null}}function resolveTagDirective(ne,oe){var ce=ne.tagPrefixes,ue=_slicedToArray(oe.parameters,2),pe=ue[0],me=ue[1];if(!pe||!me){var ge="Insufficient parameters given for %TAG directive";throw new YAMLSemanticError(oe,ge)}if(ce.some(function(ve){return ve.handle===pe})){var ye="The %TAG directive must only be given at most once per handle in the same document.";throw new YAMLSemanticError(oe,ye)}return{handle:pe,prefix:me}}function resolveYamlDirective(ne,oe){var ce=_slicedToArray(oe.parameters,1),ue=ce[0];if(oe.name==="YAML:1.0"&&(ue="1.0"),!ue){var pe="Insufficient parameters given for %YAML directive";throw new YAMLSemanticError(oe,pe)}if(!documentOptions[ue]){var me=ne.version||ne.options.version,ge="Document will be parsed as YAML ".concat(me," rather than YAML ").concat(ue);ne.warnings.push(new YAMLWarning(oe,ge))}return ue}function parseDirectives(ne,oe,ce){var ue=[],pe=!1,me=_createForOfIteratorHelper(oe),ge;try{for(me.s();!(ge=me.n()).done;){var ye=ge.value,ve=ye.comment,xe=ye.name;switch(xe){case"TAG":try{ne.tagPrefixes.push(resolveTagDirective(ne,ye))}catch(Re){ne.errors.push(Re)}pe=!0;break;case"YAML":case"YAML:1.0":if(ne.version){var _e="The %YAML directive must only be given at most once per document.";ne.errors.push(new YAMLSemanticError(ye,_e))}try{ne.version=resolveYamlDirective(ne,ye)}catch(Re){ne.errors.push(Re)}pe=!0;break;default:if(xe){var Se="YAML only supports %TAG and %YAML directives, and not %".concat(xe);ne.warnings.push(new YAMLWarning(ye,Se))}}ve&&ue.push(ve)}}catch(Re){me.e(Re)}finally{me.f()}if(ce&&!pe&&(ne.version||ce.version||ne.options.version)==="1.1"){var $e=function(Ae){var Ie=Ae.handle,ke=Ae.prefix;return{handle:Ie,prefix:ke}};ne.tagPrefixes=ce.tagPrefixes.map($e),ne.version=ce.version}ne.commentBefore=ue.join(` `)||null}function assertCollection(ne){if(ne instanceof Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Document$1=function(){function ne(oe){_classCallCheck(this,ne),this.anchors=new Anchors(oe.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=oe,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return _createClass(ne,[{key:"add",value:function(ce){return assertCollection(this.contents),this.contents.add(ce)}},{key:"addIn",value:function(ce,ue){assertCollection(this.contents),this.contents.addIn(ce,ue)}},{key:"delete",value:function(ce){return assertCollection(this.contents),this.contents.delete(ce)}},{key:"deleteIn",value:function(ce){return isEmptyPath(ce)?this.contents==null?!1:(this.contents=null,!0):(assertCollection(this.contents),this.contents.deleteIn(ce))}},{key:"getDefaults",value:function(){return ne.defaults[this.version]||ne.defaults[this.options.version]||{}}},{key:"get",value:function(ce,ue){return this.contents instanceof Collection?this.contents.get(ce,ue):void 0}},{key:"getIn",value:function(ce,ue){return isEmptyPath(ce)?!ue&&this.contents instanceof Scalar?this.contents.value:this.contents:this.contents instanceof Collection?this.contents.getIn(ce,ue):void 0}},{key:"has",value:function(ce){return this.contents instanceof Collection?this.contents.has(ce):!1}},{key:"hasIn",value:function(ce){return isEmptyPath(ce)?this.contents!==void 0:this.contents instanceof Collection?this.contents.hasIn(ce):!1}},{key:"set",value:function(ce,ue){assertCollection(this.contents),this.contents.set(ce,ue)}},{key:"setIn",value:function(ce,ue){isEmptyPath(ce)?this.contents=ue:(assertCollection(this.contents),this.contents.setIn(ce,ue))}},{key:"setSchema",value:function(ce,ue){if(!(!ce&&!ue&&this.schema)){typeof ce=="number"&&(ce=ce.toFixed(1)),ce==="1.0"||ce==="1.1"||ce==="1.2"?(this.version?this.version=ce:this.options.version=ce,delete this.options.schema):ce&&typeof ce=="string"&&(this.options.schema=ce),Array.isArray(ue)&&(this.options.customTags=ue);var pe=Object.assign({},this.getDefaults(),this.options);this.schema=new Schema(pe)}}},{key:"parse",value:function(ce,ue){this.options.keepCstNodes&&(this.cstNode=ce),this.options.keepNodeTypes&&(this.type="DOCUMENT");var pe=ce.directives,me=pe===void 0?[]:pe,ge=ce.contents,ye=ge===void 0?[]:ge,ve=ce.directivesEndMarker,xe=ce.error,_e=ce.valueRange;if(xe&&(xe.source||(xe.source=this),this.errors.push(xe)),parseDirectives(this,me,ue),ve&&(this.directivesEndMarker=!0),this.range=_e?[_e.start,_e.end]:null,this.setSchema(),this.anchors._cstAliases=[],parseContents(this,ye),this.anchors.resolveNodes(),this.options.prettyErrors){var Se=_createForOfIteratorHelper(this.errors),$e;try{for(Se.s();!($e=Se.n()).done;){var Re=$e.value;Re instanceof YAMLError&&Re.makePretty()}}catch(Be){Se.e(Be)}finally{Se.f()}var Ae=_createForOfIteratorHelper(this.warnings),Ie;try{for(Ae.s();!(Ie=Ae.n()).done;){var ke=Ie.value;ke instanceof YAMLError&&ke.makePretty()}}catch(Be){Ae.e(Be)}finally{Ae.f()}}return this}},{key:"listNonDefaultTags",value:function(){return listTagNames(this.contents).filter(function(ce){return ce.indexOf(Schema.defaultPrefix)!==0})}},{key:"setTagPrefix",value:function(ce,ue){if(ce[0]!=="!"||ce[ce.length-1]!=="!")throw new Error("Handle must start and end with !");if(ue){var pe=this.tagPrefixes.find(function(me){return me.handle===ce});pe?pe.prefix=ue:this.tagPrefixes.push({handle:ce,prefix:ue})}else this.tagPrefixes=this.tagPrefixes.filter(function(me){return me.handle!==ce})}},{key:"toJSON",value:function(ce,ue){var pe=this,me=this.options,ge=me.keepBlobsInJSON,ye=me.mapAsMap,ve=me.maxAliasCount,xe=ge&&(typeof ce!="string"||!(this.contents instanceof Scalar)),_e={doc:this,indentStep:" ",keep:xe,mapAsMap:xe&&!!ye,maxAliasCount:ve,stringify:stringify$1$1},Se=Object.keys(this.anchors.map);Se.length>0&&(_e.anchors=new Map(Se.map(function(Ne){return[pe.anchors.map[Ne],{alias:[],aliasCount:0,count:1}]})));var $e=toJSON(this.contents,ce,_e);if(typeof ue=="function"&&_e.anchors){var Re=_createForOfIteratorHelper(_e.anchors.values()),Ae;try{for(Re.s();!(Ae=Re.n()).done;){var Ie=Ae.value,ke=Ie.count,Be=Ie.res;ue(Be,ke)}}catch(Ne){Re.e(Ne)}finally{Re.f()}}return $e}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var ce=this.options.indent;if(!Number.isInteger(ce)||ce<=0){var ue=JSON.stringify(ce);throw new Error('"indent" option must be a positive integer, not '.concat(ue))}this.setSchema();var pe=[],me=!1;if(this.version){var ge="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?ge="%YAML:1.0":this.version==="1.1"&&(ge="%YAML 1.1")),pe.push(ge),me=!0}var ye=this.listNonDefaultTags();this.tagPrefixes.forEach(function(Re){var Ae=Re.handle,Ie=Re.prefix;ye.some(function(ke){return ke.indexOf(Ie)===0})&&(pe.push("%TAG ".concat(Ae," ").concat(Ie)),me=!0)}),(me||this.directivesEndMarker)&&pe.push("---"),this.commentBefore&&((me||!this.directivesEndMarker)&&pe.unshift(""),pe.unshift(this.commentBefore.replace(/^/gm,"#")));var ve={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(ce),stringify:stringify$1$1},xe=!1,_e=null;if(this.contents){this.contents instanceof Node$2&&(this.contents.spaceBefore&&(me||this.directivesEndMarker)&&pe.push(""),this.contents.commentBefore&&pe.push(this.contents.commentBefore.replace(/^/gm,"#")),ve.forceBlockIndent=!!this.comment,_e=this.contents.comment);var Se=_e?null:function(){return xe=!0},$e=stringify$1$1(this.contents,ve,function(){return _e=null},Se);pe.push(addComment($e,"",_e))}else this.contents!==void 0&&pe.push(stringify$1$1(this.contents,ve));return this.comment&&((!xe||_e)&&pe[pe.length-1]!==""&&pe.push(""),pe.push(this.comment.replace(/^/gm,"#"))),pe.join(` `)+` -`}}]),ne}();_defineProperty(Document$1,"defaults",documentOptions);function createNode$1(ne){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ce=arguments.length>2?arguments[2]:void 0;ce===void 0&&typeof oe=="string"&&(ce=oe,oe=!0);var ue=Object.assign({},Document$1.defaults[defaultOptions.version],defaultOptions),pe=new Schema(ue);return pe.createNode(ne,oe,ce)}var Document=function(ne){_inherits(ce,ne);var oe=_createSuper(ce);function ce(ue){return _classCallCheck(this,ce),oe.call(this,Object.assign({},defaultOptions,ue))}return ce}(Document$1);function parseAllDocuments(ne,oe){var ce=[],ue,pe=_createForOfIteratorHelper(parse$5(ne)),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value,ye=new Document(oe);ye.parse(ge,ue),ce.push(ye),ue=ye}}catch(ve){pe.e(ve)}finally{pe.f()}return ce}function parseDocument(ne,oe){var ce=parse$5(ne),ue=new Document(oe).parse(ce[0]);if(ce.length>1){var pe="Source contains multiple documents; please use YAML.parseAllDocuments()";ue.errors.unshift(new YAMLSemanticError(ce[1],pe))}return ue}function parse$4(ne,oe){var ce=parseDocument(ne,oe);if(ce.warnings.forEach(function(ue){return warn(ue)}),ce.errors.length>0)throw ce.errors[0];return ce.toJSON()}function stringify$2(ne,oe){var ce=new Document(oe);return ce.contents=ne,String(ce)}var YAML={createNode:createNode$1,defaultOptions,Document,parse:parse$4,parseAllDocuments,parseCST:parse$5,parseDocument,scalarOptions,stringify:stringify$2};const dist$3=Object.freeze(Object.defineProperty({__proto__:null,YAML},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(dist$3);var browser=require$$0.YAML;function Button({children:ne,sx:oe,...ce}){const ue=usePaper();return jsxRuntimeExports.jsx(MuiButton,{disableElevation:!0,variant:"outlined",color:"primary",...ce,sx:{minWidth:0,borderColor:pe=>alpha$1(pe.palette.text.primary,pe.palette.action.activatedOpacity),...ce.variant==="text"?void 0:ue(1),...oe},children:jsxRuntimeExports.jsx(Box$1,{sx:{color:"text.primary",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:ne})})}function Image$1(ne){return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:({open:oe,isOpen:ce})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Fade$1,{in:ce,children:jsxRuntimeExports.jsx("img",{...ne,onLoad:oe})})})})}const paths$1=Object.assign({"/public/recipes/9-tiles.workspace":()=>__vitePreload(()=>import("./9-tiles-1f224294.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search-heat-map.workspace":()=>__vitePreload(()=>import("./a-star-grid-search-heat-map-0f76793f.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search.workspace":()=>__vitePreload(()=>import("./a-star-grid-search-ffae5751.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/dynamic-star-craft.workspace":()=>__vitePreload(()=>import("./dynamic-star-craft-6a733d35.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/network-bidirectional-a-star.workspace":()=>__vitePreload(()=>import("./network-bidirectional-a-star-4c1e2d86.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/palette-reference.workspace":()=>__vitePreload(()=>import("./palette-reference-9c0fac30.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/polyanya.workspace":()=>__vitePreload(()=>import("./polyanya-fc7ef19b.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/primitives-reference.workspace":()=>__vitePreload(()=>import("./primitives-reference-9d7af09e.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/rayscan.workspace":()=>__vitePreload(()=>import("./rayscan-202b7804.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/variables-reference.workspace":()=>__vitePreload(()=>import("./variables-reference-b00bbb42.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/weighted-a-star.workspace":()=>__vitePreload(()=>import("./weighted-a-star-756c8812.js"),[],import.meta.url).then(ne=>ne.default)}),metaPaths=Object.assign({"/public/recipes/9-tiles.workspace.meta":()=>__vitePreload(()=>import("./9-tiles.workspace-59d4551f.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search-heat-map.workspace.meta":()=>__vitePreload(()=>import("./a-star-grid-search-heat-map.workspace-3224cf75.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search.workspace.meta":()=>__vitePreload(()=>import("./a-star-grid-search.workspace-f767f34b.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/dynamic-star-craft.workspace.meta":()=>__vitePreload(()=>import("./dynamic-star-craft.workspace-5fa26288.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/network-bidirectional-a-star.workspace.meta":()=>__vitePreload(()=>import("./network-bidirectional-a-star.workspace-e2672c0c.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/palette-reference.workspace.meta":()=>__vitePreload(()=>import("./palette-reference.workspace-76a89235.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/polyanya.workspace.meta":()=>__vitePreload(()=>import("./polyanya.workspace-2b25151a.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/primitives-reference.workspace.meta":()=>__vitePreload(()=>import("./primitives-reference.workspace-cc4c7f83.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/rayscan.workspace.meta":()=>__vitePreload(()=>import("./rayscan.workspace-b6c007ed.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/variables-reference.workspace.meta":()=>__vitePreload(()=>import("./variables-reference.workspace-4bafa382.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/weighted-a-star.workspace.meta":()=>__vitePreload(()=>import("./weighted-a-star.workspace-44781276.js"),[],import.meta.url).then(ne=>ne.default)});function stripExtension$1(ne){return ne.split(".")[0]}function basename$1(ne){return ne.split("/").pop()}async function getMeta(ne){const oe=metaPaths[ne.replace(/workspace$/,"workspace.meta")],ce=await(oe==null?void 0:oe());if(ce){const ue=await fetch(ce);return browser.parse(await ue.text())}}const getFileInfo$1=memoizee$1(async(ne,oe)=>({name:lodashExports$1.chain(ne).thru(basename$1).thru(stripExtension$1).startCase().value(),path:await oe(),...await getMeta(ne)}),{normalizer:([ne])=>ne}),makeAvatar=ne=>oe=>jsxRuntimeExports.jsx(Avatar$1,{sx:oe,children:ne});function getAuthor(ne){if(ne){try{const{protocol:oe,pathname:ce}=new URL(ne);switch(oe){case"github:":return{name:ce,avatar:ue=>jsxRuntimeExports.jsx("a",{href:`https://github.com/${ce}`,target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx(Avatar$1,{sx:ue,children:jsxRuntimeExports.jsx(Image$1,{width:"100%",height:"100%",src:`https://github.com/${ce}.png`})})})};default:break}}catch{}return{name:ne,avatar:makeAvatar(ne[0])}}return{name:"No author",avatar:makeAvatar()}}const ellipsisProps={textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"};function FeatureCard2({entry:ne,onOpenClick:oe,search:ce}){const{result:ue,loading:pe}=useAsync(async()=>{if(ne)return await getFileInfo$1(...ne)},[ne]),{name:me,description:ge,screenshots:ye,author:ve,path:xe,size:_e}=ue??{};return lodashExports$1.upperCase(browser.stringify(ue)).includes(lodashExports$1.upperCase(ce))?jsxRuntimeExports.jsx(Box$1,{sx:{p:1},children:jsxRuntimeExports.jsx(FeatureCard,{loading:pe,name:me,description:ge??"No description",image:lodashExports$1.first(ye),author:ve,onOpenClick:()=>{oe==null||oe(xe)},size:_e})}):void 0}function FeatureCard({name:ne,description:oe,image:ce,author:ue,size:pe,onOpenClick:me,loading:ge,...ye}){const[{"appearance/acrylic":ve}]=useSettings(),xe=usePaper(),_e=useTheme$1(),{name:Se,avatar:$e}=reactExports.useMemo(()=>getAuthor(ue),[ue]);return jsxRuntimeExports.jsx(Card$1,{variant:"outlined",sx:{...xe(1),position:"relative",height:"100%"},...ye,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ve&&jsxRuntimeExports.jsx(Fade$1,{in:!ge,timeout:_e.transitions.duration.complex,children:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Box$1,{sx:{zIndex:-1,filter:"blur(48px)",opacity:.1,position:"absolute",width:"100%",height:"100%",backgroundImage:`url("${ce}")`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"-52px -52px"}})})}),jsxRuntimeExports.jsx(CardHeader$1,{sx:{alignItems:"flex-start","> .MuiCardHeader-content":{overflow:"hidden"}},avatar:jsxRuntimeExports.jsx(Box$1,{sx:{...xe(1),border:"none",borderRadius:1,width:64,height:64,overflow:"hidden"},children:jsxRuntimeExports.jsx(Fade$1,{in:!!ce,children:jsxRuntimeExports.jsx(Box$1,{sx:{width:64,height:64,backgroundImage:`url("${ce}")`,backgroundSize:"100%",backgroundPosition:"center"}})})}),titleTypographyProps:ellipsisProps,title:ge?jsxRuntimeExports.jsx(Placeholder$3,{}):ne||"Untitled",subheaderTypographyProps:ellipsisProps,subheader:jsxRuntimeExports.jsxs(Stack$1,{gap:2,sx:{pt:1,alignItems:"flex-start"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",sx:{...ellipsisProps,maxWidth:"100%",width:"100%",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,whiteSpace:"break-spaces",height:60},children:ge?lodashExports$1.map([80,30],Re=>jsxRuntimeExports.jsx(Placeholder$3,{width:`${Re}%`},Re)):oe||"No description"}),jsxRuntimeExports.jsxs(Stack$1,{direction:"row",alignItems:"center",gap:1,children:[$e==null?void 0:$e({width:18,height:18,fontSize:"0.8rem"}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"caption",children:ge?jsxRuntimeExports.jsx(Placeholder$3,{width:120}):Se})]}),jsxRuntimeExports.jsx(Button,{disabled:ge,onClick:me,startIcon:jsxRuntimeExports.jsx(WorkspacesOutlined,{}),sx:xe(2),children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",gap:1,children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:"Open"}),!!pe&&jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",children:[lodashExports$1.round(pe/1024/1024,2)," MB"]})]})})]})})]})})}const CONTENT_WIDTH=940,entries2=lodashExports$1.entries(paths$1);function ExplorePage({template:ne}){const oe=useTheme$1(),[{"behaviour/showOnStart":ce},ue]=useSettings(),pe=useSnackbar(),{controls:me,onChange:ge,state:ye,dragHandle:ve,isViewTree:xe}=useViewTreeContext(),{close:_e}=useFullscreenModalContext(),$e=useSmallDisplay()||xe,[Re,Ae]=reactExports.useState(""),[Ie,ke]=reactExports.useState("explore"),{load:Be}=useWorkspace(),Ne=useLoadingState(),Fe=ze=>Ne(async()=>{try{pe(`Loading ${basename$1(ze)}...`);const Ge=await fetch(ze);Ge.ok||pe(`Couldn't load ${basename$1(ze)}`,"Network error",{error:!0});const Ze=await Ge.blob(),Dt=new File([Ze],basename$1(ze),{type:Ze.type});Be(Dt)}catch(Ge){pe(`Couldn't load ${basename$1(ze)}`,`${Ge}`,{error:!0})}}),Ue=ce==="explore";function We(ze){ue(()=>({"behaviour/showOnStart":ze?"explore":void 0}))}function qe(){const ze=new Rt(oe.palette.primary.main).H,Ge=new Rt("rgba(0,50,255,.2)").H;return jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",top:"-100%",left:"calc(50%)",width:"100%",zIndex:-1,transform:"translateX(-50%) rotate(180deg)",height:"150%",filter:`hue-rotate(${ze-Ge}deg)`,minWidth:640,opacity:.75,background:"radial-gradient(46.56% 45.08% at 56.04% 55.33%,rgba(0,50,255,.2) 0,transparent 100%),radial-gradient(46.69% 41.74% at 69.64% 60.81%,rgba(192,59,196,.2) 0,transparent 100%),radial-gradient(59.78% 45.73% at 30.42% 58.68%,rgba(0,120,212,.2) 0,transparent 100%),radial-gradient(32.53% 31.57% at 50% 66.82%,rgba(70,54,104,.2) 0,transparent 100%)"}})}return jsxRuntimeExports.jsx(TabContext,{value:Ie,children:jsxRuntimeExports.jsxs(ne,{onChange:ge,stack:ye,children:[jsxRuntimeExports.jsx(ne.Title,{children:"Explore"}),jsxRuntimeExports.jsx(ne.Key,{children:"explore"}),jsxRuntimeExports.jsx(ne.Handle,{children:ve}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsxs(TabList$1,{onChange:(ze,Ge)=>ke(Ge),sx:{mx:xe?0:-1},children:[jsxRuntimeExports.jsx(Tab$1,{label:"Examples",value:"explore"}),jsxRuntimeExports.jsx(Tab$1,{label:"Guides",value:"guides"})]})}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{vertical:!0,children:jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsx(Box$1,{sx:$e?void 0:{p:4,maxWidth:CONTENT_WIDTH,mx:"auto"},children:jsxRuntimeExports.jsxs(Box$1,{pt:6,children:[jsxRuntimeExports.jsxs(TabPanel$1,{value:"explore",sx:{p:0},children:[jsxRuntimeExports.jsxs(Box$1,{p:4,sx:{textAlign:"center"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:$e?"h6":"h4",children:"Examples"}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"subtitle2",color:"text.secondary",children:"Browse a library of included and community-made examples"})]}),oe.palette.mode==="dark"&&qe(),jsxRuntimeExports.jsx(Box$1,{px:2,pb:4,sx:{textAlign:"center"},children:jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,size:$e?"small":"medium",hiddenLabel:!0,fullWidth:!0,sx:{maxWidth:480},InputProps:{startAdornment:jsxRuntimeExports.jsx(InputAdornment$1,{position:"start",children:jsxRuntimeExports.jsx(SearchOutlined,{})})},onChange:ze=>Ae(ze.target.value),placeholder:"Search examples"})}),jsxRuntimeExports.jsx(Box$1,{sx:{p:1,display:"grid",gridAutoFlow:"row",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 320px), 1fr))"},children:lodashExports$1.map(entries2,ze=>jsxRuntimeExports.jsx(FeatureCard2,{search:Re,entry:ze,onOpenClick:Ge=>{Fe(Ge),_e==null||_e()}},ze[0]))})]}),jsxRuntimeExports.jsxs(TabPanel$1,{value:"guides",sx:{p:0},children:[jsxRuntimeExports.jsxs(Box$1,{p:4,sx:{textAlign:"center"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:$e?"h6":"h4",children:"Guides"}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"subtitle2",color:"text.secondary",children:`Learn how to use ${name} and explore ${name} features`})]}),jsxRuntimeExports.jsxs(Stack$1,{sx:{p:4,maxWidth:480,mx:"auto",textAlign:"center",alignItems:"center"},gap:2,children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:"We're still working on this feature. Check out our documentation instead."}),jsxRuntimeExports.jsx(Button,{onClick:()=>window.open(docs,"_blank"),sx:{maxWidth:"min-content"},startIcon:jsxRuntimeExports.jsx(LaunchOutlined,{}),children:"Open Documentation"})]})]})]})})})})}),jsxRuntimeExports.jsxs(ne.Extras,{children:[!$e&&jsxRuntimeExports.jsx(FormControlLabel$1,{label:"Show on start-up",labelPlacement:"start",sx:{ml:"auto",mr:-5,minWidth:"fit-content"},control:jsxRuntimeExports.jsx(Checkbox$1,{defaultChecked:Ue,onChange:(ze,Ge)=>We==null?void 0:We(Ge)})}),me]})]})})}function InfoPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),[me,ge]=useLog();return jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"info"}),jsxRuntimeExports.jsx(ne.Title,{children:"Logs"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsx(FeaturePickerButton,{disabled:!me.length,icon:jsxRuntimeExports.jsx(CloseOutlined,{}),onClick:()=>ge(()=>({action:"clear"})),children:"Clear"})}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{vertical:!0,children:me.length?jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsx(List$2,{sx:{pt:6},children:lodashExports$1.map(me,(ye,ve)=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ListItem$1,{children:jsxRuntimeExports.jsx(ListItemText$1,{primary:ye.content,secondary:ye.timestamp})}),jsxRuntimeExports.jsx(Divider$1,{})]},ve))})}):jsxRuntimeExports.jsx(Placeholder$2,{pt:6,label:"Logs",icon:jsxRuntimeExports.jsx(ListOutlined,{})})})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})}const compositeOperations=["color","color-burn","color-dodge","copy","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","lighten","lighter","luminosity","multiply","overlay","saturation","screen","soft-light","source-atop","source-in","source-out","source-over","xor"];function useDraft(ne,oe,ce=300,ue=[]){const[pe,me]=reactExports.useState(ne);reactExports.useEffect(()=>{ne&&requestIdleCallback(()=>me(lodashExports$1.merge(pe,lodashExports$1.omit(ne,...ue))))},[me,ne]);const ge=reactExports.useMemo(()=>lodashExports$1.debounce(ye=>oe==null?void 0:oe(ye),ce),[oe,ce]);return[pe,ye=>{const ve=ye(pe);me(ve),ge(ve)}]}function LayerEditor({value:ne,onValueChange:oe}){var Se,$e,Re,Ae;const ce=usePaper(),[ue,pe]=useDraft(ne,oe,300,["name","source.type"]),me=Ie=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",sx:{pt:1},children:Ie}),ge=Ie=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",children:Ie}),ye=(Ie,ke)=>jsxRuntimeExports.jsxs(Flex,{alignItems:"center",children:[ge(Ie),jsxRuntimeExports.jsx(Space,{flex:1}),ke]}),ve=Ie=>Ie.map(ke=>({id:ke,name:lodashExports$1.startCase(ke)})),xe=ue.name||inferLayerName(ne),_e=($e=(Se=getController(ne))==null?void 0:Se.error)==null?void 0:$e.call(Se,ne);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ManagedModal,{popover:!0,slotProps:{popover:{anchorOrigin:{horizontal:-12,vertical:-12}}},appBar:{children:"Edit Layer"},trigger:Ie=>{var ke;return jsxRuntimeExports.jsx(ButtonBase$1,{onClick:Ie,className:ue.key,sx:{flex:1,display:"block",textAlign:"left",px:2},children:jsxRuntimeExports.jsxs(Stack$1,{alignItems:"center",direction:"row",gap:2,children:[jsxRuntimeExports.jsx(Stack$1,{sx:{...ce(.5),alignItems:"center",justifyContent:"center",width:36,height:36,color:"action.disabled"},children:getController(ne).icon}),jsxRuntimeExports.jsxs(Box$1,{sx:{py:1.5,flex:1,width:0,ml:0,overflow:"hidden","> *":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:xe}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:lodashExports$1.startCase((ke=ne.source)==null?void 0:ke.type)})]}),!!_e&&jsxRuntimeExports.jsx(Tooltip$1,{title:_e,children:jsxRuntimeExports.jsx(Chip$1,{sx:{mr:-2,...lodashExports$1.omit(ce(1),"borderRadius"),color:Be=>Be.palette.error.main,flex:0},label:`${lodashExports$1.truncate(`${_e}`,{length:8})}`,size:"small"})})]})})},children:jsxRuntimeExports.jsxs(Box$1,{p:2,children:[jsxRuntimeExports.jsx(TextField$1,{sx:{mb:2},autoComplete:"off",autoFocus:!0,placeholder:inferLayerName(ue),fullWidth:!0,variant:"filled",label:"Layer Name",defaultValue:ue.name??"",onChange:Ie=>pe==null?void 0:pe(ke=>lodashExports$1.set(ke,"name",Ie.target.value))}),jsxRuntimeExports.jsxs(Box$1,{sx:{mx:-2,pb:1},children:[jsxRuntimeExports.jsx(Tabs$1,{variant:"fullWidth",onChange:(Ie,ke)=>pe==null?void 0:pe(Be=>lodashExports$1.set(Be,"source",{type:ke})),value:((Re=ue.source)==null?void 0:Re.type)??lodashExports$1.first(lodashExports$1.keys(getControllers()))??"",children:lodashExports$1.keys(getControllers()).map(Ie=>jsxRuntimeExports.jsx(Tab$1,{label:lodashExports$1.startCase(Ie),value:Ie},Ie))}),jsxRuntimeExports.jsx(Divider$1,{sx:{width:"100%"}})]}),me("Source Options"),((Ae=ue.source)==null?void 0:Ae.type)&&reactExports.createElement(getController(ue).editor,{onChange:pe,value:ue}),me("Layer Options"),ye("Transparency",jsxRuntimeExports.jsx(FeaturePicker,{label:"Transparency",items:["0","25","50","75"].map(Ie=>({id:Ie,name:`${Ie}%`})),value:ue.transparency??"0",arrow:!0,onChange:Ie=>pe==null?void 0:pe(ke=>lodashExports$1.set(ke,"transparency",Ie))})),ye("Display Mode",jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,label:"Display Mode",value:ue.displayMode??"source-over",items:ve(compositeOperations),onChange:Ie=>pe==null?void 0:pe(ke=>lodashExports$1.set(ke,"displayMode",Ie))}))]})})})}function LayerListEditor(){const[{layers:ne=[]},oe]=useLayers();return jsxRuntimeExports.jsx(Box$1,{sx:{overflow:"auto hidden",width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{mb:2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,icon:null,value:ne,deletable:!0,orderable:!0,extras:ce=>jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ue=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Menu$1,{...bindMenu(ue),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:jsxRuntimeExports.jsx(MenuList$1,{dense:!0,sx:{p:0},children:[{name:"Fit Layer",key:"fit-layer",action:()=>oe(({layers:pe})=>({layers:lodashExports$1.map(pe,me=>({...me,viewKey:me.key===(ce==null?void 0:ce.key)?nanoid$1():void 0}))}))}].map(({name:pe,key:me,action:ge})=>jsxRuntimeExports.jsx(MenuItem$1,{onClick:()=>{ge==null||ge(),ue.close()},children:pe},me))})}),jsxRuntimeExports.jsx(IconButton$1,{...bindTrigger(ue),sx:{color:pe=>pe.palette.text.secondary},children:jsxRuntimeExports.jsx(MoreVertOutlined,{})})]})}),renderEditor:({extras:ce,handle:ue,value:pe,onValueChange:me})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ue,jsxRuntimeExports.jsx(LayerEditor,{value:pe,onValueChange:me}),ce]}),create:()=>({source:{type:"trace",trace:{}}}),onChange:ce=>requestIdleCallback(()=>oe(()=>({layers:ce})),{timeout:300}),addItemLabel:"Layer",placeholder:jsxRuntimeExports.jsx(Box$1,{pt:2,children:"Get started by adding a layer."}),onFocus:ce=>{const ue=lodashExports$1.head(document.getElementsByClassName(ce));ue&&"click"in ue&&typeof ue.click=="function"&&ue.click()}})})})}function LayersPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext();return jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"layers"}),jsxRuntimeExports.jsx(ne.Title,{children:"Layers"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Scroll,{y:!0,style:{width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{pt:6,children:jsxRuntimeExports.jsx(LayerListEditor,{})})})})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})}var dist$2={},client$1={},models={};(function(ne){var oe=commonjsGlobal&&commonjsGlobal.__extends||function(){var Re=function(Ae,Ie){return Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Be){ke.__proto__=Be}||function(ke,Be){for(var Ne in Be)Object.prototype.hasOwnProperty.call(Be,Ne)&&(ke[Ne]=Be[Ne])},Re(Ae,Ie)};return function(Ae,Ie){if(typeof Ie!="function"&&Ie!==null)throw new TypeError("Class extends value "+String(Ie)+" is not a constructor or null");Re(Ae,Ie);function ke(){this.constructor=Ae}Ae.prototype=Ie===null?Object.create(Ie):(ke.prototype=Ie.prototype,new ke)}}();Object.defineProperty(ne,"__esModule",{value:!0}),ne.createJSONRPCNotification=ne.createJSONRPCRequest=ne.createJSONRPCSuccessResponse=ne.createJSONRPCErrorResponse=ne.JSONRPCErrorCode=ne.JSONRPCErrorException=ne.isJSONRPCResponses=ne.isJSONRPCResponse=ne.isJSONRPCRequests=ne.isJSONRPCRequest=ne.isJSONRPCID=ne.JSONRPC=void 0,ne.JSONRPC="2.0";var ce=function(Re){return typeof Re=="string"||typeof Re=="number"||Re===null};ne.isJSONRPCID=ce;var ue=function(Re){return Re.jsonrpc===ne.JSONRPC&&Re.method!==void 0&&Re.result===void 0&&Re.error===void 0};ne.isJSONRPCRequest=ue;var pe=function(Re){return Array.isArray(Re)&&Re.every(ne.isJSONRPCRequest)};ne.isJSONRPCRequests=pe;var me=function(Re){return Re.jsonrpc===ne.JSONRPC&&Re.id!==void 0&&(Re.result!==void 0||Re.error!==void 0)};ne.isJSONRPCResponse=me;var ge=function(Re){return Array.isArray(Re)&&Re.every(ne.isJSONRPCResponse)};ne.isJSONRPCResponses=ge;var ye=function(Re,Ae,Ie){var ke={code:Re,message:Ae};return Ie!=null&&(ke.data=Ie),ke},ve=function(Re){oe(Ae,Re);function Ae(Ie,ke,Be){var Ne=Re.call(this,Ie)||this;return Object.setPrototypeOf(Ne,Ae.prototype),Ne.code=ke,Ne.data=Be,Ne}return Ae.prototype.toObject=function(){return ye(this.code,this.message,this.data)},Ae}(Error);ne.JSONRPCErrorException=ve,function(Re){Re[Re.ParseError=-32700]="ParseError",Re[Re.InvalidRequest=-32600]="InvalidRequest",Re[Re.MethodNotFound=-32601]="MethodNotFound",Re[Re.InvalidParams=-32602]="InvalidParams",Re[Re.InternalError=-32603]="InternalError"}(ne.JSONRPCErrorCode||(ne.JSONRPCErrorCode={}));var xe=function(Re,Ae,Ie,ke){return{jsonrpc:ne.JSONRPC,id:Re,error:ye(Ae,Ie,ke)}};ne.createJSONRPCErrorResponse=xe;var _e=function(Re,Ae){return{jsonrpc:ne.JSONRPC,id:Re,result:Ae??null}};ne.createJSONRPCSuccessResponse=_e;var Se=function(Re,Ae,Ie){return{jsonrpc:ne.JSONRPC,id:Re,method:Ae,params:Ie}};ne.createJSONRPCRequest=Se;var $e=function(Re,Ae){return{jsonrpc:ne.JSONRPC,method:Re,params:Ae}};ne.createJSONRPCNotification=$e})(models);var internal$1={};Object.defineProperty(internal$1,"__esModule",{value:!0});internal$1.DefaultErrorCode=void 0;internal$1.DefaultErrorCode=0;var __awaiter$2=commonjsGlobal&&commonjsGlobal.__awaiter||function(ne,oe,ce,ue){function pe(me){return me instanceof ce?me:new ce(function(ge){ge(me)})}return new(ce||(ce=Promise))(function(me,ge){function ye(_e){try{xe(ue.next(_e))}catch(Se){ge(Se)}}function ve(_e){try{xe(ue.throw(_e))}catch(Se){ge(Se)}}function xe(_e){_e.done?me(_e.value):pe(_e.value).then(ye,ve)}xe((ue=ue.apply(ne,oe||[])).next())})},__generator$2=commonjsGlobal&&commonjsGlobal.__generator||function(ne,oe){var ce={label:0,sent:function(){if(me[0]&1)throw me[1];return me[1]},trys:[],ops:[]},ue,pe,me,ge;return ge={next:ye(0),throw:ye(1),return:ye(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function ye(xe){return function(_e){return ve([xe,_e])}}function ve(xe){if(ue)throw new TypeError("Generator is already executing.");for(;ge&&(ge=0,xe[0]&&(ce=0)),ce;)try{if(ue=1,pe&&(me=xe[0]&2?pe.return:xe[0]?pe.throw||((me=pe.return)&&me.call(pe),0):pe.next)&&!(me=me.call(pe,xe[1])).done)return me;switch(pe=0,me&&(xe=[xe[0]&2,me.value]),xe[0]){case 0:case 1:me=xe;break;case 4:return ce.label++,{value:xe[1],done:!1};case 5:ce.label++,pe=xe[1],xe=[0];continue;case 7:xe=ce.ops.pop(),ce.trys.pop();continue;default:if(me=ce.trys,!(me=me.length>0&&me[me.length-1])&&(xe[0]===6||xe[0]===2)){ce=0;continue}if(xe[0]===3&&(!me||xe[1]>me[0]&&xe[1]0&&me[me.length-1])&&(xe[0]===6||xe[0]===2)){ce=0;continue}if(xe[0]===3&&(!me||xe[1]>me[0]&&xe[1]0&&me[me.length-1])&&(xe[0]===6||xe[0]===2)){ce=0;continue}if(xe[0]===3&&(!me||xe[1]>me[0]&&xe[1]{const pe=({data:me})=>{me.id===ue.id&&(this.rpc.receive(me),this.worker.removeEventListener("message",pe))};this.worker.postMessage(ue),this.worker.addEventListener("message",pe)})}connect(){return this.worker.postMessage(this.options.url),new Promise(ce=>{const ue=()=>{ce(),this.worker.removeEventListener("message",ue)};this.worker.addEventListener("message",ue)})}async disconnect(){this.worker.terminate()}async call(ce,ue){return await this.rpc.request(ce,ue)}}var requiresPort=function(oe,ce){if(ce=ce.split(":")[0],oe=+oe,!oe)return!1;switch(ce){case"http":case"ws":return oe!==80;case"https":case"wss":return oe!==443;case"ftp":return oe!==21;case"gopher":return oe!==70;case"file":return!1}return oe!==0},querystringify$1={},has$4=Object.prototype.hasOwnProperty,undef;function decode$3(ne){try{return decodeURIComponent(ne.replace(/\+/g," "))}catch{return null}}function encode$3(ne){try{return encodeURIComponent(ne)}catch{return null}}function querystring$1(ne){for(var oe=/([^=?#&]+)=?([^&]*)/g,ce={},ue;ue=oe.exec(ne);){var pe=decode$3(ue[1]),me=decode$3(ue[2]);pe===null||me===null||pe in ce||(ce[pe]=me)}return ce}function querystringify(ne,oe){oe=oe||"";var ce=[],ue,pe;typeof oe!="string"&&(oe="?");for(pe in ne)if(has$4.call(ne,pe)){if(ue=ne[pe],!ue&&(ue===null||ue===undef||isNaN(ue))&&(ue=""),pe=encode$3(pe),ue=encode$3(ue),pe===null||ue===null)continue;ce.push(pe+"="+ue)}return ce.length?oe+ce.join("&"):""}querystringify$1.stringify=querystringify;querystringify$1.parse=querystring$1;var required=requiresPort,qs=querystringify$1,controlOrWhitespace=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,CRHTLF=/[\n\r\t]/g,slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,port=/:\d+$/,protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,windowsDriveLetter=/^[a-zA-Z]:/;function trimLeft(ne){return(ne||"").toString().replace(controlOrWhitespace,"")}var rules=[["#","hash"],["?","query"],function(oe,ce){return isSpecial(ce.protocol)?oe.replace(/\\/g,"/"):oe},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(ne){var oe;typeof window<"u"?oe=window:typeof commonjsGlobal<"u"?oe=commonjsGlobal:typeof self<"u"?oe=self:oe={};var ce=oe.location||{};ne=ne||ce;var ue={},pe=typeof ne,me;if(ne.protocol==="blob:")ue=new Url$1(unescape(ne.pathname),{});else if(pe==="string"){ue=new Url$1(ne,{});for(me in ignore)delete ue[me]}else if(pe==="object"){for(me in ne)me in ignore||(ue[me]=ne[me]);ue.slashes===void 0&&(ue.slashes=slashes.test(ne.href))}return ue}function isSpecial(ne){return ne==="file:"||ne==="ftp:"||ne==="http:"||ne==="https:"||ne==="ws:"||ne==="wss:"}function extractProtocol(ne,oe){ne=trimLeft(ne),ne=ne.replace(CRHTLF,""),oe=oe||{};var ce=protocolre.exec(ne),ue=ce[1]?ce[1].toLowerCase():"",pe=!!ce[2],me=!!ce[3],ge=0,ye;return pe?me?(ye=ce[2]+ce[3]+ce[4],ge=ce[2].length+ce[3].length):(ye=ce[2]+ce[4],ge=ce[2].length):me?(ye=ce[3]+ce[4],ge=ce[3].length):ye=ce[4],ue==="file:"?ge>=2&&(ye=ye.slice(2)):isSpecial(ue)?ye=ce[4]:ue?pe&&(ye=ye.slice(2)):ge>=2&&isSpecial(oe.protocol)&&(ye=ce[4]),{protocol:ue,slashes:pe||isSpecial(ue),slashesCount:ge,rest:ye}}function resolve$1(ne,oe){if(ne==="")return oe;for(var ce=(oe||"/").split("/").slice(0,-1).concat(ne.split("/")),ue=ce.length,pe=ce[ue-1],me=!1,ge=0;ue--;)ce[ue]==="."?ce.splice(ue,1):ce[ue]===".."?(ce.splice(ue,1),ge++):ge&&(ue===0&&(me=!0),ce.splice(ue,1),ge--);return me&&ce.unshift(""),(pe==="."||pe==="..")&&ce.push(""),ce.join("/")}function Url$1(ne,oe,ce){if(ne=trimLeft(ne),ne=ne.replace(CRHTLF,""),!(this instanceof Url$1))return new Url$1(ne,oe,ce);var ue,pe,me,ge,ye,ve,xe=rules.slice(),_e=typeof oe,Se=this,$e=0;for(_e!=="object"&&_e!=="string"&&(ce=oe,oe=null),ce&&typeof ce!="function"&&(ce=qs.parse),oe=lolcation(oe),pe=extractProtocol(ne||"",oe),ue=!pe.protocol&&!pe.slashes,Se.slashes=pe.slashes||ue&&oe.slashes,Se.protocol=pe.protocol||oe.protocol||"",ne=pe.rest,(pe.protocol==="file:"&&(pe.slashesCount!==2||windowsDriveLetter.test(ne))||!pe.slashes&&(pe.protocol||pe.slashesCount<2||!isSpecial(Se.protocol)))&&(xe[3]=[/(.*)/,"pathname"]);$e__vitePreload(()=>import("./alien-81a163a8.js"),[],import.meta.url).then(ne=>ne.default),"/public/maps/maze-medium.grid":()=>__vitePreload(()=>import("./maze-medium-a955cbb9.js"),[],import.meta.url).then(ne=>ne.default),"/public/maps/maze-small.grid":()=>__vitePreload(()=>import("./maze-small-85d74cf5.js"),[],import.meta.url).then(ne=>ne.default),"/public/maps/random-32x32.grid":()=>__vitePreload(()=>import("./random-32x32-1b96f0c8.js"),[],import.meta.url).then(ne=>ne.default)});function ext(ne){return ne.split(".")[1]}function stripExtension(ne){return ne.split(".")[0]}function basename(ne){return ne.split("/").pop()}const getFileInfo=memoizee$1(async(ne,oe)=>({id:`basic-maps${ne}`,name:lodashExports$1.chain(ne).thru(basename).thru(stripExtension).startCase().value(),path:await oe(),format:ext(ne)}),{normalizer:([ne])=>ne}),getFiles=async()=>await Promise.all(lodashExports$1.map(lodashExports$1.entries(paths),ne=>getFileInfo(...ne))),internal={"basic-maps":async(ne,oe)=>{switch(ne){case"about":return{name:"Basic Maps",description:"A collection of basic grid maps",version:"1.2.2"};case"features/formats":return[{id:"grid",name:"Grid"},{id:"xy",name:"Network"},{id:"mesh",name:"Mesh"}];case"features/maps":return await getFiles();case"features/map":{const ce=await getFiles(),ue=lodashExports$1.find(ce,{id:oe==null?void 0:oe.id});if(ue){const pe=await fetch(ue.path);return{...ue,content:await pe.text()}}}}}};class NativeTransport extends EventEmitter$2{constructor(ce){super();Gl(this,"handler");this.options=ce;const{hostname:ue}=url$2(ce.url);this.handler=internal[ue]}async connect(){}async disconnect(){}async call(ce,ue){return await this.handler(ce,ue)}}const PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(ne=>{PACKET_TYPES_REVERSE[PACKET_TYPES[ne]]=ne});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=ne=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ne):ne&&ne.buffer instanceof ArrayBuffer,encodePacket=({type:ne,data:oe},ce,ue)=>withNativeBlob$1&&oe instanceof Blob?ce?ue(oe):encodeBlobAsBase64(oe,ue):withNativeArrayBuffer$2&&(oe instanceof ArrayBuffer||isView$1(oe))?ce?ue(oe):encodeBlobAsBase64(new Blob([oe]),ue):ue(PACKET_TYPES[ne]+(oe||"")),encodeBlobAsBase64=(ne,oe)=>{const ce=new FileReader;return ce.onload=function(){const ue=ce.result.split(",")[1];oe("b"+(ue||""))},ce.readAsDataURL(ne)};function toArray(ne){return ne instanceof Uint8Array?ne:ne instanceof ArrayBuffer?new Uint8Array(ne):new Uint8Array(ne.buffer,ne.byteOffset,ne.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(ne,oe){if(withNativeBlob$1&&ne.data instanceof Blob)return ne.data.arrayBuffer().then(toArray).then(oe);if(withNativeArrayBuffer$2&&(ne.data instanceof ArrayBuffer||isView$1(ne.data)))return oe(toArray(ne.data));encodePacket(ne,!1,ce=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),oe(TEXT_ENCODER.encode(ce))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let ne=0;ne{let oe=ne.length*.75,ce=ne.length,ue,pe=0,me,ge,ye,ve;ne[ne.length-1]==="="&&(oe--,ne[ne.length-2]==="="&&oe--);const xe=new ArrayBuffer(oe),_e=new Uint8Array(xe);for(ue=0;ue>4,_e[pe++]=(ge&15)<<4|ye>>2,_e[pe++]=(ye&3)<<6|ve&63;return xe},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(ne,oe)=>{if(typeof ne!="string")return{type:"message",data:mapBinary(ne,oe)};const ce=ne.charAt(0);return ce==="b"?{type:"message",data:decodeBase64Packet(ne.substring(1),oe)}:PACKET_TYPES_REVERSE[ce]?ne.length>1?{type:PACKET_TYPES_REVERSE[ce],data:ne.substring(1)}:{type:PACKET_TYPES_REVERSE[ce]}:ERROR_PACKET},decodeBase64Packet=(ne,oe)=>{if(withNativeArrayBuffer$1){const ce=decode$2(ne);return mapBinary(ce,oe)}else return{base64:!0,data:ne}},mapBinary=(ne,oe)=>{switch(oe){case"blob":return ne instanceof Blob?ne:new Blob([ne]);case"arraybuffer":default:return ne instanceof ArrayBuffer?ne:ne.buffer}},SEPARATOR=String.fromCharCode(30),encodePayload=(ne,oe)=>{const ce=ne.length,ue=new Array(ce);let pe=0;ne.forEach((me,ge)=>{encodePacket(me,!1,ye=>{ue[ge]=ye,++pe===ce&&oe(ue.join(SEPARATOR))})})},decodePayload=(ne,oe)=>{const ce=ne.split(SEPARATOR),ue=[];for(let pe=0;pe{const ue=ce.length;let pe;if(ue<126)pe=new Uint8Array(1),new DataView(pe.buffer).setUint8(0,ue);else if(ue<65536){pe=new Uint8Array(3);const me=new DataView(pe.buffer);me.setUint8(0,126),me.setUint16(1,ue)}else{pe=new Uint8Array(9);const me=new DataView(pe.buffer);me.setUint8(0,127),me.setBigUint64(1,BigInt(ue))}ne.data&&typeof ne.data!="string"&&(pe[0]|=128),oe.enqueue(pe),oe.enqueue(ce)})}})}let TEXT_DECODER;function totalLength(ne){return ne.reduce((oe,ce)=>oe+ce.length,0)}function concatChunks(ne,oe){if(ne[0].length===oe)return ne.shift();const ce=new Uint8Array(oe);let ue=0;for(let pe=0;peMath.pow(2,53-32)-1){ye.enqueue(ERROR_PACKET);break}pe=_e*Math.pow(2,32)+xe.getUint32(4),ue=3}else{if(totalLength(ce)ne){ye.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(ne){if(ne)return mixin(ne)}function mixin(ne){for(var oe in Emitter.prototype)ne[oe]=Emitter.prototype[oe];return ne}Emitter.prototype.on=Emitter.prototype.addEventListener=function(ne,oe){return this._callbacks=this._callbacks||{},(this._callbacks["$"+ne]=this._callbacks["$"+ne]||[]).push(oe),this};Emitter.prototype.once=function(ne,oe){function ce(){this.off(ne,ce),oe.apply(this,arguments)}return ce.fn=oe,this.on(ne,ce),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(ne,oe){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var ce=this._callbacks["$"+ne];if(!ce)return this;if(arguments.length==1)return delete this._callbacks["$"+ne],this;for(var ue,pe=0;petypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function pick(ne,...oe){return oe.reduce((ce,ue)=>(ne.hasOwnProperty(ue)&&(ce[ue]=ne[ue]),ce),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(ne,oe){oe.useNativeTimers?(ne.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),ne.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(ne.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),ne.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(ne){return typeof ne=="string"?utf8Length(ne):Math.ceil((ne.byteLength||ne.size)*BASE64_OVERHEAD)}function utf8Length(ne){let oe=0,ce=0;for(let ue=0,pe=ne.length;ue=57344?ce+=3:(ue++,ce+=4);return ce}function encode$2(ne){let oe="";for(let ce in ne)ne.hasOwnProperty(ce)&&(oe.length&&(oe+="&"),oe+=encodeURIComponent(ce)+"="+encodeURIComponent(ne[ce]));return oe}function decode$1(ne){let oe={},ce=ne.split("&");for(let ue=0,pe=ce.length;ue0);return oe}function yeast(){const ne=encode$1(+new Date);return ne!==prev?(seed=0,prev=ne):ne+"."+encode$1(seed++)}for(;i$2{this.readyState="paused",oe()};if(this.polling||!this.writable){let ue=0;this.polling&&(ue++,this.once("pollComplete",function(){--ue||ce()})),this.writable||(ue++,this.once("drain",function(){--ue||ce()}))}else ce()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(oe){const ce=ue=>{if(this.readyState==="opening"&&ue.type==="open"&&this.onOpen(),ue.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(ue)};decodePayload(oe,this.socket.binaryType).forEach(ce),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const oe=()=>{this.write([{type:"close"}])};this.readyState==="open"?oe():this.once("open",oe)}write(oe){this.writable=!1,encodePayload(oe,ce=>{this.doWrite(ce,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const oe=this.opts.secure?"https":"http",ce=this.query||{};return this.opts.timestampRequests!==!1&&(ce[this.opts.timestampParam]=yeast()),!this.supportsBinary&&!ce.sid&&(ce.b64=1),this.createUri(oe,ce)}request(oe={}){return Object.assign(oe,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Request(this.uri(),oe)}doWrite(oe,ce){const ue=this.request({method:"POST",data:oe});ue.on("success",ce),ue.on("error",(pe,me)=>{this.onError("xhr post error",pe,me)})}doPoll(){const oe=this.request();oe.on("data",this.onData.bind(this)),oe.on("error",(ce,ue)=>{this.onError("xhr poll error",ce,ue)}),this.pollXhr=oe}}class Request extends Emitter{constructor(oe,ce){super(),installTimerFunctions(this,ce),this.opts=ce,this.method=ce.method||"GET",this.uri=oe,this.data=ce.data!==void 0?ce.data:null,this.create()}create(){var oe;const ce=pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");ce.xdomain=!!this.opts.xd;const ue=this.xhr=new XHR(ce);try{ue.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){ue.setDisableHeaderCheck&&ue.setDisableHeaderCheck(!0);for(let pe in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(pe)&&ue.setRequestHeader(pe,this.opts.extraHeaders[pe])}}catch{}if(this.method==="POST")try{ue.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{ue.setRequestHeader("Accept","*/*")}catch{}(oe=this.opts.cookieJar)===null||oe===void 0||oe.addCookies(ue),"withCredentials"in ue&&(ue.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(ue.timeout=this.opts.requestTimeout),ue.onreadystatechange=()=>{var pe;ue.readyState===3&&((pe=this.opts.cookieJar)===null||pe===void 0||pe.parseCookies(ue)),ue.readyState===4&&(ue.status===200||ue.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof ue.status=="number"?ue.status:0)},0))},ue.send(this.data)}catch(pe){this.setTimeoutFn(()=>{this.onError(pe)},0);return}typeof document<"u"&&(this.index=Request.requestsCount++,Request.requests[this.index]=this)}onError(oe){this.emitReserved("error",oe,this.xhr),this.cleanup(!0)}cleanup(oe){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=empty$1,oe)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Request.requests[this.index],this.xhr=null}}onLoad(){const oe=this.xhr.responseText;oe!==null&&(this.emitReserved("data",oe),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Request.requestsCount=0;Request.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const ne="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(ne,unloadHandler,!1)}}function unloadHandler(){for(let ne in Request.requests)Request.requests.hasOwnProperty(ne)&&Request.requests[ne].abort()}const nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?oe=>Promise.resolve().then(oe):(oe,ce)=>ce(oe,0))(),WebSocket=globalThisShim.WebSocket||globalThisShim.MozWebSocket,usingBrowserWebSocket=!0,defaultBinaryType="arraybuffer",isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WS extends Transport{constructor(oe){super(oe),this.supportsBinary=!oe.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const oe=this.uri(),ce=this.opts.protocols,ue=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(ue.headers=this.opts.extraHeaders);try{this.ws=usingBrowserWebSocket&&!isReactNative?ce?new WebSocket(oe,ce):new WebSocket(oe):new WebSocket(oe,ce,ue)}catch(pe){return this.emitReserved("error",pe)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=oe=>this.onClose({description:"websocket connection closed",context:oe}),this.ws.onmessage=oe=>this.onData(oe.data),this.ws.onerror=oe=>this.onError("websocket error",oe)}write(oe){this.writable=!1;for(let ce=0;ce{const ge={};try{usingBrowserWebSocket&&this.ws.send(me)}catch{}pe&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const oe=this.opts.secure?"wss":"ws",ce=this.query||{};return this.opts.timestampRequests&&(ce[this.opts.timestampParam]=yeast()),this.supportsBinary||(ce.b64=1),this.createUri(oe,ce)}check(){return!!WebSocket}}class WT extends Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(oe=>{this.onError("webtransport error",oe)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(oe=>{const ce=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),ue=oe.readable.pipeThrough(ce).getReader(),pe=createPacketEncoderStream();pe.readable.pipeTo(oe.writable),this.writer=pe.writable.getWriter();const me=()=>{ue.read().then(({done:ye,value:ve})=>{ye||(this.onPacket(ve),me())}).catch(ye=>{})};me();const ge={type:"open"};this.query.sid&&(ge.data=`{"sid":"${this.query.sid}"}`),this.writer.write(ge).then(()=>this.onOpen())})}))}write(oe){this.writable=!1;for(let ce=0;ce{pe&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var oe;(oe=this.transport)===null||oe===void 0||oe.close()}}const transports$2={websocket:WS,webtransport:WT,polling:Polling},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse$3(ne){if(ne.length>2e3)throw"URI too long";const oe=ne,ce=ne.indexOf("["),ue=ne.indexOf("]");ce!=-1&&ue!=-1&&(ne=ne.substring(0,ce)+ne.substring(ce,ue).replace(/:/g,";")+ne.substring(ue,ne.length));let pe=re.exec(ne||""),me={},ge=14;for(;ge--;)me[parts[ge]]=pe[ge]||"";return ce!=-1&&ue!=-1&&(me.source=oe,me.host=me.host.substring(1,me.host.length-1).replace(/;/g,":"),me.authority=me.authority.replace("[","").replace("]","").replace(/;/g,":"),me.ipv6uri=!0),me.pathNames=pathNames(me,me.path),me.queryKey=queryKey(me,me.query),me}function pathNames(ne,oe){const ce=/\/{2,9}/g,ue=oe.replace(ce,"/").split("/");return(oe.slice(0,1)=="/"||oe.length===0)&&ue.splice(0,1),oe.slice(-1)=="/"&&ue.splice(ue.length-1,1),ue}function queryKey(ne,oe){const ce={};return oe.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(ue,pe,me){pe&&(ce[pe]=me)}),ce}let Socket$1=class Ql extends Emitter{constructor(oe,ce={}){super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],oe&&typeof oe=="object"&&(ce=oe,oe=null),oe?(oe=parse$3(oe),ce.hostname=oe.host,ce.secure=oe.protocol==="https"||oe.protocol==="wss",ce.port=oe.port,oe.query&&(ce.query=oe.query)):ce.host&&(ce.hostname=parse$3(ce.host).host),installTimerFunctions(this,ce),this.secure=ce.secure!=null?ce.secure:typeof location<"u"&&location.protocol==="https:",ce.hostname&&!ce.port&&(ce.port=this.secure?"443":"80"),this.hostname=ce.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=ce.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=ce.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},ce),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode$1(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(oe){const ce=Object.assign({},this.opts.query);ce.EIO=protocol$1,ce.transport=oe,this.id&&(ce.sid=this.id);const ue=Object.assign({},this.opts,{query:ce,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[oe]);return new transports$2[oe](ue)}open(){let oe;if(this.opts.rememberUpgrade&&Ql.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)oe="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else oe=this.transports[0];this.readyState="opening";try{oe=this.createTransport(oe)}catch{this.transports.shift(),this.open();return}oe.open(),this.setTransport(oe)}setTransport(oe){this.transport&&this.transport.removeAllListeners(),this.transport=oe,oe.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",ce=>this.onClose("transport close",ce))}probe(oe){let ce=this.createTransport(oe),ue=!1;Ql.priorWebsocketSuccess=!1;const pe=()=>{ue||(ce.send([{type:"ping",data:"probe"}]),ce.once("packet",Se=>{if(!ue)if(Se.type==="pong"&&Se.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",ce),!ce)return;Ql.priorWebsocketSuccess=ce.name==="websocket",this.transport.pause(()=>{ue||this.readyState!=="closed"&&(_e(),this.setTransport(ce),ce.send([{type:"upgrade"}]),this.emitReserved("upgrade",ce),ce=null,this.upgrading=!1,this.flush())})}else{const $e=new Error("probe error");$e.transport=ce.name,this.emitReserved("upgradeError",$e)}}))};function me(){ue||(ue=!0,_e(),ce.close(),ce=null)}const ge=Se=>{const $e=new Error("probe error: "+Se);$e.transport=ce.name,me(),this.emitReserved("upgradeError",$e)};function ye(){ge("transport closed")}function ve(){ge("socket closed")}function xe(Se){ce&&Se.name!==ce.name&&me()}const _e=()=>{ce.removeListener("open",pe),ce.removeListener("error",ge),ce.removeListener("close",ye),this.off("close",ve),this.off("upgrading",xe)};ce.once("open",pe),ce.once("error",ge),ce.once("close",ye),this.once("close",ve),this.once("upgrading",xe),this.upgrades.indexOf("webtransport")!==-1&&oe!=="webtransport"?this.setTimeoutFn(()=>{ue||ce.open()},200):ce.open()}onOpen(){if(this.readyState="open",Ql.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let oe=0;const ce=this.upgrades.length;for(;oe{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const oe=this.getWritablePackets();this.transport.send(oe),this.prevBufferLen=oe.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let ce=1;for(let ue=0;ue0&&ce>this.maxPayload)return this.writeBuffer.slice(0,ue);ce+=2}return this.writeBuffer}write(oe,ce,ue){return this.sendPacket("message",oe,ce,ue),this}send(oe,ce,ue){return this.sendPacket("message",oe,ce,ue),this}sendPacket(oe,ce,ue,pe){if(typeof ce=="function"&&(pe=ce,ce=void 0),typeof ue=="function"&&(pe=ue,ue=null),this.readyState==="closing"||this.readyState==="closed")return;ue=ue||{},ue.compress=ue.compress!==!1;const me={type:oe,data:ce,options:ue};this.emitReserved("packetCreate",me),this.writeBuffer.push(me),pe&&this.once("flush",pe),this.flush()}close(){const oe=()=>{this.onClose("forced close"),this.transport.close()},ce=()=>{this.off("upgrade",ce),this.off("upgradeError",ce),oe()},ue=()=>{this.once("upgrade",ce),this.once("upgradeError",ce)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?ue():oe()}):this.upgrading?ue():oe()),this}onError(oe){Ql.priorWebsocketSuccess=!1,this.emitReserved("error",oe),this.onClose("transport error",oe)}onClose(oe,ce){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",oe,ce),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(oe){const ce=[];let ue=0;const pe=oe.length;for(;uetypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ne):ne.buffer instanceof ArrayBuffer,toString=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString.call(File)==="[object FileConstructor]";function isBinary(ne){return withNativeArrayBuffer&&(ne instanceof ArrayBuffer||isView(ne))||withNativeBlob&&ne instanceof Blob||withNativeFile&&ne instanceof File}function hasBinary(ne,oe){if(!ne||typeof ne!="object")return!1;if(Array.isArray(ne)){for(let ce=0,ue=ne.length;ce=0&&ne.num{delete this.acks[oe];for(let ge=0;ge{this.io.clearTimeoutFn(me),ce.apply(this,[null,...ge])}}emitWithAck(oe,...ce){const ue=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((pe,me)=>{ce.push((ge,ye)=>ue?ge?me(ge):pe(ye):pe(ge)),this.emit(oe,...ce)})}_addToQueue(oe){let ce;typeof oe[oe.length-1]=="function"&&(ce=oe.pop());const ue={id:this._queueSeq++,tryCount:0,pending:!1,args:oe,flags:Object.assign({fromQueue:!0},this.flags)};oe.push((pe,...me)=>ue!==this._queue[0]?void 0:(pe!==null?ue.tryCount>this._opts.retries&&(this._queue.shift(),ce&&ce(pe)):(this._queue.shift(),ce&&ce(null,...me)),ue.pending=!1,this._drainQueue())),this._queue.push(ue),this._drainQueue()}_drainQueue(oe=!1){if(!this.connected||this._queue.length===0)return;const ce=this._queue[0];ce.pending&&!oe||(ce.pending=!0,ce.tryCount++,this.flags=ce.flags,this.emit.apply(this,ce.args))}packet(oe){oe.nsp=this.nsp,this.io._packet(oe)}onopen(){typeof this.auth=="function"?this.auth(oe=>{this._sendConnectPacket(oe)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(oe){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},oe):oe})}onerror(oe){this.connected||this.emitReserved("connect_error",oe)}onclose(oe,ce){this.connected=!1,delete this.id,this.emitReserved("disconnect",oe,ce)}onpacket(oe){if(oe.nsp===this.nsp)switch(oe.type){case PacketType.CONNECT:oe.data&&oe.data.sid?this.onconnect(oe.data.sid,oe.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(oe);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(oe);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const ue=new Error(oe.data.message);ue.data=oe.data.data,this.emitReserved("connect_error",ue);break}}onevent(oe){const ce=oe.data||[];oe.id!=null&&ce.push(this.ack(oe.id)),this.connected?this.emitEvent(ce):this.receiveBuffer.push(Object.freeze(ce))}emitEvent(oe){if(this._anyListeners&&this._anyListeners.length){const ce=this._anyListeners.slice();for(const ue of ce)ue.apply(this,oe)}super.emit.apply(this,oe),this._pid&&oe.length&&typeof oe[oe.length-1]=="string"&&(this._lastOffset=oe[oe.length-1])}ack(oe){const ce=this;let ue=!1;return function(...pe){ue||(ue=!0,ce.packet({type:PacketType.ACK,id:oe,data:pe}))}}onack(oe){const ce=this.acks[oe.id];typeof ce=="function"&&(ce.apply(this,oe.data),delete this.acks[oe.id])}onconnect(oe,ce){this.id=oe,this.recovered=ce&&this._pid===ce,this._pid=ce,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(oe=>this.emitEvent(oe)),this.receiveBuffer=[],this.sendBuffer.forEach(oe=>{this.notifyOutgoingListeners(oe),this.packet(oe)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(oe=>oe()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(oe){return this.flags.compress=oe,this}get volatile(){return this.flags.volatile=!0,this}timeout(oe){return this.flags.timeout=oe,this}onAny(oe){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(oe),this}prependAny(oe){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(oe),this}offAny(oe){if(!this._anyListeners)return this;if(oe){const ce=this._anyListeners;for(let ue=0;ue0&&ne.jitter<=1?ne.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var ne=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var oe=Math.random(),ce=Math.floor(oe*this.jitter*ne);ne=Math.floor(oe*10)&1?ne+ce:ne-ce}return Math.min(ne,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(ne){this.ms=ne};Backoff.prototype.setMax=function(ne){this.max=ne};Backoff.prototype.setJitter=function(ne){this.jitter=ne};class Manager extends Emitter{constructor(oe,ce){var ue;super(),this.nsps={},this.subs=[],oe&&typeof oe=="object"&&(ce=oe,oe=void 0),ce=ce||{},ce.path=ce.path||"/socket.io",this.opts=ce,installTimerFunctions(this,ce),this.reconnection(ce.reconnection!==!1),this.reconnectionAttempts(ce.reconnectionAttempts||1/0),this.reconnectionDelay(ce.reconnectionDelay||1e3),this.reconnectionDelayMax(ce.reconnectionDelayMax||5e3),this.randomizationFactor((ue=ce.randomizationFactor)!==null&&ue!==void 0?ue:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(ce.timeout==null?2e4:ce.timeout),this._readyState="closed",this.uri=oe;const pe=ce.parser||parser;this.encoder=new pe.Encoder,this.decoder=new pe.Decoder,this._autoConnect=ce.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(oe){return arguments.length?(this._reconnection=!!oe,this):this._reconnection}reconnectionAttempts(oe){return oe===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=oe,this)}reconnectionDelay(oe){var ce;return oe===void 0?this._reconnectionDelay:(this._reconnectionDelay=oe,(ce=this.backoff)===null||ce===void 0||ce.setMin(oe),this)}randomizationFactor(oe){var ce;return oe===void 0?this._randomizationFactor:(this._randomizationFactor=oe,(ce=this.backoff)===null||ce===void 0||ce.setJitter(oe),this)}reconnectionDelayMax(oe){var ce;return oe===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=oe,(ce=this.backoff)===null||ce===void 0||ce.setMax(oe),this)}timeout(oe){return arguments.length?(this._timeout=oe,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(oe){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const ce=this.engine,ue=this;this._readyState="opening",this.skipReconnect=!1;const pe=on(ce,"open",function(){ue.onopen(),oe&&oe()}),me=ye=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",ye),oe?oe(ye):this.maybeReconnectOnOpen()},ge=on(ce,"error",me);if(this._timeout!==!1){const ye=this._timeout,ve=this.setTimeoutFn(()=>{pe(),me(new Error("timeout")),ce.close()},ye);this.opts.autoUnref&&ve.unref(),this.subs.push(()=>{this.clearTimeoutFn(ve)})}return this.subs.push(pe),this.subs.push(ge),this}connect(oe){return this.open(oe)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const oe=this.engine;this.subs.push(on(oe,"ping",this.onping.bind(this)),on(oe,"data",this.ondata.bind(this)),on(oe,"error",this.onerror.bind(this)),on(oe,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(oe){try{this.decoder.add(oe)}catch(ce){this.onclose("parse error",ce)}}ondecoded(oe){nextTick(()=>{this.emitReserved("packet",oe)},this.setTimeoutFn)}onerror(oe){this.emitReserved("error",oe)}socket(oe,ce){let ue=this.nsps[oe];return ue?this._autoConnect&&!ue.active&&ue.connect():(ue=new Socket(this,oe,ce),this.nsps[oe]=ue),ue}_destroy(oe){const ce=Object.keys(this.nsps);for(const ue of ce)if(this.nsps[ue].active)return;this._close()}_packet(oe){const ce=this.encoder.encode(oe);for(let ue=0;ueoe()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(oe,ce){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",oe,ce),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const oe=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const ce=this.backoff.duration();this._reconnecting=!0;const ue=this.setTimeoutFn(()=>{oe.skipReconnect||(this.emitReserved("reconnect_attempt",oe.backoff.attempts),!oe.skipReconnect&&oe.open(pe=>{pe?(oe._reconnecting=!1,oe.reconnect(),this.emitReserved("reconnect_error",pe)):oe.onreconnect()}))},ce);this.opts.autoUnref&&ue.unref(),this.subs.push(()=>{this.clearTimeoutFn(ue)})}}onreconnect(){const oe=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",oe)}}const cache={};function lookup(ne,oe){typeof ne=="object"&&(oe=ne,ne=void 0),oe=oe||{};const ce=url$1(ne,oe.path||"/socket.io"),ue=ce.source,pe=ce.id,me=ce.path,ge=cache[pe]&&me in cache[pe].nsps,ye=oe.forceNew||oe["force new connection"]||oe.multiplex===!1||ge;let ve;return ye?ve=new Manager(ue,oe):(cache[pe]||(cache[pe]=new Manager(ue,oe)),ve=cache[pe]),ce.query&&!oe.query&&(oe.query=ce.queryKey),ve.socket(ce.path,oe)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});class SocketIOTransport extends EventEmitter$2{constructor(ce){super();Gl(this,"client");Gl(this,"socket");this.options=ce,this.socket=lookup(ce.url),this.client=new dist$2.JSONRPCClient(async ue=>{const pe=me=>{me.id===ue.id&&(this.socket.off("response",pe),this.client.receive(me))};this.socket.emit("request",ue),this.socket.on("response",pe)}),this.socket.on("request",({method:ue,params:pe})=>{this.emit(ue,pe)})}async connect(){this.socket.connect()}async disconnect(){this.socket.disconnect()}async call(ce,ue){return await this.client.request(ce,ue)}}const transports$1={native:{name:"Internal",constructor:NativeTransport},socketio:{name:"socket.io",constructor:SocketIOTransport},ipc:{name:"Web Worker",constructor:IPCTransport}};function getTransport(ne){return transports$1[ne].constructor}const defaultTransport=lodashExports$1.first(lodashExports$1.keys(transports$1));var lodash={exports:{}};/** +`}}]),ne}();_defineProperty(Document$1,"defaults",documentOptions);function createNode$1(ne){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ce=arguments.length>2?arguments[2]:void 0;ce===void 0&&typeof oe=="string"&&(ce=oe,oe=!0);var ue=Object.assign({},Document$1.defaults[defaultOptions.version],defaultOptions),pe=new Schema(ue);return pe.createNode(ne,oe,ce)}var Document=function(ne){_inherits(ce,ne);var oe=_createSuper(ce);function ce(ue){return _classCallCheck(this,ce),oe.call(this,Object.assign({},defaultOptions,ue))}return ce}(Document$1);function parseAllDocuments(ne,oe){var ce=[],ue,pe=_createForOfIteratorHelper(parse$5(ne)),me;try{for(pe.s();!(me=pe.n()).done;){var ge=me.value,ye=new Document(oe);ye.parse(ge,ue),ce.push(ye),ue=ye}}catch(ve){pe.e(ve)}finally{pe.f()}return ce}function parseDocument(ne,oe){var ce=parse$5(ne),ue=new Document(oe).parse(ce[0]);if(ce.length>1){var pe="Source contains multiple documents; please use YAML.parseAllDocuments()";ue.errors.unshift(new YAMLSemanticError(ce[1],pe))}return ue}function parse$4(ne,oe){var ce=parseDocument(ne,oe);if(ce.warnings.forEach(function(ue){return warn(ue)}),ce.errors.length>0)throw ce.errors[0];return ce.toJSON()}function stringify$2(ne,oe){var ce=new Document(oe);return ce.contents=ne,String(ce)}var YAML={createNode:createNode$1,defaultOptions,Document,parse:parse$4,parseAllDocuments,parseCST:parse$5,parseDocument,scalarOptions,stringify:stringify$2};const dist$3=Object.freeze(Object.defineProperty({__proto__:null,YAML},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(dist$3);var browser=require$$0.YAML;function Image$1(ne){return jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:({open:oe,isOpen:ce})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Fade$1,{in:ce,children:jsxRuntimeExports.jsx("img",{...ne,onLoad:oe})})})})}const paths$1=Object.assign({"/public/recipes/9-tiles.workspace":()=>__vitePreload(()=>import("./9-tiles-1f224294.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search-heat-map.workspace":()=>__vitePreload(()=>import("./a-star-grid-search-heat-map-0f76793f.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search.workspace":()=>__vitePreload(()=>import("./a-star-grid-search-ffae5751.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/dynamic-star-craft.workspace":()=>__vitePreload(()=>import("./dynamic-star-craft-6a733d35.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/network-bidirectional-a-star.workspace":()=>__vitePreload(()=>import("./network-bidirectional-a-star-4c1e2d86.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/palette-reference.workspace":()=>__vitePreload(()=>import("./palette-reference-9c0fac30.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/polyanya.workspace":()=>__vitePreload(()=>import("./polyanya-fc7ef19b.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/primitives-reference.workspace":()=>__vitePreload(()=>import("./primitives-reference-9d7af09e.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/rayscan.workspace":()=>__vitePreload(()=>import("./rayscan-202b7804.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/variables-reference.workspace":()=>__vitePreload(()=>import("./variables-reference-b00bbb42.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/weighted-a-star.workspace":()=>__vitePreload(()=>import("./weighted-a-star-756c8812.js"),[],import.meta.url).then(ne=>ne.default)}),metaPaths=Object.assign({"/public/recipes/9-tiles.workspace.meta":()=>__vitePreload(()=>import("./9-tiles.workspace-59d4551f.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search-heat-map.workspace.meta":()=>__vitePreload(()=>import("./a-star-grid-search-heat-map.workspace-3224cf75.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/a-star-grid-search.workspace.meta":()=>__vitePreload(()=>import("./a-star-grid-search.workspace-f767f34b.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/dynamic-star-craft.workspace.meta":()=>__vitePreload(()=>import("./dynamic-star-craft.workspace-5fa26288.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/network-bidirectional-a-star.workspace.meta":()=>__vitePreload(()=>import("./network-bidirectional-a-star.workspace-e2672c0c.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/palette-reference.workspace.meta":()=>__vitePreload(()=>import("./palette-reference.workspace-76a89235.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/polyanya.workspace.meta":()=>__vitePreload(()=>import("./polyanya.workspace-2b25151a.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/primitives-reference.workspace.meta":()=>__vitePreload(()=>import("./primitives-reference.workspace-cc4c7f83.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/rayscan.workspace.meta":()=>__vitePreload(()=>import("./rayscan.workspace-b6c007ed.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/variables-reference.workspace.meta":()=>__vitePreload(()=>import("./variables-reference.workspace-4bafa382.js"),[],import.meta.url).then(ne=>ne.default),"/public/recipes/weighted-a-star.workspace.meta":()=>__vitePreload(()=>import("./weighted-a-star.workspace-44781276.js"),[],import.meta.url).then(ne=>ne.default)});function stripExtension$1(ne){return ne.split(".")[0]}function basename$1(ne){return ne.split("/").pop()}async function getMeta(ne){const oe=metaPaths[ne.replace(/workspace$/,"workspace.meta")],ce=await(oe==null?void 0:oe());if(ce){const ue=await fetch(ce);return browser.parse(await ue.text())}}const getFileInfo$1=memoizee$1(async(ne,oe)=>({name:lodashExports$1.chain(ne).thru(basename$1).thru(stripExtension$1).startCase().value(),path:await oe(),...await getMeta(ne)}),{normalizer:([ne])=>ne}),makeAvatar=ne=>oe=>jsxRuntimeExports.jsx(Avatar$1,{sx:oe,children:ne});function getAuthor(ne){if(ne){try{const{protocol:oe,pathname:ce}=new URL(ne);switch(oe){case"github:":return{name:ce,avatar:ue=>jsxRuntimeExports.jsx("a",{href:`https://github.com/${ce}`,target:"_blank",rel:"noreferrer",children:jsxRuntimeExports.jsx(Avatar$1,{sx:ue,children:jsxRuntimeExports.jsx(Image$1,{width:"100%",height:"100%",src:`https://github.com/${ce}.png`})})})};default:break}}catch{}return{name:ne,avatar:makeAvatar(ne[0])}}return{name:"No author",avatar:makeAvatar()}}const ellipsisProps={textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"};function FeatureCard2({entry:ne,onOpenClick:oe,search:ce}){const{result:ue,loading:pe}=useAsync(async()=>{if(ne)return await getFileInfo$1(...ne)},[ne]),{name:me,description:ge,screenshots:ye,author:ve,path:xe,size:_e}=ue??{};return lodashExports$1.upperCase(browser.stringify(ue)).includes(lodashExports$1.upperCase(ce))?jsxRuntimeExports.jsx(Box$1,{sx:{p:1},children:jsxRuntimeExports.jsx(FeatureCard,{loading:pe,name:me,description:ge??"No description",image:lodashExports$1.first(ye),author:ve,onOpenClick:()=>{oe==null||oe(xe)},size:_e})}):void 0}function FeatureCard({name:ne,description:oe,image:ce,author:ue,size:pe,onOpenClick:me,loading:ge,...ye}){const[{"appearance/acrylic":ve}]=useSettings(),xe=usePaper(),_e=useTheme$1(),{name:Se,avatar:$e}=reactExports.useMemo(()=>getAuthor(ue),[ue]);return jsxRuntimeExports.jsx(Card$1,{variant:"outlined",sx:{...xe(1),position:"relative",height:"100%"},...ye,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ve&&jsxRuntimeExports.jsx(Fade$1,{in:!ge,timeout:_e.transitions.duration.complex,children:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Box$1,{sx:{zIndex:-1,filter:"blur(48px)",opacity:.1,position:"absolute",width:"100%",height:"100%",backgroundImage:`url("${ce}")`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"-52px -52px"}})})}),jsxRuntimeExports.jsx(CardHeader$1,{sx:{alignItems:"flex-start","> .MuiCardHeader-content":{overflow:"hidden"}},avatar:jsxRuntimeExports.jsx(Box$1,{sx:{...xe(1),border:"none",borderRadius:1,width:64,height:64,overflow:"hidden"},children:jsxRuntimeExports.jsx(Fade$1,{in:!!ce,children:jsxRuntimeExports.jsx(Box$1,{sx:{width:64,height:64,backgroundImage:`url("${ce}")`,backgroundSize:"100%",backgroundPosition:"center"}})})}),titleTypographyProps:ellipsisProps,title:ge?jsxRuntimeExports.jsx(Placeholder$3,{}):ne||"Untitled",subheaderTypographyProps:ellipsisProps,subheader:jsxRuntimeExports.jsxs(Stack$1,{gap:2,sx:{pt:1,alignItems:"flex-start"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",sx:{...ellipsisProps,maxWidth:"100%",width:"100%",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,whiteSpace:"break-spaces",height:60},children:ge?lodashExports$1.map([80,30],Re=>jsxRuntimeExports.jsx(Placeholder$3,{width:`${Re}%`},Re)):oe||"No description"}),jsxRuntimeExports.jsxs(Stack$1,{direction:"row",alignItems:"center",gap:1,children:[$e==null?void 0:$e({width:18,height:18,fontSize:"0.8rem"}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"caption",children:ge?jsxRuntimeExports.jsx(Placeholder$3,{width:120}):Se})]}),jsxRuntimeExports.jsx(Button,{disabled:ge,onClick:me,startIcon:jsxRuntimeExports.jsx(WorkspacesOutlined,{}),sx:xe(2),children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",gap:1,children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:"Open"}),!!pe&&jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",children:[lodashExports$1.round(pe/1024/1024,2)," MB"]})]})})]})})]})})}const CONTENT_WIDTH=940,entries2=lodashExports$1.entries(paths$1);function ExplorePage({template:ne}){const oe=useTheme$1(),[{"behaviour/showOnStart":ce},ue]=useSettings(),pe=useSnackbar(),{controls:me,onChange:ge,state:ye,dragHandle:ve,isViewTree:xe}=useViewTreeContext(),{close:_e}=useFullscreenModalContext(),$e=useSmallDisplay()||xe,[Re,Ae]=reactExports.useState(""),[Ie,ke]=reactExports.useState("explore"),{load:Be}=useWorkspace(),Ne=useLoadingState(),Fe=ze=>Ne(async()=>{try{pe(`Loading ${basename$1(ze)}...`);const Ge=await fetch(ze);Ge.ok||pe(`Couldn't load ${basename$1(ze)}`,"Network error",{error:!0});const Ze=await Ge.blob(),Dt=new File([Ze],basename$1(ze),{type:Ze.type});Be(Dt,new URL(location.href).origin)}catch(Ge){pe(`Couldn't load ${basename$1(ze)}`,`${Ge}`,{error:!0})}}),Ue=ce==="explore";function We(ze){ue(()=>({"behaviour/showOnStart":ze?"explore":void 0}))}function qe(){const ze=new Rt(oe.palette.primary.main).H,Ge=new Rt("rgba(0,50,255,.2)").H;return jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",top:"-100%",left:"calc(50%)",width:"100%",zIndex:-1,transform:"translateX(-50%) rotate(180deg)",height:"150%",filter:`hue-rotate(${ze-Ge}deg)`,minWidth:640,opacity:.75,background:"radial-gradient(46.56% 45.08% at 56.04% 55.33%,rgba(0,50,255,.2) 0,transparent 100%),radial-gradient(46.69% 41.74% at 69.64% 60.81%,rgba(192,59,196,.2) 0,transparent 100%),radial-gradient(59.78% 45.73% at 30.42% 58.68%,rgba(0,120,212,.2) 0,transparent 100%),radial-gradient(32.53% 31.57% at 50% 66.82%,rgba(70,54,104,.2) 0,transparent 100%)"}})}return jsxRuntimeExports.jsx(TabContext,{value:Ie,children:jsxRuntimeExports.jsxs(ne,{onChange:ge,stack:ye,children:[jsxRuntimeExports.jsx(ne.Title,{children:"Explore"}),jsxRuntimeExports.jsx(ne.Key,{children:"explore"}),jsxRuntimeExports.jsx(ne.Handle,{children:ve}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsxs(TabList$1,{onChange:(ze,Ge)=>ke(Ge),sx:{mx:xe?0:-1},children:[jsxRuntimeExports.jsx(Tab$1,{label:"Examples",value:"explore"}),jsxRuntimeExports.jsx(Tab$1,{label:"Guides",value:"guides"})]})}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{vertical:!0,children:jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsx(Box$1,{sx:$e?void 0:{p:4,maxWidth:CONTENT_WIDTH,mx:"auto"},children:jsxRuntimeExports.jsxs(Box$1,{pt:6,children:[jsxRuntimeExports.jsxs(TabPanel$1,{value:"explore",sx:{p:0},children:[jsxRuntimeExports.jsxs(Box$1,{p:4,sx:{textAlign:"center"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:$e?"h6":"h4",children:"Examples"}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"subtitle2",color:"text.secondary",children:"Browse a library of included and community-made examples"})]}),oe.palette.mode==="dark"&&qe(),jsxRuntimeExports.jsx(Box$1,{px:2,pb:4,sx:{textAlign:"center"},children:jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,size:$e?"small":"medium",hiddenLabel:!0,fullWidth:!0,sx:{maxWidth:480},InputProps:{startAdornment:jsxRuntimeExports.jsx(InputAdornment$1,{position:"start",children:jsxRuntimeExports.jsx(SearchOutlined,{})})},onChange:ze=>Ae(ze.target.value),placeholder:"Search examples"})}),jsxRuntimeExports.jsx(Box$1,{sx:{p:1,display:"grid",gridAutoFlow:"row",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 320px), 1fr))"},children:lodashExports$1.map(entries2,ze=>jsxRuntimeExports.jsx(FeatureCard2,{search:Re,entry:ze,onOpenClick:Ge=>{Fe(Ge),_e==null||_e()}},ze[0]))})]}),jsxRuntimeExports.jsxs(TabPanel$1,{value:"guides",sx:{p:0},children:[jsxRuntimeExports.jsxs(Box$1,{p:4,sx:{textAlign:"center"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:$e?"h6":"h4",children:"Guides"}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"subtitle2",color:"text.secondary",children:`Learn how to use ${name} and explore ${name} features`})]}),jsxRuntimeExports.jsxs(Stack$1,{sx:{p:4,maxWidth:480,mx:"auto",textAlign:"center",alignItems:"center"},gap:2,children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:"We're still working on this feature. Check out our documentation instead."}),jsxRuntimeExports.jsx(Button,{onClick:()=>window.open(docs,"_blank"),sx:{maxWidth:"min-content"},startIcon:jsxRuntimeExports.jsx(LaunchOutlined,{}),children:"Open Documentation"})]})]})]})})})})}),jsxRuntimeExports.jsxs(ne.Extras,{children:[!$e&&jsxRuntimeExports.jsx(FormControlLabel$1,{label:"Show on start-up",labelPlacement:"start",sx:{ml:"auto",mr:-5,minWidth:"fit-content"},control:jsxRuntimeExports.jsx(Checkbox$1,{defaultChecked:Ue,onChange:(ze,Ge)=>We==null?void 0:We(Ge)})}),me]})]})})}function InfoPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),[me,ge]=useLog();return jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"info"}),jsxRuntimeExports.jsx(ne.Title,{children:"Logs"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsx(FeaturePickerButton,{disabled:!me.length,icon:jsxRuntimeExports.jsx(CloseOutlined,{}),onClick:()=>ge(()=>({action:"clear"})),children:"Clear"})}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{vertical:!0,children:me.length?jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsx(List$2,{sx:{pt:6},children:lodashExports$1.map(me,(ye,ve)=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ListItem$1,{children:jsxRuntimeExports.jsx(ListItemText$1,{primary:ye.content,secondary:ye.timestamp})}),jsxRuntimeExports.jsx(Divider$1,{})]},ve))})}):jsxRuntimeExports.jsx(Placeholder$2,{pt:6,label:"Logs",icon:jsxRuntimeExports.jsx(ListOutlined,{})})})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})}const compositeOperations=["color","color-burn","color-dodge","copy","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","lighten","lighter","luminosity","multiply","overlay","saturation","screen","soft-light","source-atop","source-in","source-out","source-over","xor"];function useDraft(ne,oe,ce=300,ue=[]){const[pe,me]=reactExports.useState(ne);reactExports.useEffect(()=>{ne&&requestIdleCallback(()=>me(lodashExports$1.merge(pe,lodashExports$1.omit(ne,...ue))))},[me,ne]);const ge=reactExports.useMemo(()=>lodashExports$1.debounce(ye=>oe==null?void 0:oe(ye),ce),[oe,ce]);return[pe,ye=>{const ve=ye(pe);me(ve),ge(ve)}]}function LayerEditor({value:ne,onValueChange:oe}){var Se,$e,Re,Ae;const ce=usePaper(),[ue,pe]=useDraft(ne,oe,300,["name","source.type"]),me=Ie=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",sx:{pt:1},children:Ie}),ge=Ie=>jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",children:Ie}),ye=(Ie,ke)=>jsxRuntimeExports.jsxs(Flex,{alignItems:"center",children:[ge(Ie),jsxRuntimeExports.jsx(Space,{flex:1}),ke]}),ve=Ie=>Ie.map(ke=>({id:ke,name:lodashExports$1.startCase(ke)})),xe=ue.name||inferLayerName(ne),_e=($e=(Se=getController(ne))==null?void 0:Se.error)==null?void 0:$e.call(Se,ne);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ManagedModal,{popover:!0,slotProps:{popover:{anchorOrigin:{horizontal:-12,vertical:-12}}},appBar:{children:"Edit Layer"},trigger:Ie=>{var ke;return jsxRuntimeExports.jsx(ButtonBase$1,{onClick:Ie,className:ue.key,sx:{flex:1,display:"block",textAlign:"left",px:2},children:jsxRuntimeExports.jsxs(Stack$1,{alignItems:"center",direction:"row",gap:2,children:[jsxRuntimeExports.jsx(Stack$1,{sx:{...ce(.5),alignItems:"center",justifyContent:"center",width:36,height:36,color:"action.disabled"},children:getController(ne).icon}),jsxRuntimeExports.jsxs(Box$1,{sx:{py:1.5,flex:1,width:0,ml:0,overflow:"hidden","> *":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:xe}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:lodashExports$1.startCase((ke=ne.source)==null?void 0:ke.type)})]}),!!_e&&jsxRuntimeExports.jsx(Tooltip$1,{title:_e,children:jsxRuntimeExports.jsx(Chip$1,{sx:{mr:-2,...lodashExports$1.omit(ce(1),"borderRadius"),color:Be=>Be.palette.error.main,flex:0},label:`${lodashExports$1.truncate(`${_e}`,{length:8})}`,size:"small"})})]})})},children:jsxRuntimeExports.jsxs(Box$1,{p:2,children:[jsxRuntimeExports.jsx(TextField$1,{sx:{mb:2},autoComplete:"off",autoFocus:!0,placeholder:inferLayerName(ue),fullWidth:!0,variant:"filled",label:"Layer Name",defaultValue:ue.name??"",onChange:Ie=>pe==null?void 0:pe(ke=>lodashExports$1.set(ke,"name",Ie.target.value))}),jsxRuntimeExports.jsxs(Box$1,{sx:{mx:-2,pb:1},children:[jsxRuntimeExports.jsx(Tabs$1,{variant:"fullWidth",onChange:(Ie,ke)=>pe==null?void 0:pe(Be=>lodashExports$1.set(Be,"source",{type:ke})),value:((Re=ue.source)==null?void 0:Re.type)??lodashExports$1.first(lodashExports$1.keys(getControllers()))??"",children:lodashExports$1.keys(getControllers()).map(Ie=>jsxRuntimeExports.jsx(Tab$1,{label:lodashExports$1.startCase(Ie),value:Ie},Ie))}),jsxRuntimeExports.jsx(Divider$1,{sx:{width:"100%"}})]}),me("Source Options"),((Ae=ue.source)==null?void 0:Ae.type)&&reactExports.createElement(getController(ue).editor,{onChange:pe,value:ue}),me("Layer Options"),ye("Transparency",jsxRuntimeExports.jsx(FeaturePicker,{label:"Transparency",items:["0","25","50","75"].map(Ie=>({id:Ie,name:`${Ie}%`})),value:ue.transparency??"0",arrow:!0,onChange:Ie=>pe==null?void 0:pe(ke=>lodashExports$1.set(ke,"transparency",Ie))})),ye("Display Mode",jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,label:"Display Mode",value:ue.displayMode??"source-over",items:ve(compositeOperations),onChange:Ie=>pe==null?void 0:pe(ke=>lodashExports$1.set(ke,"displayMode",Ie))}))]})})})}function LayerListEditor(){const[{layers:ne=[]},oe]=useLayers();return jsxRuntimeExports.jsx(Box$1,{sx:{overflow:"auto hidden",width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{mb:2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,icon:null,value:ne,deletable:!0,orderable:!0,extras:ce=>jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ue=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Menu$1,{...bindMenu(ue),transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:jsxRuntimeExports.jsx(MenuList$1,{dense:!0,sx:{p:0},children:[{name:"Fit Layer",key:"fit-layer",action:()=>oe(({layers:pe})=>({layers:lodashExports$1.map(pe,me=>({...me,viewKey:me.key===(ce==null?void 0:ce.key)?nanoid$1():void 0}))}))}].map(({name:pe,key:me,action:ge})=>jsxRuntimeExports.jsx(MenuItem$1,{onClick:()=>{ge==null||ge(),ue.close()},children:pe},me))})}),jsxRuntimeExports.jsx(IconButton$1,{...bindTrigger(ue),sx:{color:pe=>pe.palette.text.secondary},children:jsxRuntimeExports.jsx(MoreVertOutlined,{})})]})}),renderEditor:({extras:ce,handle:ue,value:pe,onValueChange:me})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ue,jsxRuntimeExports.jsx(LayerEditor,{value:pe,onValueChange:me}),ce]}),create:()=>({source:{type:"trace",trace:{}}}),onChange:ce=>requestIdleCallback(()=>oe(()=>({layers:ce})),{timeout:300}),addItemLabel:"Layer",placeholder:jsxRuntimeExports.jsx(Box$1,{pt:2,children:"Get started by adding a layer."}),onFocus:ce=>{const ue=lodashExports$1.head(document.getElementsByClassName(ce));ue&&"click"in ue&&typeof ue.click=="function"&&ue.click()}})})})}function LayersPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext();return jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"layers"}),jsxRuntimeExports.jsx(ne.Title,{children:"Layers"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Scroll,{y:!0,style:{width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{pt:6,children:jsxRuntimeExports.jsx(LayerListEditor,{})})})})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})}var dist$2={},client$1={},models={};(function(ne){var oe=commonjsGlobal&&commonjsGlobal.__extends||function(){var Re=function(Ae,Ie){return Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Be){ke.__proto__=Be}||function(ke,Be){for(var Ne in Be)Object.prototype.hasOwnProperty.call(Be,Ne)&&(ke[Ne]=Be[Ne])},Re(Ae,Ie)};return function(Ae,Ie){if(typeof Ie!="function"&&Ie!==null)throw new TypeError("Class extends value "+String(Ie)+" is not a constructor or null");Re(Ae,Ie);function ke(){this.constructor=Ae}Ae.prototype=Ie===null?Object.create(Ie):(ke.prototype=Ie.prototype,new ke)}}();Object.defineProperty(ne,"__esModule",{value:!0}),ne.createJSONRPCNotification=ne.createJSONRPCRequest=ne.createJSONRPCSuccessResponse=ne.createJSONRPCErrorResponse=ne.JSONRPCErrorCode=ne.JSONRPCErrorException=ne.isJSONRPCResponses=ne.isJSONRPCResponse=ne.isJSONRPCRequests=ne.isJSONRPCRequest=ne.isJSONRPCID=ne.JSONRPC=void 0,ne.JSONRPC="2.0";var ce=function(Re){return typeof Re=="string"||typeof Re=="number"||Re===null};ne.isJSONRPCID=ce;var ue=function(Re){return Re.jsonrpc===ne.JSONRPC&&Re.method!==void 0&&Re.result===void 0&&Re.error===void 0};ne.isJSONRPCRequest=ue;var pe=function(Re){return Array.isArray(Re)&&Re.every(ne.isJSONRPCRequest)};ne.isJSONRPCRequests=pe;var me=function(Re){return Re.jsonrpc===ne.JSONRPC&&Re.id!==void 0&&(Re.result!==void 0||Re.error!==void 0)};ne.isJSONRPCResponse=me;var ge=function(Re){return Array.isArray(Re)&&Re.every(ne.isJSONRPCResponse)};ne.isJSONRPCResponses=ge;var ye=function(Re,Ae,Ie){var ke={code:Re,message:Ae};return Ie!=null&&(ke.data=Ie),ke},ve=function(Re){oe(Ae,Re);function Ae(Ie,ke,Be){var Ne=Re.call(this,Ie)||this;return Object.setPrototypeOf(Ne,Ae.prototype),Ne.code=ke,Ne.data=Be,Ne}return Ae.prototype.toObject=function(){return ye(this.code,this.message,this.data)},Ae}(Error);ne.JSONRPCErrorException=ve,function(Re){Re[Re.ParseError=-32700]="ParseError",Re[Re.InvalidRequest=-32600]="InvalidRequest",Re[Re.MethodNotFound=-32601]="MethodNotFound",Re[Re.InvalidParams=-32602]="InvalidParams",Re[Re.InternalError=-32603]="InternalError"}(ne.JSONRPCErrorCode||(ne.JSONRPCErrorCode={}));var xe=function(Re,Ae,Ie,ke){return{jsonrpc:ne.JSONRPC,id:Re,error:ye(Ae,Ie,ke)}};ne.createJSONRPCErrorResponse=xe;var _e=function(Re,Ae){return{jsonrpc:ne.JSONRPC,id:Re,result:Ae??null}};ne.createJSONRPCSuccessResponse=_e;var Se=function(Re,Ae,Ie){return{jsonrpc:ne.JSONRPC,id:Re,method:Ae,params:Ie}};ne.createJSONRPCRequest=Se;var $e=function(Re,Ae){return{jsonrpc:ne.JSONRPC,method:Re,params:Ae}};ne.createJSONRPCNotification=$e})(models);var internal$1={};Object.defineProperty(internal$1,"__esModule",{value:!0});internal$1.DefaultErrorCode=void 0;internal$1.DefaultErrorCode=0;var __awaiter$2=commonjsGlobal&&commonjsGlobal.__awaiter||function(ne,oe,ce,ue){function pe(me){return me instanceof ce?me:new ce(function(ge){ge(me)})}return new(ce||(ce=Promise))(function(me,ge){function ye(_e){try{xe(ue.next(_e))}catch(Se){ge(Se)}}function ve(_e){try{xe(ue.throw(_e))}catch(Se){ge(Se)}}function xe(_e){_e.done?me(_e.value):pe(_e.value).then(ye,ve)}xe((ue=ue.apply(ne,oe||[])).next())})},__generator$2=commonjsGlobal&&commonjsGlobal.__generator||function(ne,oe){var ce={label:0,sent:function(){if(me[0]&1)throw me[1];return me[1]},trys:[],ops:[]},ue,pe,me,ge;return ge={next:ye(0),throw:ye(1),return:ye(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function ye(xe){return function(_e){return ve([xe,_e])}}function ve(xe){if(ue)throw new TypeError("Generator is already executing.");for(;ge&&(ge=0,xe[0]&&(ce=0)),ce;)try{if(ue=1,pe&&(me=xe[0]&2?pe.return:xe[0]?pe.throw||((me=pe.return)&&me.call(pe),0):pe.next)&&!(me=me.call(pe,xe[1])).done)return me;switch(pe=0,me&&(xe=[xe[0]&2,me.value]),xe[0]){case 0:case 1:me=xe;break;case 4:return ce.label++,{value:xe[1],done:!1};case 5:ce.label++,pe=xe[1],xe=[0];continue;case 7:xe=ce.ops.pop(),ce.trys.pop();continue;default:if(me=ce.trys,!(me=me.length>0&&me[me.length-1])&&(xe[0]===6||xe[0]===2)){ce=0;continue}if(xe[0]===3&&(!me||xe[1]>me[0]&&xe[1]0&&me[me.length-1])&&(xe[0]===6||xe[0]===2)){ce=0;continue}if(xe[0]===3&&(!me||xe[1]>me[0]&&xe[1]0&&me[me.length-1])&&(xe[0]===6||xe[0]===2)){ce=0;continue}if(xe[0]===3&&(!me||xe[1]>me[0]&&xe[1]{const pe=({data:me})=>{me.id===ue.id&&(this.rpc.receive(me),this.worker.removeEventListener("message",pe))};this.worker.postMessage(ue),this.worker.addEventListener("message",pe)})}connect(){return this.worker.postMessage(this.options.url),new Promise(ce=>{const ue=()=>{ce(),this.worker.removeEventListener("message",ue)};this.worker.addEventListener("message",ue)})}async disconnect(){this.worker.terminate()}async call(ce,ue){return await this.rpc.request(ce,ue)}}var requiresPort=function(oe,ce){if(ce=ce.split(":")[0],oe=+oe,!oe)return!1;switch(ce){case"http":case"ws":return oe!==80;case"https":case"wss":return oe!==443;case"ftp":return oe!==21;case"gopher":return oe!==70;case"file":return!1}return oe!==0},querystringify$1={},has$4=Object.prototype.hasOwnProperty,undef;function decode$3(ne){try{return decodeURIComponent(ne.replace(/\+/g," "))}catch{return null}}function encode$3(ne){try{return encodeURIComponent(ne)}catch{return null}}function querystring$1(ne){for(var oe=/([^=?#&]+)=?([^&]*)/g,ce={},ue;ue=oe.exec(ne);){var pe=decode$3(ue[1]),me=decode$3(ue[2]);pe===null||me===null||pe in ce||(ce[pe]=me)}return ce}function querystringify(ne,oe){oe=oe||"";var ce=[],ue,pe;typeof oe!="string"&&(oe="?");for(pe in ne)if(has$4.call(ne,pe)){if(ue=ne[pe],!ue&&(ue===null||ue===undef||isNaN(ue))&&(ue=""),pe=encode$3(pe),ue=encode$3(ue),pe===null||ue===null)continue;ce.push(pe+"="+ue)}return ce.length?oe+ce.join("&"):""}querystringify$1.stringify=querystringify;querystringify$1.parse=querystring$1;var required=requiresPort,qs=querystringify$1,controlOrWhitespace=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,CRHTLF=/[\n\r\t]/g,slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,port=/:\d+$/,protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,windowsDriveLetter=/^[a-zA-Z]:/;function trimLeft(ne){return(ne||"").toString().replace(controlOrWhitespace,"")}var rules=[["#","hash"],["?","query"],function(oe,ce){return isSpecial(ce.protocol)?oe.replace(/\\/g,"/"):oe},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(ne){var oe;typeof window<"u"?oe=window:typeof commonjsGlobal<"u"?oe=commonjsGlobal:typeof self<"u"?oe=self:oe={};var ce=oe.location||{};ne=ne||ce;var ue={},pe=typeof ne,me;if(ne.protocol==="blob:")ue=new Url$1(unescape(ne.pathname),{});else if(pe==="string"){ue=new Url$1(ne,{});for(me in ignore)delete ue[me]}else if(pe==="object"){for(me in ne)me in ignore||(ue[me]=ne[me]);ue.slashes===void 0&&(ue.slashes=slashes.test(ne.href))}return ue}function isSpecial(ne){return ne==="file:"||ne==="ftp:"||ne==="http:"||ne==="https:"||ne==="ws:"||ne==="wss:"}function extractProtocol(ne,oe){ne=trimLeft(ne),ne=ne.replace(CRHTLF,""),oe=oe||{};var ce=protocolre.exec(ne),ue=ce[1]?ce[1].toLowerCase():"",pe=!!ce[2],me=!!ce[3],ge=0,ye;return pe?me?(ye=ce[2]+ce[3]+ce[4],ge=ce[2].length+ce[3].length):(ye=ce[2]+ce[4],ge=ce[2].length):me?(ye=ce[3]+ce[4],ge=ce[3].length):ye=ce[4],ue==="file:"?ge>=2&&(ye=ye.slice(2)):isSpecial(ue)?ye=ce[4]:ue?pe&&(ye=ye.slice(2)):ge>=2&&isSpecial(oe.protocol)&&(ye=ce[4]),{protocol:ue,slashes:pe||isSpecial(ue),slashesCount:ge,rest:ye}}function resolve$1(ne,oe){if(ne==="")return oe;for(var ce=(oe||"/").split("/").slice(0,-1).concat(ne.split("/")),ue=ce.length,pe=ce[ue-1],me=!1,ge=0;ue--;)ce[ue]==="."?ce.splice(ue,1):ce[ue]===".."?(ce.splice(ue,1),ge++):ge&&(ue===0&&(me=!0),ce.splice(ue,1),ge--);return me&&ce.unshift(""),(pe==="."||pe==="..")&&ce.push(""),ce.join("/")}function Url$1(ne,oe,ce){if(ne=trimLeft(ne),ne=ne.replace(CRHTLF,""),!(this instanceof Url$1))return new Url$1(ne,oe,ce);var ue,pe,me,ge,ye,ve,xe=rules.slice(),_e=typeof oe,Se=this,$e=0;for(_e!=="object"&&_e!=="string"&&(ce=oe,oe=null),ce&&typeof ce!="function"&&(ce=qs.parse),oe=lolcation(oe),pe=extractProtocol(ne||"",oe),ue=!pe.protocol&&!pe.slashes,Se.slashes=pe.slashes||ue&&oe.slashes,Se.protocol=pe.protocol||oe.protocol||"",ne=pe.rest,(pe.protocol==="file:"&&(pe.slashesCount!==2||windowsDriveLetter.test(ne))||!pe.slashes&&(pe.protocol||pe.slashesCount<2||!isSpecial(Se.protocol)))&&(xe[3]=[/(.*)/,"pathname"]);$e__vitePreload(()=>import("./alien-81a163a8.js"),[],import.meta.url).then(ne=>ne.default),"/public/maps/maze-medium.grid":()=>__vitePreload(()=>import("./maze-medium-a955cbb9.js"),[],import.meta.url).then(ne=>ne.default),"/public/maps/maze-small.grid":()=>__vitePreload(()=>import("./maze-small-85d74cf5.js"),[],import.meta.url).then(ne=>ne.default),"/public/maps/random-32x32.grid":()=>__vitePreload(()=>import("./random-32x32-1b96f0c8.js"),[],import.meta.url).then(ne=>ne.default)});function ext(ne){return ne.split(".")[1]}function stripExtension(ne){return ne.split(".")[0]}function basename(ne){return ne.split("/").pop()}const getFileInfo=memoizee$1(async(ne,oe)=>({id:`basic-maps${ne}`,name:lodashExports$1.chain(ne).thru(basename).thru(stripExtension).startCase().value(),path:await oe(),format:ext(ne)}),{normalizer:([ne])=>ne}),getFiles=async()=>await Promise.all(lodashExports$1.map(lodashExports$1.entries(paths),ne=>getFileInfo(...ne))),internal={"basic-maps":async(ne,oe)=>{switch(ne){case"about":return{name:"Basic Maps",description:"A collection of basic grid maps",version:"1.2.2"};case"features/formats":return[{id:"grid",name:"Grid"},{id:"xy",name:"Network"},{id:"mesh",name:"Mesh"}];case"features/maps":return await getFiles();case"features/map":{const ce=await getFiles(),ue=lodashExports$1.find(ce,{id:oe==null?void 0:oe.id});if(ue){const pe=await fetch(ue.path);return{...ue,content:await pe.text()}}}}}};class NativeTransport extends EventEmitter$2{constructor(ce){super();Gl(this,"handler");this.options=ce;const{hostname:ue}=url$2(ce.url);this.handler=internal[ue]}async connect(){}async disconnect(){}async call(ce,ue){return await this.handler(ce,ue)}}const PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(ne=>{PACKET_TYPES_REVERSE[PACKET_TYPES[ne]]=ne});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=ne=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ne):ne&&ne.buffer instanceof ArrayBuffer,encodePacket=({type:ne,data:oe},ce,ue)=>withNativeBlob$1&&oe instanceof Blob?ce?ue(oe):encodeBlobAsBase64(oe,ue):withNativeArrayBuffer$2&&(oe instanceof ArrayBuffer||isView$1(oe))?ce?ue(oe):encodeBlobAsBase64(new Blob([oe]),ue):ue(PACKET_TYPES[ne]+(oe||"")),encodeBlobAsBase64=(ne,oe)=>{const ce=new FileReader;return ce.onload=function(){const ue=ce.result.split(",")[1];oe("b"+(ue||""))},ce.readAsDataURL(ne)};function toArray(ne){return ne instanceof Uint8Array?ne:ne instanceof ArrayBuffer?new Uint8Array(ne):new Uint8Array(ne.buffer,ne.byteOffset,ne.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(ne,oe){if(withNativeBlob$1&&ne.data instanceof Blob)return ne.data.arrayBuffer().then(toArray).then(oe);if(withNativeArrayBuffer$2&&(ne.data instanceof ArrayBuffer||isView$1(ne.data)))return oe(toArray(ne.data));encodePacket(ne,!1,ce=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),oe(TEXT_ENCODER.encode(ce))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let ne=0;ne{let oe=ne.length*.75,ce=ne.length,ue,pe=0,me,ge,ye,ve;ne[ne.length-1]==="="&&(oe--,ne[ne.length-2]==="="&&oe--);const xe=new ArrayBuffer(oe),_e=new Uint8Array(xe);for(ue=0;ue>4,_e[pe++]=(ge&15)<<4|ye>>2,_e[pe++]=(ye&3)<<6|ve&63;return xe},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(ne,oe)=>{if(typeof ne!="string")return{type:"message",data:mapBinary(ne,oe)};const ce=ne.charAt(0);return ce==="b"?{type:"message",data:decodeBase64Packet(ne.substring(1),oe)}:PACKET_TYPES_REVERSE[ce]?ne.length>1?{type:PACKET_TYPES_REVERSE[ce],data:ne.substring(1)}:{type:PACKET_TYPES_REVERSE[ce]}:ERROR_PACKET},decodeBase64Packet=(ne,oe)=>{if(withNativeArrayBuffer$1){const ce=decode$2(ne);return mapBinary(ce,oe)}else return{base64:!0,data:ne}},mapBinary=(ne,oe)=>{switch(oe){case"blob":return ne instanceof Blob?ne:new Blob([ne]);case"arraybuffer":default:return ne instanceof ArrayBuffer?ne:ne.buffer}},SEPARATOR=String.fromCharCode(30),encodePayload=(ne,oe)=>{const ce=ne.length,ue=new Array(ce);let pe=0;ne.forEach((me,ge)=>{encodePacket(me,!1,ye=>{ue[ge]=ye,++pe===ce&&oe(ue.join(SEPARATOR))})})},decodePayload=(ne,oe)=>{const ce=ne.split(SEPARATOR),ue=[];for(let pe=0;pe{const ue=ce.length;let pe;if(ue<126)pe=new Uint8Array(1),new DataView(pe.buffer).setUint8(0,ue);else if(ue<65536){pe=new Uint8Array(3);const me=new DataView(pe.buffer);me.setUint8(0,126),me.setUint16(1,ue)}else{pe=new Uint8Array(9);const me=new DataView(pe.buffer);me.setUint8(0,127),me.setBigUint64(1,BigInt(ue))}ne.data&&typeof ne.data!="string"&&(pe[0]|=128),oe.enqueue(pe),oe.enqueue(ce)})}})}let TEXT_DECODER;function totalLength(ne){return ne.reduce((oe,ce)=>oe+ce.length,0)}function concatChunks(ne,oe){if(ne[0].length===oe)return ne.shift();const ce=new Uint8Array(oe);let ue=0;for(let pe=0;peMath.pow(2,53-32)-1){ye.enqueue(ERROR_PACKET);break}pe=_e*Math.pow(2,32)+xe.getUint32(4),ue=3}else{if(totalLength(ce)ne){ye.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(ne){if(ne)return mixin(ne)}function mixin(ne){for(var oe in Emitter.prototype)ne[oe]=Emitter.prototype[oe];return ne}Emitter.prototype.on=Emitter.prototype.addEventListener=function(ne,oe){return this._callbacks=this._callbacks||{},(this._callbacks["$"+ne]=this._callbacks["$"+ne]||[]).push(oe),this};Emitter.prototype.once=function(ne,oe){function ce(){this.off(ne,ce),oe.apply(this,arguments)}return ce.fn=oe,this.on(ne,ce),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(ne,oe){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var ce=this._callbacks["$"+ne];if(!ce)return this;if(arguments.length==1)return delete this._callbacks["$"+ne],this;for(var ue,pe=0;petypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function pick(ne,...oe){return oe.reduce((ce,ue)=>(ne.hasOwnProperty(ue)&&(ce[ue]=ne[ue]),ce),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(ne,oe){oe.useNativeTimers?(ne.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),ne.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(ne.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),ne.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(ne){return typeof ne=="string"?utf8Length(ne):Math.ceil((ne.byteLength||ne.size)*BASE64_OVERHEAD)}function utf8Length(ne){let oe=0,ce=0;for(let ue=0,pe=ne.length;ue=57344?ce+=3:(ue++,ce+=4);return ce}function encode$2(ne){let oe="";for(let ce in ne)ne.hasOwnProperty(ce)&&(oe.length&&(oe+="&"),oe+=encodeURIComponent(ce)+"="+encodeURIComponent(ne[ce]));return oe}function decode$1(ne){let oe={},ce=ne.split("&");for(let ue=0,pe=ce.length;ue0);return oe}function yeast(){const ne=encode$1(+new Date);return ne!==prev?(seed=0,prev=ne):ne+"."+encode$1(seed++)}for(;i$2{this.readyState="paused",oe()};if(this.polling||!this.writable){let ue=0;this.polling&&(ue++,this.once("pollComplete",function(){--ue||ce()})),this.writable||(ue++,this.once("drain",function(){--ue||ce()}))}else ce()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(oe){const ce=ue=>{if(this.readyState==="opening"&&ue.type==="open"&&this.onOpen(),ue.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(ue)};decodePayload(oe,this.socket.binaryType).forEach(ce),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const oe=()=>{this.write([{type:"close"}])};this.readyState==="open"?oe():this.once("open",oe)}write(oe){this.writable=!1,encodePayload(oe,ce=>{this.doWrite(ce,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const oe=this.opts.secure?"https":"http",ce=this.query||{};return this.opts.timestampRequests!==!1&&(ce[this.opts.timestampParam]=yeast()),!this.supportsBinary&&!ce.sid&&(ce.b64=1),this.createUri(oe,ce)}request(oe={}){return Object.assign(oe,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Request(this.uri(),oe)}doWrite(oe,ce){const ue=this.request({method:"POST",data:oe});ue.on("success",ce),ue.on("error",(pe,me)=>{this.onError("xhr post error",pe,me)})}doPoll(){const oe=this.request();oe.on("data",this.onData.bind(this)),oe.on("error",(ce,ue)=>{this.onError("xhr poll error",ce,ue)}),this.pollXhr=oe}}class Request extends Emitter{constructor(oe,ce){super(),installTimerFunctions(this,ce),this.opts=ce,this.method=ce.method||"GET",this.uri=oe,this.data=ce.data!==void 0?ce.data:null,this.create()}create(){var oe;const ce=pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");ce.xdomain=!!this.opts.xd;const ue=this.xhr=new XHR(ce);try{ue.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){ue.setDisableHeaderCheck&&ue.setDisableHeaderCheck(!0);for(let pe in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(pe)&&ue.setRequestHeader(pe,this.opts.extraHeaders[pe])}}catch{}if(this.method==="POST")try{ue.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{ue.setRequestHeader("Accept","*/*")}catch{}(oe=this.opts.cookieJar)===null||oe===void 0||oe.addCookies(ue),"withCredentials"in ue&&(ue.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(ue.timeout=this.opts.requestTimeout),ue.onreadystatechange=()=>{var pe;ue.readyState===3&&((pe=this.opts.cookieJar)===null||pe===void 0||pe.parseCookies(ue)),ue.readyState===4&&(ue.status===200||ue.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof ue.status=="number"?ue.status:0)},0))},ue.send(this.data)}catch(pe){this.setTimeoutFn(()=>{this.onError(pe)},0);return}typeof document<"u"&&(this.index=Request.requestsCount++,Request.requests[this.index]=this)}onError(oe){this.emitReserved("error",oe,this.xhr),this.cleanup(!0)}cleanup(oe){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=empty$1,oe)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Request.requests[this.index],this.xhr=null}}onLoad(){const oe=this.xhr.responseText;oe!==null&&(this.emitReserved("data",oe),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Request.requestsCount=0;Request.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const ne="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(ne,unloadHandler,!1)}}function unloadHandler(){for(let ne in Request.requests)Request.requests.hasOwnProperty(ne)&&Request.requests[ne].abort()}const nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?oe=>Promise.resolve().then(oe):(oe,ce)=>ce(oe,0))(),WebSocket=globalThisShim.WebSocket||globalThisShim.MozWebSocket,usingBrowserWebSocket=!0,defaultBinaryType="arraybuffer",isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WS extends Transport{constructor(oe){super(oe),this.supportsBinary=!oe.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const oe=this.uri(),ce=this.opts.protocols,ue=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(ue.headers=this.opts.extraHeaders);try{this.ws=usingBrowserWebSocket&&!isReactNative?ce?new WebSocket(oe,ce):new WebSocket(oe):new WebSocket(oe,ce,ue)}catch(pe){return this.emitReserved("error",pe)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=oe=>this.onClose({description:"websocket connection closed",context:oe}),this.ws.onmessage=oe=>this.onData(oe.data),this.ws.onerror=oe=>this.onError("websocket error",oe)}write(oe){this.writable=!1;for(let ce=0;ce{const ge={};try{usingBrowserWebSocket&&this.ws.send(me)}catch{}pe&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const oe=this.opts.secure?"wss":"ws",ce=this.query||{};return this.opts.timestampRequests&&(ce[this.opts.timestampParam]=yeast()),this.supportsBinary||(ce.b64=1),this.createUri(oe,ce)}check(){return!!WebSocket}}class WT extends Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(oe=>{this.onError("webtransport error",oe)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(oe=>{const ce=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),ue=oe.readable.pipeThrough(ce).getReader(),pe=createPacketEncoderStream();pe.readable.pipeTo(oe.writable),this.writer=pe.writable.getWriter();const me=()=>{ue.read().then(({done:ye,value:ve})=>{ye||(this.onPacket(ve),me())}).catch(ye=>{})};me();const ge={type:"open"};this.query.sid&&(ge.data=`{"sid":"${this.query.sid}"}`),this.writer.write(ge).then(()=>this.onOpen())})}))}write(oe){this.writable=!1;for(let ce=0;ce{pe&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var oe;(oe=this.transport)===null||oe===void 0||oe.close()}}const transports$2={websocket:WS,webtransport:WT,polling:Polling},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse$3(ne){if(ne.length>2e3)throw"URI too long";const oe=ne,ce=ne.indexOf("["),ue=ne.indexOf("]");ce!=-1&&ue!=-1&&(ne=ne.substring(0,ce)+ne.substring(ce,ue).replace(/:/g,";")+ne.substring(ue,ne.length));let pe=re.exec(ne||""),me={},ge=14;for(;ge--;)me[parts[ge]]=pe[ge]||"";return ce!=-1&&ue!=-1&&(me.source=oe,me.host=me.host.substring(1,me.host.length-1).replace(/;/g,":"),me.authority=me.authority.replace("[","").replace("]","").replace(/;/g,":"),me.ipv6uri=!0),me.pathNames=pathNames(me,me.path),me.queryKey=queryKey(me,me.query),me}function pathNames(ne,oe){const ce=/\/{2,9}/g,ue=oe.replace(ce,"/").split("/");return(oe.slice(0,1)=="/"||oe.length===0)&&ue.splice(0,1),oe.slice(-1)=="/"&&ue.splice(ue.length-1,1),ue}function queryKey(ne,oe){const ce={};return oe.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(ue,pe,me){pe&&(ce[pe]=me)}),ce}let Socket$1=class Ql extends Emitter{constructor(oe,ce={}){super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],oe&&typeof oe=="object"&&(ce=oe,oe=null),oe?(oe=parse$3(oe),ce.hostname=oe.host,ce.secure=oe.protocol==="https"||oe.protocol==="wss",ce.port=oe.port,oe.query&&(ce.query=oe.query)):ce.host&&(ce.hostname=parse$3(ce.host).host),installTimerFunctions(this,ce),this.secure=ce.secure!=null?ce.secure:typeof location<"u"&&location.protocol==="https:",ce.hostname&&!ce.port&&(ce.port=this.secure?"443":"80"),this.hostname=ce.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=ce.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=ce.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},ce),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode$1(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(oe){const ce=Object.assign({},this.opts.query);ce.EIO=protocol$1,ce.transport=oe,this.id&&(ce.sid=this.id);const ue=Object.assign({},this.opts,{query:ce,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[oe]);return new transports$2[oe](ue)}open(){let oe;if(this.opts.rememberUpgrade&&Ql.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)oe="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else oe=this.transports[0];this.readyState="opening";try{oe=this.createTransport(oe)}catch{this.transports.shift(),this.open();return}oe.open(),this.setTransport(oe)}setTransport(oe){this.transport&&this.transport.removeAllListeners(),this.transport=oe,oe.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",ce=>this.onClose("transport close",ce))}probe(oe){let ce=this.createTransport(oe),ue=!1;Ql.priorWebsocketSuccess=!1;const pe=()=>{ue||(ce.send([{type:"ping",data:"probe"}]),ce.once("packet",Se=>{if(!ue)if(Se.type==="pong"&&Se.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",ce),!ce)return;Ql.priorWebsocketSuccess=ce.name==="websocket",this.transport.pause(()=>{ue||this.readyState!=="closed"&&(_e(),this.setTransport(ce),ce.send([{type:"upgrade"}]),this.emitReserved("upgrade",ce),ce=null,this.upgrading=!1,this.flush())})}else{const $e=new Error("probe error");$e.transport=ce.name,this.emitReserved("upgradeError",$e)}}))};function me(){ue||(ue=!0,_e(),ce.close(),ce=null)}const ge=Se=>{const $e=new Error("probe error: "+Se);$e.transport=ce.name,me(),this.emitReserved("upgradeError",$e)};function ye(){ge("transport closed")}function ve(){ge("socket closed")}function xe(Se){ce&&Se.name!==ce.name&&me()}const _e=()=>{ce.removeListener("open",pe),ce.removeListener("error",ge),ce.removeListener("close",ye),this.off("close",ve),this.off("upgrading",xe)};ce.once("open",pe),ce.once("error",ge),ce.once("close",ye),this.once("close",ve),this.once("upgrading",xe),this.upgrades.indexOf("webtransport")!==-1&&oe!=="webtransport"?this.setTimeoutFn(()=>{ue||ce.open()},200):ce.open()}onOpen(){if(this.readyState="open",Ql.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let oe=0;const ce=this.upgrades.length;for(;oe{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const oe=this.getWritablePackets();this.transport.send(oe),this.prevBufferLen=oe.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let ce=1;for(let ue=0;ue0&&ce>this.maxPayload)return this.writeBuffer.slice(0,ue);ce+=2}return this.writeBuffer}write(oe,ce,ue){return this.sendPacket("message",oe,ce,ue),this}send(oe,ce,ue){return this.sendPacket("message",oe,ce,ue),this}sendPacket(oe,ce,ue,pe){if(typeof ce=="function"&&(pe=ce,ce=void 0),typeof ue=="function"&&(pe=ue,ue=null),this.readyState==="closing"||this.readyState==="closed")return;ue=ue||{},ue.compress=ue.compress!==!1;const me={type:oe,data:ce,options:ue};this.emitReserved("packetCreate",me),this.writeBuffer.push(me),pe&&this.once("flush",pe),this.flush()}close(){const oe=()=>{this.onClose("forced close"),this.transport.close()},ce=()=>{this.off("upgrade",ce),this.off("upgradeError",ce),oe()},ue=()=>{this.once("upgrade",ce),this.once("upgradeError",ce)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?ue():oe()}):this.upgrading?ue():oe()),this}onError(oe){Ql.priorWebsocketSuccess=!1,this.emitReserved("error",oe),this.onClose("transport error",oe)}onClose(oe,ce){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",oe,ce),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(oe){const ce=[];let ue=0;const pe=oe.length;for(;uetypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ne):ne.buffer instanceof ArrayBuffer,toString=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString.call(File)==="[object FileConstructor]";function isBinary(ne){return withNativeArrayBuffer&&(ne instanceof ArrayBuffer||isView(ne))||withNativeBlob&&ne instanceof Blob||withNativeFile&&ne instanceof File}function hasBinary(ne,oe){if(!ne||typeof ne!="object")return!1;if(Array.isArray(ne)){for(let ce=0,ue=ne.length;ce=0&&ne.num{delete this.acks[oe];for(let ge=0;ge{this.io.clearTimeoutFn(me),ce.apply(this,[null,...ge])}}emitWithAck(oe,...ce){const ue=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((pe,me)=>{ce.push((ge,ye)=>ue?ge?me(ge):pe(ye):pe(ge)),this.emit(oe,...ce)})}_addToQueue(oe){let ce;typeof oe[oe.length-1]=="function"&&(ce=oe.pop());const ue={id:this._queueSeq++,tryCount:0,pending:!1,args:oe,flags:Object.assign({fromQueue:!0},this.flags)};oe.push((pe,...me)=>ue!==this._queue[0]?void 0:(pe!==null?ue.tryCount>this._opts.retries&&(this._queue.shift(),ce&&ce(pe)):(this._queue.shift(),ce&&ce(null,...me)),ue.pending=!1,this._drainQueue())),this._queue.push(ue),this._drainQueue()}_drainQueue(oe=!1){if(!this.connected||this._queue.length===0)return;const ce=this._queue[0];ce.pending&&!oe||(ce.pending=!0,ce.tryCount++,this.flags=ce.flags,this.emit.apply(this,ce.args))}packet(oe){oe.nsp=this.nsp,this.io._packet(oe)}onopen(){typeof this.auth=="function"?this.auth(oe=>{this._sendConnectPacket(oe)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(oe){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},oe):oe})}onerror(oe){this.connected||this.emitReserved("connect_error",oe)}onclose(oe,ce){this.connected=!1,delete this.id,this.emitReserved("disconnect",oe,ce)}onpacket(oe){if(oe.nsp===this.nsp)switch(oe.type){case PacketType.CONNECT:oe.data&&oe.data.sid?this.onconnect(oe.data.sid,oe.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(oe);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(oe);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const ue=new Error(oe.data.message);ue.data=oe.data.data,this.emitReserved("connect_error",ue);break}}onevent(oe){const ce=oe.data||[];oe.id!=null&&ce.push(this.ack(oe.id)),this.connected?this.emitEvent(ce):this.receiveBuffer.push(Object.freeze(ce))}emitEvent(oe){if(this._anyListeners&&this._anyListeners.length){const ce=this._anyListeners.slice();for(const ue of ce)ue.apply(this,oe)}super.emit.apply(this,oe),this._pid&&oe.length&&typeof oe[oe.length-1]=="string"&&(this._lastOffset=oe[oe.length-1])}ack(oe){const ce=this;let ue=!1;return function(...pe){ue||(ue=!0,ce.packet({type:PacketType.ACK,id:oe,data:pe}))}}onack(oe){const ce=this.acks[oe.id];typeof ce=="function"&&(ce.apply(this,oe.data),delete this.acks[oe.id])}onconnect(oe,ce){this.id=oe,this.recovered=ce&&this._pid===ce,this._pid=ce,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(oe=>this.emitEvent(oe)),this.receiveBuffer=[],this.sendBuffer.forEach(oe=>{this.notifyOutgoingListeners(oe),this.packet(oe)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(oe=>oe()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(oe){return this.flags.compress=oe,this}get volatile(){return this.flags.volatile=!0,this}timeout(oe){return this.flags.timeout=oe,this}onAny(oe){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(oe),this}prependAny(oe){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(oe),this}offAny(oe){if(!this._anyListeners)return this;if(oe){const ce=this._anyListeners;for(let ue=0;ue0&&ne.jitter<=1?ne.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var ne=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var oe=Math.random(),ce=Math.floor(oe*this.jitter*ne);ne=Math.floor(oe*10)&1?ne+ce:ne-ce}return Math.min(ne,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(ne){this.ms=ne};Backoff.prototype.setMax=function(ne){this.max=ne};Backoff.prototype.setJitter=function(ne){this.jitter=ne};class Manager extends Emitter{constructor(oe,ce){var ue;super(),this.nsps={},this.subs=[],oe&&typeof oe=="object"&&(ce=oe,oe=void 0),ce=ce||{},ce.path=ce.path||"/socket.io",this.opts=ce,installTimerFunctions(this,ce),this.reconnection(ce.reconnection!==!1),this.reconnectionAttempts(ce.reconnectionAttempts||1/0),this.reconnectionDelay(ce.reconnectionDelay||1e3),this.reconnectionDelayMax(ce.reconnectionDelayMax||5e3),this.randomizationFactor((ue=ce.randomizationFactor)!==null&&ue!==void 0?ue:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(ce.timeout==null?2e4:ce.timeout),this._readyState="closed",this.uri=oe;const pe=ce.parser||parser;this.encoder=new pe.Encoder,this.decoder=new pe.Decoder,this._autoConnect=ce.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(oe){return arguments.length?(this._reconnection=!!oe,this):this._reconnection}reconnectionAttempts(oe){return oe===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=oe,this)}reconnectionDelay(oe){var ce;return oe===void 0?this._reconnectionDelay:(this._reconnectionDelay=oe,(ce=this.backoff)===null||ce===void 0||ce.setMin(oe),this)}randomizationFactor(oe){var ce;return oe===void 0?this._randomizationFactor:(this._randomizationFactor=oe,(ce=this.backoff)===null||ce===void 0||ce.setJitter(oe),this)}reconnectionDelayMax(oe){var ce;return oe===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=oe,(ce=this.backoff)===null||ce===void 0||ce.setMax(oe),this)}timeout(oe){return arguments.length?(this._timeout=oe,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(oe){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const ce=this.engine,ue=this;this._readyState="opening",this.skipReconnect=!1;const pe=on(ce,"open",function(){ue.onopen(),oe&&oe()}),me=ye=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",ye),oe?oe(ye):this.maybeReconnectOnOpen()},ge=on(ce,"error",me);if(this._timeout!==!1){const ye=this._timeout,ve=this.setTimeoutFn(()=>{pe(),me(new Error("timeout")),ce.close()},ye);this.opts.autoUnref&&ve.unref(),this.subs.push(()=>{this.clearTimeoutFn(ve)})}return this.subs.push(pe),this.subs.push(ge),this}connect(oe){return this.open(oe)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const oe=this.engine;this.subs.push(on(oe,"ping",this.onping.bind(this)),on(oe,"data",this.ondata.bind(this)),on(oe,"error",this.onerror.bind(this)),on(oe,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(oe){try{this.decoder.add(oe)}catch(ce){this.onclose("parse error",ce)}}ondecoded(oe){nextTick(()=>{this.emitReserved("packet",oe)},this.setTimeoutFn)}onerror(oe){this.emitReserved("error",oe)}socket(oe,ce){let ue=this.nsps[oe];return ue?this._autoConnect&&!ue.active&&ue.connect():(ue=new Socket(this,oe,ce),this.nsps[oe]=ue),ue}_destroy(oe){const ce=Object.keys(this.nsps);for(const ue of ce)if(this.nsps[ue].active)return;this._close()}_packet(oe){const ce=this.encoder.encode(oe);for(let ue=0;ueoe()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(oe,ce){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",oe,ce),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const oe=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const ce=this.backoff.duration();this._reconnecting=!0;const ue=this.setTimeoutFn(()=>{oe.skipReconnect||(this.emitReserved("reconnect_attempt",oe.backoff.attempts),!oe.skipReconnect&&oe.open(pe=>{pe?(oe._reconnecting=!1,oe.reconnect(),this.emitReserved("reconnect_error",pe)):oe.onreconnect()}))},ce);this.opts.autoUnref&&ue.unref(),this.subs.push(()=>{this.clearTimeoutFn(ue)})}}onreconnect(){const oe=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",oe)}}const cache={};function lookup(ne,oe){typeof ne=="object"&&(oe=ne,ne=void 0),oe=oe||{};const ce=url$1(ne,oe.path||"/socket.io"),ue=ce.source,pe=ce.id,me=ce.path,ge=cache[pe]&&me in cache[pe].nsps,ye=oe.forceNew||oe["force new connection"]||oe.multiplex===!1||ge;let ve;return ye?ve=new Manager(ue,oe):(cache[pe]||(cache[pe]=new Manager(ue,oe)),ve=cache[pe]),ce.query&&!oe.query&&(oe.query=ce.queryKey),ve.socket(ce.path,oe)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});class SocketIOTransport extends EventEmitter$2{constructor(ce){super();Gl(this,"client");Gl(this,"socket");this.options=ce,this.socket=lookup(ce.url),this.client=new dist$2.JSONRPCClient(async ue=>{const pe=me=>{me.id===ue.id&&(this.socket.off("response",pe),this.client.receive(me))};this.socket.emit("request",ue),this.socket.on("response",pe)}),this.socket.on("request",({method:ue,params:pe})=>{this.emit(ue,pe)})}async connect(){this.socket.connect()}async disconnect(){this.socket.disconnect()}async call(ce,ue){return await this.client.request(ce,ue)}}const transports$1={native:{name:"Internal",constructor:NativeTransport},socketio:{name:"socket.io",constructor:SocketIOTransport},ipc:{name:"Web Worker",constructor:IPCTransport}};function getTransport(ne){return transports$1[ne].constructor}const defaultTransport=lodashExports$1.first(lodashExports$1.keys(transports$1));var lodash={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -2410,7 +2410,7 @@ void main(void)\r src: url('${oe.dataSrc}'); font-weight: ${oe.weight}; font-style: ${oe.style}; - }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(ne){this._stylesheet!==ne&&(this._stylesheet=ne,this.styleID++)}normalizeColor(ne){return Array.isArray(ne)&&(ne=rgb2hex(ne)),typeof ne=="number"?hex2string(ne):ne}dropShadowToCSS(){let ne=this.normalizeColor(this.dropShadowColor);const oe=this.dropShadowAlpha,ce=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),ue=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);ne.startsWith("#")&&oe<1&&(ne+=(oe*255|0).toString(16).padStart(2,"0"));const pe=`${ce}px ${ue}px`;return this.dropShadowBlur>0?`text-shadow: ${pe} ${this.dropShadowBlur}px ${ne}`:`text-shadow: ${pe} ${ne}`}reset(){Object.assign(this,_HTMLTextStyle.defaultOptions)}onBeforeDraw(){const{fontsDirty:ne}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&ne?new Promise(oe=>setTimeout(oe,100)):Promise.resolve()}get isSafari(){const{userAgent:ne}=settings.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(ne)}set fillGradientStops(ne){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(ne){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(ne){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(ne){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(ne){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(ne){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(ne){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};let HTMLTextStyle=_HTMLTextStyle;HTMLTextStyle.availableFonts={};HTMLTextStyle.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};const _HTMLText=class extends Sprite{constructor(ne="",oe={}){super(Texture.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;const ce=new Image,ue=Texture.from(ce,{scaleMode:settings.SCALE_MODE,resourceOptions:{autoLoad:!1}});ue.orig=new Rectangle,ue.trim=new Rectangle,this.texture=ue;const pe="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml",ge=document.createElementNS(pe,"svg"),ye=document.createElementNS(pe,"foreignObject"),ve=document.createElementNS(me,"div"),xe=document.createElementNS(me,"style");ye.setAttribute("width","10000"),ye.setAttribute("height","10000"),ye.style.overflow="hidden",ge.appendChild(ye),this.maxWidth=_HTMLText.defaultMaxWidth,this.maxHeight=_HTMLText.defaultMaxHeight,this._domElement=ve,this._styleElement=xe,this._svgRoot=ge,this._foreignObject=ye,this._foreignObject.appendChild(xe),this._foreignObject.appendChild(ve),this._image=ce,this._loadImage=new Image,this._autoResolution=_HTMLText.defaultAutoResolution,this._resolution=_HTMLText.defaultResolution??settings.RESOLUTION,this.text=ne,this.style=oe}measureText(ne){var ye,ve;const{text:oe,style:ce,resolution:ue}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},ne);Object.assign(this._domElement,{innerHTML:oe,style:ce.toCSS(ue)}),this._styleElement.textContent=ce.toGlobalCSS(),document.body.appendChild(this._svgRoot);const pe=this._domElement.getBoundingClientRect();this._svgRoot.remove();const me=Math.min(this.maxWidth,Math.ceil(pe.width)),ge=Math.min(this.maxHeight,Math.ceil(pe.height));return this._svgRoot.setAttribute("width",me.toString()),this._svgRoot.setAttribute("height",ge.toString()),oe!==this._text&&(this._domElement.innerHTML=this._text),ce!==this._style&&(Object.assign(this._domElement,{style:(ye=this._style)==null?void 0:ye.toCSS(ue)}),this._styleElement.textContent=(ve=this._style)==null?void 0:ve.toGlobalCSS()),{width:me+ce.padding*2,height:ge+ce.padding*2}}async updateText(ne=!0){const{style:oe,_image:ce,_loadImage:ue}=this;if(this.localStyleID!==oe.styleID&&(this.dirty=!0,this.localStyleID=oe.styleID),!this.dirty&&ne)return;const{width:pe,height:me}=this.measureText();ce.width=ue.width=Math.ceil(Math.max(1,pe)),ce.height=ue.height=Math.ceil(Math.max(1,me)),this._loading||(this._loading=!0,await new Promise(ge=>{ue.onload=async()=>{await oe.onBeforeDraw(),this._loading=!1,ce.src=ue.src,ue.onload=null,ue.src="",this.updateTexture(),ge()};const ye=new XMLSerializer().serializeToString(this._svgRoot);ue.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(ye)}`}))}get source(){return this._image}updateTexture(){const{style:ne,texture:oe,_image:ce,resolution:ue}=this,{padding:pe}=ne,{baseTexture:me}=oe;oe.trim.width=oe._frame.width=ce.width/ue,oe.trim.height=oe._frame.height=ce.height/ue,oe.trim.x=-pe,oe.trim.y=-pe,oe.orig.width=oe._frame.width-pe*2,oe.orig.height=oe._frame.height-pe*2,this._onTextureUpdate(),me.setRealSize(ce.width,ce.height,ue),this.dirty=!1}_render(ne){this._autoResolution&&this._resolution!==ne.resolution&&(this._resolution=ne.resolution,this.dirty=!0),this.updateText(!0),super._render(ne)}_renderCanvas(ne){this._autoResolution&&this._resolution!==ne.resolution&&(this._resolution=ne.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(ne)}getLocalBounds(ne){return this.updateText(!0),super.getLocalBounds(ne)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(ne){var ce,ue,pe,me,ge;typeof ne=="boolean"&&(ne={children:ne}),ne=Object.assign({},_HTMLText.defaultDestroyOptions,ne),super.destroy(ne);const oe=null;this.ownsStyle&&((ce=this._style)==null||ce.cleanFonts()),this._style=oe,(ue=this._svgRoot)==null||ue.remove(),this._svgRoot=oe,(pe=this._domElement)==null||pe.remove(),this._domElement=oe,(me=this._foreignObject)==null||me.remove(),this._foreignObject=oe,(ge=this._styleElement)==null||ge.remove(),this._styleElement=oe,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=oe,this._image.src="",this._image=oe}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(ne){this.updateText(!0);const oe=sign$2(this.scale.x)||1;this.scale.x=oe*ne/this._image.width/this.resolution,this._width=ne}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(ne){this.updateText(!0);const oe=sign$2(this.scale.y)||1;this.scale.y=oe*ne/this._image.height/this.resolution,this._height=ne}get style(){return this._style}set style(ne){this._style!==ne&&(ne=ne||{},ne instanceof HTMLTextStyle?(this.ownsStyle=!1,this._style=ne):ne instanceof TextStyle?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=HTMLTextStyle.from(ne)):(this.ownsStyle=!0,this._style=new HTMLTextStyle(ne)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(ne){ne=String(ne===""||ne===null||ne===void 0?" ":ne),ne=this.sanitiseText(ne),this._text!==ne&&(this._text=ne,this.dirty=!0)}get resolution(){return this._resolution}set resolution(ne){this._autoResolution=!1,this._resolution!==ne&&(this._resolution=ne,this.dirty=!0)}sanitiseText(ne){return ne.replace(/
/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};let HTMLText=_HTMLText;HTMLText.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};HTMLText.defaultMaxWidth=2024;HTMLText.defaultMaxHeight=2024;HTMLText.defaultAutoResolution=!0;function makeRenderer(ne,oe){return{constructor:ne,meta:oe}}function quickselect(ne,oe,ce,ue,pe){quickselectStep(ne,oe,ce||0,ue||ne.length-1,pe||defaultCompare)}function quickselectStep(ne,oe,ce,ue,pe){for(;ue>ce;){if(ue-ce>600){var me=ue-ce+1,ge=oe-ce+1,ye=Math.log(me),ve=.5*Math.exp(2*ye/3),xe=.5*Math.sqrt(ye*ve*(me-ve)/me)*(ge-me/2<0?-1:1),_e=Math.max(ce,Math.floor(oe-ge*ve/me+xe)),Se=Math.min(ue,Math.floor(oe+(me-ge)*ve/me+xe));quickselectStep(ne,oe,_e,Se,pe)}var $e=ne[oe],Re=ce,Ae=ue;for(swap(ne,ce,oe),pe(ne[ue],$e)>0&&swap(ne,ce,ue);Re0;)Ae--}pe(ne[ce],$e)===0?swap(ne,ce,Ae):(Ae++,swap(ne,Ae,ue)),Ae<=oe&&(ce=Ae+1),oe<=Ae&&(ue=Ae-1)}}function swap(ne,oe,ce){var ue=ne[oe];ne[oe]=ne[ce],ne[ce]=ue}function defaultCompare(ne,oe){return neoe?1:0}class RBush{constructor(oe=9){this._maxEntries=Math.max(4,oe),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(oe){let ce=this.data;const ue=[];if(!intersects(oe,ce))return ue;const pe=this.toBBox,me=[];for(;ce;){for(let ge=0;ge=0&&me[ce].children.length>this._maxEntries;)this._split(me,ce),ce--;this._adjustParentBBoxes(pe,me,ce)}_split(oe,ce){const ue=oe[ce],pe=ue.children.length,me=this._minEntries;this._chooseSplitAxis(ue,me,pe);const ge=this._chooseSplitIndex(ue,me,pe),ye=createNode(ue.children.splice(ge,ue.children.length-ge));ye.height=ue.height,ye.leaf=ue.leaf,calcBBox(ue,this.toBBox),calcBBox(ye,this.toBBox),ce?oe[ce-1].children.push(ye):this._splitRoot(ue,ye)}_splitRoot(oe,ce){this.data=createNode([oe,ce]),this.data.height=oe.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)}_chooseSplitIndex(oe,ce,ue){let pe,me=1/0,ge=1/0;for(let ye=ce;ye<=ue-ce;ye++){const ve=distBBox(oe,0,ye,this.toBBox),xe=distBBox(oe,ye,ue,this.toBBox),_e=intersectionArea(ve,xe),Se=bboxArea(ve)+bboxArea(xe);_e=ce;xe--){const _e=oe.children[xe];extend$1(ye,oe.leaf?me(_e):_e),ve+=bboxMargin(ye)}return ve}_adjustParentBBoxes(oe,ce,ue){for(let pe=ue;pe>=0;pe--)extend$1(ce[pe],oe)}_condense(oe){for(let ce=oe.length-1,ue;ce>=0;ce--)oe[ce].children.length===0?ce>0?(ue=oe[ce-1].children,ue.splice(ue.indexOf(oe[ce]),1)):this.clear():calcBBox(oe[ce],this.toBBox)}}function findItem(ne,oe,ce){if(!ce)return oe.indexOf(ne);for(let ue=0;ue=ne.minX&&oe.maxY>=ne.minY}function createNode(ne){return{children:ne,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(ne,oe,ce,ue,pe){const me=[oe,ce];for(;me.length;){if(ce=me.pop(),oe=me.pop(),ce-oe<=ue)continue;const ge=oe+Math.ceil((ce-oe)/ue/2)*ue;quickselect(ne,ge,oe,ce,pe),me.push(oe,ge,ge,ce)}}class Bush extends RBush{toBBox(oe){return{minX:oe.left,minY:oe.top,maxX:oe.right,maxY:oe.bottom}}compareMinX(oe,ce){return oe.left-ce.left}compareMinY(oe,ce){return oe.top-ce.top}}const defaultD2RendererOptions={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,errorColor:"#f44336",backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:500,increment:.5,maxScale:1.5,minScale:1,dtMax:1.5,dtMin:1.1}};var dist$1={},__assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(ne){for(var oe,ce=1,ue=arguments.length;ce0?1:-1}),shim$4}var sign$1=isImplemented$6()?Math.sign:requireShim$4(),sign=sign$1,abs=Math.abs,floor$1=Math.floor,toInteger$1=function(ne){return isNaN(ne)?0:(ne=Number(ne),ne===0||!isFinite(ne)?ne:sign(ne)*floor$1(abs(ne)))},toInteger=toInteger$1,max$3=Math.max,toPosInteger=function(ne){return max$3(0,toInteger(ne))},validCallable=function(ne){if(typeof ne!="function")throw new TypeError(ne+" is not a function");return ne},isValue$4=isValue$6,validValue=function(ne){if(!isValue$4(ne))throw new TypeError("Cannot use null or undefined");return ne},custom={exports:{}},isImplemented$5=function(){var ne=Object.assign,oe;return typeof ne!="function"?!1:(oe={foo:"raz"},ne(oe,{bar:"dwa"},{trzy:"trzy"}),oe.foo+oe.bar+oe.trzy==="razdwatrzy")},isImplemented$4,hasRequiredIsImplemented$3;function requireIsImplemented$3(){return hasRequiredIsImplemented$3||(hasRequiredIsImplemented$3=1,isImplemented$4=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),isImplemented$4}var shim$3,hasRequiredShim$3;function requireShim$3(){if(hasRequiredShim$3)return shim$3;hasRequiredShim$3=1;var ne=isValue$6,oe=Object.keys;return shim$3=function(ce){return oe(ne(ce)?Object(ce):ce)},shim$3}var keys,hasRequiredKeys;function requireKeys(){return hasRequiredKeys||(hasRequiredKeys=1,keys=requireIsImplemented$3()()?Object.keys:requireShim$3()),keys}var shim$2,hasRequiredShim$2;function requireShim$2(){if(hasRequiredShim$2)return shim$2;hasRequiredShim$2=1;var ne=requireKeys(),oe=validValue,ce=Math.max;return shim$2=function(ue,pe){var me,ge,ye=ce(arguments.length,2),ve;for(ue=Object(oe(ue)),ve=function(xe){try{ue[xe]=pe[xe]}catch(_e){me||(me=_e)}},ge=1;ge-1},shim$1}var contains$1=isImplemented$3()?String.prototype.contains:requireShim$1(),isValue$1=is$5,isPlainFunction=is$1,assign$1=assign$2,normalizeOpts=normalizeOptions,contains=contains$1,d$1=d$2.exports=function(ne,oe){var ce,ue,pe,me,ge;return arguments.length<2||typeof ne!="string"?(me=oe,oe=ne,ne=null):me=arguments[2],isValue$1(ne)?(ce=contains.call(ne,"c"),ue=contains.call(ne,"e"),pe=contains.call(ne,"w")):(ce=pe=!0,ue=!1),ge={value:oe,configurable:ce,enumerable:ue,writable:pe},me?assign$1(normalizeOpts(me),ge):ge};d$1.gs=function(ne,oe,ce){var ue,pe,me,ge;return typeof ne!="string"?(me=ce,ce=oe,oe=ne,ne=null):me=arguments[3],isValue$1(oe)?isPlainFunction(oe)?isValue$1(ce)?isPlainFunction(ce)||(me=ce,ce=void 0):ce=void 0:(me=oe,oe=ce=void 0):oe=void 0,isValue$1(ne)?(ue=contains.call(ne,"c"),pe=contains.call(ne,"e")):(ue=!0,pe=!1),ge={get:oe,set:ce,configurable:ue,enumerable:pe},me?assign$1(normalizeOpts(me),ge):ge};var dExports=d$2.exports,eventEmitter={exports:{}};(function(ne,oe){var ce=dExports,ue=validCallable,pe=Function.prototype.apply,me=Function.prototype.call,ge=Object.create,ye=Object.defineProperty,ve=Object.defineProperties,xe=Object.prototype.hasOwnProperty,_e={configurable:!0,enumerable:!1,writable:!0},Se,$e,Re,Ae,Ie,ke,Be;Se=function(Ne,Fe){var Ue;return ue(Fe),xe.call(this,"__ee__")?Ue=this.__ee__:(Ue=_e.value=ge(null),ye(this,"__ee__",_e),_e.value=null),Ue[Ne]?typeof Ue[Ne]=="object"?Ue[Ne].push(Fe):Ue[Ne]=[Ue[Ne],Fe]:Ue[Ne]=Fe,this},$e=function(Ne,Fe){var Ue,We;return ue(Fe),We=this,Se.call(this,Ne,Ue=function(){Re.call(We,Ne,Ue),pe.call(Fe,this,arguments)}),Ue.__eeOnceListener__=Fe,this},Re=function(Ne,Fe){var Ue,We,qe,ze;if(ue(Fe),!xe.call(this,"__ee__"))return this;if(Ue=this.__ee__,!Ue[Ne])return this;if(We=Ue[Ne],typeof We=="object")for(ze=0;qe=We[ze];++ze)(qe===Fe||qe.__eeOnceListener__===Fe)&&(We.length===2?Ue[Ne]=We[ze?0:1]:We.splice(ze,1));else(We===Fe||We.__eeOnceListener__===Fe)&&delete Ue[Ne];return this},Ae=function(Ne){var Fe,Ue,We,qe,ze;if(xe.call(this,"__ee__")&&(qe=this.__ee__[Ne],!!qe))if(typeof qe=="object"){for(Ue=arguments.length,ze=new Array(Ue-1),Fe=1;Fe=55296&&Ue<=56319&&(Ge+=$e[++ke])),Ge=Re?xe.call(Re,Ae,Ge,Be):Ge,Ie?(_e.value=Ge,Se(Ne,Be,_e)):Ne[Be]=Ge,++Be;Fe=Be}}if(Fe===void 0)for(Fe=ue($e.length),Ie&&(Ne=new Ie(Fe)),ke=0;ke=6&&(ce-=6),G(ce<1?255*((oe-ne)*ce+ne):ce<3?255*oe:ce<4?255*((oe-ne)*(4-ce)+ne):255*ne)},X=function(ne,oe,ce){oe/=100;var ue=(ce/=100)<=.5?ce*(oe+1):ce+oe-ce*oe,pe=2*ce-ue;return{r:O(pe,ue,(ne/=60)+2),g:O(pe,ue,ne),b:O(pe,ue,ne-2)}},Y=function(ne,oe,ce,ue){return{r:G(255*(1-ne)*(ue=1-ue)),g:G(255*(1-oe)*ue),b:G(255*(1-ce)*ue)}},j=function(ne,oe,ce){ne/=255,oe/=255,ce/=255;var ue=1-Math.max(ne,oe,ce),pe=1-ue,me=pe&&(pe-oe)/pe,ge=pe&&(pe-ce)/pe;return{c:G(100*(pe&&(pe-ne)/pe)),m:G(100*me),y:G(100*ge),k:G(100*ue)}},K=function(ne,oe,ce,ue){ue===void 0&&(ue=1),ne/=255,oe/=255,ce/=255,ue=Math.min(ue,1);var pe=Math.max(ne,oe,ce),me=Math.min(ne,oe,ce),ge=pe-me,ye=0,ve=0,xe=(pe+me)/2;if(ge!==0){switch(pe){case ne:ye=(oe-ce)/ge%6;break;case oe:ye=(ce-ne)/ge+2;break;case ce:ye=(ne-oe)/ge+4}(ye=G(60*ye))<0&&(ye+=360),ve=ge/(1-Math.abs(2*xe-1))}return{h:ye,s:G(100*ve),l:G(100*xe),a:ue}},I=function(ne,oe){if(ne<0&&(ne+=360),ne>360&&(ne-=360),ne===360||ne===0)return ne;var ce=[[0,120],[120,180],[180,240],[240,360]],ue=[[0,60],[60,120],[120,240],[240,360]],pe=oe?ue:ce,me=0,ge=0,ye=0,ve=0;return(oe?ce:ue).find(function(xe,_e){return ne>=xe[0]&&ne360||ne<0)&&(ne-=360*Math.floor(ne/360)),ne},N=function(ne){return typeof ne=="string"&&(ne=m.test(ne)?B(ne)/100:+ne),isNaN(+ne)||ne>1?1:G(ne)},V=function(ne,oe,ce){return oe.reduce(function(ue,pe){return e(e([],ue,!0),[t(t({},ne),{h:ce===i.ADDITIVE?x(ne.h+pe):x(I(I(ne.h,!1)+pe,!0))})],!1)},[t({},ne)])},U=function(ne,oe){return V(ne,[30,-30],oe)},q=function(ne,oe){return V(ne,[180],oe)},$=function(ne,oe){return V(ne,[150,-150],oe)},_=function(ne,oe){return V(ne,[120,-120],oe)},Q=function(ne,oe){return V(ne,[60,-120,180],oe)},z$1=function(ne,oe){return V(ne,[90,-90,180],oe)},J=function(ne){return typeof ne=="string"?function(oe){var ce;if(Object.keys(r).some(function(ue){if(b[ue].test(oe))return ce=ue,!0}),!ce&&~f.indexOf(oe)&&(ce=r.HEX),!ce)throw new Error(E);return ce}(ne):function(oe){var ce,ue=!1,pe=L(Object.keys(oe));if(p[pe]&&(ce=p[pe]),ce&&ce===r.RGB){var me=Object.entries(oe).some(function(ye){return!y.test("".concat(ye[1]))}),ge=Object.entries(oe).some(function(ye){return!(m.test("".concat(ye[1]))||!y.test("".concat(ye[1]))&&!isNaN(+ye[1])&&+ye[1]<=255)});me&&ge&&(ue=!0),me||(ce=r.HEX)}if(!ce||ue)throw new Error(v);return ce}(ne)},W=((c={})[r.HEX]=function(ne){var oe=(~f.indexOf(ne)?o[ne]:ne).match(b.HEX),ce={r:M(oe[1]||oe[5]),g:M(oe[2]||oe[6]),b:M(oe[3]||oe[7])},ue=oe[4]||oe[8];return ue!==void 0&&(ce.a=M(ue)/255),ce},c[r.RGB]=function(ne){var oe=ne.match(b.RGB),ce=D(oe[1]||oe[5]),ue=D(oe[2]||oe[6]),pe=D(oe[3]||oe[7]),me=oe[4]||oe[8],ge={r:Math.min(ce,255),g:Math.min(ue,255),b:Math.min(pe,255)};return me!==void 0&&(ge.a=N(me)),ge},c[r.HSL]=function(ne){var oe=ne.match(b.HSL),ce=x(oe[1]||oe[5]),ue=C(oe[2]||oe[6]),pe=C(oe[3]||oe[7]),me=oe[4]||oe[8],ge=X(ce,ue,pe);return me!==void 0&&(ge.a=N(me)),ge},c[r.CMYK]=function(ne){var oe=ne.match(b.CMYK),ce=S(oe[1]||oe[6]),ue=S(oe[2]||oe[7]),pe=S(oe[3]||oe[8]),me=S(oe[4]||oe[9]),ge=oe[5]||oe[10],ye=Y(ce,ue,pe,me);return ge!==void 0&&(ye.a=N(ge)),ye},c),Z=((s={})[r.HEX]=function(ne){var oe={r:D("".concat(ne.r)),g:D("".concat(ne.g)),b:D("".concat(ne.b))};return H(ne,"a")&&(oe.a=Math.min(D("".concat(ne.a),!0),1)),oe},s[r.RGB]=function(ne){return this.HEX(ne)},s[r.HSL]=function(ne){var oe=C("".concat(ne.s)),ce=C("".concat(ne.l)),ue=X(x(ne.h),oe,ce);return H(ne,"a")&&(ue.a=N(ne.a)),ue},s[r.CMYK]=function(ne){var oe=S("".concat(ne.c)),ce=S("".concat(ne.m)),ue=S("".concat(ne.y)),pe=S("".concat(ne.k)),me=Y(oe,ce,ue,pe);return H(ne,"a")&&(me.a=N(ne.a)),me},s),tt=function(ne,oe){return oe===void 0&&(oe=J(ne)),typeof ne=="string"?W[oe](ne):Z[oe](ne)},et=((d={})[r.HEX]=function(ne){return{r:R(ne.r),g:R(ne.g),b:R(ne.b)}},d.HEXA=function(ne){var oe=et.HEX(ne);return oe.a=H(ne,"a")?R(255*ne.a):"0xFF",oe},d[r.RGB]=function(ne,oe){return H(ne,"a")&&delete ne.a,ot(ne,oe)},d.RGBA=function(ne,oe){return ne.a=H(ne,"a")?G(ne.a):1,ot(ne,oe)},d[r.HSL]=function(ne,oe){var ce=K(ne.r,ne.g,ne.b);return delete ce.a,at(ce,oe)},d.HSLA=function(ne,oe){var ce=et.HSL(ne,oe);return ce.a=H(ne,"a")?G(ne.a,oe):1,ce},d[r.CMYK]=function(ne,oe){return ut(j(ne.r,ne.g,ne.b),oe)},d.CMYKA=function(ne,oe){var ce=et.CMYK(ne,oe);return ce.a=H(ne,"a")?G(ne.a,oe):1,ce},d),rt=function(ne,oe,ce,ue){var pe=J(ne),me=typeof ne=="string",ge=tt(ne,pe),ye=typeof ne=="string"&&H(ge,"a")||typeof ne!="string"&&H(ne,"a"),ve=K(ge.r,ge.g,ge.b,ge.a);ye||delete ve.a;var xe=ce?ve.l/(oe+1):(100-ve.l)/(oe+1),_e=Array(oe).fill(null).map(function(Se,$e){return t(t({},ve),{l:ve.l+xe*($e+1)*(1-2*+ce)})});switch(pe){case r.HEX:default:return _e.map(function(Se){var $e=X(Se.h,Se.s,Se.l);return ye&&($e.a=Se.a),me?ye?w.HEX(ot(t(t({},$e),{a:G(255*$e.a)}),ue)):w.HEX(ot($e,ue)):ye?et.HEXA($e):et.HEX($e)});case r.RGB:return _e.map(function(Se){var $e=X(Se.h,Se.s,Se.l);return ye&&($e.a=Se.a),me?w.RGB(ot($e,ue)):ye?et.RGBA($e,ue):et.RGB($e,ue)});case r.HSL:return _e.map(function(Se){return me?w.HSL(at(Se,ue)):ye?et.HSLA(t(t({},X(Se.h,Se.s,Se.l)),{a:Se.a}),ue):et.HSL(X(Se.h,Se.s,Se.l),ue)})}},nt=((h={buildHarmony:function(ne,oe,ce,ue){var pe=J(ne),me=tt(ne,pe),ge=K(me.r,me.g,me.b,me.a),ye=typeof ne=="string"&&H(me,"a")||typeof ne!="string"&&H(ne,"a"),ve=typeof ne=="string";switch(pe){case r.HEX:default:return ye?this.HEXA(at(ge,0),oe,ce,ve):this.HEX(at(ge,0),oe,ce,ve);case r.HSL:return ye?this.HSLA(ge,oe,ce,ve,ue):this.HSL(ge,oe,ce,ve,ue);case r.RGB:return ye?this.RGBA(ge,oe,ce,ve,ue):this.RGB(ge,oe,ce,ve,ue)}}})[r.HEX]=function(ne,oe,ce,ue){return oe(ne,ce).map(function(pe){return ue?w.HEX(X(pe.h,pe.s,pe.l)):et.HEX(X(pe.h,pe.s,pe.l))})},h.HEXA=function(ne,oe,ce,ue){return oe(ne,ce).map(function(pe){return ue?w.HEX(t(t({},X(pe.h,pe.s,pe.l)),{a:255*N(pe.a)})):et.HEXA(t(t({},X(pe.h,pe.s,pe.l)),{a:N(pe.a)}))})},h[r.RGB]=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.RGB(ot(X(me.h,me.s,me.l),pe)):et.RGB(X(me.h,me.s,me.l),pe)})},h.RGBA=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.RGB(ot(t(t({},X(me.h,me.s,me.l)),{a:N(me.a)}),pe)):et.RGBA(t(t({},X(me.h,me.s,me.l)),{a:N(me.a)}),pe)})},h[r.HSL]=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.HSL(at({h:me.h,s:me.s,l:me.l},pe)):et.HSL(X(me.h,me.s,me.l),pe)})},h.HSLA=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.HSL(at(t(t({},me),{a:N(me.a)}),pe)):et.HSLA(t(t({},X(me.h,me.s,me.l)),{a:N(me.a)}),pe)})},h),it=((l={mix:function(ne,oe){var ce,ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae,Ie,ke,Be=ne.map(function(We){var qe=J(We);return tt(We,qe)}),Ne=oe===i.SUBTRACTIVE?Be.map(function(We){var qe,ze,Ge,Ze,Dt,Je,Ut,jt,Ke,an,Zt,en,Kt,Wt,un=(qe=We.r,ze=We.g,Ge=We.b,Ze=Math.min(qe,ze,Ge),Dt=Math.min(255-qe,255-ze,255-Ge),Je=qe-Ze,Ut=ze-Ze,jt=Ge-Ze,Ke=Math.min(Je,Ut),an=Je-Ke,Zt=(Ut+Ke)/2,en=(jt+Ut-Ke)/2,Kt=Math.max(an,Zt,en)/Math.max(Je,Ut,jt),Wt=isNaN(Kt)||Kt===1/0||Kt<=0?1:Kt,{r:an/Wt+Dt,y:Zt/Wt+Dt,b:en/Wt+Dt});return H(We,"a")&&(un.a=We.a),un}):null;function Fe(We){var qe=oe===i.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return We.reduce(function(ze,Ge){var Ze=H(Ge,"a")?Ge.a:1,Dt={r:Math.min(ze.r+Ge.r*Ze,255),b:Math.min(ze.b+Ge.b*Ze,255),a:1-(1-Ze)*(1-ze.a)},Je="g"in ze?ze.g:ze.y,Ut="g"in Ge?Ge.g:Ge.y;return t(t({},Dt),oe===i.ADDITIVE?{g:Math.min(Je+Ut*Ze,255)}:{y:Math.min(Je+Ut*Ze,255)})},qe)}if(oe===i.ADDITIVE)ce=Fe(Be);else{var Ue=Fe(Ne);ue=Ue.r,pe=Ue.y,me=Ue.b,ge=Math.min(ue,pe,me),ye=Math.min(255-ue,255-pe,255-me),ve=ue-ge,xe=pe-ge,_e=me-ge,Se=Math.min(xe,_e),$e=ve+xe-Se,Re=xe+Se,Ae=2*(_e-Se),Ie=Math.max($e,Re,Ae)/Math.max(ve,xe,_e),ke=isNaN(Ie)||Ie===1/0||Ie<=0?1:Ie,(ce={r:$e/ke+ye,g:Re/ke+ye,b:Ae/ke+ye}).a=Ue.a}return{r:G(ce.r),g:G(ce.g),b:G(ce.b),a:k(ce.a,0,1)}}})[r.HEX]=function(ne,oe,ce){var ue=this.mix(ne,oe);return delete ue.a,ce?w.HEX(ue):et.HEX(ue)},l.HEXA=function(ne,oe,ce){var ue=this.mix(ne,oe);return ue.a=ce?255*N(ue.a):N(ue.a),ce?w.HEX(ue):et.HEXA(ue)},l[r.RGB]=function(ne,oe,ce,ue){var pe=this.mix(ne,oe);return delete pe.a,ce?w.RGB(pe):et.RGB(pe,ue)},l.RGBA=function(ne,oe,ce,ue){var pe=this.mix(ne,oe);return ce?w.RGB(pe):et.RGBA(pe,ue)},l[r.HSL]=function(ne,oe,ce,ue){var pe=this.mix(ne,oe),me=K(pe.r,pe.g,pe.b);return delete pe.a,delete me.a,ce?w.HSL(me):et.HSL(pe,ue)},l.HSLA=function(ne,oe,ce,ue){var pe=this.mix(ne,oe),me=K(pe.r,pe.g,pe.b,pe.a);return ce?w.HSL(me):et.HSLA(pe,ue)},l),ot=function(ne,oe){return t({r:G(ne.r,oe),g:G(ne.g,oe),b:G(ne.b,oe)},H(ne,"a")?{a:G(ne.a,oe)}:{})},at=function(ne,oe){return t({h:G(ne.h,oe),s:G(ne.s,oe),l:G(ne.l,oe)},H(ne,"a")?{a:G(ne.a,oe)}:{})},ut=function(ne,oe){return{c:G(ne.c,oe),m:G(ne.m,oe),y:G(ne.y,oe),k:G(ne.k,oe)}},ct=function(ne,oe,ce,ue,pe,me){var ge=pe(tt(ne,oe),ue);return ce?me(ge):ge},st=function(ne,oe,ce,ue,pe,me,ge){ce<1&&(ce=5);var ye=function(ve,xe,_e){var Se=_e-1,$e=(xe.r-ve.r)/Se,Re=(xe.g-ve.g)/Se,Ae=(xe.b-ve.b)/Se,Ie=N(ve.a),ke=(N(xe.a)-Ie)/Se;return Array(_e).fill(null).map(function(Be,Ne){return Ne===0?ve:Ne===Se?xe:{r:G(ve.r+$e*Ne),g:G(ve.g+Re*Ne),b:G(ve.b+Ae*Ne),a:G(Ie+ke*Ne)}})}(tt(ne),tt(oe),ce);return ye.map(function(ve){var xe=me(ve,pe);return ue?ge(xe):xe})},dt=function(){function ne(oe,ce){ce===void 0&&(ce=6),this.rgb=tt(oe),this._decimals=ce,this.updateHSL(),this.updateCMYK()}return ne.prototype.updateRGB=function(){this.rgb=t(t({},X(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},ne.prototype.updateRGBFromCMYK=function(){this.rgb=t(t({},Y(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},ne.prototype.updateHSL=function(){this.hsl=K(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},ne.prototype.updateCMYK=function(){this.cmyk=j(this.rgb.r,this.rgb.g,this.rgb.b)},ne.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},ne.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},ne.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},ne.prototype.setDecimals=function(oe){return this._decimals=oe,this},ne.prototype.setH=function(oe){return this.hsl.h=x(oe),this.updateRGBAndCMYK()},ne.prototype.setS=function(oe){return this.hsl.s=k(oe,0,100),this.updateRGBAndCMYK()},ne.prototype.setL=function(oe){return this.hsl.l=k(oe,0,100),this.updateRGBAndCMYK()},ne.prototype.setR=function(oe){return this.rgb.r=k(oe,0,255),this.updateHSLAndCMYK()},ne.prototype.setG=function(oe){return this.rgb.g=k(oe,0,255),this.updateHSLAndCMYK()},ne.prototype.setB=function(oe){return this.rgb.b=k(oe,0,255),this.updateHSLAndCMYK()},ne.prototype.setA=function(oe){return this.hsl.a=this.rgb.a=k(oe,0,1),this},ne.prototype.setC=function(oe){return this.cmyk.c=k(oe,0,100),this.updateRGBAndHSL()},ne.prototype.setM=function(oe){return this.cmyk.m=k(oe,0,100),this.updateRGBAndHSL()},ne.prototype.setY=function(oe){return this.cmyk.y=k(oe,0,100),this.updateRGBAndHSL()},ne.prototype.setK=function(oe){return this.cmyk.k=k(oe,0,100),this.updateRGBAndHSL()},Object.defineProperty(ne.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"H",{get:function(){return G(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"S",{get:function(){return G(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"L",{get:function(){return G(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"R",{get:function(){return G(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"G",{get:function(){return G(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"B",{get:function(){return G(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"A",{get:function(){return G(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"C",{get:function(){return G(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"M",{get:function(){return G(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"Y",{get:function(){return G(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"K",{get:function(){return G(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEXObject",{get:function(){return et.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEXAObject",{get:function(){return et.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGBAObject",{get:function(){return t(t({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSLAObject",{get:function(){return t(t({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYKAObject",{get:function(){return t(t({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEX",{get:function(){return w.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEXA",{get:function(){return w.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGB",{get:function(){return w.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGBA",{get:function(){return w.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSL",{get:function(){return w.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSLA",{get:function(){return w.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYK",{get:function(){return w.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYKA",{get:function(){return w.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),ne.toHEX=function(oe,ce){ce===void 0&&(ce=!0);var ue=J(oe);return ct(oe,ue,ce,0,et.HEX,w.HEX)},ne.toHEXA=function(oe,ce){ce===void 0&&(ce=!0);var ue=J(oe);return ct(oe,ue,ce,0,et.HEXA,w.HEX)},ne.toRGB=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.RGB,w.RGB)},ne.toRGBA=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.RGBA,w.RGB)},ne.toHSL=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.HSL,w.HSL)},ne.toHSLA=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.HSLA,w.HSL)},ne.toCMYK=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.CMYK,w.CMYK)},ne.toCMYKA=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.CMYKA,w.CMYK)},ne.getBlendHEX=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HEX,w.HEX)},ne.getBlendHEXA=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HEXA,w.HEX)},ne.getBlendRGB=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.RGB,w.RGB)},ne.getBlendRGBA=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.RGBA,w.RGB)},ne.getBlendHSL=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HSL,w.HSL)},ne.getBlendHSLA=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HSLA,w.HSL)},ne.getMixHEX=function(oe,ce,ue){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),it.HEX(oe,ce,ue)},ne.getMixHEXA=function(oe,ce,ue){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),it.HEXA(oe,ce,ue)},ne.getMixRGB=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.RGB(oe,ce,ue,pe)},ne.getMixRGBA=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.RGBA(oe,ce,ue,pe)},ne.getMixHSL=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.HSL(oe,ce,ue,pe)},ne.getMixHSLA=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.HSLA(oe,ce,ue,pe)},ne.getShades=function(oe,ce,ue){return ue===void 0&&(ue=6),rt(oe,ce,!0,ue)},ne.getTints=function(oe,ce,ue){return ue===void 0&&(ue=6),rt(oe,ce,!1,ue)},ne.getHarmony=function(oe,ce,ue,pe){return ce===void 0&&(ce=n.COMPLEMENTARY),ue===void 0&&(ue=i.ADDITIVE),pe===void 0&&(pe=6),function(me,ge,ye,ve){var xe;return(xe={},xe[n.ANALOGOUS]=nt.buildHarmony(ge,U,ve,ye),xe[n.COMPLEMENTARY]=nt.buildHarmony(ge,q,ve,ye),xe[n.SPLIT_COMPLEMENTARY]=nt.buildHarmony(ge,$,ve,ye),xe[n.TRIADIC]=nt.buildHarmony(ge,_,ve,ye),xe[n.TETRADIC]=nt.buildHarmony(ge,Q,ve,ye),xe[n.SQUARE]=nt.buildHarmony(ge,z$1,ve,ye),xe)[me]}(ce,oe,pe,ue)},ne}();const defaultContext={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1};var earthRadius=63710088e-1,factors={centimeters:earthRadius*100,centimetres:earthRadius*100,degrees:earthRadius/111325,feet:earthRadius*3.28084,inches:earthRadius*39.37,kilometers:earthRadius/1e3,kilometres:earthRadius/1e3,meters:earthRadius,metres:earthRadius,miles:earthRadius/1609.344,millimeters:earthRadius*1e3,millimetres:earthRadius*1e3,nauticalmiles:earthRadius/1852,radians:1,yards:earthRadius*1.0936};function feature(ne,oe,ce){ce===void 0&&(ce={});var ue={type:"Feature"};return(ce.id===0||ce.id)&&(ue.id=ce.id),ce.bbox&&(ue.bbox=ce.bbox),ue.properties=oe||{},ue.geometry=ne,ue}function point(ne,oe,ce){if(ce===void 0&&(ce={}),!ne)throw new Error("coordinates is required");if(!Array.isArray(ne))throw new Error("coordinates must be an Array");if(ne.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!isNumber(ne[0])||!isNumber(ne[1]))throw new Error("coordinates must contain numbers");var ue={type:"Point",coordinates:ne};return feature(ue,oe,ce)}function lineString(ne,oe,ce){if(ce===void 0&&(ce={}),ne.length<2)throw new Error("coordinates must be an array of two or more positions");var ue={type:"LineString",coordinates:ne};return feature(ue,oe,ce)}function radiansToLength(ne,oe){oe===void 0&&(oe="kilometers");var ce=factors[oe];if(!ce)throw new Error(oe+" units is invalid");return ne*ce}function lengthToRadians(ne,oe){oe===void 0&&(oe="kilometers");var ce=factors[oe];if(!ce)throw new Error(oe+" units is invalid");return ne/ce}function degreesToRadians(ne){var oe=ne%360;return oe*Math.PI/180}function convertLength(ne,oe,ce){if(oe===void 0&&(oe="kilometers"),ce===void 0&&(ce="kilometers"),!(ne>=0))throw new Error("length must be a positive number");return radiansToLength(lengthToRadians(ne,oe),ce)}function isNumber(ne){return!isNaN(ne)&&ne!==null&&!Array.isArray(ne)}function getCoord(ne){if(!ne)throw new Error("coord is required");if(!Array.isArray(ne)){if(ne.type==="Feature"&&ne.geometry!==null&&ne.geometry.type==="Point")return ne.geometry.coordinates;if(ne.type==="Point")return ne.coordinates}if(Array.isArray(ne)&&ne.length>=2&&!Array.isArray(ne[0])&&!Array.isArray(ne[1]))return ne;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function featureOf(ne,oe,ce){if(!ne)throw new Error("No feature passed");if(!ce)throw new Error(".featureOf() requires a name");if(!ne||ne.type!=="Feature"||!ne.geometry)throw new Error("Invalid input to "+ce+", Feature with geometry required");if(!ne.geometry||ne.geometry.type!==oe)throw new Error("Invalid input to "+ce+": must be a "+oe+", given "+ne.geometry.type)}function distance(ne,oe,ce){ce===void 0&&(ce={});var ue=getCoord(ne),pe=getCoord(oe),me=degreesToRadians(pe[1]-ue[1]),ge=degreesToRadians(pe[0]-ue[0]),ye=degreesToRadians(ue[1]),ve=degreesToRadians(pe[1]),xe=Math.pow(Math.sin(me/2),2)+Math.pow(Math.sin(ge/2),2)*Math.cos(ye)*Math.cos(ve);return radiansToLength(2*Math.atan2(Math.sqrt(xe),Math.sqrt(1-xe)),ce.units)}function coordEach(ne,oe,ce){if(ne!==null)for(var ue,pe,me,ge,ye,ve,xe,_e=0,Se=0,$e,Re=ne.type,Ae=Re==="FeatureCollection",Ie=Re==="Feature",ke=Ae?ne.features.length:1,Be=0;Beve||Ae>xe||Ie>_e){ye=Se,ve=ue,xe=Ae,_e=Ie,me=0;return}var ke=lineString([ye,Se],ce.properties);if(oe(ke,ue,pe,Ie,me)===!1)return!1;me++,ye=Se})===!1)return!1}}})}function rhumbDistance(ne,oe,ce){ce===void 0&&(ce={});var ue=getCoord(ne),pe=getCoord(oe);pe[0]+=pe[0]-ue[0]>180?-360:ue[0]-pe[0]>180?360:0;var me=calculateRhumbDistance(ue,pe),ge=convertLength(me,"meters",ce.units);return ge}function calculateRhumbDistance(ne,oe,ce){ce=ce===void 0?earthRadius:Number(ce);var ue=ce,pe=ne[1]*Math.PI/180,me=oe[1]*Math.PI/180,ge=me-pe,ye=Math.abs(oe[0]-ne[0])*Math.PI/180;ye>Math.PI&&(ye-=2*Math.PI);var ve=Math.log(Math.tan(me/2+Math.PI/4)/Math.tan(pe/2+Math.PI/4)),xe=Math.abs(ve)>1e-11?ge/ve:Math.cos(pe),_e=Math.sqrt(ge*ge+xe*xe*ye*ye),Se=_e*ue;return Se}function pointToLineDistance(ne,oe,ce){if(ce===void 0&&(ce={}),ce.method||(ce.method="geodesic"),ce.units||(ce.units="kilometers"),!ne)throw new Error("pt is required");if(Array.isArray(ne)?ne=point(ne):ne.type==="Point"?ne=feature(ne):featureOf(ne,"Point","point"),!oe)throw new Error("line is required");Array.isArray(oe)?oe=lineString(oe):oe.type==="LineString"?oe=feature(oe):featureOf(oe,"LineString","line");var ue=1/0,pe=ne.geometry.coordinates;return segmentEach(oe,function(me){var ge=me.geometry.coordinates[0],ye=me.geometry.coordinates[1],ve=distanceToSegment(pe,ge,ye,ce);venew dt(ne).setA(oe??defaultContext.alpha).RGBA,getStrokeStyle=(ne,oe)=>getFillStyle(ne,oe);function transform(ne,oe){return{width:ne.width*oe.scale.x,height:ne.height*oe.scale.y,x:ne.x*oe.scale.x+oe.x,y:ne.y*oe.scale.y+oe.y}}const text={draw(ne,oe,ce){const ue=ne.label??ne.text;if(ue){const pe=transform(ne,{x:ne["label-x"]??ne.textX??0,y:ne["label-y"]??ne.textY??0,scale:{x:1,y:1}}),me=transform(pe,ce);oe.font=`${(ne["label-size"]??ne.fontSize??4)*ce.scale.x}px Inter`,oe.fillStyle=getFillStyle(ne["label-color"]??ne.fontColor??"grey",1),oe.fillText(ue,me.x,me.y)}},test(ne){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}},narrow(){return!0}},rect={draw(ne,oe,ce){const{x:ue,y:pe,width:me,height:ge}=transform(ne,ce);oe.fillStyle=getFillStyle(ne.fill,ne.alpha),oe.fillRect(ceil$1(ue),ceil$1(pe),ceil$1(me)||1,ceil$1(ge)||1)},test(ne){return{left:ne.x,right:ne.x+ne.width,top:ne.y,bottom:ne.y+ne.height}},narrow(){return!0}},circle={draw(ne,oe,ce){oe.fillStyle=getFillStyle(ne.fill,ne.alpha),oe.beginPath();const ue=transform({...ne,width:ne.radius,height:ne.radius},ce);oe.ellipse(ceil$1(ue.x),ceil$1(ue.y),ceil$1(ue.width),ceil$1(ue.height),0,0,2*PI),oe.fill()},test(ne){return{left:ne.x-ne.radius,right:ne.x+ne.radius,top:ne.y-ne.radius,bottom:ne.y+ne.radius}},narrow(){return!0}},polygon={draw(ne,oe,ce){const[ue,...pe]=ne.points;oe.beginPath(),oe.fillStyle=getFillStyle(ne.fill,ne.alpha);const{x:me,y:ge}=transform({...ue,width:0,height:0},ce);oe.moveTo(ceil$1(me),ceil$1(ge));for(const ye of pe){const{x:ve,y:xe}=transform({...ye,width:0,height:0},ce);oe.lineTo(ceil$1(ve),ceil$1(xe))}oe.closePath(),oe.fill()},test(ne){var oe,ce,ue,pe;return{left:((oe=lodashExports.minBy(ne.points,"x"))==null?void 0:oe.x)??0,right:((ce=lodashExports.maxBy(ne.points,"x"))==null?void 0:ce.x)??0,top:((ue=lodashExports.minBy(ne.points,"y"))==null?void 0:ue.y)??0,bottom:((pe=lodashExports.maxBy(ne.points,"y"))==null?void 0:pe.y)??0}},narrow(){return!0}},path={draw(ne,oe,ce){const[ue,...pe]=ne.points;oe.beginPath(),oe.lineCap="round",oe.lineJoin="round",oe.strokeStyle=getStrokeStyle(ne.fill,ne.alpha);const{x:me,y:ge,width:ye}=transform({...ue,width:ne["line-width"]??ne.lineWidth,height:0},ce);oe.lineWidth=ceil$1(ye),oe.moveTo(ceil$1(me),ceil$1(ge));for(const ve of pe){const{x:xe,y:_e}=transform({...ve,width:0,height:0},ce);oe.lineTo(ceil$1(xe),ceil$1(_e))}oe.stroke()},test(ne){var ce,ue,pe,me;const oe=ne["line-width"]??ne.lineWidth;return{left:(((ce=lodashExports.minBy(ne.points,"x"))==null?void 0:ce.x)??0-oe??0)-1,right:(((ue=lodashExports.maxBy(ne.points,"x"))==null?void 0:ue.x)??0+oe??0)+1,top:(((pe=lodashExports.minBy(ne.points,"y"))==null?void 0:pe.y)??0-oe??0)-1,bottom:(((me=lodashExports.maxBy(ne.points,"y"))==null?void 0:me.y)??0+oe??0)+1}},narrow(ne,oe){return pointToLineDistance(point([oe.x,oe.y]),lineString(ne.points.map(({x:ce,y:ue})=>[ce,ue])))<500*ne.lineWidth}},primitives={text,path,rect,polygon,circle};var rgb$1={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},rgb=rgb$1;rgb.hsl=function(ne){var oe=ne[0]/255,ce=ne[1]/255,ue=ne[2]/255,pe=Math.min(oe,ce,ue),me=Math.max(oe,ce,ue),ge=me-pe,ye,ve,xe;return me===pe?ye=0:oe===me?ye=(ce-ue)/ge:ce===me?ye=2+(ue-oe)/ge:ue===me&&(ye=4+(oe-ce)/ge),ye=Math.min(ye*60,360),ye<0&&(ye+=360),xe=(pe+me)/2,me===pe?ve=0:xe<=.5?ve=ge/(me+pe):ve=ge/(2-me-pe),[ye,ve*100,xe*100]};const{log2,max:max$2}=Math,z=ne=>lodashExports.floor(log2(ne+1));function getTiles({right:ne,left:oe,bottom:ce,top:ue},pe){const me=max$2(z(ne-oe),z(ce-ue))-pe,ge=2**me,ye={left:lodashExports.floor(oe/ge),right:lodashExports.ceil((ne+1)/ge),top:lodashExports.floor(ue/ge),bottom:lodashExports.ceil((ce+1)/ge)};return{zoom:me,order:ge,tiles:lodashExports.shuffle(_default({x:lodashExports.range(ye.left,ye.right+1),y:lodashExports.range(ye.top,ye.bottom+1)}).map(ve=>{const xe=ve.x*ge,_e=ve.y*ge;return{tile:ve,bounds:{left:xe-ge/2,right:xe+ge/2,top:_e-ge/2,bottom:_e+ge/2}}}))}}const defaultBounds={top:0,left:0,right:1,bottom:1},isValue=ne=>lodashExports.isNumber(ne)&&!isNaN(ne),d2RendererWorkerUrl=""+new URL("D2Renderer.worker-b68532bc.js",import.meta.url).href;class D2RendererWorkerAdapter extends Worker{constructor(){super(d2RendererWorkerUrl,{type:"module"})}call(oe,ce,ue=[]){return this.postMessage({action:oe,payload:ce},ue)}on(oe,ce){const ue=pe=>{const{action:me,payload:ge}=pe.data;me===oe&&ce(ge)};return this.addEventListener("message",ue),()=>this.removeEventListener("message",ue)}}function intersect(ne,oe){return!(oe.left>=ne.right||oe.right<=ne.left||oe.top>=ne.bottom||oe.bottom<=ne.top)}const{max:max$1,min:min$1}=Math,_Tile=class K1 extends Sprite{constructor(oe,ce){super(oe),this.bounds=ce,this.destroying=!1,this.age=K1.age++}};_Tile.age=0;let Tile=_Tile;function handleNaN(ne,oe){return lodashExports.isNaN(ne)?oe:ne}var oa,wo,Bs,Ms,Fo,Wa,Ns,Fs,sd,ld,Z1,cd,Q1,Jl,td,ud,nd,dd,J1,hd,e0,fd,t0,pd,n0,rd,W1,od,q1,md,r0,ad,V1,gd,i0,yd,o0,bd,a0;class D2Renderer extends EventEmitter{constructor(){super(...arguments);ao(this,ld);ao(this,cd);ao(this,dd);ao(this,hd);ao(this,fd);ao(this,pd);ao(this,rd);ao(this,od);ao(this,md);ao(this,ad);ao(this,gd);ao(this,yd);ao(this,bd);ao(this,oa,void 0);ao(this,wo,void 0);ao(this,Bs,void 0);ao(this,Ms,void 0);ao(this,Fo,defaultD2RendererOptions);ao(this,Wa,[]);ao(this,Ns,new Bush(16));ao(this,Fs,void 0);ao(this,sd,0);ao(this,Jl,lodashExports.once(()=>lodashExports.debounce(()=>Ko(this,rd,W1).call(this),Vr(this,Fo).debounceInterval)));ao(this,td,lodashExports.once(()=>lodashExports.throttle(()=>Ko(this,od,q1).call(this),Vr(this,Fo).refreshInterval)));ao(this,ud,lodashExports.once(()=>lodashExports.throttle(ce=>Ko(this,md,r0).call(this,ce),Vr(this,Fo).refreshInterval)));ao(this,nd,lodashExports.once(()=>{if(typeof OffscreenCanvas>"u")return"OffscreenCanvas API is not supported by your system."}))}getInstance(){return{app:Vr(this,oa),viewport:Vr(this,wo)}}fitCamera(ce=lodashExports.constant(!0)){var pe,me,ge,ye;const ue=lodashExports.values(Vr(this,Ns).all()).flat().filter(ce);if(ue.length){const ve=lodashExports.reduce(ue,(xe,_e)=>({top:handleNaN(min$1(xe.top,_e.top),xe.top),left:handleNaN(min$1(xe.left,_e.left),xe.left),bottom:handleNaN(max$1(xe.bottom,_e.bottom),xe.bottom),right:handleNaN(max$1(xe.right,_e.right),xe.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(ye=(pe=Vr(this,wo))==null?void 0:pe.animate)==null||ye.call(pe,{position:new Point((ve.left+ve.right)/2,(ve.top+ve.bottom)/2),scale:((ge=(me=Vr(this,wo))==null?void 0:me.findFit)==null?void 0:ge.call(me,ve.right-ve.left,ve.bottom-ve.top))*.8,ease:"easeOutExpo",time:Vr(this,Fo).animationDuration*1.5,callbackOnComplete:()=>Vr(this,Jl).call(this)()})}}initialCamera(){var ce,ue;(ue=(ce=Vr(this,wo))==null?void 0:ce.animate)==null||ue.call(ce,{scale:1,ease:"easeOutExpo",time:Vr(this,Fo).animationDuration*1.5,callbackOnComplete:()=>Vr(this,Jl).call(this)()})}getView(){var ce;return(ce=Vr(this,oa))==null?void 0:ce.view}async toDataUrl(){var ce,ue,pe,me,ge;return(ue=(ce=Vr(this,oa))==null?void 0:ce.render)==null||ue.call(ce),(ge=(me=(pe=Vr(this,oa))==null?void 0:pe.view)==null?void 0:me.toDataURL)==null?void 0:ge.call(me)}setup(ce){if(Vr(this,nd).call(this))throw new Error(Vr(this,nd).call(this));const ue={...defaultD2RendererOptions,...ce};Ko(this,cd,Q1).call(this,ue),this.setOptions(ue),Ko(this,hd,e0).call(this,ue)}destroy(){lodashExports.map(Vr(this,Wa),ce=>ce.terminate()),Vr(this,oa).destroy()}add(ce){var me,ge;const ue=nanoid(),pe=ce.map(({component:ye,meta:ve})=>({...defaultBounds,...lodashExports.pickBy(primitives[ye.$].test(ye),isValue),component:ye,meta:ve,index:Ko(this,ld,Z1).call(this)}));return Vr(this,Ns).load(pe),(ge=(me=Vr(this,Wa))==null?void 0:me.forEach)==null||ge.call(me,ye=>ye.call("add",[ce,ue])),()=>requestIdleCallback(()=>{var ye,ve;for(const xe of pe)Vr(this,Ns).remove(xe);(ve=(ye=Vr(this,Wa))==null?void 0:ye.forEach)==null||ve.call(ye,xe=>xe.call("remove",[ue]))},{timeout:Vr(this,Fo).animationDuration})}setOptions(ce){const ue={...Vr(this,Fo),...ce};Ko(this,fd,t0).call(this,ue),Os(this,Fo,ue),Ko(this,rd,W1).call(this),Ko(this,od,q1).call(this)}}oa=new WeakMap,wo=new WeakMap,Bs=new WeakMap,Ms=new WeakMap,Fo=new WeakMap,Wa=new WeakMap,Ns=new WeakMap,Fs=new WeakMap,sd=new WeakMap,ld=new WeakSet,Z1=function(){return Y1(this,sd)._++},cd=new WeakSet,Q1=function(ce){Os(this,oa,new Application({backgroundAlpha:0,width:ce.screenSize.width,height:ce.screenSize.height,autoDensity:!0,resolution:2})),Os(this,wo,new ht({stopPropagation:!0,screenWidth:ce.screenSize.width,screenHeight:ce.screenSize.height,events:Vr(this,oa).renderer.events,passiveWheel:!1})),Vr(this,wo).on("clicked",ue=>{const{x:pe,y:me}=ue.world,ge=Vr(this,Ns).search({minX:pe,minY:me,maxX:pe+Number.MIN_VALUE,maxY:me+Number.MIN_VALUE}).filter(ye=>primitives[ye.component.$].narrow(ye.component,{x:pe,y:me}));this.emit("click",ue.event,{world:ue.world,components:ge})}),Vr(this,oa).stage.addChild(Vr(this,wo)),Vr(this,wo).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),Vr(this,wo).on("moved",()=>{Vr(this,Jl).call(this)(),Vr(this,td).call(this)()}),Vr(this,wo).on("mousemove",ue=>Vr(this,ud).call(this)(ue)),Os(this,Bs,new Container),Vr(this,wo).addChild(Vr(this,Bs)),Os(this,Ms,new Graphics),Vr(this,wo).addChild(Vr(this,Ms)),Os(this,Fs,new Graphics),Vr(this,wo).addChild(Vr(this,Fs)),Ko(this,dd,J1).call(this)},Jl=new WeakMap,td=new WeakMap,ud=new WeakMap,nd=new WeakMap,dd=new WeakSet,J1=function(){const{dynamicResolution:ce}=Vr(this,Fo),{dtMax:ue,dtMin:pe,increment:me,intervalMs:ge,maxScale:ye,minScale:ve}=ce,xe=lodashExports.floor(Ticker.targetFPMS*ge);let _e=0,Se=0,$e=1;Vr(this,oa).ticker.add(Re=>{const{tileResolution:Ae}=Vr(this,Fo);if(!(_e%xe)){const Ie=Se/xe;$e=lodashExports.clamp(Ie>=ue?$e+me:Ie<=pe?$e-me:$e,ve,ye),lodashExports.map(Vr(this,Wa),ke=>{ke.call("setTileResolution",[{width:lodashExports.ceil(Ae.width/$e),height:lodashExports.ceil(Ae.height/$e)}])}),Se=0}Se+=Re,_e++})},hd=new WeakSet,e0=function(ce){lodashExports.map(Vr(this,Wa),ue=>ue.terminate()),Os(this,Wa,lodashExports.times(ce.workerCount,ue=>{const pe=new D2RendererWorkerAdapter;return pe.on("update",me=>Ko(this,pd,n0).call(this,me)),pe.onerror=me=>{throw me},pe.call("setup",[{...ce,workerIndex:ue}]),pe}))},fd=new WeakSet,t0=function(ce){var me,ge,ye,ve;const{width:ue,height:pe}=ce.screenSize;(ye=(ge=(me=Vr(this,oa))==null?void 0:me.renderer)==null?void 0:ge.resize)==null||ye.call(ge,ue,pe),(ve=Vr(this,wo))==null||ve.resize(ue,pe),lodashExports.map(Vr(this,Wa),xe=>{xe.call("setTileResolution",[{width:lodashExports.ceil(ce.tileResolution.width),height:lodashExports.ceil(ce.tileResolution.height)}])})},pd=new WeakSet,n0=function({bounds:ce,bitmap:ue}){const pe=Texture.from(ue);Ko(this,gd,i0).call(this,pe,ce)},rd=new WeakSet,W1=function(){const{top:ce,bottom:ue,left:pe,right:me}=Vr(this,wo);lodashExports.map(Vr(this,Wa),ge=>ge.call("setFrustum",[{top:ce,bottom:ue,left:pe,right:me}]))},od=new WeakSet,q1=function(){var ge,ye,ve,xe,_e;const{tileSubdivision:ce,accentColor:ue}=Vr(this,Fo),{tiles:pe}=getTiles(Vr(this,wo),ce),me=Ko(this,ad,V1).call(this);(ge=Vr(this,Ms))==null||ge.clear(),(ye=Vr(this,Ms))==null||ye.lineStyle(1*me,ue,.5),(ve=Vr(this,Ms))==null||ve.beginFill(ue,.05);for(const{bounds:Se}of pe)lodashExports.find((xe=Vr(this,Bs))==null?void 0:xe.children,$e=>lodashExports.isEqual($e.bounds,Se))||(_e=Vr(this,Ms))==null||_e.drawRect(Se.left,Se.top,Se.right-Se.left,Se.bottom-Se.top)},md=new WeakSet,r0=function(ce){var ve;const{accentColor:ue}=Vr(this,Fo),pe=Ko(this,ad,V1).call(this),{x:me,y:ge}=Vr(this,wo).toWorld(ce.globalX,ce.globalY),ye=Vr(this,Ns).search({minX:me,minY:ge,maxX:me+Number.MIN_VALUE,maxY:ge+Number.MIN_VALUE}).filter(xe=>primitives[xe.component.$].narrow(xe.component,{x:me,y:ge}));Vr(this,Fs).clear();for(const xe of ye)Vr(this,Fs).lineStyle(2*pe,ue,"$info"in xe.component?1:.02),(ve=Vr(this,Fs))==null||ve.drawRect(xe.left,xe.top,xe.right-xe.left,xe.bottom-xe.top)},ad=new WeakSet,V1=function(){const{right:ce,left:ue}=Vr(this,wo),{width:pe}=Vr(this,Fo).screenSize;return(ce-ue)/pe},gd=new WeakSet,i0=async function(ce,ue){var ge,ye;const{tileSubdivision:pe}=Vr(this,Fo),{tiles:me}=getTiles(Vr(this,wo),pe);if(lodashExports.find(me,ve=>lodashExports.isEqual(ve.bounds,ue))){const ve={x:(ue.right-ue.left)/ce.width,y:(ue.bottom-ue.top)/ce.height},xe=new Tile(ce,ue);(ge=Vr(this,Bs))==null||ge.addChild(xe).setTransform(ue.left,ue.top,ve.x,ve.y),Vr(this,td).call(this)(),await Ko(this,yd,o0).call(this,xe),lodashExports.forEach((ye=Vr(this,Bs))==null?void 0:ye.children,async _e=>{intersect(_e.bounds,ue)&&_e.age{const me=ge=>{ce.alpha+=ge/Ticker.targetFPMS/Vr(this,Fo).animationDuration,ce.alpha>1&&(ue.remove(me),pe())};ce.alpha=0,ue.add(me)})},bd=new WeakSet,a0=function(ce){const ue=Vr(this,oa).ticker;return new Promise(pe=>{const me=ge=>{ce.alpha-=ge/Ticker.targetFPMS/Vr(this,Fo).animationDuration,ce.alpha<0&&(ue.remove(me),pe())};ce.alpha=1,ue.add(me)})};const D2Renderer$1=makeRenderer(D2Renderer,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixel",description:"Comfortably performant 2D renderer",version:"1.0.0"}),renderers={"d2-renderer":D2Renderer$1};class NativeRendererTransport{constructor(oe){this.options=oe}async get(){const{hostname:oe}=url$2(this.options.url);return renderers[oe]}}const transports={native:{name:"Internal",constructor:NativeRendererTransport}};function RendererService(){const[{renderer:ne}]=useSettings(),[,oe]=useRenderers();return useAsync(async()=>{const ce=[];for(const{transport:ue,url:pe,key:me,disabled:ge}of ne??[])if(!ge){const ye=new transports[ue].constructor({url:pe});ce.push({key:me,url:pe,renderer:await ye.get()})}oe(()=>ce)},[JSON.stringify(ne),oe]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}const statusColor$1={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function RendererEditor({value:ne,onValueChange:oe}){const[ce]=useRenderers(),ue=usePaper(),pe=lodashExports$1.find(ce,{key:ne.key});function me(ye){oe==null||oe(merge$4(ne,ye))}const ge=ne!=null&&ne.disabled?"disabled":pe?"connected":"error";return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Flex,{alignItems:"center",py:1,children:jsxRuntimeExports.jsx(ManagedModal,{slotProps:{paper:{sx:{width:480}},popover:{anchorOrigin:{horizontal:-18,vertical:"bottom"}}},popover:!0,trigger:ye=>{var ve;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box$1,{className:ne.key,onClick:ye,flex:1,sx:{width:0,overflow:"hidden","> *":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:pe?`${pe.renderer.meta.name} ${pe.renderer.meta.version}`:lodashExports$1.startCase(ge)}),!!pe&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:pe.renderer.meta.description}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("span",{children:["Contributes"," ",lodashExports$1.join(pe.renderer.meta.components,", ")]})]})}),jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:[(ve=transports[ne==null?void 0:ne.transport])==null?void 0:ve.name,": ",(ne==null?void 0:ne.url)||"No URL"]})]}),jsxRuntimeExports.jsx(Chip$1,{sx:{minWidth:0,maxWidth:"fit-content",flex:1,mx:1,color:statusColor$1[ge],...lodashExports$1.omit(ue(1),"borderRadius")},size:"small",label:lodashExports$1.startCase(ge)}),jsxRuntimeExports.jsx(Tooltip$1,{title:`${ne.disabled?"Enable":"Disable"} Renderer`,children:jsxRuntimeExports.jsx(Box$1,{mr:-3,children:jsxRuntimeExports.jsx(Switch$2,{checked:!ne.disabled,onChange:(xe,_e)=>me({disabled:!_e})})})})]})},appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Edit Renderer"})},children:jsxRuntimeExports.jsxs(Box$1,{p:2.5,children:[jsxRuntimeExports.jsx(TextField$1,{autoFocus:!0,defaultValue:ne.url,onChange:ye=>me({url:ye.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Renderer Type",items:lodashExports$1.entries(transports).map(([ye,{name:ve}])=>({value:ye,label:ve})),fullWidth:!0,value:ne.transport,onChange:ye=>me({transport:ye})})]})})})})}function RendererListEditor(){const[{renderer:ne},oe]=useSettings();return jsxRuntimeExports.jsx(Box$1,{sx:{mx:-2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,editor:ce=>jsxRuntimeExports.jsx(RendererEditor,{value:ce}),icon:null,value:ne,onChange:lodashExports$1.debounce(ce=>oe(()=>({renderer:ce})),300),addItemLabel:"Add renderer",create:()=>({transport:defaultTransport,url:"",disabled:!0}),addItemExtras:jsxRuntimeExports.jsx(FeaturePickerButton,{icon:jsxRuntimeExports.jsx(ResetIcon,{}),onClick:()=>oe(()=>({renderer:defaultRenderers})),children:"Reset"}),onFocus:ce=>{const ue=lodashExports$1.head(document.getElementsByClassName(ce));ue&&"click"in ue&&typeof ue.click=="function"&&ue.click()}})})}function useConnectionStatus(ne){const[{connections:oe}]=useLoading(),ce=useConnectionResolver(),[{remote:ue}]=useSettings(),pe=lodashExports$1.find(ue,{url:ne});return pe&&!(pe!=null&&pe.disabled)?ce({url:ne})?"connected":oe?"connecting":ne?"error":"not-connected":"not-connected"}const statusColor={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function ServerEditor({value:ne,onValueChange:oe}){const ce=useConnection(ne.url),ue=usePaper(),pe=useConnectionStatus(ne.url),me=reactExports.useMemo(()=>debounce$2(ge=>{oe==null||oe(merge$4(ne,ge))},300),[oe,ne]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Flex,{alignItems:"center",children:jsxRuntimeExports.jsx(ManagedModal,{slotProps:{paper:{sx:{width:480}},popover:{anchorOrigin:{horizontal:-18,vertical:"bottom"}}},popover:!0,trigger:ge=>{var ye;return jsxRuntimeExports.jsxs(Stack$1,{direction:"row",flex:1,alignItems:"center",sx:{py:1,mr:-3},children:[jsxRuntimeExports.jsxs(Stack$1,{className:ne.key,direction:"row",flex:1,alignItems:"center",onClick:ge,children:[jsxRuntimeExports.jsxs(Box$1,{flex:1,sx:{width:0,overflow:"hidden","> *":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:ce?`${ce.name} ${ce.version}`:lodashExports$1.startCase(pe)}),!!(ce!=null&&ce.description)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:ce.description}),jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:[(ye=transports$1[ne==null?void 0:ne.transport])==null?void 0:ye.name,": ",(ne==null?void 0:ne.url)||"No URL"]})]}),jsxRuntimeExports.jsx(Chip$1,{sx:{flex:1,minWidth:0,maxWidth:"fit-content",mx:1,color:statusColor[pe],...lodashExports$1.omit(ue(1),"borderRadius")},size:"small",label:lodashExports$1.startCase(pe)})]}),jsxRuntimeExports.jsx(Tooltip$1,{title:`${ne.disabled?"Enable":"Disable"} adapter`,children:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Switch$2,{defaultChecked:!ne.disabled,onChange:(ve,xe)=>me({disabled:!xe})})})})]})},appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Edit Adapter"})},children:jsxRuntimeExports.jsxs(Box$1,{p:2.5,children:[jsxRuntimeExports.jsx(TextField$1,{autoFocus:!0,defaultValue:ne.url,onChange:ge=>me({url:ge.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Connection Type",items:lodashExports$1.entries(transports$1).map(([ge,{name:ye}])=>({value:ge,label:ye})),fullWidth:!0,value:ne.transport,onChange:ge=>me({transport:ge})})]})})})})}function ServerListEditor(){const[{remote:ne},oe]=useSettings();return jsxRuntimeExports.jsx(Box$1,{sx:{mx:-2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,editor:ce=>jsxRuntimeExports.jsx(ServerEditor,{value:ce}),icon:null,value:ne,onChange:lodashExports$1.debounce(ce=>oe(()=>({remote:ce})),300),addItemLabel:"Add adapter",create:()=>({transport:defaultTransport,url:"",disabled:!0}),addItemExtras:jsxRuntimeExports.jsx(FeaturePickerButton,{icon:jsxRuntimeExports.jsx(ResetIcon,{}),onClick:()=>oe(()=>({remote:defaultRemotes})),children:"Reset"}),onFocus:ce=>{const ue=lodashExports$1.head(document.getElementsByClassName(ce));ue&&"click"in ue&&typeof ue.click=="function"&&ue.click()}})})}const logo$1=""+new URL("logo512-23eace97.png",import.meta.url).href,contacts=[{name:"Dr Daniel Harabor",email:"daniel.harabor@monash.edu"},{name:"Dr Michael Wybrow",email:"michael.wybrow@monash.edu"},{name:"Kevin Zheng",email:"kevin.zheng@monash.edu"},{name:"Francis Anthony",email:"fant0003@student.monash.edu"},{name:"Karan Batta",email:"krnbatta@gmail.com"},{name:"Jay Wingate",email:"jaypeterwingate@gmail.com"},{name:"Leo Whitehead",email:"leo@whiteheadsoftware.dev"},{name:"Can Wang",email:"camwang@outlook.com"},{name:"Rory Tobin-Underwood",email:"rorytu@gmail.com"}];function parseUrl(ne){const oe=new URL(ne);return lodashExports$1.trimEnd(`${oe.hostname}${oe.pathname}`,"/")}function AboutContent(){function ne(oe,ce){return jsxRuntimeExports.jsxs(Box$1,{sx:{pt:2},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:oe}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",children:ce})]})}return jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(Box$1,{sx:{pt:0,pb:2},children:jsxRuntimeExports.jsx("img",{src:logo$1,height:"64"})}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:name}),ne("Build Info",jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:version_name})),ne("Team",jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(List$2,{sx:{mx:-2},children:contacts.map(({name:oe,email:ce},ue)=>jsxRuntimeExports.jsxs(ListItemButton$1,{href:`mailto:${ce}`,children:[jsxRuntimeExports.jsx(ListItemAvatar$1,{children:jsxRuntimeExports.jsx(Avatar$1,{children:lodashExports$1.head(oe)})}),jsxRuntimeExports.jsx(ListItemText$1,{primary:oe,secondary:ce})]},ue))})})),ne("Resources",jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(List$2,{sx:{mx:-2},children:[jsxRuntimeExports.jsxs(ListItemButton$1,{target:"_blank",href:homepage,children:[jsxRuntimeExports.jsx(ListItemAvatar$1,{children:jsxRuntimeExports.jsx(Avatar$1,{sx:{width:24,height:24},src:logo$1})}),jsxRuntimeExports.jsx(ListItemText$1,{primary:"Home",secondary:parseUrl(homepage)})]}),jsxRuntimeExports.jsxs(ListItemButton$1,{target:"_blank",href:repository,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(GitHub,{})}),jsxRuntimeExports.jsx(ListItemText$1,{primary:"Repository",secondary:parseUrl(repository)})]})]})}))]})}const formatLabel=ne=>`${ne}x`;function SettingsPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),me=useSmallDisplay(),[ge,ye]=useUIState(),ve=useSnackbar(),xe=useBusyState("reset"),[{"playback/playbackRate":_e=1,"appearance/acrylic":Se,"appearance/theme":$e="light","appearance/accentColor":Re="teal","behaviour/showOnStart":Ae},Ie]=useSettings(),[ke,Be]=reactExports.useState("general");function Ne(Ue){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:Ue})}function Fe(Ue){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",sx:{mr:4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:Ue})}return jsxRuntimeExports.jsx(TabContext,{value:ke,children:jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"settings"}),jsxRuntimeExports.jsx(ne.Title,{children:"Settings"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsxs(TabList$1,{onChange:(Ue,We)=>Be(We),children:[jsxRuntimeExports.jsx(Tab$1,{label:"General",value:"general"}),jsxRuntimeExports.jsx(Tab$1,{label:"Extensions",value:"connections"}),jsxRuntimeExports.jsx(Tab$1,{label:"About",value:"about"})]})}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{vertical:!0,children:jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsxs(Flex,{vertical:!0,pt:6,children:[jsxRuntimeExports.jsx(TabPanel$1,{value:"general",sx:{p:2},children:jsxRuntimeExports.jsxs(Box$1,{children:[Ne("Playback"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Playback rate"),jsxRuntimeExports.jsx(Slider$1,{sx:{maxWidth:320,mr:2},marks:[1,2,5,10].map(Ue=>({value:Ue*defaultPlaybackRate,label:formatLabel(Ue)})),step:1*defaultPlaybackRate,min:1*defaultPlaybackRate,max:10*defaultPlaybackRate,valueLabelFormat:Ue=>formatLabel(Ue/defaultPlaybackRate),valueLabelDisplay:"auto",defaultValue:_e,onChangeCommitted:(Ue,We)=>Ie(()=>({"playback/playbackRate":We}))})]}),Ne("Appearance"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Acrylic"),jsxRuntimeExports.jsx(Switch$2,{defaultChecked:!!Se,onChange:(Ue,We)=>Ie(()=>({"appearance/acrylic":We}))})]}),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Dark mode"),jsxRuntimeExports.jsx(Space,{flex:1}),jsxRuntimeExports.jsx(Switch$2,{defaultChecked:$e==="dark",onChange:(Ue,We)=>Ie(()=>({"appearance/theme":We?"dark":"light"}))})]}),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Accent"),jsxRuntimeExports.jsx(Box$1,{sx:{p:1},children:jsxRuntimeExports.jsx(FeaturePicker,{paper:!0,value:Re,items:lodashExports$1.map(shades,Ue=>({id:Ue,name:lodashExports$1.startCase(Ue),icon:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Box$1,{sx:{ml:.5,width:12,height:12,backgroundColor:getShade(Ue,$e),borderRadius:4}})})})),arrow:!0,onChange:Ue=>Ie(()=>({"appearance/accentColor":Ue}))})})]}),Ne("Behaviour"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Show explore on start-up"),jsxRuntimeExports.jsx(Switch$2,{defaultChecked:!!Ae,onChange:(Ue,We)=>Ie(()=>({"behaviour/showOnStart":We?"explore":void 0}))})]}),Ne("Advanced"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Reset settings and extensions"),jsxRuntimeExports.jsx(ManagedModal,{trigger:Ue=>jsxRuntimeExports.jsx(Button,{sx:{mx:1},color:"error",startIcon:jsxRuntimeExports.jsx(RestartAltOutlined,{}),onClick:Ue,children:"Reset now"}),appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Reset settings and extensions"})},children:({close:Ue})=>jsxRuntimeExports.jsxs(Stack$1,{sx:{p:me?2:3,pt:2,gap:4},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",children:"If something's not working correctly, you can try to reset all settings and extensions. This cannot be undone."}),jsxRuntimeExports.jsxs(Stack$1,{direction:"row",justifyContent:"flex-end",gap:2,children:[jsxRuntimeExports.jsx(Button,{variant:"text",onClick:()=>{Ue()},children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:()=>{xe(async()=>{await wait(300),Ie(()=>defaults$3),Ue(),ye(()=>({sidebarOpen:!1,fullscreenModal:void 0})),ve("Reset complete")},"Resetting settings and extensions")},color:"error",startIcon:jsxRuntimeExports.jsx(RestartAltOutlined,{}),children:"Reset settings and extensions"})]})]})})]})]})}),jsxRuntimeExports.jsxs(TabPanel$1,{value:"connections",sx:{p:2},children:[jsxRuntimeExports.jsxs(Box$1,{children:[Ne("Adapters"),jsxRuntimeExports.jsx(ServerListEditor,{})]}),jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(Divider$1,{sx:{mb:2}}),Ne("Renderers"),jsxRuntimeExports.jsx(RendererListEditor,{})]}),jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(Divider$1,{sx:{mb:2}}),Ne("Map support"),jsxRuntimeExports.jsx(MapParserListEditor,{})]})]}),jsxRuntimeExports.jsx(TabPanel$1,{value:"about",sx:{p:2},children:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(AboutContent,{})})})]})})})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})})}const a=lodashExports$1.keys(mapParsers).map(ne=>({key:ne}));function Sink({children:ne}){return ne}function MapParserListEditor(){return jsxRuntimeExports.jsx(Box$1,{sx:{mx:-2},children:jsxRuntimeExports.jsx(ListEditor,{button:!1,sortable:!0,addable:!1,deletable:!1,editor:ne=>jsxRuntimeExports.jsx(Sink,{children:jsxRuntimeExports.jsx(ListItemText$1,{primary:lodashExports$1.startCase(ne.key),secondary:`Support for *.${ne.key} maps`})},ne.key),icon:null,value:a,create:()=>({key:""})})})}const PUBLISH=0,SUBSCRIBE=1,RESET=2,VALUE=4;function compose(ne,oe){return ce=>ne(oe(ce))}function thrush(ne,oe){return oe(ne)}function curry2to1(ne,oe){return ce=>ne(oe,ce)}function curry1to0(ne,oe){return()=>ne(oe)}function tap(ne,oe){return oe(ne),ne}function tup(...ne){return ne}function call(ne){ne()}function always(ne){return()=>ne}function joinProc(...ne){return()=>{ne.map(call)}}function isDefined(ne){return ne!==void 0}function noop$4(){}function subscribe(ne,oe){return ne(SUBSCRIBE,oe)}function publish(ne,oe){ne(PUBLISH,oe)}function reset(ne){ne(RESET)}function getValue(ne){return ne(VALUE)}function connect(ne,oe){return subscribe(ne,curry2to1(oe,PUBLISH))}function handleNext(ne,oe){const ce=ne(SUBSCRIBE,ue=>{ce(),oe(ue)});return ce}function stream(){const ne=[];return(oe,ce)=>{switch(oe){case RESET:ne.splice(0,ne.length);return;case SUBSCRIBE:return ne.push(ce),()=>{const ue=ne.indexOf(ce);ue>-1&&ne.splice(ue,1)};case PUBLISH:ne.slice().forEach(ue=>{ue(ce)});return;default:throw new Error(`unrecognized action ${oe}`)}}}function statefulStream(ne){let oe=ne;const ce=stream();return(ue,pe)=>{switch(ue){case SUBSCRIBE:pe(oe);break;case PUBLISH:oe=pe;break;case VALUE:return oe}return ce(ue,pe)}}function eventHandler(ne){let oe,ce;const ue=()=>oe&&oe();return function(pe,me){switch(pe){case SUBSCRIBE:return me?ce===me?void 0:(ue(),ce=me,oe=subscribe(ne,me),oe):(ue(),noop$4);case RESET:ue(),ce=null;return;default:throw new Error(`unrecognized action ${pe}`)}}}function streamFromEmitter(ne){return tap(stream(),oe=>connect(ne,oe))}function statefulStreamFromEmitter(ne,oe){return tap(statefulStream(oe),ce=>connect(ne,ce))}function combineOperators(...ne){return oe=>ne.reduceRight(thrush,oe)}function pipe(ne,...oe){const ce=combineOperators(...oe);return(ue,pe)=>{switch(ue){case SUBSCRIBE:return subscribe(ne,ce(pe));case RESET:reset(ne);return}}}function defaultComparator(ne,oe){return ne===oe}function distinctUntilChanged(ne=defaultComparator){let oe;return ce=>ue=>{ne(oe,ue)||(oe=ue,ce(ue))}}function filter(ne){return oe=>ce=>{ne(ce)&&oe(ce)}}function map$1(ne){return oe=>compose(oe,ne)}function mapTo(ne){return oe=>()=>oe(ne)}function scan(ne,oe){return ce=>ue=>ce(oe=ne(oe,ue))}function skip(ne){return oe=>ce=>{ne>0?ne--:oe(ce)}}function throttleTime(ne){let oe=null,ce;return ue=>pe=>{oe=pe,!ce&&(ce=setTimeout(()=>{ce=void 0,ue(oe)},ne))}}function debounceTime(ne){let oe,ce;return ue=>pe=>{oe=pe,ce&&clearTimeout(ce),ce=setTimeout(()=>{ue(oe)},ne)}}function withLatestFrom(...ne){const oe=new Array(ne.length);let ce=0,ue=null;const pe=Math.pow(2,ne.length)-1;return ne.forEach((me,ge)=>{const ye=Math.pow(2,ge);subscribe(me,ve=>{const xe=ce;ce=ce|ye,oe[ge]=ve,xe!==pe&&ce===pe&&ue&&(ue(),ue=null)})}),me=>ge=>{const ye=()=>me([ge].concat(oe));ce===pe?ye():ue=ye}}function merge(...ne){return function(oe,ce){switch(oe){case SUBSCRIBE:return joinProc(...ne.map(ue=>subscribe(ue,ce)));case RESET:return;default:throw new Error(`unrecognized action ${oe}`)}}}function duc(ne,oe=defaultComparator){return pipe(ne,distinctUntilChanged(oe))}function combineLatest(...ne){const oe=stream(),ce=new Array(ne.length);let ue=0;const pe=Math.pow(2,ne.length)-1;return ne.forEach((me,ge)=>{const ye=Math.pow(2,ge);subscribe(me,ve=>{ce[ge]=ve,ue=ue|ye,ue===pe&&publish(oe,ce)})}),function(me,ge){switch(me){case SUBSCRIBE:return ue===pe&&ge(ce),subscribe(oe,ge);case RESET:return reset(oe);default:throw new Error(`unrecognized action ${me}`)}}}function system(ne,oe=[],{singleton:ce}={singleton:!0}){return{id:id(),constructor:ne,dependencies:oe,singleton:ce}}const id=()=>Symbol();function init(ne){const oe=new Map,ce=({id:ue,constructor:pe,dependencies:me,singleton:ge})=>{if(ge&&oe.has(ue))return oe.get(ue);const ye=pe(me.map(ve=>ce(ve)));return ge&&oe.set(ue,ye),ye};return ce(ne)}function omit(ne,oe){const ce={},ue={};let pe=0;const me=ne.length;for(;pe(Ne[Fe]=Ue=>{const We=Be[oe.methods[Fe]];publish(We,Ue)},Ne),{})}function _e(Be){return ge.reduce((Ne,Fe)=>(Ne[Fe]=eventHandler(Be[oe.events[Fe]]),Ne),{})}const Se=React$2.forwardRef((Be,Ne)=>{const{children:Fe,...Ue}=Be,[We]=React$2.useState(()=>tap(init(ne),ze=>ve(ze,Ue))),[qe]=React$2.useState(curry1to0(_e,We));return useIsomorphicLayoutEffect$2(()=>{for(const ze of ge)ze in Ue&&subscribe(qe[ze],Ue[ze]);return()=>{Object.values(qe).map(reset)}},[Ue,qe,We]),useIsomorphicLayoutEffect$2(()=>{ve(We,Ue)}),React$2.useImperativeHandle(Ne,always(xe(We))),React$2.createElement(ye.Provider,{value:We},ce?React$2.createElement(ce,omit([...ue,...pe,...ge],Ue),Fe):Fe)}),$e=Be=>React$2.useCallback(curry2to1(publish,React$2.useContext(ye)[Be]),[Be]),Re=Be=>{const Fe=React$2.useContext(ye)[Be],Ue=React$2.useCallback(We=>subscribe(Fe,We),[Fe]);return React$2.useSyncExternalStore(Ue,()=>getValue(Fe),()=>getValue(Fe))},Ae=Be=>{const Fe=React$2.useContext(ye)[Be],[Ue,We]=React$2.useState(curry1to0(getValue,Fe));return useIsomorphicLayoutEffect$2(()=>subscribe(Fe,qe=>{qe!==Ue&&We(always(qe))}),[Fe,Ue]),Ue},Ie=React$2.version.startsWith("18")?Re:Ae;return{Component:Se,usePublisher:$e,useEmitterValue:Ie,useEmitter:(Be,Ne)=>{const Ue=React$2.useContext(ye)[Be];useIsomorphicLayoutEffect$2(()=>subscribe(Ue,Ne),[Ne,Ue])}}}const useIsomorphicLayoutEffect=typeof document<"u"?React$2.useLayoutEffect:React$2.useEffect,useIsomorphicLayoutEffect$1=useIsomorphicLayoutEffect;var LogLevel=(ne=>(ne[ne.DEBUG=0]="DEBUG",ne[ne.INFO=1]="INFO",ne[ne.WARN=2]="WARN",ne[ne.ERROR=3]="ERROR",ne))(LogLevel||{});const CONSOLE_METHOD_MAP={0:"debug",1:"log",2:"warn",3:"error"},getGlobalThis=()=>typeof globalThis>"u"?window:globalThis,loggerSystem=system(()=>{const ne=statefulStream(3);return{log:statefulStream((ce,ue,pe=1)=>{var me;const ge=(me=getGlobalThis().VIRTUOSO_LOG_LEVEL)!=null?me:getValue(ne);pe>=ge&&console[CONSOLE_METHOD_MAP[pe]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",ce,ue)}),logLevel:ne}},[],{singleton:!0});function useSizeWithElRef(ne,oe=!0){const ce=React$2.useRef(null);let ue=pe=>{};if(typeof ResizeObserver<"u"){const pe=React$2.useMemo(()=>new ResizeObserver(me=>{const ge=me[0].target;ge.offsetParent!==null&&ne(ge)}),[ne]);ue=me=>{me&&oe?(pe.observe(me),ce.current=me):(ce.current&&pe.unobserve(ce.current),ce.current=null)}}return{ref:ce,callbackRef:ue}}function useSize(ne,oe=!0){return useSizeWithElRef(ne,oe).callbackRef}function useChangedListContentsSizes(ne,oe,ce,ue,pe,me,ge){const ye=React$2.useCallback(ve=>{const xe=getChangedChildSizes(ve.children,oe,"offsetHeight",pe);let _e=ve.parentElement;for(;!_e.dataset.virtuosoScroller;)_e=_e.parentElement;const Se=_e.lastElementChild.dataset.viewportType==="window",$e=ge?ge.scrollTop:Se?window.pageYOffset||document.documentElement.scrollTop:_e.scrollTop,Re=ge?ge.scrollHeight:Se?document.documentElement.scrollHeight:_e.scrollHeight,Ae=ge?ge.offsetHeight:Se?window.innerHeight:_e.offsetHeight;ue({scrollTop:Math.max($e,0),scrollHeight:Re,viewportHeight:Ae}),me==null||me(resolveGapValue$1("row-gap",getComputedStyle(ve).rowGap,pe)),xe!==null&&ne(xe)},[ne,oe,pe,me,ge,ue]);return useSizeWithElRef(ye,ce)}function getChangedChildSizes(ne,oe,ce,ue){const pe=ne.length;if(pe===0)return null;const me=[];for(let ge=0;ge{const $e=Se.target,Re=$e===window||$e===document,Ae=Re?window.pageYOffset||document.documentElement.scrollTop:$e.scrollTop,Ie=Re?document.documentElement.scrollHeight:$e.scrollHeight,ke=Re?window.innerHeight:$e.offsetHeight,Be=()=>{ne({scrollTop:Math.max(Ae,0),scrollHeight:Ie,viewportHeight:ke})};Se.suppressFlushSync?Be():ReactDOM$1.flushSync(Be),ge.current!==null&&(Ae===ge.current||Ae<=0||Ae===Ie-ke)&&(ge.current=null,oe(!0),ye.current&&(clearTimeout(ye.current),ye.current=null))},[ne,oe]);React$2.useEffect(()=>{const Se=pe||me.current;return ue(pe||me.current),ve({target:Se,suppressFlushSync:!0}),Se.addEventListener("scroll",ve,{passive:!0}),()=>{ue(null),Se.removeEventListener("scroll",ve)}},[me,ve,ce,ue,pe]);function xe(Se){const $e=me.current;if(!$e||"offsetHeight"in $e&&$e.offsetHeight===0)return;const Re=Se.behavior==="smooth";let Ae,Ie,ke;$e===window?(Ie=Math.max(correctItemSize(document.documentElement,"height"),document.documentElement.scrollHeight),Ae=window.innerHeight,ke=document.documentElement.scrollTop):(Ie=$e.scrollHeight,Ae=correctItemSize($e,"height"),ke=$e.scrollTop);const Be=Ie-Ae;if(Se.top=Math.ceil(Math.max(Math.min(Be,Se.top),0)),approximatelyEqual(Ae,Ie)||Se.top===ke){ne({scrollTop:ke,scrollHeight:Ie,viewportHeight:Ae}),Re&&oe(!0);return}Re?(ge.current=Se.top,ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{ye.current=null,ge.current=null,oe(!0)},1e3)):ge.current=null,$e.scrollTo(Se)}function _e(Se){me.current.scrollBy(Se)}return{scrollerRef:me,scrollByCallback:_e,scrollToCallback:xe}}const domIOSystem=system(()=>{const ne=stream(),oe=stream(),ce=statefulStream(0),ue=stream(),pe=statefulStream(0),me=stream(),ge=stream(),ye=statefulStream(0),ve=statefulStream(0),xe=statefulStream(0),_e=statefulStream(0),Se=stream(),$e=stream(),Re=statefulStream(!1);return connect(pipe(ne,map$1(({scrollTop:Ae})=>Ae)),oe),connect(pipe(ne,map$1(({scrollHeight:Ae})=>Ae)),ge),connect(oe,pe),{scrollContainerState:ne,scrollTop:oe,viewportHeight:me,headerHeight:ye,fixedHeaderHeight:ve,fixedFooterHeight:xe,footerHeight:_e,scrollHeight:ge,smoothScrollTargetReached:ue,scrollTo:Se,scrollBy:$e,statefulScrollTop:pe,deviation:ce,scrollingInProgress:Re}},[],{singleton:!0}),NIL_NODE={lvl:0};function newAANode(ne,oe,ce,ue=NIL_NODE,pe=NIL_NODE){return{k:ne,v:oe,lvl:ce,l:ue,r:pe}}function empty(ne){return ne===NIL_NODE}function newTree(){return NIL_NODE}function remove(ne,oe){if(empty(ne))return NIL_NODE;const{k:ce,l:ue,r:pe}=ne;if(oe===ce){if(empty(ue))return pe;if(empty(pe))return ue;{const[me,ge]=last(ue);return adjust(clone(ne,{k:me,v:ge,l:deleteLast(ue)}))}}else return oeoe&&(ye=ye.concat(walkWithin(me,oe,ce))),ue>=oe&&ue<=ce&&ye.push({k:ue,v:pe}),ue<=ce&&(ye=ye.concat(walkWithin(ge,oe,ce))),ye}function walk(ne){return empty(ne)?[]:[...walk(ne.l),{k:ne.k,v:ne.v},...walk(ne.r)]}function last(ne){return empty(ne.r)?[ne.k,ne.v]:last(ne.r)}function deleteLast(ne){return empty(ne.r)?ne.l:adjust(clone(ne,{r:deleteLast(ne.r)}))}function clone(ne,oe){return newAANode(oe.k!==void 0?oe.k:ne.k,oe.v!==void 0?oe.v:ne.v,oe.lvl!==void 0?oe.lvl:ne.lvl,oe.l!==void 0?oe.l:ne.l,oe.r!==void 0?oe.r:ne.r)}function isSingle(ne){return empty(ne)||ne.lvl>ne.r.lvl}function rebalance(ne){return split(skew(ne))}function adjust(ne){const{l:oe,r:ce,lvl:ue}=ne;if(ce.lvl>=ue-1&&oe.lvl>=ue-1)return ne;if(ue>ce.lvl+1){if(isSingle(oe))return skew(clone(ne,{lvl:ue-1}));if(!empty(oe)&&!empty(oe.r))return clone(oe.r,{l:clone(oe,{r:oe.r.l}),r:clone(ne,{l:oe.r.r,lvl:ue-1}),lvl:ue});throw new Error("Unexpected empty nodes")}else{if(isSingle(ne))return split(clone(ne,{lvl:ue-1}));if(!empty(ce)&&!empty(ce.l)){const pe=ce.l,me=isSingle(pe)?ce.lvl-1:ce.lvl;return clone(pe,{l:clone(ne,{r:pe.l,lvl:ue-1}),r:split(clone(ce,{l:pe.r,lvl:me})),lvl:pe.lvl+1})}else throw new Error("Unexpected empty nodes")}}function rangesWithin(ne,oe,ce){if(empty(ne))return[];const ue=findMaxKeyValue(ne,oe)[0];return toRanges(walkWithin(ne,ue,ce))}function arrayToRanges(ne,oe){const ce=ne.length;if(ce===0)return[];let{index:ue,value:pe}=oe(ne[0]);const me=[];for(let ge=1;ge({index:oe,value:ce}))}function split(ne){const{r:oe,lvl:ce}=ne;return!empty(oe)&&!empty(oe.r)&&oe.lvl===ce&&oe.r.lvl===ce?clone(oe,{l:clone(ne,{r:oe.l}),lvl:ce+1}):ne}function skew(ne){const{l:oe}=ne;return!empty(oe)&&oe.lvl===ne.lvl?clone(oe,{r:clone(ne,{l:oe.r})}):ne}function findIndexOfClosestSmallerOrEqual(ne,oe,ce,ue=0){let pe=ne.length-1;for(;ue<=pe;){const me=Math.floor((ue+pe)/2),ge=ne[me],ye=ce(ge,oe);if(ye===0)return me;if(ye===-1){if(pe-ue<2)return me-1;pe=me-1}else{if(pe===ue)return me;ue=me+1}}throw new Error(`Failed binary finding record in array - ${ne.join(",")}, searched for ${oe}`)}function findClosestSmallerOrEqual(ne,oe,ce){return ne[findIndexOfClosestSmallerOrEqual(ne,oe,ce)]}function findRange(ne,oe,ce,ue){const pe=findIndexOfClosestSmallerOrEqual(ne,oe,ue),me=findIndexOfClosestSmallerOrEqual(ne,ce,ue,pe);return ne.slice(pe,me+1)}const recalcSystem=system(()=>({recalcInProgress:statefulStream(!1)}),[],{singleton:!0});function rangeIncludes(ne){const{size:oe,startIndex:ce,endIndex:ue}=ne;return pe=>pe.start===ce&&(pe.end===ue||pe.end===1/0)&&pe.value===oe}function affectedGroupCount(ne,oe){let ce=0,ue=0;for(;ce=_e||pe===$e)&&(ne=remove(ne,_e)):(xe=$e!==pe,ve=!0),Se>ge&&ge>=_e&&$e!==pe&&(ne=insert(ne,ge+1,$e));xe&&(ne=insert(ne,me,pe))}return[ne,ce]}function initialSizeState(){return{offsetTree:[],sizeTree:newTree(),groupOffsetTree:newTree(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function indexComparator({index:ne},oe){return oe===ne?0:oe0&&(oe=Math.max(oe,findClosestSmallerOrEqual(ne,ue,indexComparator).offset)),arrayToRanges(findRange(ne,oe,ce,offsetComparator),offsetPointParser)}function createOffsetTree(ne,oe,ce,ue){let pe=ne,me=0,ge=0,ye=0,ve=0;if(oe!==0){ve=findIndexOfClosestSmallerOrEqual(pe,oe-1,indexComparator),ye=pe[ve].offset;const _e=findMaxKeyValue(ce,oe-1);me=_e[0],ge=_e[1],pe.length&&pe[ve].size===findMaxKeyValue(ce,oe)[1]&&(ve-=1),pe=pe.slice(0,ve+1)}else pe=[];for(const{start:xe,value:_e}of rangesWithin(ce,oe,1/0)){const Se=xe-me,$e=Se*ge+ye+Se*ue;pe.push({offset:$e,size:_e,index:xe}),me=xe,ye=$e,ge=_e}return{offsetTree:pe,lastIndex:me,lastOffset:ye,lastSize:ge}}function sizeStateReducer(ne,[oe,ce,ue,pe]){oe.length>0&&ue("received item sizes",oe,LogLevel.DEBUG);const me=ne.sizeTree;let ge=me,ye=0;if(ce.length>0&&empty(me)&&oe.length===2){const $e=oe[0].size,Re=oe[1].size;ge=ce.reduce((Ae,Ie)=>insert(insert(Ae,Ie,$e),Ie+1,Re),ge)}else[ge,ye]=insertRanges(ge,oe);if(ge===me)return ne;const{offsetTree:ve,lastIndex:xe,lastSize:_e,lastOffset:Se}=createOffsetTree(ne.offsetTree,ye,ge,pe);return{sizeTree:ge,offsetTree:ve,lastIndex:xe,lastOffset:Se,lastSize:_e,groupOffsetTree:ce.reduce(($e,Re)=>insert($e,Re,offsetOf(Re,ve,pe)),newTree()),groupIndices:ce}}function offsetOf(ne,oe,ce){if(oe.length===0)return 0;const{offset:ue,index:pe,size:me}=findClosestSmallerOrEqual(oe,ne,indexComparator),ge=ne-pe,ye=me*ge+(ge-1)*ce+ue;return ye>0?ye+ce:ye}function isGroupLocation(ne){return typeof ne.groupIndex<"u"}function originalIndexFromLocation(ne,oe,ce){if(isGroupLocation(ne))return oe.groupIndices[ne.groupIndex]+1;{const ue=ne.index==="LAST"?ce:ne.index;let pe=originalIndexFromItemIndex(ue,oe);return pe=Math.max(0,pe,Math.min(ce,pe)),pe}}function originalIndexFromItemIndex(ne,oe){if(!hasGroups(oe))return ne;let ce=0;for(;oe.groupIndices[ce]<=ne+ce;)ce++;return ne+ce}function hasGroups(ne){return!empty(ne.groupOffsetTree)}function sizeTreeToRanges(ne){return walk(ne).map(({k:oe,v:ce},ue,pe)=>{const me=pe[ue+1],ge=me?me.k-1:1/0;return{startIndex:oe,endIndex:ge,size:ce}})}const SIZE_MAP={offsetHeight:"height",offsetWidth:"width"},sizeSystem=system(([{log:ne},{recalcInProgress:oe}])=>{const ce=stream(),ue=stream(),pe=statefulStreamFromEmitter(ue,0),me=stream(),ge=stream(),ye=statefulStream(0),ve=statefulStream([]),xe=statefulStream(void 0),_e=statefulStream(void 0),Se=statefulStream((We,qe)=>correctItemSize(We,SIZE_MAP[qe])),$e=statefulStream(void 0),Re=statefulStream(0),Ae=initialSizeState(),Ie=statefulStreamFromEmitter(pipe(ce,withLatestFrom(ve,ne,Re),scan(sizeStateReducer,Ae),distinctUntilChanged()),Ae),ke=statefulStreamFromEmitter(pipe(ve,distinctUntilChanged(),scan((We,qe)=>({prev:We.current,current:qe}),{prev:[],current:[]}),map$1(({prev:We})=>We)),[]);connect(pipe(ve,filter(We=>We.length>0),withLatestFrom(Ie,Re),map$1(([We,qe,ze])=>{const Ge=We.reduce((Ze,Dt,Je)=>insert(Ze,Dt,offsetOf(Dt,qe.offsetTree,ze)||Je),newTree());return{...qe,groupIndices:We,groupOffsetTree:Ge}})),Ie),connect(pipe(ue,withLatestFrom(Ie),filter(([We,{lastIndex:qe}])=>We[{startIndex:We,endIndex:qe,size:ze}])),ce),connect(xe,_e);const Be=statefulStreamFromEmitter(pipe(xe,map$1(We=>We===void 0)),!0);connect(pipe(_e,filter(We=>We!==void 0&&empty(getValue(Ie).sizeTree)),map$1(We=>[{startIndex:0,endIndex:0,size:We}])),ce);const Ne=streamFromEmitter(pipe(ce,withLatestFrom(Ie),scan(({sizes:We},[qe,ze])=>({changed:ze!==We,sizes:ze}),{changed:!1,sizes:Ae}),map$1(We=>We.changed)));subscribe(pipe(ye,scan((We,qe)=>({diff:We.prev-qe,prev:qe}),{diff:0,prev:0}),map$1(We=>We.diff)),We=>{const{groupIndices:qe}=getValue(Ie);if(We>0)publish(oe,!0),publish(me,We+affectedGroupCount(We,qe));else if(We<0){const ze=getValue(ke);ze.length>0&&(We-=affectedGroupCount(-We,ze)),publish(ge,We)}}),subscribe(pipe(ye,withLatestFrom(ne)),([We,qe])=>{We<0&&qe("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:ye},LogLevel.ERROR)});const Fe=streamFromEmitter(me);connect(pipe(me,withLatestFrom(Ie),map$1(([We,qe])=>{const ze=qe.groupIndices.length>0,Ge=[],Ze=qe.lastSize;if(ze){const Dt=find(qe.sizeTree,0);let Je=0,Ut=0;for(;Je{let Kt=an.ranges;return an.prevSize!==0&&(Kt=[...an.ranges,{startIndex:an.prevIndex,endIndex:Zt+We-1,size:an.prevSize}]),{ranges:Kt,prevIndex:Zt+We,prevSize:en}},{ranges:Ge,prevIndex:We,prevSize:0}).ranges}return walk(qe.sizeTree).reduce((Dt,{k:Je,v:Ut})=>({ranges:[...Dt.ranges,{startIndex:Dt.prevIndex,endIndex:Je+We-1,size:Dt.prevSize}],prevIndex:Je+We,prevSize:Ut}),{ranges:[],prevIndex:0,prevSize:Ze}).ranges})),ce);const Ue=streamFromEmitter(pipe(ge,withLatestFrom(Ie,Re),map$1(([We,{offsetTree:qe},ze])=>{const Ge=-We;return offsetOf(Ge,qe,ze)})));return connect(pipe(ge,withLatestFrom(Ie,Re),map$1(([We,qe,ze])=>{if(qe.groupIndices.length>0){if(empty(qe.sizeTree))return qe;let Ze=newTree();const Dt=getValue(ke);let Je=0,Ut=0,jt=0;for(;Je<-We;){jt=Dt[Ut];const an=Dt[Ut+1]-jt-1;Ut++,Je+=an+1}if(Ze=walk(qe.sizeTree).reduce((an,{k:Zt,v:en})=>insert(an,Math.max(0,Zt+We),en),Ze),Je!==-We){const an=find(qe.sizeTree,jt);Ze=insert(Ze,0,an);const Zt=findMaxKeyValue(qe.sizeTree,-We+1)[1];Ze=insert(Ze,1,Zt)}return{...qe,sizeTree:Ze,...createOffsetTree(qe.offsetTree,0,Ze,ze)}}else{const Ze=walk(qe.sizeTree).reduce((Dt,{k:Je,v:Ut})=>insert(Dt,Math.max(0,Je+We),Ut),newTree());return{...qe,sizeTree:Ze,...createOffsetTree(qe.offsetTree,0,Ze,ze)}}})),Ie),{data:$e,totalCount:ue,sizeRanges:ce,groupIndices:ve,defaultItemSize:_e,fixedItemSize:xe,unshiftWith:me,shiftWith:ge,shiftWithOffset:Ue,beforeUnshiftWith:Fe,firstItemIndex:ye,gap:Re,sizes:Ie,listRefresh:Ne,statefulTotalCount:pe,trackItemSizes:Be,itemSize:Se}},tup(loggerSystem,recalcSystem),{singleton:!0}),SUPPORTS_SCROLL_TO_OPTIONS=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function normalizeIndexLocation(ne){const oe=typeof ne=="number"?{index:ne}:ne;return oe.align||(oe.align="start"),(!oe.behavior||!SUPPORTS_SCROLL_TO_OPTIONS)&&(oe.behavior="auto"),oe.offset||(oe.offset=0),oe}const scrollToIndexSystem=system(([{sizes:ne,totalCount:oe,listRefresh:ce,gap:ue},{scrollingInProgress:pe,viewportHeight:me,scrollTo:ge,smoothScrollTargetReached:ye,headerHeight:ve,footerHeight:xe,fixedHeaderHeight:_e,fixedFooterHeight:Se},{log:$e}])=>{const Re=stream(),Ae=statefulStream(0);let Ie=null,ke=null,Be=null;function Ne(){Ie&&(Ie(),Ie=null),Be&&(Be(),Be=null),ke&&(clearTimeout(ke),ke=null),publish(pe,!1)}return connect(pipe(Re,withLatestFrom(ne,me,oe,Ae,ve,xe,$e),withLatestFrom(ue,_e,Se),map$1(([[Fe,Ue,We,qe,ze,Ge,Ze,Dt],Je,Ut,jt])=>{const Ke=normalizeIndexLocation(Fe),{align:an,behavior:Zt,offset:en}=Ke,Kt=qe-1,Wt=originalIndexFromLocation(Ke,Ue,Kt);let un=offsetOf(Wt,Ue.offsetTree,Je)+Ge;an==="end"?(un+=Ut+findMaxKeyValue(Ue.sizeTree,Wt)[1]-We+jt,Wt===Kt&&(un+=Ze)):an==="center"?un+=(Ut+findMaxKeyValue(Ue.sizeTree,Wt)[1]-We+jt)/2:un-=ze,en&&(un+=en);const Xt=nn=>{Ne(),nn?(Dt("retrying to scroll to",{location:Fe},LogLevel.DEBUG),publish(Re,Fe)):Dt("list did not change, scroll successful",{},LogLevel.DEBUG)};if(Ne(),Zt==="smooth"){let nn=!1;Be=subscribe(ce,vn=>{nn=nn||vn}),Ie=handleNext(ye,()=>{Xt(nn)})}else Ie=handleNext(pipe(ce,watchChangesFor(150)),Xt);return ke=setTimeout(()=>{Ne()},1200),publish(pe,!0),Dt("scrolling from index to",{index:Wt,top:un,behavior:Zt},LogLevel.DEBUG),{top:un,behavior:Zt}})),ge),{scrollToIndex:Re,topListHeight:Ae}},tup(sizeSystem,domIOSystem,loggerSystem),{singleton:!0});function watchChangesFor(ne){return oe=>{const ce=setTimeout(()=>{oe(!1)},ne);return ue=>{ue&&(oe(!0),clearTimeout(ce))}}}const UP="up",DOWN="down",NONE$1="none",INITIAL_BOTTOM_STATE={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},DEFAULT_AT_TOP_THRESHOLD=0,stateFlagsSystem=system(([{scrollContainerState:ne,scrollTop:oe,viewportHeight:ce,headerHeight:ue,footerHeight:pe,scrollBy:me}])=>{const ge=statefulStream(!1),ye=statefulStream(!0),ve=stream(),xe=stream(),_e=statefulStream(4),Se=statefulStream(DEFAULT_AT_TOP_THRESHOLD),$e=statefulStreamFromEmitter(pipe(merge(pipe(duc(oe),skip(1),mapTo(!0)),pipe(duc(oe),skip(1),mapTo(!1),debounceTime(100))),distinctUntilChanged()),!1),Re=statefulStreamFromEmitter(pipe(merge(pipe(me,mapTo(!0)),pipe(me,mapTo(!1),debounceTime(200))),distinctUntilChanged()),!1);connect(pipe(combineLatest(duc(oe),duc(Se)),map$1(([Ne,Fe])=>Ne<=Fe),distinctUntilChanged()),ye),connect(pipe(ye,throttleTime(50)),xe);const Ae=streamFromEmitter(pipe(combineLatest(ne,duc(ce),duc(ue),duc(pe),duc(_e)),scan((Ne,[{scrollTop:Fe,scrollHeight:Ue},We,qe,ze,Ge])=>{const Ze=Fe+We-Ue>-Ge,Dt={viewportHeight:We,scrollTop:Fe,scrollHeight:Ue};if(Ze){let Ut,jt;return Fe>Ne.state.scrollTop?(Ut="SCROLLED_DOWN",jt=Ne.state.scrollTop-Fe):(Ut="SIZE_DECREASED",jt=Ne.state.scrollTop-Fe||Ne.scrollTopDelta),{atBottom:!0,state:Dt,atBottomBecause:Ut,scrollTopDelta:jt}}let Je;return Dt.scrollHeight>Ne.state.scrollHeight?Je="SIZE_INCREASED":WeNe&&Ne.atBottom===Fe.atBottom))),Ie=statefulStreamFromEmitter(pipe(ne,scan((Ne,{scrollTop:Fe,scrollHeight:Ue,viewportHeight:We})=>{if(approximatelyEqual(Ne.scrollHeight,Ue))return{scrollTop:Fe,scrollHeight:Ue,jump:0,changed:!1};{const qe=Ue-(Fe+We)<1;return Ne.scrollTop!==Fe&&qe?{scrollHeight:Ue,scrollTop:Fe,jump:Ne.scrollTop-Fe,changed:!0}:{scrollHeight:Ue,scrollTop:Fe,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),filter(Ne=>Ne.changed),map$1(Ne=>Ne.jump)),0);connect(pipe(Ae,map$1(Ne=>Ne.atBottom)),ge),connect(pipe(ge,throttleTime(50)),ve);const ke=statefulStream(DOWN);connect(pipe(ne,map$1(({scrollTop:Ne})=>Ne),distinctUntilChanged(),scan((Ne,Fe)=>getValue(Re)?{direction:Ne.direction,prevScrollTop:Fe}:{direction:FeNe.direction)),ke),connect(pipe(ne,throttleTime(50),mapTo(NONE$1)),ke);const Be=statefulStream(0);return connect(pipe($e,filter(Ne=>!Ne),mapTo(0)),Be),connect(pipe(oe,throttleTime(100),withLatestFrom($e),filter(([Ne,Fe])=>!!Fe),scan(([Ne,Fe],[Ue])=>[Fe,Ue],[0,0]),map$1(([Ne,Fe])=>Fe-Ne)),Be),{isScrolling:$e,isAtTop:ye,isAtBottom:ge,atBottomState:Ae,atTopStateChange:xe,atBottomStateChange:ve,scrollDirection:ke,atBottomThreshold:_e,atTopThreshold:Se,scrollVelocity:Be,lastJumpDueToItemResize:Ie}},tup(domIOSystem)),propsReadySystem=system(([{log:ne}])=>{const oe=statefulStream(!1),ce=streamFromEmitter(pipe(oe,filter(ue=>ue),distinctUntilChanged()));return subscribe(oe,ue=>{ue&&getValue(ne)("props updated",{},LogLevel.DEBUG)}),{propsReady:oe,didMount:ce}},tup(loggerSystem),{singleton:!0});function skipFrames(ne,oe){ne==0?oe():requestAnimationFrame(()=>skipFrames(ne-1,oe))}function getInitialTopMostItemIndexNumber(ne,oe){const ce=oe-1;return typeof ne=="number"?ne:ne.index==="LAST"?ce:ne.index}const initialTopMostItemIndexSystem=system(([{sizes:ne,listRefresh:oe,defaultItemSize:ce},{scrollTop:ue},{scrollToIndex:pe},{didMount:me}])=>{const ge=statefulStream(!0),ye=statefulStream(0),ve=statefulStream(!1);return connect(pipe(me,withLatestFrom(ye),filter(([xe,_e])=>!!_e),mapTo(!1)),ge),subscribe(pipe(combineLatest(oe,me),withLatestFrom(ge,ne,ce,ve),filter(([[,xe],_e,{sizeTree:Se},$e,Re])=>xe&&(!empty(Se)||isDefined($e))&&!_e&&!Re),withLatestFrom(ye)),([,xe])=>{publish(ve,!0),skipFrames(3,()=>{handleNext(ue,()=>publish(ge,!0)),publish(pe,xe)})}),{scrolledToInitialItem:ge,initialTopMostItemIndex:ye}},tup(sizeSystem,domIOSystem,scrollToIndexSystem,propsReadySystem),{singleton:!0});function normalizeFollowOutput(ne){return ne?ne==="smooth"?"smooth":"auto":!1}const behaviorFromFollowOutput=(ne,oe)=>typeof ne=="function"?normalizeFollowOutput(ne(oe)):oe&&normalizeFollowOutput(ne),followOutputSystem=system(([{totalCount:ne,listRefresh:oe},{isAtBottom:ce,atBottomState:ue},{scrollToIndex:pe},{scrolledToInitialItem:me},{propsReady:ge,didMount:ye},{log:ve},{scrollingInProgress:xe}])=>{const _e=statefulStream(!1),Se=stream();let $e=null;function Re(Ie){publish(pe,{index:"LAST",align:"end",behavior:Ie})}subscribe(pipe(combineLatest(pipe(duc(ne),skip(1)),ye),withLatestFrom(duc(_e),ce,me,xe),map$1(([[Ie,ke],Be,Ne,Fe,Ue])=>{let We=ke&&Fe,qe="auto";return We&&(qe=behaviorFromFollowOutput(Be,Ne||Ue),We=We&&!!qe),{totalCount:Ie,shouldFollow:We,followOutputBehavior:qe}}),filter(({shouldFollow:Ie})=>Ie)),({totalCount:Ie,followOutputBehavior:ke})=>{$e&&($e(),$e=null),$e=handleNext(oe,()=>{getValue(ve)("following output to ",{totalCount:Ie},LogLevel.DEBUG),Re(ke),$e=null})});function Ae(Ie){const ke=handleNext(ue,Be=>{Ie&&!Be.atBottom&&Be.notAtBottomBecause==="SIZE_INCREASED"&&!$e&&(getValue(ve)("scrolling to bottom due to increased size",{},LogLevel.DEBUG),Re("auto"))});setTimeout(ke,100)}return subscribe(pipe(combineLatest(duc(_e),ne,ge),filter(([Ie,,ke])=>Ie&&ke),scan(({value:Ie},[,ke])=>({refreshed:Ie===ke,value:ke}),{refreshed:!1,value:0}),filter(({refreshed:Ie})=>Ie),withLatestFrom(_e,ne)),([,Ie])=>{Ae(Ie!==!1)}),subscribe(Se,()=>{Ae(getValue(_e)!==!1)}),subscribe(combineLatest(duc(_e),ue),([Ie,ke])=>{Ie&&!ke.atBottom&&ke.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&Re("auto")}),{followOutput:_e,autoscrollToBottom:Se}},tup(sizeSystem,stateFlagsSystem,scrollToIndexSystem,initialTopMostItemIndexSystem,propsReadySystem,loggerSystem,domIOSystem));function groupCountsToIndicesAndCount(ne){return ne.reduce((oe,ce)=>(oe.groupIndices.push(oe.totalCount),oe.totalCount+=ce+1,oe),{totalCount:0,groupIndices:[]})}const groupedListSystem=system(([{totalCount:ne,groupIndices:oe,sizes:ce},{scrollTop:ue,headerHeight:pe}])=>{const me=stream(),ge=stream(),ye=streamFromEmitter(pipe(me,map$1(groupCountsToIndicesAndCount)));return connect(pipe(ye,map$1(ve=>ve.totalCount)),ne),connect(pipe(ye,map$1(ve=>ve.groupIndices)),oe),connect(pipe(combineLatest(ue,ce,pe),filter(([ve,xe])=>hasGroups(xe)),map$1(([ve,xe,_e])=>findMaxKeyValue(xe.groupOffsetTree,Math.max(ve-_e,0),"v")[0]),distinctUntilChanged(),map$1(ve=>[ve])),ge),{groupCounts:me,topItemsIndexes:ge}},tup(sizeSystem,domIOSystem));function tupleComparator(ne,oe){return!!(ne&&ne[0]===oe[0]&&ne[1]===oe[1])}function rangeComparator(ne,oe){return!!(ne&&ne.startIndex===oe.startIndex&&ne.endIndex===oe.endIndex)}const TOP="top",BOTTOM="bottom",NONE="none";function getOverscan(ne,oe,ce){return typeof ne=="number"?ce===UP&&oe===TOP||ce===DOWN&&oe===BOTTOM?ne:0:ce===UP?oe===TOP?ne.main:ne.reverse:oe===BOTTOM?ne.main:ne.reverse}function getViewportIncrease(ne,oe){return typeof ne=="number"?ne:ne[oe]||0}const sizeRangeSystem=system(([{scrollTop:ne,viewportHeight:oe,deviation:ce,headerHeight:ue,fixedHeaderHeight:pe}])=>{const me=stream(),ge=statefulStream(0),ye=statefulStream(0),ve=statefulStream(0),xe=statefulStreamFromEmitter(pipe(combineLatest(duc(ne),duc(oe),duc(ue),duc(me,tupleComparator),duc(ve),duc(ge),duc(pe),duc(ce),duc(ye)),map$1(([_e,Se,$e,[Re,Ae],Ie,ke,Be,Ne,Fe])=>{const Ue=_e-Ne,We=ke+Be,qe=Math.max($e-Ue,0);let ze=NONE;const Ge=getViewportIncrease(Fe,TOP),Ze=getViewportIncrease(Fe,BOTTOM);return Re-=Ne,Re+=$e+Be,Ae+=$e+Be,Ae-=Ne,Re>_e+We-Ge&&(ze=UP),Ae<_e-qe+Se+Ze&&(ze=DOWN),ze!==NONE?[Math.max(Ue-$e-getOverscan(Ie,TOP,ze)-Ge,0),Ue-qe-Be+Se+getOverscan(Ie,BOTTOM,ze)+Ze]:null}),filter(_e=>_e!=null),distinctUntilChanged(tupleComparator)),[0,0]);return{listBoundary:me,overscan:ve,topListHeight:ge,increaseViewportBy:ye,visibleRange:xe}},tup(domIOSystem),{singleton:!0});function probeItemSet(ne,oe,ce){if(hasGroups(oe)){const ue=originalIndexFromItemIndex(ne,oe);return[{index:findMaxKeyValue(oe.groupOffsetTree,ue)[0],size:0,offset:0},{index:ue,size:0,offset:0,data:ce&&ce[0]}]}return[{index:ne,size:0,offset:0,data:ce&&ce[0]}]}const EMPTY_LIST_STATE={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function transposeItems(ne,oe,ce){if(ne.length===0)return[];if(!hasGroups(oe))return ne.map(xe=>({...xe,index:xe.index+ce,originalIndex:xe.index}));const ue=ne[0].index,pe=ne[ne.length-1].index,me=[],ge=rangesWithin(oe.groupOffsetTree,ue,pe);let ye,ve=0;for(const xe of ne){(!ye||ye.end0){xe=ne[0].offset;const Ie=ne[ne.length-1];_e=Ie.offset+Ie.size}const Se=ce-ve,$e=ye+Se*ge+(Se-1)*ue,Re=xe,Ae=$e-_e;return{items:transposeItems(ne,pe,me),topItems:transposeItems(oe,pe,me),topListHeight:oe.reduce((Ie,ke)=>ke.size+Ie,0),offsetTop:xe,offsetBottom:Ae,top:Re,bottom:_e,totalCount:ce,firstItemIndex:me}}function buildListStateFromItemCount(ne,oe,ce,ue,pe,me){let ge=0;if(ce.groupIndices.length>0)for(const _e of ce.groupIndices){if(_e-ge>=ne)break;ge++}const ye=ne+ge,ve=getInitialTopMostItemIndexNumber(oe,ye),xe=Array.from({length:ye}).map((_e,Se)=>({index:Se+ve,size:0,offset:0,data:me[Se+ve]}));return buildListState(xe,[],ye,pe,ce,ue)}const listStateSystem=system(([{sizes:ne,totalCount:oe,data:ce,firstItemIndex:ue,gap:pe},me,{visibleRange:ge,listBoundary:ye,topListHeight:ve},{scrolledToInitialItem:xe,initialTopMostItemIndex:_e},{topListHeight:Se},$e,{didMount:Re},{recalcInProgress:Ae}])=>{const Ie=statefulStream([]),ke=statefulStream(0),Be=stream();connect(me.topItemsIndexes,Ie);const Ne=statefulStreamFromEmitter(pipe(combineLatest(Re,Ae,duc(ge,tupleComparator),duc(oe),duc(ne),duc(_e),xe,duc(Ie),duc(ue),duc(pe),ce),filter(([qe,ze,,Ge,,,,,,,Ze])=>{const Dt=Ze&&Ze.length!==Ge;return qe&&!ze&&!Dt}),map$1(([,,[qe,ze],Ge,Ze,Dt,Je,Ut,jt,Ke,an])=>{const Zt=Ze,{sizeTree:en,offsetTree:Kt}=Zt,Wt=getValue(ke);if(Ge===0)return{...EMPTY_LIST_STATE,totalCount:Ge};if(qe===0&&ze===0)return Wt===0?{...EMPTY_LIST_STATE,totalCount:Ge}:buildListStateFromItemCount(Wt,Dt,Ze,jt,Ke,an||[]);if(empty(en))return Wt>0?null:buildListState(probeItemSet(getInitialTopMostItemIndexNumber(Dt,Ge),Zt,an),[],Ge,Ke,Zt,jt);const un=[];if(Ut.length>0){const Cn=Ut[0],Nt=Ut[Ut.length-1];let Yt=0;for(const Jt of rangesWithin(en,Cn,Nt)){const hn=Jt.value,Ye=Math.max(Jt.start,Cn),Xe=Math.min(Jt.end,Nt);for(let Pt=Ye;Pt<=Xe;Pt++)un.push({index:Pt,size:hn,offset:Yt,data:an&&an[Pt]}),Yt+=hn}}if(!Je)return buildListState([],un,Ge,Ke,Zt,jt);const Xt=Ut.length>0?Ut[Ut.length-1]+1:0,nn=rangesWithinOffsets(Kt,qe,ze,Xt);if(nn.length===0)return null;const vn=Ge-1,Sn=tap([],Cn=>{for(const Nt of nn){const Yt=Nt.value;let Jt=Yt.offset,hn=Nt.start;const Ye=Yt.size;if(Yt.offset=ze);Pt++)Cn.push({index:Pt,size:Ye,offset:Jt,data:an&&an[Pt]}),Jt+=Ye+Ke}});return buildListState(Sn,un,Ge,Ke,Zt,jt)}),filter(qe=>qe!==null),distinctUntilChanged()),EMPTY_LIST_STATE);connect(pipe(ce,filter(isDefined),map$1(qe=>qe==null?void 0:qe.length)),oe),connect(pipe(Ne,map$1(qe=>qe.topListHeight)),Se),connect(Se,ve),connect(pipe(Ne,map$1(qe=>[qe.top,qe.bottom])),ye),connect(pipe(Ne,map$1(qe=>qe.items)),Be);const Fe=streamFromEmitter(pipe(Ne,filter(({items:qe})=>qe.length>0),withLatestFrom(oe,ce),filter(([{items:qe},ze])=>qe[qe.length-1].originalIndex===ze-1),map$1(([,qe,ze])=>[qe-1,ze]),distinctUntilChanged(tupleComparator),map$1(([qe])=>qe))),Ue=streamFromEmitter(pipe(Ne,throttleTime(200),filter(({items:qe,topItems:ze})=>qe.length>0&&qe[0].originalIndex===ze.length),map$1(({items:qe})=>qe[0].index),distinctUntilChanged())),We=streamFromEmitter(pipe(Ne,filter(({items:qe})=>qe.length>0),map$1(({items:qe})=>{let ze=0,Ge=qe.length-1;for(;qe[ze].type==="group"&&zeze;)Ge--;return{startIndex:qe[ze].index,endIndex:qe[Ge].index}}),distinctUntilChanged(rangeComparator)));return{listState:Ne,topItemsIndexes:Ie,endReached:Fe,startReached:Ue,rangeChanged:We,itemsRendered:Be,initialItemCount:ke,...$e}},tup(sizeSystem,groupedListSystem,sizeRangeSystem,initialTopMostItemIndexSystem,scrollToIndexSystem,stateFlagsSystem,propsReadySystem,recalcSystem),{singleton:!0}),initialItemCountSystem=system(([{sizes:ne,firstItemIndex:oe,data:ce,gap:ue},{initialTopMostItemIndex:pe},{initialItemCount:me,listState:ge},{didMount:ye}])=>(connect(pipe(ye,withLatestFrom(me),filter(([,ve])=>ve!==0),withLatestFrom(pe,ne,oe,ue,ce),map$1(([[,ve],xe,_e,Se,$e,Re=[]])=>buildListStateFromItemCount(ve,xe,_e,Se,$e,Re))),ge),{}),tup(sizeSystem,initialTopMostItemIndexSystem,listStateSystem,propsReadySystem),{singleton:!0}),scrollSeekSystem=system(([{scrollVelocity:ne}])=>{const oe=statefulStream(!1),ce=stream(),ue=statefulStream(!1);return connect(pipe(ne,withLatestFrom(ue,oe,ce),filter(([pe,me])=>!!me),map$1(([pe,me,ge,ye])=>{const{exit:ve,enter:xe}=me;if(ge){if(ve(pe,ye))return!1}else if(xe(pe,ye))return!0;return ge}),distinctUntilChanged()),oe),subscribe(pipe(combineLatest(oe,ne,ce),withLatestFrom(ue)),([[pe,me,ge],ye])=>pe&&ye&&ye.change&&ye.change(me,ge)),{isSeeking:oe,scrollSeekConfiguration:ue,scrollVelocity:ne,scrollSeekRangeChanged:ce}},tup(stateFlagsSystem),{singleton:!0}),topItemCountSystem=system(([{topItemsIndexes:ne}])=>{const oe=statefulStream(0);return connect(pipe(oe,filter(ce=>ce>0),map$1(ce=>Array.from({length:ce}).map((ue,pe)=>pe))),ne),{topItemCount:oe}},tup(listStateSystem)),totalListHeightSystem=system(([{footerHeight:ne,headerHeight:oe,fixedHeaderHeight:ce,fixedFooterHeight:ue},{listState:pe}])=>{const me=stream(),ge=statefulStreamFromEmitter(pipe(combineLatest(ne,ue,oe,ce,pe),map$1(([ye,ve,xe,_e,Se])=>ye+ve+xe+_e+Se.offsetBottom+Se.bottom)),0);return connect(duc(ge),me),{totalListHeight:ge,totalListHeightChanged:me}},tup(domIOSystem,listStateSystem),{singleton:!0});function simpleMemoize(ne){let oe=!1,ce;return()=>(oe||(oe=!0,ce=ne()),ce)}const isMobileSafari=simpleMemoize(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),upwardScrollFixSystem=system(([{scrollBy:ne,scrollTop:oe,deviation:ce,scrollingInProgress:ue},{isScrolling:pe,isAtBottom:me,scrollDirection:ge,lastJumpDueToItemResize:ye},{listState:ve},{beforeUnshiftWith:xe,shiftWithOffset:_e,sizes:Se,gap:$e},{log:Re},{recalcInProgress:Ae}])=>{const Ie=streamFromEmitter(pipe(ve,withLatestFrom(ye),scan(([,Be,Ne,Fe],[{items:Ue,totalCount:We,bottom:qe,offsetBottom:ze},Ge])=>{const Ze=qe+ze;let Dt=0;return Ne===We&&Be.length>0&&Ue.length>0&&(Ue[0].originalIndex===0&&Be[0].originalIndex===0||(Dt=Ze-Fe,Dt!==0&&(Dt+=Ge))),[Dt,Ue,We,Ze]},[0,[],0,0]),filter(([Be])=>Be!==0),withLatestFrom(oe,ge,ue,me,Re,Ae),filter(([,Be,Ne,Fe,,,Ue])=>!Ue&&!Fe&&Be!==0&&Ne===UP),map$1(([[Be],,,,,Ne])=>(Ne("Upward scrolling compensation",{amount:Be},LogLevel.DEBUG),Be))));function ke(Be){Be>0?(publish(ne,{top:-Be,behavior:"auto"}),publish(ce,0)):(publish(ce,0),publish(ne,{top:-Be,behavior:"auto"}))}return subscribe(pipe(Ie,withLatestFrom(ce,pe)),([Be,Ne,Fe])=>{Fe&&isMobileSafari()?publish(ce,Ne-Be):ke(-Be)}),subscribe(pipe(combineLatest(statefulStreamFromEmitter(pe,!1),ce,Ae),filter(([Be,Ne,Fe])=>!Be&&!Fe&&Ne!==0),map$1(([Be,Ne])=>Ne),throttleTime(1)),ke),connect(pipe(_e,map$1(Be=>({top:-Be}))),ne),subscribe(pipe(xe,withLatestFrom(Se,$e),map$1(([Be,{lastSize:Ne,groupIndices:Fe,sizeTree:Ue},We])=>{function qe(ze){return ze*(Ne+We)}if(Fe.length===0)return qe(Be);{let ze=0;const Ge=find(Ue,0);let Ze=0,Dt=0;for(;ZeBe&&(ze-=Ge,Je=Be-Ze+1),Ze+=Je,ze+=qe(Je),Dt++}return ze}})),Be=>{publish(ce,Be),requestAnimationFrame(()=>{publish(ne,{top:Be}),requestAnimationFrame(()=>{publish(ce,0),publish(Ae,!1)})})}),{deviation:ce}},tup(domIOSystem,stateFlagsSystem,listStateSystem,sizeSystem,loggerSystem,recalcSystem)),initialScrollTopSystem=system(([{didMount:ne},{scrollTo:oe},{listState:ce}])=>{const ue=statefulStream(0);return subscribe(pipe(ne,withLatestFrom(ue),filter(([,pe])=>pe!==0),map$1(([,pe])=>({top:pe}))),pe=>{handleNext(pipe(ce,skip(1),filter(me=>me.items.length>1)),()=>{requestAnimationFrame(()=>{publish(oe,pe)})})}),{initialScrollTop:ue}},tup(propsReadySystem,domIOSystem,listStateSystem),{singleton:!0}),alignToBottomSystem=system(([{viewportHeight:ne},{totalListHeight:oe}])=>{const ce=statefulStream(!1),ue=statefulStreamFromEmitter(pipe(combineLatest(ce,ne,oe),filter(([pe])=>pe),map$1(([,pe,me])=>Math.max(0,pe-me)),throttleTime(0),distinctUntilChanged()),0);return{alignToBottom:ce,paddingTopAddition:ue}},tup(domIOSystem,totalListHeightSystem),{singleton:!0}),windowScrollerSystem=system(([{scrollTo:ne,scrollContainerState:oe}])=>{const ce=stream(),ue=stream(),pe=stream(),me=statefulStream(!1),ge=statefulStream(void 0);return connect(pipe(combineLatest(ce,ue),map$1(([{viewportHeight:ye,scrollTop:ve,scrollHeight:xe},{offsetTop:_e}])=>({scrollTop:Math.max(0,ve-_e),scrollHeight:xe,viewportHeight:ye}))),oe),connect(pipe(ne,withLatestFrom(ue),map$1(([ye,{offsetTop:ve}])=>({...ye,top:ye.top+ve}))),pe),{useWindowScroll:me,customScrollParent:ge,windowScrollContainerState:ce,windowViewportRect:ue,windowScrollTo:pe}},tup(domIOSystem)),defaultCalculateViewLocation=({itemTop:ne,itemBottom:oe,viewportTop:ce,viewportBottom:ue,locationParams:{behavior:pe,align:me,...ge}})=>neue?{...ge,behavior:pe,align:me??"end"}:null,scrollIntoViewSystem=system(([{sizes:ne,totalCount:oe,gap:ce},{scrollTop:ue,viewportHeight:pe,headerHeight:me,fixedHeaderHeight:ge,fixedFooterHeight:ye,scrollingInProgress:ve},{scrollToIndex:xe}])=>{const _e=stream();return connect(pipe(_e,withLatestFrom(ne,pe,oe,me,ge,ye,ue),withLatestFrom(ce),map$1(([[Se,$e,Re,Ae,Ie,ke,Be,Ne],Fe])=>{const{done:Ue,behavior:We,align:qe,calculateViewLocation:ze=defaultCalculateViewLocation,...Ge}=Se,Ze=originalIndexFromLocation(Se,$e,Ae-1),Dt=offsetOf(Ze,$e.offsetTree,Fe)+Ie+ke,Je=Dt+findMaxKeyValue($e.sizeTree,Ze)[1],Ut=Ne+ke,jt=Ne+Re-Be,Ke=ze({itemTop:Dt,itemBottom:Je,viewportTop:Ut,viewportBottom:jt,locationParams:{behavior:We,align:qe,...Ge}});return Ke?Ue&&handleNext(pipe(ve,filter(an=>an===!1),skip(getValue(ve)?1:2)),Ue):Ue&&Ue(),Ke}),filter(Se=>Se!==null)),xe),{scrollIntoView:_e}},tup(sizeSystem,domIOSystem,scrollToIndexSystem,listStateSystem,loggerSystem),{singleton:!0}),stateLoadSystem=system(([{sizes:ne,sizeRanges:oe},{scrollTop:ce},{initialTopMostItemIndex:ue},{didMount:pe},{useWindowScroll:me,windowScrollContainerState:ge,windowViewportRect:ye}])=>{const ve=stream(),xe=statefulStream(void 0),_e=statefulStream(null),Se=statefulStream(null);return connect(ge,_e),connect(ye,Se),subscribe(pipe(ve,withLatestFrom(ne,ce,me,_e,Se)),([$e,Re,Ae,Ie,ke,Be])=>{const Ne=sizeTreeToRanges(Re.sizeTree);Ie&&ke!==null&&Be!==null&&(Ae=ke.scrollTop-Be.offsetTop),$e({ranges:Ne,scrollTop:Ae})}),connect(pipe(xe,filter(isDefined),map$1(locationFromSnapshot)),ue),connect(pipe(pe,withLatestFrom(xe),filter(([,$e])=>$e!==void 0),distinctUntilChanged(),map$1(([,$e])=>$e.ranges)),oe),{getState:ve,restoreStateFrom:xe}},tup(sizeSystem,domIOSystem,initialTopMostItemIndexSystem,propsReadySystem,windowScrollerSystem));function locationFromSnapshot(ne){return{offset:ne.scrollTop,index:0,align:"start"}}const featureGroup1System=system(([ne,oe,ce,ue,pe,me,ge,ye,ve,xe])=>({...ne,...oe,...ce,...ue,...pe,...me,...ge,...ye,...ve,...xe}),tup(sizeRangeSystem,initialItemCountSystem,propsReadySystem,scrollSeekSystem,totalListHeightSystem,initialScrollTopSystem,alignToBottomSystem,windowScrollerSystem,scrollIntoViewSystem,loggerSystem)),listSystem=system(([{totalCount:ne,sizeRanges:oe,fixedItemSize:ce,defaultItemSize:ue,trackItemSizes:pe,itemSize:me,data:ge,firstItemIndex:ye,groupIndices:ve,statefulTotalCount:xe,gap:_e,sizes:Se},{initialTopMostItemIndex:$e,scrolledToInitialItem:Re},Ae,Ie,ke,{listState:Be,topItemsIndexes:Ne,...Fe},{scrollToIndex:Ue},We,{topItemCount:qe},{groupCounts:ze},Ge])=>(connect(Fe.rangeChanged,Ge.scrollSeekRangeChanged),connect(pipe(Ge.windowViewportRect,map$1(Ze=>Ze.visibleHeight)),Ae.viewportHeight),{totalCount:ne,data:ge,firstItemIndex:ye,sizeRanges:oe,initialTopMostItemIndex:$e,scrolledToInitialItem:Re,topItemsIndexes:Ne,topItemCount:qe,groupCounts:ze,fixedItemHeight:ce,defaultItemHeight:ue,gap:_e,...ke,statefulTotalCount:xe,listState:Be,scrollToIndex:Ue,trackItemSizes:pe,itemSize:me,groupIndices:ve,...Fe,...Ge,...Ae,sizes:Se,...Ie}),tup(sizeSystem,initialTopMostItemIndexSystem,domIOSystem,stateLoadSystem,followOutputSystem,listStateSystem,scrollToIndexSystem,upwardScrollFixSystem,topItemCountSystem,groupedListSystem,featureGroup1System)),WEBKIT_STICKY="-webkit-sticky",STICKY="sticky",positionStickyCssValue=simpleMemoize(()=>{if(typeof document>"u")return STICKY;const ne=document.createElement("div");return ne.style.position=WEBKIT_STICKY,ne.style.position===WEBKIT_STICKY?WEBKIT_STICKY:STICKY});function useWindowViewportRectRef(ne,oe){const ce=React$2.useRef(null),ue=React$2.useCallback(ye=>{if(ye===null||!ye.offsetParent)return;const ve=ye.getBoundingClientRect(),xe=ve.width;let _e,Se;if(oe){const $e=oe.getBoundingClientRect(),Re=ve.top-$e.top;_e=$e.height-Math.max(0,Re),Se=Re+oe.scrollTop}else _e=window.innerHeight-Math.max(0,ve.top),Se=ve.top+window.pageYOffset;ce.current={offsetTop:Se,visibleHeight:_e,visibleWidth:xe},ne(ce.current)},[ne,oe]),{callbackRef:pe,ref:me}=useSizeWithElRef(ue),ge=React$2.useCallback(()=>{ue(me.current)},[ue,me]);return React$2.useEffect(()=>{if(oe){oe.addEventListener("scroll",ge);const ye=new ResizeObserver(ge);return ye.observe(oe),()=>{oe.removeEventListener("scroll",ge),ye.unobserve(oe)}}else return window.addEventListener("scroll",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("scroll",ge),window.removeEventListener("resize",ge)}},[ge,oe]),pe}const VirtuosoMockContext=React$2.createContext(void 0),VirtuosoGridMockContext=React$2.createContext(void 0);function identity(ne){return ne}const listComponentPropsSystem=system(()=>{const ne=statefulStream(ve=>`Item ${ve}`),oe=statefulStream(null),ce=statefulStream(ve=>`Group ${ve}`),ue=statefulStream({}),pe=statefulStream(identity),me=statefulStream("div"),ge=statefulStream(noop$4),ye=(ve,xe=null)=>statefulStreamFromEmitter(pipe(ue,map$1(_e=>_e[ve]),distinctUntilChanged()),xe);return{context:oe,itemContent:ne,groupContent:ce,components:ue,computeItemKey:pe,headerFooterTag:me,scrollerRef:ge,FooterComponent:ye("Footer"),HeaderComponent:ye("Header"),TopItemListComponent:ye("TopItemList"),ListComponent:ye("List","div"),ItemComponent:ye("Item","div"),GroupComponent:ye("Group","div"),ScrollerComponent:ye("Scroller","div"),EmptyPlaceholder:ye("EmptyPlaceholder"),ScrollSeekPlaceholder:ye("ScrollSeekPlaceholder")}}),combinedSystem$2=system(([ne,oe])=>({...ne,...oe}),tup(listSystem,listComponentPropsSystem)),DefaultScrollSeekPlaceholder$1=({height:ne})=>React$2.createElement("div",{style:{height:ne}}),GROUP_STYLE={position:positionStickyCssValue(),zIndex:1,overflowAnchor:"none"},ITEM_STYLE$1={overflowAnchor:"none"},Items$1=React$2.memo(function({showTopList:oe=!1}){const ce=useEmitterValue$2("listState"),ue=usePublisher$2("sizeRanges"),pe=useEmitterValue$2("useWindowScroll"),me=useEmitterValue$2("customScrollParent"),ge=usePublisher$2("windowScrollContainerState"),ye=usePublisher$2("scrollContainerState"),ve=me||pe?ge:ye,xe=useEmitterValue$2("itemContent"),_e=useEmitterValue$2("context"),Se=useEmitterValue$2("groupContent"),$e=useEmitterValue$2("trackItemSizes"),Re=useEmitterValue$2("itemSize"),Ae=useEmitterValue$2("log"),Ie=usePublisher$2("gap"),{callbackRef:ke}=useChangedListContentsSizes(ue,Re,$e,oe?noop$4:ve,Ae,Ie,me),[Be,Ne]=React$2.useState(0);useEmitter$2("deviation",Ke=>{Be!==Ke&&Ne(Ke)});const Fe=useEmitterValue$2("EmptyPlaceholder"),Ue=useEmitterValue$2("ScrollSeekPlaceholder")||DefaultScrollSeekPlaceholder$1,We=useEmitterValue$2("ListComponent"),qe=useEmitterValue$2("ItemComponent"),ze=useEmitterValue$2("GroupComponent"),Ge=useEmitterValue$2("computeItemKey"),Ze=useEmitterValue$2("isSeeking"),Dt=useEmitterValue$2("groupIndices").length>0,Je=useEmitterValue$2("paddingTopAddition"),Ut=useEmitterValue$2("scrolledToInitialItem"),jt=oe?{}:{boxSizing:"border-box",paddingTop:ce.offsetTop+Je,paddingBottom:ce.offsetBottom,marginTop:Be,...Ut?{}:{visibility:"hidden"}};return!oe&&ce.totalCount===0&&Fe?React$2.createElement(Fe,contextPropIfNotDomElement(Fe,_e)):React$2.createElement(We,{...contextPropIfNotDomElement(We,_e),ref:ke,style:jt,"data-test-id":oe?"virtuoso-top-item-list":"virtuoso-item-list"},(oe?ce.topItems:ce.items).map(Ke=>{const an=Ke.originalIndex,Zt=Ge(an+ce.firstItemIndex,Ke.data,_e);return Ze?React$2.createElement(Ue,{...contextPropIfNotDomElement(Ue,_e),key:Zt,index:Ke.index,height:Ke.size,type:Ke.type||"item",...Ke.type==="group"?{}:{groupIndex:Ke.groupIndex}}):Ke.type==="group"?React$2.createElement(ze,{...contextPropIfNotDomElement(ze,_e),key:Zt,"data-index":an,"data-known-size":Ke.size,"data-item-index":Ke.index,style:GROUP_STYLE},Se(Ke.index,_e)):React$2.createElement(qe,{...contextPropIfNotDomElement(qe,_e),...itemPropIfNotDomElement(qe,Ke.data),key:Zt,"data-index":an,"data-known-size":Ke.size,"data-item-index":Ke.index,"data-item-group-index":Ke.groupIndex,style:ITEM_STYLE$1},Dt?xe(Ke.index,Ke.groupIndex,Ke.data,_e):xe(Ke.index,Ke.data,_e))}))}),scrollerStyle={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},viewportStyle={width:"100%",height:"100%",position:"absolute",top:0},topItemListStyle={width:"100%",position:positionStickyCssValue(),top:0,zIndex:1};function contextPropIfNotDomElement(ne,oe){if(typeof ne!="string")return{context:oe}}function itemPropIfNotDomElement(ne,oe){return{item:typeof ne=="string"?void 0:oe}}const Header$1=React$2.memo(function(){const oe=useEmitterValue$2("HeaderComponent"),ce=usePublisher$2("headerHeight"),ue=useEmitterValue$2("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$2("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null}),Footer$1=React$2.memo(function(){const oe=useEmitterValue$2("FooterComponent"),ce=usePublisher$2("footerHeight"),ue=useEmitterValue$2("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$2("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null});function buildScroller({usePublisher:ne,useEmitter:oe,useEmitterValue:ce}){return React$2.memo(function({style:me,children:ge,...ye}){const ve=ne("scrollContainerState"),xe=ce("ScrollerComponent"),_e=ne("smoothScrollTargetReached"),Se=ce("scrollerRef"),$e=ce("context"),{scrollerRef:Re,scrollByCallback:Ae,scrollToCallback:Ie}=useScrollTop(ve,_e,xe,Se);return oe("scrollTo",Ie),oe("scrollBy",Ae),React$2.createElement(xe,{ref:Re,style:{...scrollerStyle,...me},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...ye,...contextPropIfNotDomElement(xe,$e)},ge)})}function buildWindowScroller({usePublisher:ne,useEmitter:oe,useEmitterValue:ce}){return React$2.memo(function({style:me,children:ge,...ye}){const ve=ne("windowScrollContainerState"),xe=ce("ScrollerComponent"),_e=ne("smoothScrollTargetReached"),Se=ce("totalListHeight"),$e=ce("deviation"),Re=ce("customScrollParent"),Ae=ce("context"),{scrollerRef:Ie,scrollByCallback:ke,scrollToCallback:Be}=useScrollTop(ve,_e,xe,noop$4,Re);return useIsomorphicLayoutEffect$1(()=>(Ie.current=Re||window,()=>{Ie.current=null}),[Ie,Re]),oe("windowScrollTo",Be),oe("scrollBy",ke),React$2.createElement(xe,{style:{position:"relative",...me,...Se!==0?{height:Se+$e}:{}},"data-virtuoso-scroller":!0,...ye,...contextPropIfNotDomElement(xe,Ae)},ge)})}const Viewport$2=({children:ne})=>{const oe=React$2.useContext(VirtuosoMockContext),ce=usePublisher$2("viewportHeight"),ue=usePublisher$2("fixedItemHeight"),pe=useSize(compose(ce,me=>correctItemSize(me,"height")));return React$2.useEffect(()=>{oe&&(ce(oe.viewportHeight),ue(oe.itemHeight))},[oe,ce,ue]),React$2.createElement("div",{style:viewportStyle,ref:pe,"data-viewport-type":"element"},ne)},WindowViewport$2=({children:ne})=>{const oe=React$2.useContext(VirtuosoMockContext),ce=usePublisher$2("windowViewportRect"),ue=usePublisher$2("fixedItemHeight"),pe=useEmitterValue$2("customScrollParent"),me=useWindowViewportRectRef(ce,pe);return React$2.useEffect(()=>{oe&&(ue(oe.itemHeight),ce({offsetTop:0,visibleHeight:oe.viewportHeight,visibleWidth:100}))},[oe,ce,ue]),React$2.createElement("div",{ref:me,style:viewportStyle,"data-viewport-type":"window"},ne)},TopItemListContainer=({children:ne})=>{const oe=useEmitterValue$2("TopItemListComponent")||"div",ce=useEmitterValue$2("headerHeight"),ue={...topItemListStyle,marginTop:`${ce}px`},pe=useEmitterValue$2("context");return React$2.createElement(oe,{style:ue,...contextPropIfNotDomElement(oe,pe)},ne)},ListRoot=React$2.memo(function(oe){const ce=useEmitterValue$2("useWindowScroll"),ue=useEmitterValue$2("topItemsIndexes").length>0,pe=useEmitterValue$2("customScrollParent"),me=pe||ce?WindowScroller$2:Scroller$2,ge=pe||ce?WindowViewport$2:Viewport$2;return React$2.createElement(me,{...oe},ue&&React$2.createElement(TopItemListContainer,null,React$2.createElement(Items$1,{showTopList:!0})),React$2.createElement(ge,null,React$2.createElement(Header$1,null),React$2.createElement(Items$1,null),React$2.createElement(Footer$1,null)))}),{Component:List,usePublisher:usePublisher$2,useEmitterValue:useEmitterValue$2,useEmitter:useEmitter$2}=systemToComponent(combinedSystem$2,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},ListRoot),Scroller$2=buildScroller({usePublisher:usePublisher$2,useEmitterValue:useEmitterValue$2,useEmitter:useEmitter$2}),WindowScroller$2=buildWindowScroller({usePublisher:usePublisher$2,useEmitterValue:useEmitterValue$2,useEmitter:useEmitter$2}),Virtuoso=List,INITIAL_GRID_STATE={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},PROBE_GRID_STATE={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round,ceil,floor,min,max}=Math;function buildProbeGridState(ne){return{...PROBE_GRID_STATE,items:ne}}function buildItems(ne,oe,ce){return Array.from({length:oe-ne+1}).map((ue,pe)=>{const me=ce===null?null:ce[pe+ne];return{index:pe+ne,data:me}})}function gapComparator(ne,oe){return ne&&ne.column===oe.column&&ne.row===oe.row}function dimensionComparator(ne,oe){return ne&&ne.width===oe.width&&ne.height===oe.height}const gridSystem=system(([{overscan:ne,visibleRange:oe,listBoundary:ce},{scrollTop:ue,viewportHeight:pe,scrollBy:me,scrollTo:ge,smoothScrollTargetReached:ye,scrollContainerState:ve,footerHeight:xe,headerHeight:_e},Se,$e,{propsReady:Re,didMount:Ae},{windowViewportRect:Ie,useWindowScroll:ke,customScrollParent:Be,windowScrollContainerState:Ne,windowScrollTo:Fe},Ue])=>{const We=statefulStream(0),qe=statefulStream(0),ze=statefulStream(INITIAL_GRID_STATE),Ge=statefulStream({height:0,width:0}),Ze=statefulStream({height:0,width:0}),Dt=stream(),Je=stream(),Ut=statefulStream(0),jt=statefulStream(null),Ke=statefulStream({row:0,column:0}),an=stream(),Zt=stream(),en=statefulStream(!1),Kt=statefulStream(0),Wt=statefulStream(!0),un=statefulStream(!1);subscribe(pipe(Ae,withLatestFrom(Kt),filter(([Nt,Yt])=>!!Yt)),()=>{publish(Wt,!1),publish(qe,0)}),subscribe(pipe(combineLatest(Ae,Wt,Ze,Ge,Kt,un),filter(([Nt,Yt,Jt,hn,,Ye])=>Nt&&!Yt&&Jt.height!==0&&hn.height!==0&&!Ye)),([,,,,Nt])=>{publish(un,!0),skipFrames(1,()=>{publish(Dt,Nt)}),handleNext(pipe(ue),()=>{publish(ce,[0,0]),publish(Wt,!0)})}),connect(pipe(Zt,filter(Nt=>Nt!=null&&Nt.scrollTop>0),mapTo(0)),qe),subscribe(pipe(Ae,withLatestFrom(Zt),filter(([,Nt])=>Nt!=null)),([,Nt])=>{Nt&&(publish(Ge,Nt.viewport),publish(Ze,Nt==null?void 0:Nt.item),publish(Ke,Nt.gap),Nt.scrollTop>0&&(publish(en,!0),handleNext(pipe(ue,skip(1)),Yt=>{publish(en,!1)}),publish(ge,{top:Nt.scrollTop})))}),connect(pipe(Ge,map$1(({height:Nt})=>Nt)),pe),connect(pipe(combineLatest(duc(Ge,dimensionComparator),duc(Ze,dimensionComparator),duc(Ke,(Nt,Yt)=>Nt&&Nt.column===Yt.column&&Nt.row===Yt.row),duc(ue)),map$1(([Nt,Yt,Jt,hn])=>({viewport:Nt,item:Yt,gap:Jt,scrollTop:hn}))),an),connect(pipe(combineLatest(duc(We),oe,duc(Ke,gapComparator),duc(Ze,dimensionComparator),duc(Ge,dimensionComparator),duc(jt),duc(qe),duc(en),duc(Wt),duc(Kt)),filter(([,,,,,,,Nt])=>!Nt),map$1(([Nt,[Yt,Jt],hn,Ye,Xe,Pt,sn,,yn,qt])=>{const{row:wn,column:Tn}=hn,{height:xn,width:Nn}=Ye,{width:zn}=Xe;if(sn===0&&(Nt===0||zn===0))return INITIAL_GRID_STATE;if(Nn===0){const bn=getInitialTopMostItemIndexNumber(qt,Nt),kn=bn===0?Math.max(sn-1,0):bn;return buildProbeGridState(buildItems(bn,kn,Pt))}const Yn=itemsPerRow(zn,Nn,Tn);let Kn,Rn;yn?Yt===0&&Jt===0&&sn>0?(Kn=0,Rn=sn-1):(Kn=Yn*floor((Yt+wn)/(xn+wn)),Rn=Yn*ceil((Jt+wn)/(xn+wn))-1,Rn=min(Nt-1,max(Rn,Yn-1)),Kn=min(Rn,max(0,Kn))):(Kn=0,Rn=-1);const Mn=buildItems(Kn,Rn,Pt),{top:Xn,bottom:Jn}=gridLayout(Xe,hn,Ye,Mn),pn=ceil(Nt/Yn),Gt=pn*xn+(pn-1)*wn-Jn;return{items:Mn,offsetTop:Xn,offsetBottom:Gt,top:Xn,bottom:Jn,itemHeight:xn,itemWidth:Nn}})),ze),connect(pipe(jt,filter(Nt=>Nt!==null),map$1(Nt=>Nt.length)),We),connect(pipe(combineLatest(Ge,Ze,ze,Ke),filter(([Nt,Yt,{items:Jt}])=>Jt.length>0&&Yt.height!==0&&Nt.height!==0),map$1(([Nt,Yt,{items:Jt},hn])=>{const{top:Ye,bottom:Xe}=gridLayout(Nt,hn,Yt,Jt);return[Ye,Xe]}),distinctUntilChanged(tupleComparator)),ce);const Xt=statefulStream(!1);connect(pipe(ue,withLatestFrom(Xt),map$1(([Nt,Yt])=>Yt||Nt!==0)),Xt);const nn=streamFromEmitter(pipe(duc(ze),filter(({items:Nt})=>Nt.length>0),withLatestFrom(We,Xt),filter(([{items:Nt},Yt,Jt])=>Jt&&Nt[Nt.length-1].index===Yt-1),map$1(([,Nt])=>Nt-1),distinctUntilChanged())),vn=streamFromEmitter(pipe(duc(ze),filter(({items:Nt})=>Nt.length>0&&Nt[0].index===0),mapTo(0),distinctUntilChanged())),Sn=streamFromEmitter(pipe(duc(ze),withLatestFrom(en),filter(([{items:Nt},Yt])=>Nt.length>0&&!Yt),map$1(([{items:Nt}])=>({startIndex:Nt[0].index,endIndex:Nt[Nt.length-1].index})),distinctUntilChanged(rangeComparator),throttleTime(0)));connect(Sn,$e.scrollSeekRangeChanged),connect(pipe(Dt,withLatestFrom(Ge,Ze,We,Ke),map$1(([Nt,Yt,Jt,hn,Ye])=>{const Xe=normalizeIndexLocation(Nt),{align:Pt,behavior:sn,offset:yn}=Xe;let qt=Xe.index;qt==="LAST"&&(qt=hn-1),qt=max(0,qt,min(hn-1,qt));let wn=itemTop(Yt,Ye,Jt,qt);return Pt==="end"?wn=round(wn-Yt.height+Jt.height):Pt==="center"&&(wn=round(wn-Yt.height/2+Jt.height/2)),yn&&(wn+=yn),{top:wn,behavior:sn}})),ge);const Cn=statefulStreamFromEmitter(pipe(ze,map$1(Nt=>Nt.offsetBottom+Nt.bottom)),0);return connect(pipe(Ie,map$1(Nt=>({width:Nt.visibleWidth,height:Nt.visibleHeight}))),Ge),{data:jt,totalCount:We,viewportDimensions:Ge,itemDimensions:Ze,scrollTop:ue,scrollHeight:Je,overscan:ne,scrollBy:me,scrollTo:ge,scrollToIndex:Dt,smoothScrollTargetReached:ye,windowViewportRect:Ie,windowScrollTo:Fe,useWindowScroll:ke,customScrollParent:Be,windowScrollContainerState:Ne,deviation:Ut,scrollContainerState:ve,footerHeight:xe,headerHeight:_e,initialItemCount:qe,gap:Ke,restoreStateFrom:Zt,...$e,initialTopMostItemIndex:Kt,gridState:ze,totalListHeight:Cn,...Se,startReached:vn,endReached:nn,rangeChanged:Sn,stateChanged:an,propsReady:Re,stateRestoreInProgress:en,...Ue}},tup(sizeRangeSystem,domIOSystem,stateFlagsSystem,scrollSeekSystem,propsReadySystem,windowScrollerSystem,loggerSystem));function gridLayout(ne,oe,ce,ue){const{height:pe}=ce;if(pe===void 0||ue.length===0)return{top:0,bottom:0};const me=itemTop(ne,oe,ce,ue[0].index),ge=itemTop(ne,oe,ce,ue[ue.length-1].index)+pe;return{top:me,bottom:ge}}function itemTop(ne,oe,ce,ue){const pe=itemsPerRow(ne.width,ce.width,oe.column),me=floor(ue/pe),ge=me*ce.height+max(0,me-1)*oe.row;return ge>0?ge+oe.row:ge}function itemsPerRow(ne,oe,ce){return max(1,floor((ne+ce)/(floor(oe)+ce)))}const gridComponentPropsSystem=system(()=>{const ne=statefulStream(xe=>`Item ${xe}`),oe=statefulStream({}),ce=statefulStream(null),ue=statefulStream("virtuoso-grid-item"),pe=statefulStream("virtuoso-grid-list"),me=statefulStream(identity),ge=statefulStream("div"),ye=statefulStream(noop$4),ve=(xe,_e=null)=>statefulStreamFromEmitter(pipe(oe,map$1(Se=>Se[xe]),distinctUntilChanged()),_e);return{context:ce,itemContent:ne,components:oe,computeItemKey:me,itemClassName:ue,listClassName:pe,headerFooterTag:ge,scrollerRef:ye,FooterComponent:ve("Footer"),HeaderComponent:ve("Header"),ListComponent:ve("List","div"),ItemComponent:ve("Item","div"),ScrollerComponent:ve("Scroller","div"),ScrollSeekPlaceholder:ve("ScrollSeekPlaceholder","div")}}),combinedSystem$1=system(([ne,oe])=>({...ne,...oe}),tup(gridSystem,gridComponentPropsSystem)),GridItems=React$2.memo(function(){const oe=useEmitterValue$1("gridState"),ce=useEmitterValue$1("listClassName"),ue=useEmitterValue$1("itemClassName"),pe=useEmitterValue$1("itemContent"),me=useEmitterValue$1("computeItemKey"),ge=useEmitterValue$1("isSeeking"),ye=usePublisher$1("scrollHeight"),ve=useEmitterValue$1("ItemComponent"),xe=useEmitterValue$1("ListComponent"),_e=useEmitterValue$1("ScrollSeekPlaceholder"),Se=useEmitterValue$1("context"),$e=usePublisher$1("itemDimensions"),Re=usePublisher$1("gap"),Ae=useEmitterValue$1("log"),Ie=useEmitterValue$1("stateRestoreInProgress"),ke=useSize(Be=>{const Ne=Be.parentElement.parentElement.scrollHeight;ye(Ne);const Fe=Be.firstChild;if(Fe){const{width:Ue,height:We}=Fe.getBoundingClientRect();$e({width:Ue,height:We})}Re({row:resolveGapValue("row-gap",getComputedStyle(Be).rowGap,Ae),column:resolveGapValue("column-gap",getComputedStyle(Be).columnGap,Ae)})});return Ie?null:React$2.createElement(xe,{ref:ke,className:ce,...contextPropIfNotDomElement(xe,Se),style:{paddingTop:oe.offsetTop,paddingBottom:oe.offsetBottom},"data-test-id":"virtuoso-item-list"},oe.items.map(Be=>{const Ne=me(Be.index,Be.data,Se);return ge?React$2.createElement(_e,{key:Ne,...contextPropIfNotDomElement(_e,Se),index:Be.index,height:oe.itemHeight,width:oe.itemWidth}):React$2.createElement(ve,{...contextPropIfNotDomElement(ve,Se),className:ue,"data-index":Be.index,key:Ne},pe(Be.index,Be.data,Se))}))}),Header=React$2.memo(function(){const oe=useEmitterValue$1("HeaderComponent"),ce=usePublisher$1("headerHeight"),ue=useEmitterValue$1("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$1("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null}),Footer=React$2.memo(function(){const oe=useEmitterValue$1("FooterComponent"),ce=usePublisher$1("footerHeight"),ue=useEmitterValue$1("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$1("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null}),Viewport$1=({children:ne})=>{const oe=React$2.useContext(VirtuosoGridMockContext),ce=usePublisher$1("itemDimensions"),ue=usePublisher$1("viewportDimensions"),pe=useSize(me=>{ue(me.getBoundingClientRect())});return React$2.useEffect(()=>{oe&&(ue({height:oe.viewportHeight,width:oe.viewportWidth}),ce({height:oe.itemHeight,width:oe.itemWidth}))},[oe,ue,ce]),React$2.createElement("div",{style:viewportStyle,ref:pe},ne)},WindowViewport$1=({children:ne})=>{const oe=React$2.useContext(VirtuosoGridMockContext),ce=usePublisher$1("windowViewportRect"),ue=usePublisher$1("itemDimensions"),pe=useEmitterValue$1("customScrollParent"),me=useWindowViewportRectRef(ce,pe);return React$2.useEffect(()=>{oe&&(ue({height:oe.itemHeight,width:oe.itemWidth}),ce({offsetTop:0,visibleHeight:oe.viewportHeight,visibleWidth:oe.viewportWidth}))},[oe,ce,ue]),React$2.createElement("div",{ref:me,style:viewportStyle},ne)},GridRoot=React$2.memo(function({...oe}){const ce=useEmitterValue$1("useWindowScroll"),ue=useEmitterValue$1("customScrollParent"),pe=ue||ce?WindowScroller$1:Scroller$1,me=ue||ce?WindowViewport$1:Viewport$1;return React$2.createElement(pe,{...oe},React$2.createElement(me,null,React$2.createElement(Header,null),React$2.createElement(GridItems,null),React$2.createElement(Footer,null)))}),{Component:Grid,usePublisher:usePublisher$1,useEmitterValue:useEmitterValue$1,useEmitter:useEmitter$1}=systemToComponent(combinedSystem$1,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},GridRoot),Scroller$1=buildScroller({usePublisher:usePublisher$1,useEmitterValue:useEmitterValue$1,useEmitter:useEmitter$1}),WindowScroller$1=buildWindowScroller({usePublisher:usePublisher$1,useEmitterValue:useEmitterValue$1,useEmitter:useEmitter$1});function resolveGapValue(ne,oe,ce){return oe!=="normal"&&!(oe!=null&&oe.endsWith("px"))&&ce(`${ne} was not resolved to pixel value correctly`,oe,LogLevel.WARN),oe==="normal"?0:parseInt(oe??"0",10)}const Scroller=reactExports.forwardRef(({style:ne,children:oe,...ce},ue)=>{const pe=reactExports.useRef(null),{palette:me,spacing:ge}=useTheme$1(),ye=useCss$1({"--os-padding-perpendicular":"2px",".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":ge(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${ge(6)})`,marginTop:ge(6)},"div > div.os-scrollbar-track":{"--os-handle-perpendicular-size":"2px","--os-handle-perpendicular-size-hover":"6px","--os-handle-perpendicular-size-active":"6px","> div.os-scrollbar-handle":{borderRadius:0,opacity:.5,"&:hover":{opacity:.8}}}}),[ve]=S$4({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:me.mode==="dark"?"os-theme-light":"os-theme-dark"}}});reactExports.useEffect(()=>{typeof ue!="function"&&(ue!=null&&ue.current)&&(pe!=null&&pe.current)&&ve({target:pe.current,elements:{viewport:ue.current}})},[ve]);const xe=reactExports.useCallback(_e=>{_e&&ue&&(typeof ue=="function"?ue(_e):ue.current=_e)},[ue]);return jsxRuntimeExports.jsx("div",{ref:pe,style:ne,className:ye,children:jsxRuntimeExports.jsx("div",{ref:xe,...ce,children:oe})})});function LazyList({items:ne=[],renderItem:oe,listOptions:ce,placeholder:ue,...pe}){return jsxRuntimeExports.jsx(Box$1,{...pe,children:jsxRuntimeExports.jsx(Virtuoso,{components:{Scroller},totalCount:ne.length,itemContent:me=>oe==null?void 0:oe(ne[me],me),...ce})})}function Dot({label:ne}){return jsxRuntimeExports.jsx(Tooltip$1,{title:ne,children:jsxRuntimeExports.jsx(FiberManualRecord,{sx:{color:"error.main",transform:"scale(0.5)",pl:.5,mr:2},fontSize:"small"})})}function EventInspector({event:ne,index:oe,selected:ce,label:ue,...pe}){const{spacing:me}=useTheme$1(),ge=useCss$1({}),ye=useCss$1({}),ve=lodashExports$1.omit(ne,...OMIT_PROPS),xe=lodashExports$1.pick(ve,...ESSENTIAL_PROPS),_e=lodashExports$1.omit(ve,...ESSENTIAL_PROPS);return jsxRuntimeExports.jsxs(Box$1,{sx:{position:"relative",[`> .${ye}`]:{opacity:0},[`&:hover > .${ye}`]:{opacity:1},[`&:hover > .${ge}`]:{pr:8}},children:[jsxRuntimeExports.jsxs(ListItemButton$1,{className:ge,selected:ce,...pe,sx:{height:80,borderLeft:`${me(.5)} solid ${getColorHex(ne==null?void 0:ne.type)}`,...pe.sx},children:[jsxRuntimeExports.jsxs(ListItemIcon$1,{sx:{alignItems:"center"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",children:oe}),ue&&jsxRuntimeExports.jsx(Dot,{label:ue})]}),jsxRuntimeExports.jsx(ListItemText$1,{sx:{overflow:"hidden"},primary:jsxRuntimeExports.jsxs(Box$1,{sx:{overflow:"hidden",whiteSpace:"nowrap",display:"block",textOverflow:"ellipsis",my:.5},children:[lodashExports$1.startCase(`${(ne==null?void 0:ne.type)??"event"} ${(ne==null?void 0:ne.id)??"-"}`)," "]}),secondaryTypographyProps:{component:"div",whiteSpace:"nowrap",overflow:"hidden"},secondary:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",justifyContent:"flex-start",sx:{"> *":{flex:0}},children:[jsxRuntimeExports.jsx(PropertyList,{event:xe,simple:!0}),jsxRuntimeExports.jsx(PropertyList,{event:_e,simple:!0})]})})]}),jsxRuntimeExports.jsx(Stack$1,{className:ye,direction:"row",sx:{p:1,justifyContent:"center",position:"absolute",right:0,alignItems:"center",top:0,height:"100%"},children:jsxRuntimeExports.jsx(PropertyDialog,{event:ne,trigger:Se=>jsxRuntimeExports.jsx(IconButtonWithTooltip,{onClick:Se,sx:{p:1.5,color:"text.secondary"},label:"See All Properties",icon:jsxRuntimeExports.jsx(DataObjectOutlined,{fontSize:"small"})})})})]})}function Skeleton({event:ne}){const{spacing:oe}=useTheme$1();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItem$1,{sx:{height:80,borderLeft:`${oe(.5)} solid ${getColorHex(ne==null?void 0:ne.type)}`},children:jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(Placeholder$3,{animation:!1,width:oe(4)})})}),jsxRuntimeExports.jsx(Divider$1,{variant:"inset"})]})}function lerp(ne,oe,ce){return ne+lodashExports$1.clamp(ce,0,1)*(oe-ne)}const ITEM_HEIGHT=80,PADDING_TOP=8,divider$2=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1}}),pxToInt=ne=>Number(ne.replace(/px$/,"")),SYMBOL_ALL=nanoid$1(),stepsLayerGuard=ne=>!!getController(ne).steps;function useStepsPageState(ne,oe){const{key:ce,setKey:ue,layers:pe,layer:me,allLayers:ge}=useLayer(ne==null?void 0:ne.layer,stepsLayerGuard),[ye,ve]=reactExports.useState(ne==null?void 0:ne.selectedType);function xe(Se){oe==null||oe({layer:Se}),ue(Se)}function _e(Se){oe==null||oe({selectedType:Se}),ve(Se)}return{setSelectedType:_e,setKey:xe,selectedType:ye,layers:pe,allLayers:ge,key:ce,layer:me}}const getStepsPageDescription=ne=>ne?`${ne} contains 0 steps.`:"When you load a trace, you'll see its steps here.";function StepsPage({template:ne}){const{spacing:oe}=useTheme$1(),ce=usePaper(),ue=useAcrylic(),pe=reactExports.useRef(null),[me,ge]=reactExports.useState(null),{controls:ye,onChange:ve,state:xe,dragHandle:_e}=useViewTreeContext(),{allLayers:Se,key:$e,layers:Re,selectedType:Ae,setKey:Ie,setSelectedType:ke,layer:Be}=useStepsPageState(xe,ve),{step:Ne,playing:Fe,stepTo:Ue}=usePlaybackState($e),We=reactExports.useMemo(()=>{if(Be){const{steps:Je}=getController(Be);return Je(Be)}},[Be]),{steps:qe,types:ze,stepToFilteredStep:Ge,selectedType:Ze}=reactExports.useMemo(()=>{if(We){const Je=We.map((Zt,en)=>[Zt,en]),Ut=lodashExports$1.chain(Je).map(([Zt])=>Zt.type).filter().uniq().value(),jt=!Ut.includes(Ae),Ke=jt?Je:Je.filter(([Zt])=>Zt.type===Ae),{stepMap:an}=lodashExports$1.reduce(Je,(Zt,[,en])=>{const Kt=lodashExports$1.findIndex(Ke,([,un])=>un>=en,Zt.from),Wt=Kt===-1?Ke.length:Kt;return Zt.from=Wt,Zt.stepMap.push(Wt),Zt},{from:0,stepMap:[]});return{steps:Ke,types:Ut,stepToFilteredStep:Zt=>an[Zt],selectedType:jt?SYMBOL_ALL:Ae}}return{}},[We,Ae]),Dt=useBreakpoints($e);return reactExports.useEffect(()=>{if(Ge&&me&&pe.current){const Je=Ge(Ne);if(Fe){let Ut=!1;const jt=Ke=>{var an;if(!Ut&&"scrollTop"in me&&!lodashExports$1.isUndefined(Ne)){const{scrollTop:Zt}=me,en=Je*ITEM_HEIGHT;(an=pe.current)==null||an.scrollTo({top:lerp(Zt,en,1e-6*Ke)}),requestAnimationFrame(jt)}};return requestAnimationFrame(jt),()=>{Ut=!0}}else pe.current.scrollToIndex({index:Je,behavior:"smooth",offset:-pxToInt(oe(12+PADDING_TOP))})}},[Ne,pe,me,Ge,Fe]),jsxRuntimeExports.jsxs(ne,{onChange:ve,stack:xe,children:[jsxRuntimeExports.jsx(ne.Title,{children:"Steps"}),jsxRuntimeExports.jsx(ne.Handle,{children:_e}),jsxRuntimeExports.jsxs(ne.Content,{children:[jsxRuntimeExports.jsx(Flex,{vertical:!0,alignItems:"center",children:qe?qe.length?jsxRuntimeExports.jsx(LazyList,{sx:{width:"100%",height:"100%"},items:qe,listOptions:{scrollerRef:ge,ref:pe,defaultItemHeight:ITEM_HEIGHT,overscan:0},renderItem:([Je,Ut],jt)=>{var Ke;return Fe?jsxRuntimeExports.jsx(Box$1,{sx:{pt:jt?0:oe(6+PADDING_TOP)},children:jsxRuntimeExports.jsx(Skeleton,{event:Je})},jt):jsxRuntimeExports.jsxs(Box$1,{sx:{height:pxToInt(oe(jt?0:6+PADDING_TOP))+ITEM_HEIGHT,pt:jt?0:oe(6+PADDING_TOP)},children:[jsxRuntimeExports.jsx(EventInspector,{event:Je,index:Ut,selected:Ut===Ne,label:(Ke=Dt(Ut))==null?void 0:Ke.result,onClick:()=>Ue(Ut)}),jsxRuntimeExports.jsx(Divider$1,{variant:"inset"})]},jt)}}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(StepsIcon,{}),label:"Events",secondary:getStepsPageDescription(inferLayerName(Be))}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(StepsIcon,{}),label:"Events",secondary:getStepsPageDescription()})}),!!(qe!=null&&qe.length)&&jsxRuntimeExports.jsx(Stack$1,{direction:"row",sx:{...ce(1),...ue,alignItems:"center",position:"absolute",top:Je=>Je.spacing(6),height:Je=>Je.spacing(6),borderRadius:1,px:1,m:1},children:jsxRuntimeExports.jsx(Playback,{layer:Be})})]}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:$e,items:lodashExports$1.map(Se,Je=>({id:Je.key,hidden:!lodashExports$1.find(Re,{key:Je.key}),name:inferLayerName(Je)})),onChange:Ie,arrow:!0,ellipsis:12}),divider$2,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(FiberManualRecordOutlined,{sx:{color:Ze===SYMBOL_ALL||!Ze?grey$1[tint]:getColorHex(Ze)}}),label:"Event Type",value:Ze,items:[{id:SYMBOL_ALL,name:"All Events"},...lodashExports$1.map(ze,Je=>({id:`${Je}`,name:lodashExports$1.startCase(Je)}))],onChange:ke,arrow:!0,ellipsis:12})]}),jsxRuntimeExports.jsx(ne.Extras,{children:ye})]})}function SelectMulti({trigger:ne,items:oe,value:ce,onChange:ue,placeholder:pe="Select Options",defaultChecked:me}){return useSmallDisplay(),lodashExports$1.max([lodashExports$1.findIndex(oe,({value:ge})=>!!(ce!=null&&ce[ge])),0]),jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ge=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:pe,children:jsxRuntimeExports.jsx("span",{children:ne==null?void 0:ne(bindTrigger(ge))})}),jsxRuntimeExports.jsx(Menu$1,{...bindMenu(ge),anchorOrigin:{horizontal:"left",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"left"},children:lodashExports$1.map(oe,({value:ye,label:ve,disabled:xe})=>jsxRuntimeExports.jsxs(MenuItem$1,{disabled:xe,onClick:()=>{ue==null||ue({...ce,[ye]:!((ce==null?void 0:ce[ye])??me)})},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(Checkbox$1,{sx:{p:0},checked:!!((ce==null?void 0:ce[ye])??me)})}),ve]},ye))})]})})}function FeaturePickerMulti({label:ne,value:oe,onChange:ce,items:ue,icon:pe,showArrow:me,defaultChecked:ge,ellipsis:ye=1/0}){var _e;const ve=lodashExports$1.filter(ue,({id:Se})=>!!((oe==null?void 0:oe[Se])??ge)),xe=ve.length?ve.length===1?(_e=lodashExports$1.head(ve))==null?void 0:_e.name:`${ve.length} Selected`:ne;return jsxRuntimeExports.jsx(SelectMulti,{defaultChecked:!0,placeholder:lodashExports$1.startCase(ne),trigger:Se=>jsxRuntimeExports.jsx(FeaturePickerButton,{...Se,disabled:!(ue!=null&&ue.length),icon:pe,arrow:me,children:lodashExports$1.truncate(xe,{length:ye})}),items:lodashExports$1.map(ue,({id:Se,name:$e,description:Re,hidden:Ae})=>({value:Se,label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:$e}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Re})]}),disabled:Ae})),value:oe,onChange:ce})}function useRendererResolver(ne){var ue,pe;const[oe]=useRenderers(),ce=reactExports.useMemo(()=>lodashExports$1.head(oe),[oe]);return{auto:ce,selected:ne&&ne!=="internal:auto"?ne:(pe=(ue=ce==null?void 0:ce.renderer)==null?void 0:ue.meta)==null?void 0:pe.id}}const divider$1=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1}});function ViewportPage({template:ne}){var ke,Be;const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),[me]=useRenderers(),ge=usePaper(),ye=useAcrylic(),[{layers:ve}]=useLayers(),[xe,_e]=reactExports.useState({}),Se=reactExports.useMemo(()=>lodashExports$1.filter(ve,Ne=>(xe==null?void 0:xe[Ne.key])??!0),[xe,ve,ve==null?void 0:ve.length]),[$e,Re]=reactExports.useState(),{selected:Ae,auto:Ie}=useRendererResolver(ue==null?void 0:ue.renderer);return reactExports.useEffect(()=>{lodashExports$1.delay(()=>{var Ne;(Ne=$e==null?void 0:$e.fitCamera)==null||Ne.call($e,Fe=>{var Ue;return lodashExports$1.chain(Se).filter("viewKey").map("key").includes(((Ue=Fe.meta)==null?void 0:Ue.sourceLayer)??"").value()})},150)},[$e,lodashExports$1.chain(Se).map("viewKey").sort().join(".").value()]),jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"viewport"}),jsxRuntimeExports.jsx(ne.Title,{children:"Viewport"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(AutoSizer,{children:Ne=>jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(TraceRenderer,{...Ne,layers:Se,renderer:Ae,rendererRef:Re}),jsxRuntimeExports.jsx(Stack$1,{sx:{pt:6,position:"absolute",top:0,left:0},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{...ge(1),...ye,alignItems:"center",height:Fe=>Fe.spacing(6),px:1,m:1},children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",disabled:!$e,onClick:()=>{$e==null||$e.fitCamera()},label:"Fit",icon:jsxRuntimeExports.jsx(CenterFocusWeakOutlined,{})}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",disabled:!$e,onClick:()=>{var Fe;(Fe=$e==null?void 0:$e.initialCamera)==null||Fe.call($e)},icon:jsxRuntimeExports.jsx(TimesOneMobiledataOutlined,{}),label:"1 to 1"}),divider$1,jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",disabled:!$e,onClick:async()=>{const Fe=await($e==null?void 0:$e.toDataUrl());Fe&&download(Fe,dist$4.generateUsername("-"))},icon:jsxRuntimeExports.jsx(CameraOutlined,{}),label:"capture-screenshot"})]})})]})})})}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",children:[jsxRuntimeExports.jsx(FeaturePicker,{label:"Renderer",icon:jsxRuntimeExports.jsx(BlurCircularOutlined,{}),value:(ue==null?void 0:ue.renderer)??"internal:auto",onChange:Ne=>ce==null?void 0:ce({renderer:Ne}),items:[{id:"internal:auto",name:`Auto (${((Be=(ke=Ie==null?void 0:Ie.renderer)==null?void 0:ke.meta)==null?void 0:Be.name)??"None"})`},...lodashExports$1.map(me,({renderer:Ne})=>({id:Ne.meta.id,name:Ne.meta.name,description:Ne.meta.id}))],arrow:!0}),divider$1,jsxRuntimeExports.jsx(FeaturePickerMulti,{defaultChecked:!0,label:"Layers",icon:jsxRuntimeExports.jsx(LayersIcon,{}),value:xe,onChange:_e,items:lodashExports$1.map(ve,Ne=>({id:Ne.key,name:inferLayerName(Ne)})),showArrow:!0,ellipsis:12})]})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})}const ErrorBoundaryContext=reactExports.createContext(null),initialState={didCatch:!1,error:null};class ErrorBoundary extends reactExports.Component{constructor(oe){super(oe),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=initialState}static getDerivedStateFromError(oe){return{didCatch:!0,error:oe}}resetErrorBoundary(){const{error:oe}=this.state;if(oe!==null){for(var ce,ue,pe=arguments.length,me=new Array(pe),ge=0;ge0&&arguments[0]!==void 0?arguments[0]:[],oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return ne.length!==oe.length||ne.some((ce,ue)=>!Object.is(ce,oe[ue]))}const divider=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1,height:ne=>ne.spacing(3),alignSelf:"auto"}}),Page=withSlots(({slotProps:ne,onChange:oe,stack:ce})=>{var pe,me,ge,ye;const ue=useAcrylic();return jsxRuntimeExports.jsx(ErrorBoundary,{fallbackRender:ve=>{var xe,_e;return jsxRuntimeExports.jsxs(Stack$1,{sx:{background:Se=>Se.palette.background.paper,height:"100%"},children:[jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{height:Se=>Se.spacing(6),alignItems:"center",pl:1,borderBottom:1,borderColor:"divider"},children:[(xe=ne.Handle)==null?void 0:xe.children,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(WidgetsOutlined,{}),label:"Choose View",onChange:Se=>oe==null?void 0:oe({...ce,type:Se}),value:ce==null?void 0:ce.type,items:lodashExports$1.values(pages),itemOrientation:"vertical"}),jsxRuntimeExports.jsx(Space,{sx:{mx:"auto"}}),(_e=ne.Extras)==null?void 0:_e.children]}),jsxRuntimeExports.jsx(Placeholder$2,{secondary:`${ve.error}`,icon:jsxRuntimeExports.jsx(ErrorOutlineOutlined,{})})]})},children:jsxRuntimeExports.jsxs(Flex,{vertical:!0,children:[jsxRuntimeExports.jsx(Flex,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(pe=ne.Content)==null?void 0:pe.children})}),jsxRuntimeExports.jsxs(Flex,{sx:{height:ve=>ve.spacing(6),alignItems:"center"},children:[jsxRuntimeExports.jsx(Flex,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...ue},children:jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsxs(Flex,{sx:{width:"max-content",height:ve=>ve.spacing(6),alignItems:"center",p:1},children:[(me=ne.Handle)==null?void 0:me.children,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(WidgetsOutlined,{}),label:"Choose View",onChange:ve=>oe==null?void 0:oe({...ce,type:ve}),value:ce==null?void 0:ce.type,items:lodashExports$1.values(pages),itemOrientation:"vertical"}),((ge=ne.Options)==null?void 0:ge.children)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[divider,ne.Options.children]})]})})}),jsxRuntimeExports.jsx(Space,{sx:{mx:"auto"}}),(ye=ne.Extras)==null?void 0:ye.children]})]})})}),isSourceLayer=ne=>{var oe;return!!((oe=getController(ne))!=null&&oe.getSources)};function SourcePage({template:ne}){var Re;const oe=useTheme$1();useMonacoTheme(oe);const{key:ce,setKey:ue,layer:pe,layers:me,allLayers:ge}=useLayer(void 0,isSourceLayer),{controls:ye,onChange:ve,state:xe,dragHandle:_e}=useViewTreeContext(),Se=reactExports.useMemo(()=>{var Ae,Ie;return(Ie=(Ae=getController(pe))==null?void 0:Ae.getSources)==null?void 0:Ie.call(Ae,pe)},[pe]),$e=lodashExports$1.find(Se,{id:xe==null?void 0:xe.source})??lodashExports$1.first(Se);return jsxRuntimeExports.jsxs(ne,{onChange:ve,stack:xe,children:[jsxRuntimeExports.jsx(ne.Key,{children:"source"}),jsxRuntimeExports.jsx(ne.Title,{children:"Source"}),jsxRuntimeExports.jsx(ne.Handle,{children:_e}),jsxRuntimeExports.jsx(ne.Content,{children:Se!=null&&Se.length?jsxRuntimeExports.jsx(Flex,{pt:6,children:jsxRuntimeExports.jsx(AutoSizer,{children:Ae=>jsxRuntimeExports.jsx(de,{theme:oe.palette.mode==="dark"?"posthoc-dark":"light",options:{readOnly:!0},language:$e==null?void 0:$e.language,loading:jsxRuntimeExports.jsx(CircularProgress$1,{variant:"indeterminate"}),...Ae,value:$e==null?void 0:$e.content})})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(CodeOutlined,{}),label:"Source"})}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:ce,items:lodashExports$1.map(ge,Ae=>({id:Ae.key,hidden:!lodashExports$1.find(me,{key:Ae.key}),name:inferLayerName(Ae)})),onChange:ue,arrow:!0,ellipsis:12}),!!(Se!=null&&Se.length)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[divider,jsxRuntimeExports.jsx(Tabs$1,{value:(xe==null?void 0:xe.source)??((Re=lodashExports$1.first(Se))==null?void 0:Re.id),onChange:(Ae,Ie)=>ve==null?void 0:ve({source:Ie}),children:lodashExports$1.map(Se,({name:Ae,id:Ie})=>jsxRuntimeExports.jsx(Tab$1,{label:Ae,value:Ie}))})]})]}),jsxRuntimeExports.jsx(ne.Extras,{children:ye})]})}const pages={explore:{id:"explore",name:"Explore",color:"deepOrange",description:"Browse examples and guides",icon:jsxRuntimeExports.jsx(RocketIcon,{}),content:ExplorePage,allowFullscreen:!0,showInSidebar:"always"},layers:{id:"layers",name:"Layers",description:"",color:"pink",icon:jsxRuntimeExports.jsx(LayersIcon,{}),content:LayersPage,allowFullscreen:!0,showInSidebar:"mobile-only"},steps:{id:"steps",name:"Events",description:"",color:"pink",icon:jsxRuntimeExports.jsx(StepsIcon,{}),content:StepsPage,allowFullscreen:!0},viewport:{id:"viewport",name:"Viewport",description:"",color:"deepPurple",icon:jsxRuntimeExports.jsx(ViewportIcon,{}),content:ViewportPage,allowFullscreen:!0},tree:{id:"tree",name:"Graph",description:"",color:"deepPurple",icon:jsxRuntimeExports.jsx(TreeIcon,{}),content:TreePage,allowFullscreen:!0},source:{id:"source",name:"Source",description:"",color:"deepPurple",icon:jsxRuntimeExports.jsx(CodeOutlined,{}),content:SourcePage,allowFullscreen:!0,showInSidebar:"mobile-only"},debug:{id:"debug",name:"Debugger",description:"",color:"indigo",icon:jsxRuntimeExports.jsx(DebuggerIcon,{}),content:DebugPage,allowFullscreen:!0,showInSidebar:"mobile-only"},info:{id:"info",name:"Logs",description:"",color:"grey",icon:jsxRuntimeExports.jsx(ListOutlined,{}),content:InfoPage,allowFullscreen:!0},settings:{id:"settings",name:"Settings",description:"",color:"grey",icon:jsxRuntimeExports.jsx(SettingsIcon,{}),content:SettingsPage,allowFullscreen:!0,showInSidebar:"always"}},SidebarPage=withSlots(({slotProps:ne})=>{var pe,me,ge;const oe=useSidebarBackground(),ce=useAcrylic(oe),[,ue]=useUIState();return jsxRuntimeExports.jsx(ErrorBoundary,{fallback:jsxRuntimeExports.jsx(Box$1,{sx:{p:6,background:ye=>ye.palette.background.paper,height:"100%"},children:"This page encountered an error."}),children:jsxRuntimeExports.jsxs(Flex,{vertical:!0,children:[jsxRuntimeExports.jsx(Flex,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{width:"100%",height:"100%",bgcolor:oe},children:(pe=ne.Content)==null?void 0:pe.children})}),jsxRuntimeExports.jsx(Flex,{sx:{height:ye=>ye.spacing(6)},children:jsxRuntimeExports.jsxs(Flex,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",...ce},children:[jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsxs(Flex,{sx:{width:"max-content",height:ye=>ye.spacing(6),alignItems:"center",p:1},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",sx:{p:1,color:"text.secondary"},children:(me=ne.Title)==null?void 0:me.children}),((ge=ne.Options)==null?void 0:ge.children)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[divider,ne.Options.children]})]})}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{onClick:()=>{ue(()=>{var ye;return{fullscreenModal:(ye=ne.Key)==null?void 0:ye.children,sidebarOpen:!1}})},size:"small",sx:{m:1},icon:jsxRuntimeExports.jsx(FullscreenOutlined,{sx:{color:"text.secondary"},fontSize:"small"}),label:"Maximise"})]})})]})})});var sysend$1={exports:{}};/**@license + }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(ne){this._stylesheet!==ne&&(this._stylesheet=ne,this.styleID++)}normalizeColor(ne){return Array.isArray(ne)&&(ne=rgb2hex(ne)),typeof ne=="number"?hex2string(ne):ne}dropShadowToCSS(){let ne=this.normalizeColor(this.dropShadowColor);const oe=this.dropShadowAlpha,ce=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),ue=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);ne.startsWith("#")&&oe<1&&(ne+=(oe*255|0).toString(16).padStart(2,"0"));const pe=`${ce}px ${ue}px`;return this.dropShadowBlur>0?`text-shadow: ${pe} ${this.dropShadowBlur}px ${ne}`:`text-shadow: ${pe} ${ne}`}reset(){Object.assign(this,_HTMLTextStyle.defaultOptions)}onBeforeDraw(){const{fontsDirty:ne}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&ne?new Promise(oe=>setTimeout(oe,100)):Promise.resolve()}get isSafari(){const{userAgent:ne}=settings.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(ne)}set fillGradientStops(ne){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(ne){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(ne){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(ne){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(ne){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(ne){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(ne){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};let HTMLTextStyle=_HTMLTextStyle;HTMLTextStyle.availableFonts={};HTMLTextStyle.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};const _HTMLText=class extends Sprite{constructor(ne="",oe={}){super(Texture.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;const ce=new Image,ue=Texture.from(ce,{scaleMode:settings.SCALE_MODE,resourceOptions:{autoLoad:!1}});ue.orig=new Rectangle,ue.trim=new Rectangle,this.texture=ue;const pe="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml",ge=document.createElementNS(pe,"svg"),ye=document.createElementNS(pe,"foreignObject"),ve=document.createElementNS(me,"div"),xe=document.createElementNS(me,"style");ye.setAttribute("width","10000"),ye.setAttribute("height","10000"),ye.style.overflow="hidden",ge.appendChild(ye),this.maxWidth=_HTMLText.defaultMaxWidth,this.maxHeight=_HTMLText.defaultMaxHeight,this._domElement=ve,this._styleElement=xe,this._svgRoot=ge,this._foreignObject=ye,this._foreignObject.appendChild(xe),this._foreignObject.appendChild(ve),this._image=ce,this._loadImage=new Image,this._autoResolution=_HTMLText.defaultAutoResolution,this._resolution=_HTMLText.defaultResolution??settings.RESOLUTION,this.text=ne,this.style=oe}measureText(ne){var ye,ve;const{text:oe,style:ce,resolution:ue}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},ne);Object.assign(this._domElement,{innerHTML:oe,style:ce.toCSS(ue)}),this._styleElement.textContent=ce.toGlobalCSS(),document.body.appendChild(this._svgRoot);const pe=this._domElement.getBoundingClientRect();this._svgRoot.remove();const me=Math.min(this.maxWidth,Math.ceil(pe.width)),ge=Math.min(this.maxHeight,Math.ceil(pe.height));return this._svgRoot.setAttribute("width",me.toString()),this._svgRoot.setAttribute("height",ge.toString()),oe!==this._text&&(this._domElement.innerHTML=this._text),ce!==this._style&&(Object.assign(this._domElement,{style:(ye=this._style)==null?void 0:ye.toCSS(ue)}),this._styleElement.textContent=(ve=this._style)==null?void 0:ve.toGlobalCSS()),{width:me+ce.padding*2,height:ge+ce.padding*2}}async updateText(ne=!0){const{style:oe,_image:ce,_loadImage:ue}=this;if(this.localStyleID!==oe.styleID&&(this.dirty=!0,this.localStyleID=oe.styleID),!this.dirty&&ne)return;const{width:pe,height:me}=this.measureText();ce.width=ue.width=Math.ceil(Math.max(1,pe)),ce.height=ue.height=Math.ceil(Math.max(1,me)),this._loading||(this._loading=!0,await new Promise(ge=>{ue.onload=async()=>{await oe.onBeforeDraw(),this._loading=!1,ce.src=ue.src,ue.onload=null,ue.src="",this.updateTexture(),ge()};const ye=new XMLSerializer().serializeToString(this._svgRoot);ue.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(ye)}`}))}get source(){return this._image}updateTexture(){const{style:ne,texture:oe,_image:ce,resolution:ue}=this,{padding:pe}=ne,{baseTexture:me}=oe;oe.trim.width=oe._frame.width=ce.width/ue,oe.trim.height=oe._frame.height=ce.height/ue,oe.trim.x=-pe,oe.trim.y=-pe,oe.orig.width=oe._frame.width-pe*2,oe.orig.height=oe._frame.height-pe*2,this._onTextureUpdate(),me.setRealSize(ce.width,ce.height,ue),this.dirty=!1}_render(ne){this._autoResolution&&this._resolution!==ne.resolution&&(this._resolution=ne.resolution,this.dirty=!0),this.updateText(!0),super._render(ne)}_renderCanvas(ne){this._autoResolution&&this._resolution!==ne.resolution&&(this._resolution=ne.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(ne)}getLocalBounds(ne){return this.updateText(!0),super.getLocalBounds(ne)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(ne){var ce,ue,pe,me,ge;typeof ne=="boolean"&&(ne={children:ne}),ne=Object.assign({},_HTMLText.defaultDestroyOptions,ne),super.destroy(ne);const oe=null;this.ownsStyle&&((ce=this._style)==null||ce.cleanFonts()),this._style=oe,(ue=this._svgRoot)==null||ue.remove(),this._svgRoot=oe,(pe=this._domElement)==null||pe.remove(),this._domElement=oe,(me=this._foreignObject)==null||me.remove(),this._foreignObject=oe,(ge=this._styleElement)==null||ge.remove(),this._styleElement=oe,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=oe,this._image.src="",this._image=oe}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(ne){this.updateText(!0);const oe=sign$2(this.scale.x)||1;this.scale.x=oe*ne/this._image.width/this.resolution,this._width=ne}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(ne){this.updateText(!0);const oe=sign$2(this.scale.y)||1;this.scale.y=oe*ne/this._image.height/this.resolution,this._height=ne}get style(){return this._style}set style(ne){this._style!==ne&&(ne=ne||{},ne instanceof HTMLTextStyle?(this.ownsStyle=!1,this._style=ne):ne instanceof TextStyle?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=HTMLTextStyle.from(ne)):(this.ownsStyle=!0,this._style=new HTMLTextStyle(ne)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(ne){ne=String(ne===""||ne===null||ne===void 0?" ":ne),ne=this.sanitiseText(ne),this._text!==ne&&(this._text=ne,this.dirty=!0)}get resolution(){return this._resolution}set resolution(ne){this._autoResolution=!1,this._resolution!==ne&&(this._resolution=ne,this.dirty=!0)}sanitiseText(ne){return ne.replace(/
/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};let HTMLText=_HTMLText;HTMLText.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};HTMLText.defaultMaxWidth=2024;HTMLText.defaultMaxHeight=2024;HTMLText.defaultAutoResolution=!0;function makeRenderer(ne,oe){return{constructor:ne,meta:oe}}function quickselect(ne,oe,ce,ue,pe){quickselectStep(ne,oe,ce||0,ue||ne.length-1,pe||defaultCompare)}function quickselectStep(ne,oe,ce,ue,pe){for(;ue>ce;){if(ue-ce>600){var me=ue-ce+1,ge=oe-ce+1,ye=Math.log(me),ve=.5*Math.exp(2*ye/3),xe=.5*Math.sqrt(ye*ve*(me-ve)/me)*(ge-me/2<0?-1:1),_e=Math.max(ce,Math.floor(oe-ge*ve/me+xe)),Se=Math.min(ue,Math.floor(oe+(me-ge)*ve/me+xe));quickselectStep(ne,oe,_e,Se,pe)}var $e=ne[oe],Re=ce,Ae=ue;for(swap(ne,ce,oe),pe(ne[ue],$e)>0&&swap(ne,ce,ue);Re0;)Ae--}pe(ne[ce],$e)===0?swap(ne,ce,Ae):(Ae++,swap(ne,Ae,ue)),Ae<=oe&&(ce=Ae+1),oe<=Ae&&(ue=Ae-1)}}function swap(ne,oe,ce){var ue=ne[oe];ne[oe]=ne[ce],ne[ce]=ue}function defaultCompare(ne,oe){return neoe?1:0}class RBush{constructor(oe=9){this._maxEntries=Math.max(4,oe),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(oe){let ce=this.data;const ue=[];if(!intersects(oe,ce))return ue;const pe=this.toBBox,me=[];for(;ce;){for(let ge=0;ge=0&&me[ce].children.length>this._maxEntries;)this._split(me,ce),ce--;this._adjustParentBBoxes(pe,me,ce)}_split(oe,ce){const ue=oe[ce],pe=ue.children.length,me=this._minEntries;this._chooseSplitAxis(ue,me,pe);const ge=this._chooseSplitIndex(ue,me,pe),ye=createNode(ue.children.splice(ge,ue.children.length-ge));ye.height=ue.height,ye.leaf=ue.leaf,calcBBox(ue,this.toBBox),calcBBox(ye,this.toBBox),ce?oe[ce-1].children.push(ye):this._splitRoot(ue,ye)}_splitRoot(oe,ce){this.data=createNode([oe,ce]),this.data.height=oe.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)}_chooseSplitIndex(oe,ce,ue){let pe,me=1/0,ge=1/0;for(let ye=ce;ye<=ue-ce;ye++){const ve=distBBox(oe,0,ye,this.toBBox),xe=distBBox(oe,ye,ue,this.toBBox),_e=intersectionArea(ve,xe),Se=bboxArea(ve)+bboxArea(xe);_e=ce;xe--){const _e=oe.children[xe];extend$1(ye,oe.leaf?me(_e):_e),ve+=bboxMargin(ye)}return ve}_adjustParentBBoxes(oe,ce,ue){for(let pe=ue;pe>=0;pe--)extend$1(ce[pe],oe)}_condense(oe){for(let ce=oe.length-1,ue;ce>=0;ce--)oe[ce].children.length===0?ce>0?(ue=oe[ce-1].children,ue.splice(ue.indexOf(oe[ce]),1)):this.clear():calcBBox(oe[ce],this.toBBox)}}function findItem(ne,oe,ce){if(!ce)return oe.indexOf(ne);for(let ue=0;ue=ne.minX&&oe.maxY>=ne.minY}function createNode(ne){return{children:ne,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(ne,oe,ce,ue,pe){const me=[oe,ce];for(;me.length;){if(ce=me.pop(),oe=me.pop(),ce-oe<=ue)continue;const ge=oe+Math.ceil((ce-oe)/ue/2)*ue;quickselect(ne,ge,oe,ce,pe),me.push(oe,ge,ge,ce)}}class Bush extends RBush{toBBox(oe){return{minX:oe.left,minY:oe.top,maxX:oe.right,maxY:oe.bottom}}compareMinX(oe,ce){return oe.left-ce.left}compareMinY(oe,ce){return oe.top-ce.top}}const defaultD2RendererOptions={screenSize:{width:1,height:1},workerCount:4,workerIndex:0,tileResolution:{width:64,height:64},tileSubdivision:0,refreshInterval:1e3/60,animationDuration:150,debounceInterval:1e3/60,errorColor:"#f44336",backgroundColor:"#ffffff",accentColor:"#333333",dynamicResolution:{intervalMs:500,increment:.5,maxScale:1.5,minScale:1,dtMax:1.5,dtMin:1.1}};var dist$1={},__assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(ne){for(var oe,ce=1,ue=arguments.length;ce0?1:-1}),shim$4}var sign$1=isImplemented$6()?Math.sign:requireShim$4(),sign=sign$1,abs=Math.abs,floor$1=Math.floor,toInteger$1=function(ne){return isNaN(ne)?0:(ne=Number(ne),ne===0||!isFinite(ne)?ne:sign(ne)*floor$1(abs(ne)))},toInteger=toInteger$1,max$3=Math.max,toPosInteger=function(ne){return max$3(0,toInteger(ne))},validCallable=function(ne){if(typeof ne!="function")throw new TypeError(ne+" is not a function");return ne},isValue$4=isValue$6,validValue=function(ne){if(!isValue$4(ne))throw new TypeError("Cannot use null or undefined");return ne},custom={exports:{}},isImplemented$5=function(){var ne=Object.assign,oe;return typeof ne!="function"?!1:(oe={foo:"raz"},ne(oe,{bar:"dwa"},{trzy:"trzy"}),oe.foo+oe.bar+oe.trzy==="razdwatrzy")},isImplemented$4,hasRequiredIsImplemented$3;function requireIsImplemented$3(){return hasRequiredIsImplemented$3||(hasRequiredIsImplemented$3=1,isImplemented$4=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),isImplemented$4}var shim$3,hasRequiredShim$3;function requireShim$3(){if(hasRequiredShim$3)return shim$3;hasRequiredShim$3=1;var ne=isValue$6,oe=Object.keys;return shim$3=function(ce){return oe(ne(ce)?Object(ce):ce)},shim$3}var keys,hasRequiredKeys;function requireKeys(){return hasRequiredKeys||(hasRequiredKeys=1,keys=requireIsImplemented$3()()?Object.keys:requireShim$3()),keys}var shim$2,hasRequiredShim$2;function requireShim$2(){if(hasRequiredShim$2)return shim$2;hasRequiredShim$2=1;var ne=requireKeys(),oe=validValue,ce=Math.max;return shim$2=function(ue,pe){var me,ge,ye=ce(arguments.length,2),ve;for(ue=Object(oe(ue)),ve=function(xe){try{ue[xe]=pe[xe]}catch(_e){me||(me=_e)}},ge=1;ge-1},shim$1}var contains$1=isImplemented$3()?String.prototype.contains:requireShim$1(),isValue$1=is$5,isPlainFunction=is$1,assign$1=assign$2,normalizeOpts=normalizeOptions,contains=contains$1,d$1=d$2.exports=function(ne,oe){var ce,ue,pe,me,ge;return arguments.length<2||typeof ne!="string"?(me=oe,oe=ne,ne=null):me=arguments[2],isValue$1(ne)?(ce=contains.call(ne,"c"),ue=contains.call(ne,"e"),pe=contains.call(ne,"w")):(ce=pe=!0,ue=!1),ge={value:oe,configurable:ce,enumerable:ue,writable:pe},me?assign$1(normalizeOpts(me),ge):ge};d$1.gs=function(ne,oe,ce){var ue,pe,me,ge;return typeof ne!="string"?(me=ce,ce=oe,oe=ne,ne=null):me=arguments[3],isValue$1(oe)?isPlainFunction(oe)?isValue$1(ce)?isPlainFunction(ce)||(me=ce,ce=void 0):ce=void 0:(me=oe,oe=ce=void 0):oe=void 0,isValue$1(ne)?(ue=contains.call(ne,"c"),pe=contains.call(ne,"e")):(ue=!0,pe=!1),ge={get:oe,set:ce,configurable:ue,enumerable:pe},me?assign$1(normalizeOpts(me),ge):ge};var dExports=d$2.exports,eventEmitter={exports:{}};(function(ne,oe){var ce=dExports,ue=validCallable,pe=Function.prototype.apply,me=Function.prototype.call,ge=Object.create,ye=Object.defineProperty,ve=Object.defineProperties,xe=Object.prototype.hasOwnProperty,_e={configurable:!0,enumerable:!1,writable:!0},Se,$e,Re,Ae,Ie,ke,Be;Se=function(Ne,Fe){var Ue;return ue(Fe),xe.call(this,"__ee__")?Ue=this.__ee__:(Ue=_e.value=ge(null),ye(this,"__ee__",_e),_e.value=null),Ue[Ne]?typeof Ue[Ne]=="object"?Ue[Ne].push(Fe):Ue[Ne]=[Ue[Ne],Fe]:Ue[Ne]=Fe,this},$e=function(Ne,Fe){var Ue,We;return ue(Fe),We=this,Se.call(this,Ne,Ue=function(){Re.call(We,Ne,Ue),pe.call(Fe,this,arguments)}),Ue.__eeOnceListener__=Fe,this},Re=function(Ne,Fe){var Ue,We,qe,ze;if(ue(Fe),!xe.call(this,"__ee__"))return this;if(Ue=this.__ee__,!Ue[Ne])return this;if(We=Ue[Ne],typeof We=="object")for(ze=0;qe=We[ze];++ze)(qe===Fe||qe.__eeOnceListener__===Fe)&&(We.length===2?Ue[Ne]=We[ze?0:1]:We.splice(ze,1));else(We===Fe||We.__eeOnceListener__===Fe)&&delete Ue[Ne];return this},Ae=function(Ne){var Fe,Ue,We,qe,ze;if(xe.call(this,"__ee__")&&(qe=this.__ee__[Ne],!!qe))if(typeof qe=="object"){for(Ue=arguments.length,ze=new Array(Ue-1),Fe=1;Fe=55296&&Ue<=56319&&(Ge+=$e[++ke])),Ge=Re?xe.call(Re,Ae,Ge,Be):Ge,Ie?(_e.value=Ge,Se(Ne,Be,_e)):Ne[Be]=Ge,++Be;Fe=Be}}if(Fe===void 0)for(Fe=ue($e.length),Ie&&(Ne=new Ie(Fe)),ke=0;ke=6&&(ce-=6),G(ce<1?255*((oe-ne)*ce+ne):ce<3?255*oe:ce<4?255*((oe-ne)*(4-ce)+ne):255*ne)},X=function(ne,oe,ce){oe/=100;var ue=(ce/=100)<=.5?ce*(oe+1):ce+oe-ce*oe,pe=2*ce-ue;return{r:O(pe,ue,(ne/=60)+2),g:O(pe,ue,ne),b:O(pe,ue,ne-2)}},Y=function(ne,oe,ce,ue){return{r:G(255*(1-ne)*(ue=1-ue)),g:G(255*(1-oe)*ue),b:G(255*(1-ce)*ue)}},j=function(ne,oe,ce){ne/=255,oe/=255,ce/=255;var ue=1-Math.max(ne,oe,ce),pe=1-ue,me=pe&&(pe-oe)/pe,ge=pe&&(pe-ce)/pe;return{c:G(100*(pe&&(pe-ne)/pe)),m:G(100*me),y:G(100*ge),k:G(100*ue)}},K=function(ne,oe,ce,ue){ue===void 0&&(ue=1),ne/=255,oe/=255,ce/=255,ue=Math.min(ue,1);var pe=Math.max(ne,oe,ce),me=Math.min(ne,oe,ce),ge=pe-me,ye=0,ve=0,xe=(pe+me)/2;if(ge!==0){switch(pe){case ne:ye=(oe-ce)/ge%6;break;case oe:ye=(ce-ne)/ge+2;break;case ce:ye=(ne-oe)/ge+4}(ye=G(60*ye))<0&&(ye+=360),ve=ge/(1-Math.abs(2*xe-1))}return{h:ye,s:G(100*ve),l:G(100*xe),a:ue}},I=function(ne,oe){if(ne<0&&(ne+=360),ne>360&&(ne-=360),ne===360||ne===0)return ne;var ce=[[0,120],[120,180],[180,240],[240,360]],ue=[[0,60],[60,120],[120,240],[240,360]],pe=oe?ue:ce,me=0,ge=0,ye=0,ve=0;return(oe?ce:ue).find(function(xe,_e){return ne>=xe[0]&&ne360||ne<0)&&(ne-=360*Math.floor(ne/360)),ne},N=function(ne){return typeof ne=="string"&&(ne=m.test(ne)?B(ne)/100:+ne),isNaN(+ne)||ne>1?1:G(ne)},V=function(ne,oe,ce){return oe.reduce(function(ue,pe){return e(e([],ue,!0),[t(t({},ne),{h:ce===i.ADDITIVE?x(ne.h+pe):x(I(I(ne.h,!1)+pe,!0))})],!1)},[t({},ne)])},U=function(ne,oe){return V(ne,[30,-30],oe)},q=function(ne,oe){return V(ne,[180],oe)},$=function(ne,oe){return V(ne,[150,-150],oe)},_=function(ne,oe){return V(ne,[120,-120],oe)},Q=function(ne,oe){return V(ne,[60,-120,180],oe)},z$1=function(ne,oe){return V(ne,[90,-90,180],oe)},J=function(ne){return typeof ne=="string"?function(oe){var ce;if(Object.keys(r).some(function(ue){if(b[ue].test(oe))return ce=ue,!0}),!ce&&~f.indexOf(oe)&&(ce=r.HEX),!ce)throw new Error(E);return ce}(ne):function(oe){var ce,ue=!1,pe=L(Object.keys(oe));if(p[pe]&&(ce=p[pe]),ce&&ce===r.RGB){var me=Object.entries(oe).some(function(ye){return!y.test("".concat(ye[1]))}),ge=Object.entries(oe).some(function(ye){return!(m.test("".concat(ye[1]))||!y.test("".concat(ye[1]))&&!isNaN(+ye[1])&&+ye[1]<=255)});me&&ge&&(ue=!0),me||(ce=r.HEX)}if(!ce||ue)throw new Error(v);return ce}(ne)},W=((c={})[r.HEX]=function(ne){var oe=(~f.indexOf(ne)?o[ne]:ne).match(b.HEX),ce={r:M(oe[1]||oe[5]),g:M(oe[2]||oe[6]),b:M(oe[3]||oe[7])},ue=oe[4]||oe[8];return ue!==void 0&&(ce.a=M(ue)/255),ce},c[r.RGB]=function(ne){var oe=ne.match(b.RGB),ce=D(oe[1]||oe[5]),ue=D(oe[2]||oe[6]),pe=D(oe[3]||oe[7]),me=oe[4]||oe[8],ge={r:Math.min(ce,255),g:Math.min(ue,255),b:Math.min(pe,255)};return me!==void 0&&(ge.a=N(me)),ge},c[r.HSL]=function(ne){var oe=ne.match(b.HSL),ce=x(oe[1]||oe[5]),ue=C(oe[2]||oe[6]),pe=C(oe[3]||oe[7]),me=oe[4]||oe[8],ge=X(ce,ue,pe);return me!==void 0&&(ge.a=N(me)),ge},c[r.CMYK]=function(ne){var oe=ne.match(b.CMYK),ce=S(oe[1]||oe[6]),ue=S(oe[2]||oe[7]),pe=S(oe[3]||oe[8]),me=S(oe[4]||oe[9]),ge=oe[5]||oe[10],ye=Y(ce,ue,pe,me);return ge!==void 0&&(ye.a=N(ge)),ye},c),Z=((s={})[r.HEX]=function(ne){var oe={r:D("".concat(ne.r)),g:D("".concat(ne.g)),b:D("".concat(ne.b))};return H(ne,"a")&&(oe.a=Math.min(D("".concat(ne.a),!0),1)),oe},s[r.RGB]=function(ne){return this.HEX(ne)},s[r.HSL]=function(ne){var oe=C("".concat(ne.s)),ce=C("".concat(ne.l)),ue=X(x(ne.h),oe,ce);return H(ne,"a")&&(ue.a=N(ne.a)),ue},s[r.CMYK]=function(ne){var oe=S("".concat(ne.c)),ce=S("".concat(ne.m)),ue=S("".concat(ne.y)),pe=S("".concat(ne.k)),me=Y(oe,ce,ue,pe);return H(ne,"a")&&(me.a=N(ne.a)),me},s),tt=function(ne,oe){return oe===void 0&&(oe=J(ne)),typeof ne=="string"?W[oe](ne):Z[oe](ne)},et=((d={})[r.HEX]=function(ne){return{r:R(ne.r),g:R(ne.g),b:R(ne.b)}},d.HEXA=function(ne){var oe=et.HEX(ne);return oe.a=H(ne,"a")?R(255*ne.a):"0xFF",oe},d[r.RGB]=function(ne,oe){return H(ne,"a")&&delete ne.a,ot(ne,oe)},d.RGBA=function(ne,oe){return ne.a=H(ne,"a")?G(ne.a):1,ot(ne,oe)},d[r.HSL]=function(ne,oe){var ce=K(ne.r,ne.g,ne.b);return delete ce.a,at(ce,oe)},d.HSLA=function(ne,oe){var ce=et.HSL(ne,oe);return ce.a=H(ne,"a")?G(ne.a,oe):1,ce},d[r.CMYK]=function(ne,oe){return ut(j(ne.r,ne.g,ne.b),oe)},d.CMYKA=function(ne,oe){var ce=et.CMYK(ne,oe);return ce.a=H(ne,"a")?G(ne.a,oe):1,ce},d),rt=function(ne,oe,ce,ue){var pe=J(ne),me=typeof ne=="string",ge=tt(ne,pe),ye=typeof ne=="string"&&H(ge,"a")||typeof ne!="string"&&H(ne,"a"),ve=K(ge.r,ge.g,ge.b,ge.a);ye||delete ve.a;var xe=ce?ve.l/(oe+1):(100-ve.l)/(oe+1),_e=Array(oe).fill(null).map(function(Se,$e){return t(t({},ve),{l:ve.l+xe*($e+1)*(1-2*+ce)})});switch(pe){case r.HEX:default:return _e.map(function(Se){var $e=X(Se.h,Se.s,Se.l);return ye&&($e.a=Se.a),me?ye?w.HEX(ot(t(t({},$e),{a:G(255*$e.a)}),ue)):w.HEX(ot($e,ue)):ye?et.HEXA($e):et.HEX($e)});case r.RGB:return _e.map(function(Se){var $e=X(Se.h,Se.s,Se.l);return ye&&($e.a=Se.a),me?w.RGB(ot($e,ue)):ye?et.RGBA($e,ue):et.RGB($e,ue)});case r.HSL:return _e.map(function(Se){return me?w.HSL(at(Se,ue)):ye?et.HSLA(t(t({},X(Se.h,Se.s,Se.l)),{a:Se.a}),ue):et.HSL(X(Se.h,Se.s,Se.l),ue)})}},nt=((h={buildHarmony:function(ne,oe,ce,ue){var pe=J(ne),me=tt(ne,pe),ge=K(me.r,me.g,me.b,me.a),ye=typeof ne=="string"&&H(me,"a")||typeof ne!="string"&&H(ne,"a"),ve=typeof ne=="string";switch(pe){case r.HEX:default:return ye?this.HEXA(at(ge,0),oe,ce,ve):this.HEX(at(ge,0),oe,ce,ve);case r.HSL:return ye?this.HSLA(ge,oe,ce,ve,ue):this.HSL(ge,oe,ce,ve,ue);case r.RGB:return ye?this.RGBA(ge,oe,ce,ve,ue):this.RGB(ge,oe,ce,ve,ue)}}})[r.HEX]=function(ne,oe,ce,ue){return oe(ne,ce).map(function(pe){return ue?w.HEX(X(pe.h,pe.s,pe.l)):et.HEX(X(pe.h,pe.s,pe.l))})},h.HEXA=function(ne,oe,ce,ue){return oe(ne,ce).map(function(pe){return ue?w.HEX(t(t({},X(pe.h,pe.s,pe.l)),{a:255*N(pe.a)})):et.HEXA(t(t({},X(pe.h,pe.s,pe.l)),{a:N(pe.a)}))})},h[r.RGB]=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.RGB(ot(X(me.h,me.s,me.l),pe)):et.RGB(X(me.h,me.s,me.l),pe)})},h.RGBA=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.RGB(ot(t(t({},X(me.h,me.s,me.l)),{a:N(me.a)}),pe)):et.RGBA(t(t({},X(me.h,me.s,me.l)),{a:N(me.a)}),pe)})},h[r.HSL]=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.HSL(at({h:me.h,s:me.s,l:me.l},pe)):et.HSL(X(me.h,me.s,me.l),pe)})},h.HSLA=function(ne,oe,ce,ue,pe){return oe(ne,ce).map(function(me){return ue?w.HSL(at(t(t({},me),{a:N(me.a)}),pe)):et.HSLA(t(t({},X(me.h,me.s,me.l)),{a:N(me.a)}),pe)})},h),it=((l={mix:function(ne,oe){var ce,ue,pe,me,ge,ye,ve,xe,_e,Se,$e,Re,Ae,Ie,ke,Be=ne.map(function(We){var qe=J(We);return tt(We,qe)}),Ne=oe===i.SUBTRACTIVE?Be.map(function(We){var qe,ze,Ge,Ze,Dt,Je,Ut,jt,Ke,an,Zt,en,Kt,Wt,un=(qe=We.r,ze=We.g,Ge=We.b,Ze=Math.min(qe,ze,Ge),Dt=Math.min(255-qe,255-ze,255-Ge),Je=qe-Ze,Ut=ze-Ze,jt=Ge-Ze,Ke=Math.min(Je,Ut),an=Je-Ke,Zt=(Ut+Ke)/2,en=(jt+Ut-Ke)/2,Kt=Math.max(an,Zt,en)/Math.max(Je,Ut,jt),Wt=isNaN(Kt)||Kt===1/0||Kt<=0?1:Kt,{r:an/Wt+Dt,y:Zt/Wt+Dt,b:en/Wt+Dt});return H(We,"a")&&(un.a=We.a),un}):null;function Fe(We){var qe=oe===i.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return We.reduce(function(ze,Ge){var Ze=H(Ge,"a")?Ge.a:1,Dt={r:Math.min(ze.r+Ge.r*Ze,255),b:Math.min(ze.b+Ge.b*Ze,255),a:1-(1-Ze)*(1-ze.a)},Je="g"in ze?ze.g:ze.y,Ut="g"in Ge?Ge.g:Ge.y;return t(t({},Dt),oe===i.ADDITIVE?{g:Math.min(Je+Ut*Ze,255)}:{y:Math.min(Je+Ut*Ze,255)})},qe)}if(oe===i.ADDITIVE)ce=Fe(Be);else{var Ue=Fe(Ne);ue=Ue.r,pe=Ue.y,me=Ue.b,ge=Math.min(ue,pe,me),ye=Math.min(255-ue,255-pe,255-me),ve=ue-ge,xe=pe-ge,_e=me-ge,Se=Math.min(xe,_e),$e=ve+xe-Se,Re=xe+Se,Ae=2*(_e-Se),Ie=Math.max($e,Re,Ae)/Math.max(ve,xe,_e),ke=isNaN(Ie)||Ie===1/0||Ie<=0?1:Ie,(ce={r:$e/ke+ye,g:Re/ke+ye,b:Ae/ke+ye}).a=Ue.a}return{r:G(ce.r),g:G(ce.g),b:G(ce.b),a:k(ce.a,0,1)}}})[r.HEX]=function(ne,oe,ce){var ue=this.mix(ne,oe);return delete ue.a,ce?w.HEX(ue):et.HEX(ue)},l.HEXA=function(ne,oe,ce){var ue=this.mix(ne,oe);return ue.a=ce?255*N(ue.a):N(ue.a),ce?w.HEX(ue):et.HEXA(ue)},l[r.RGB]=function(ne,oe,ce,ue){var pe=this.mix(ne,oe);return delete pe.a,ce?w.RGB(pe):et.RGB(pe,ue)},l.RGBA=function(ne,oe,ce,ue){var pe=this.mix(ne,oe);return ce?w.RGB(pe):et.RGBA(pe,ue)},l[r.HSL]=function(ne,oe,ce,ue){var pe=this.mix(ne,oe),me=K(pe.r,pe.g,pe.b);return delete pe.a,delete me.a,ce?w.HSL(me):et.HSL(pe,ue)},l.HSLA=function(ne,oe,ce,ue){var pe=this.mix(ne,oe),me=K(pe.r,pe.g,pe.b,pe.a);return ce?w.HSL(me):et.HSLA(pe,ue)},l),ot=function(ne,oe){return t({r:G(ne.r,oe),g:G(ne.g,oe),b:G(ne.b,oe)},H(ne,"a")?{a:G(ne.a,oe)}:{})},at=function(ne,oe){return t({h:G(ne.h,oe),s:G(ne.s,oe),l:G(ne.l,oe)},H(ne,"a")?{a:G(ne.a,oe)}:{})},ut=function(ne,oe){return{c:G(ne.c,oe),m:G(ne.m,oe),y:G(ne.y,oe),k:G(ne.k,oe)}},ct=function(ne,oe,ce,ue,pe,me){var ge=pe(tt(ne,oe),ue);return ce?me(ge):ge},st=function(ne,oe,ce,ue,pe,me,ge){ce<1&&(ce=5);var ye=function(ve,xe,_e){var Se=_e-1,$e=(xe.r-ve.r)/Se,Re=(xe.g-ve.g)/Se,Ae=(xe.b-ve.b)/Se,Ie=N(ve.a),ke=(N(xe.a)-Ie)/Se;return Array(_e).fill(null).map(function(Be,Ne){return Ne===0?ve:Ne===Se?xe:{r:G(ve.r+$e*Ne),g:G(ve.g+Re*Ne),b:G(ve.b+Ae*Ne),a:G(Ie+ke*Ne)}})}(tt(ne),tt(oe),ce);return ye.map(function(ve){var xe=me(ve,pe);return ue?ge(xe):xe})},dt=function(){function ne(oe,ce){ce===void 0&&(ce=6),this.rgb=tt(oe),this._decimals=ce,this.updateHSL(),this.updateCMYK()}return ne.prototype.updateRGB=function(){this.rgb=t(t({},X(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},ne.prototype.updateRGBFromCMYK=function(){this.rgb=t(t({},Y(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},ne.prototype.updateHSL=function(){this.hsl=K(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},ne.prototype.updateCMYK=function(){this.cmyk=j(this.rgb.r,this.rgb.g,this.rgb.b)},ne.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},ne.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},ne.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},ne.prototype.setDecimals=function(oe){return this._decimals=oe,this},ne.prototype.setH=function(oe){return this.hsl.h=x(oe),this.updateRGBAndCMYK()},ne.prototype.setS=function(oe){return this.hsl.s=k(oe,0,100),this.updateRGBAndCMYK()},ne.prototype.setL=function(oe){return this.hsl.l=k(oe,0,100),this.updateRGBAndCMYK()},ne.prototype.setR=function(oe){return this.rgb.r=k(oe,0,255),this.updateHSLAndCMYK()},ne.prototype.setG=function(oe){return this.rgb.g=k(oe,0,255),this.updateHSLAndCMYK()},ne.prototype.setB=function(oe){return this.rgb.b=k(oe,0,255),this.updateHSLAndCMYK()},ne.prototype.setA=function(oe){return this.hsl.a=this.rgb.a=k(oe,0,1),this},ne.prototype.setC=function(oe){return this.cmyk.c=k(oe,0,100),this.updateRGBAndHSL()},ne.prototype.setM=function(oe){return this.cmyk.m=k(oe,0,100),this.updateRGBAndHSL()},ne.prototype.setY=function(oe){return this.cmyk.y=k(oe,0,100),this.updateRGBAndHSL()},ne.prototype.setK=function(oe){return this.cmyk.k=k(oe,0,100),this.updateRGBAndHSL()},Object.defineProperty(ne.prototype,"decimals",{get:function(){return this._decimals},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"H",{get:function(){return G(this.hsl.h,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"S",{get:function(){return G(this.hsl.s,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"L",{get:function(){return G(this.hsl.l,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"R",{get:function(){return G(this.rgb.r,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"G",{get:function(){return G(this.rgb.g,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"B",{get:function(){return G(this.rgb.b,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"A",{get:function(){return G(this.hsl.a,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"C",{get:function(){return G(this.cmyk.c,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"M",{get:function(){return G(this.cmyk.m,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"Y",{get:function(){return G(this.cmyk.y,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"K",{get:function(){return G(this.cmyk.k,this.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEXObject",{get:function(){return et.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEXAObject",{get:function(){return et.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGBAObject",{get:function(){return t(t({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSLAObject",{get:function(){return t(t({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYKAObject",{get:function(){return t(t({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEX",{get:function(){return w.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HEXA",{get:function(){return w.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGB",{get:function(){return w.RGB({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"RGBA",{get:function(){return w.RGB({r:this.R,g:this.G,b:this.B,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSL",{get:function(){return w.HSL({h:this.H,s:this.S,l:this.L})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"HSLA",{get:function(){return w.HSL({h:this.H,s:this.S,l:this.L,a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYK",{get:function(){return w.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"CMYKA",{get:function(){return w.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A})},enumerable:!1,configurable:!0}),ne.toHEX=function(oe,ce){ce===void 0&&(ce=!0);var ue=J(oe);return ct(oe,ue,ce,0,et.HEX,w.HEX)},ne.toHEXA=function(oe,ce){ce===void 0&&(ce=!0);var ue=J(oe);return ct(oe,ue,ce,0,et.HEXA,w.HEX)},ne.toRGB=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.RGB,w.RGB)},ne.toRGBA=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.RGBA,w.RGB)},ne.toHSL=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.HSL,w.HSL)},ne.toHSLA=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.HSLA,w.HSL)},ne.toCMYK=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.CMYK,w.CMYK)},ne.toCMYKA=function(oe,ce,ue){ce===void 0&&(ce=!0),ue===void 0&&(ue=6);var pe=J(oe);return ct(oe,pe,ce,ue,et.CMYKA,w.CMYK)},ne.getBlendHEX=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HEX,w.HEX)},ne.getBlendHEXA=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HEXA,w.HEX)},ne.getBlendRGB=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.RGB,w.RGB)},ne.getBlendRGBA=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.RGBA,w.RGB)},ne.getBlendHSL=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HSL,w.HSL)},ne.getBlendHSLA=function(oe,ce,ue,pe,me){return ue===void 0&&(ue=5),pe===void 0&&(pe=!0),me===void 0&&(me=6),st(oe,ce,ue,pe,me,et.HSLA,w.HSL)},ne.getMixHEX=function(oe,ce,ue){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),it.HEX(oe,ce,ue)},ne.getMixHEXA=function(oe,ce,ue){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),it.HEXA(oe,ce,ue)},ne.getMixRGB=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.RGB(oe,ce,ue,pe)},ne.getMixRGBA=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.RGBA(oe,ce,ue,pe)},ne.getMixHSL=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.HSL(oe,ce,ue,pe)},ne.getMixHSLA=function(oe,ce,ue,pe){return ce===void 0&&(ce=i.ADDITIVE),ue===void 0&&(ue=!0),pe===void 0&&(pe=6),it.HSLA(oe,ce,ue,pe)},ne.getShades=function(oe,ce,ue){return ue===void 0&&(ue=6),rt(oe,ce,!0,ue)},ne.getTints=function(oe,ce,ue){return ue===void 0&&(ue=6),rt(oe,ce,!1,ue)},ne.getHarmony=function(oe,ce,ue,pe){return ce===void 0&&(ce=n.COMPLEMENTARY),ue===void 0&&(ue=i.ADDITIVE),pe===void 0&&(pe=6),function(me,ge,ye,ve){var xe;return(xe={},xe[n.ANALOGOUS]=nt.buildHarmony(ge,U,ve,ye),xe[n.COMPLEMENTARY]=nt.buildHarmony(ge,q,ve,ye),xe[n.SPLIT_COMPLEMENTARY]=nt.buildHarmony(ge,$,ve,ye),xe[n.TRIADIC]=nt.buildHarmony(ge,_,ve,ye),xe[n.TETRADIC]=nt.buildHarmony(ge,Q,ve,ye),xe[n.SQUARE]=nt.buildHarmony(ge,z$1,ve,ye),xe)[me]}(ce,oe,pe,ue)},ne}();const defaultContext={current:void 0,parent:void 0,events:void 0,color:{source:2533018,destination:15753874,expanding:16733986,updating:16733986,generating:16771899,closing:11583173,end:15483002},scale:10,fill:"#000000",alpha:1};var earthRadius=63710088e-1,factors={centimeters:earthRadius*100,centimetres:earthRadius*100,degrees:earthRadius/111325,feet:earthRadius*3.28084,inches:earthRadius*39.37,kilometers:earthRadius/1e3,kilometres:earthRadius/1e3,meters:earthRadius,metres:earthRadius,miles:earthRadius/1609.344,millimeters:earthRadius*1e3,millimetres:earthRadius*1e3,nauticalmiles:earthRadius/1852,radians:1,yards:earthRadius*1.0936};function feature(ne,oe,ce){ce===void 0&&(ce={});var ue={type:"Feature"};return(ce.id===0||ce.id)&&(ue.id=ce.id),ce.bbox&&(ue.bbox=ce.bbox),ue.properties=oe||{},ue.geometry=ne,ue}function point(ne,oe,ce){if(ce===void 0&&(ce={}),!ne)throw new Error("coordinates is required");if(!Array.isArray(ne))throw new Error("coordinates must be an Array");if(ne.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!isNumber(ne[0])||!isNumber(ne[1]))throw new Error("coordinates must contain numbers");var ue={type:"Point",coordinates:ne};return feature(ue,oe,ce)}function lineString(ne,oe,ce){if(ce===void 0&&(ce={}),ne.length<2)throw new Error("coordinates must be an array of two or more positions");var ue={type:"LineString",coordinates:ne};return feature(ue,oe,ce)}function radiansToLength(ne,oe){oe===void 0&&(oe="kilometers");var ce=factors[oe];if(!ce)throw new Error(oe+" units is invalid");return ne*ce}function lengthToRadians(ne,oe){oe===void 0&&(oe="kilometers");var ce=factors[oe];if(!ce)throw new Error(oe+" units is invalid");return ne/ce}function degreesToRadians(ne){var oe=ne%360;return oe*Math.PI/180}function convertLength(ne,oe,ce){if(oe===void 0&&(oe="kilometers"),ce===void 0&&(ce="kilometers"),!(ne>=0))throw new Error("length must be a positive number");return radiansToLength(lengthToRadians(ne,oe),ce)}function isNumber(ne){return!isNaN(ne)&&ne!==null&&!Array.isArray(ne)}function getCoord(ne){if(!ne)throw new Error("coord is required");if(!Array.isArray(ne)){if(ne.type==="Feature"&&ne.geometry!==null&&ne.geometry.type==="Point")return ne.geometry.coordinates;if(ne.type==="Point")return ne.coordinates}if(Array.isArray(ne)&&ne.length>=2&&!Array.isArray(ne[0])&&!Array.isArray(ne[1]))return ne;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function featureOf(ne,oe,ce){if(!ne)throw new Error("No feature passed");if(!ce)throw new Error(".featureOf() requires a name");if(!ne||ne.type!=="Feature"||!ne.geometry)throw new Error("Invalid input to "+ce+", Feature with geometry required");if(!ne.geometry||ne.geometry.type!==oe)throw new Error("Invalid input to "+ce+": must be a "+oe+", given "+ne.geometry.type)}function distance(ne,oe,ce){ce===void 0&&(ce={});var ue=getCoord(ne),pe=getCoord(oe),me=degreesToRadians(pe[1]-ue[1]),ge=degreesToRadians(pe[0]-ue[0]),ye=degreesToRadians(ue[1]),ve=degreesToRadians(pe[1]),xe=Math.pow(Math.sin(me/2),2)+Math.pow(Math.sin(ge/2),2)*Math.cos(ye)*Math.cos(ve);return radiansToLength(2*Math.atan2(Math.sqrt(xe),Math.sqrt(1-xe)),ce.units)}function coordEach(ne,oe,ce){if(ne!==null)for(var ue,pe,me,ge,ye,ve,xe,_e=0,Se=0,$e,Re=ne.type,Ae=Re==="FeatureCollection",Ie=Re==="Feature",ke=Ae?ne.features.length:1,Be=0;Beve||Ae>xe||Ie>_e){ye=Se,ve=ue,xe=Ae,_e=Ie,me=0;return}var ke=lineString([ye,Se],ce.properties);if(oe(ke,ue,pe,Ie,me)===!1)return!1;me++,ye=Se})===!1)return!1}}})}function rhumbDistance(ne,oe,ce){ce===void 0&&(ce={});var ue=getCoord(ne),pe=getCoord(oe);pe[0]+=pe[0]-ue[0]>180?-360:ue[0]-pe[0]>180?360:0;var me=calculateRhumbDistance(ue,pe),ge=convertLength(me,"meters",ce.units);return ge}function calculateRhumbDistance(ne,oe,ce){ce=ce===void 0?earthRadius:Number(ce);var ue=ce,pe=ne[1]*Math.PI/180,me=oe[1]*Math.PI/180,ge=me-pe,ye=Math.abs(oe[0]-ne[0])*Math.PI/180;ye>Math.PI&&(ye-=2*Math.PI);var ve=Math.log(Math.tan(me/2+Math.PI/4)/Math.tan(pe/2+Math.PI/4)),xe=Math.abs(ve)>1e-11?ge/ve:Math.cos(pe),_e=Math.sqrt(ge*ge+xe*xe*ye*ye),Se=_e*ue;return Se}function pointToLineDistance(ne,oe,ce){if(ce===void 0&&(ce={}),ce.method||(ce.method="geodesic"),ce.units||(ce.units="kilometers"),!ne)throw new Error("pt is required");if(Array.isArray(ne)?ne=point(ne):ne.type==="Point"?ne=feature(ne):featureOf(ne,"Point","point"),!oe)throw new Error("line is required");Array.isArray(oe)?oe=lineString(oe):oe.type==="LineString"?oe=feature(oe):featureOf(oe,"LineString","line");var ue=1/0,pe=ne.geometry.coordinates;return segmentEach(oe,function(me){var ge=me.geometry.coordinates[0],ye=me.geometry.coordinates[1],ve=distanceToSegment(pe,ge,ye,ce);venew dt(ne).setA(oe??defaultContext.alpha).RGBA,getStrokeStyle=(ne,oe)=>getFillStyle(ne,oe);function transform(ne,oe){return{width:ne.width*oe.scale.x,height:ne.height*oe.scale.y,x:ne.x*oe.scale.x+oe.x,y:ne.y*oe.scale.y+oe.y}}const text={draw(ne,oe,ce){const ue=ne.label??ne.text;if(ue){const pe=transform(ne,{x:ne["label-x"]??ne.textX??0,y:ne["label-y"]??ne.textY??0,scale:{x:1,y:1}}),me=transform(pe,ce);oe.font=`${(ne["label-size"]??ne.fontSize??4)*ce.scale.x}px Inter`,oe.fillStyle=getFillStyle(ne["label-color"]??ne.fontColor??"grey",1),oe.fillText(ue,me.x,me.y)}},test(ne){return{left:-1/0,right:1/0,top:-1/0,bottom:1/0}},narrow(){return!0}},rect={draw(ne,oe,ce){const{x:ue,y:pe,width:me,height:ge}=transform(ne,ce);oe.fillStyle=getFillStyle(ne.fill,ne.alpha),oe.fillRect(ceil$1(ue),ceil$1(pe),ceil$1(me)||1,ceil$1(ge)||1)},test(ne){return{left:ne.x,right:ne.x+ne.width,top:ne.y,bottom:ne.y+ne.height}},narrow(){return!0}},circle={draw(ne,oe,ce){oe.fillStyle=getFillStyle(ne.fill,ne.alpha),oe.beginPath();const ue=transform({...ne,width:ne.radius,height:ne.radius},ce);oe.ellipse(ceil$1(ue.x),ceil$1(ue.y),ceil$1(ue.width),ceil$1(ue.height),0,0,2*PI),oe.fill()},test(ne){return{left:ne.x-ne.radius,right:ne.x+ne.radius,top:ne.y-ne.radius,bottom:ne.y+ne.radius}},narrow(){return!0}},polygon={draw(ne,oe,ce){const[ue,...pe]=ne.points;oe.beginPath(),oe.fillStyle=getFillStyle(ne.fill,ne.alpha);const{x:me,y:ge}=transform({...ue,width:0,height:0},ce);oe.moveTo(ceil$1(me),ceil$1(ge));for(const ye of pe){const{x:ve,y:xe}=transform({...ye,width:0,height:0},ce);oe.lineTo(ceil$1(ve),ceil$1(xe))}oe.closePath(),oe.fill()},test(ne){var oe,ce,ue,pe;return{left:((oe=lodashExports.minBy(ne.points,"x"))==null?void 0:oe.x)??0,right:((ce=lodashExports.maxBy(ne.points,"x"))==null?void 0:ce.x)??0,top:((ue=lodashExports.minBy(ne.points,"y"))==null?void 0:ue.y)??0,bottom:((pe=lodashExports.maxBy(ne.points,"y"))==null?void 0:pe.y)??0}},narrow(){return!0}},path={draw(ne,oe,ce){const[ue,...pe]=ne.points;oe.beginPath(),oe.lineCap="round",oe.lineJoin="round",oe.strokeStyle=getStrokeStyle(ne.fill,ne.alpha);const{x:me,y:ge,width:ye}=transform({...ue,width:ne["line-width"]??ne.lineWidth,height:0},ce);oe.lineWidth=ceil$1(ye),oe.moveTo(ceil$1(me),ceil$1(ge));for(const ve of pe){const{x:xe,y:_e}=transform({...ve,width:0,height:0},ce);oe.lineTo(ceil$1(xe),ceil$1(_e))}oe.stroke()},test(ne){var ce,ue,pe,me;const oe=ne["line-width"]??ne.lineWidth;return{left:(((ce=lodashExports.minBy(ne.points,"x"))==null?void 0:ce.x)??0-oe??0)-1,right:(((ue=lodashExports.maxBy(ne.points,"x"))==null?void 0:ue.x)??0+oe??0)+1,top:(((pe=lodashExports.minBy(ne.points,"y"))==null?void 0:pe.y)??0-oe??0)-1,bottom:(((me=lodashExports.maxBy(ne.points,"y"))==null?void 0:me.y)??0+oe??0)+1}},narrow(ne,oe){return pointToLineDistance(point([oe.x,oe.y]),lineString(ne.points.map(({x:ce,y:ue})=>[ce,ue])))<500*ne.lineWidth}},primitives={text,path,rect,polygon,circle};var rgb$1={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},rgb=rgb$1;rgb.hsl=function(ne){var oe=ne[0]/255,ce=ne[1]/255,ue=ne[2]/255,pe=Math.min(oe,ce,ue),me=Math.max(oe,ce,ue),ge=me-pe,ye,ve,xe;return me===pe?ye=0:oe===me?ye=(ce-ue)/ge:ce===me?ye=2+(ue-oe)/ge:ue===me&&(ye=4+(oe-ce)/ge),ye=Math.min(ye*60,360),ye<0&&(ye+=360),xe=(pe+me)/2,me===pe?ve=0:xe<=.5?ve=ge/(me+pe):ve=ge/(2-me-pe),[ye,ve*100,xe*100]};const{log2,max:max$2}=Math,z=ne=>lodashExports.floor(log2(ne+1));function getTiles({right:ne,left:oe,bottom:ce,top:ue},pe){const me=max$2(z(ne-oe),z(ce-ue))-pe,ge=2**me,ye={left:lodashExports.floor(oe/ge),right:lodashExports.ceil((ne+1)/ge),top:lodashExports.floor(ue/ge),bottom:lodashExports.ceil((ce+1)/ge)};return{zoom:me,order:ge,tiles:lodashExports.shuffle(_default({x:lodashExports.range(ye.left,ye.right+1),y:lodashExports.range(ye.top,ye.bottom+1)}).map(ve=>{const xe=ve.x*ge,_e=ve.y*ge;return{tile:ve,bounds:{left:xe-ge/2,right:xe+ge/2,top:_e-ge/2,bottom:_e+ge/2}}}))}}const defaultBounds={top:0,left:0,right:1,bottom:1},isValue=ne=>lodashExports.isNumber(ne)&&!isNaN(ne),d2RendererWorkerUrl=""+new URL("D2Renderer.worker-32d1b7b8.js",import.meta.url).href;class D2RendererWorkerAdapter extends Worker{constructor(){super(d2RendererWorkerUrl,{type:"module"})}call(oe,ce,ue=[]){return this.postMessage({action:oe,payload:ce},ue)}on(oe,ce){const ue=pe=>{const{action:me,payload:ge}=pe.data;me===oe&&ce(ge)};return this.addEventListener("message",ue),()=>this.removeEventListener("message",ue)}}function intersect(ne,oe){return!(oe.left>=ne.right||oe.right<=ne.left||oe.top>=ne.bottom||oe.bottom<=ne.top)}const{max:max$1,min:min$1}=Math,_Tile=class K1 extends Sprite{constructor(oe,ce){super(oe),this.bounds=ce,this.destroying=!1,this.age=K1.age++}};_Tile.age=0;let Tile=_Tile;function handleNaN(ne,oe){return lodashExports.isNaN(ne)?oe:ne}var oa,wo,Bs,Ms,Fo,Wa,Ns,Fs,sd,ld,Z1,cd,Q1,Jl,td,ud,nd,dd,J1,hd,e0,fd,t0,pd,n0,rd,W1,od,q1,md,r0,ad,V1,gd,i0,yd,o0,bd,a0;class D2Renderer extends EventEmitter{constructor(){super(...arguments);ao(this,ld);ao(this,cd);ao(this,dd);ao(this,hd);ao(this,fd);ao(this,pd);ao(this,rd);ao(this,od);ao(this,md);ao(this,ad);ao(this,gd);ao(this,yd);ao(this,bd);ao(this,oa,void 0);ao(this,wo,void 0);ao(this,Bs,void 0);ao(this,Ms,void 0);ao(this,Fo,defaultD2RendererOptions);ao(this,Wa,[]);ao(this,Ns,new Bush(16));ao(this,Fs,void 0);ao(this,sd,0);ao(this,Jl,lodashExports.once(()=>lodashExports.debounce(()=>Ko(this,rd,W1).call(this),Vr(this,Fo).debounceInterval)));ao(this,td,lodashExports.once(()=>lodashExports.throttle(()=>Ko(this,od,q1).call(this),Vr(this,Fo).refreshInterval)));ao(this,ud,lodashExports.once(()=>lodashExports.throttle(ce=>Ko(this,md,r0).call(this,ce),Vr(this,Fo).refreshInterval)));ao(this,nd,lodashExports.once(()=>{if(typeof OffscreenCanvas>"u")return"OffscreenCanvas API is not supported by your system."}))}getInstance(){return{app:Vr(this,oa),viewport:Vr(this,wo)}}fitCamera(ce=lodashExports.constant(!0)){var pe,me,ge,ye;const ue=lodashExports.values(Vr(this,Ns).all()).flat().filter(ce);if(ue.length){const ve=lodashExports.reduce(ue,(xe,_e)=>({top:handleNaN(min$1(xe.top,_e.top),xe.top),left:handleNaN(min$1(xe.left,_e.left),xe.left),bottom:handleNaN(max$1(xe.bottom,_e.bottom),xe.bottom),right:handleNaN(max$1(xe.right,_e.right),xe.right)}),{bottom:-1/0,top:1/0,left:1/0,right:-1/0});(ye=(pe=Vr(this,wo))==null?void 0:pe.animate)==null||ye.call(pe,{position:new Point((ve.left+ve.right)/2,(ve.top+ve.bottom)/2),scale:((ge=(me=Vr(this,wo))==null?void 0:me.findFit)==null?void 0:ge.call(me,ve.right-ve.left,ve.bottom-ve.top))*.8,ease:"easeOutExpo",time:Vr(this,Fo).animationDuration*1.5,callbackOnComplete:()=>Vr(this,Jl).call(this)()})}}initialCamera(){var ce,ue;(ue=(ce=Vr(this,wo))==null?void 0:ce.animate)==null||ue.call(ce,{scale:1,ease:"easeOutExpo",time:Vr(this,Fo).animationDuration*1.5,callbackOnComplete:()=>Vr(this,Jl).call(this)()})}getView(){var ce;return(ce=Vr(this,oa))==null?void 0:ce.view}async toDataUrl(){var ce,ue,pe,me,ge;return(ue=(ce=Vr(this,oa))==null?void 0:ce.render)==null||ue.call(ce),(ge=(me=(pe=Vr(this,oa))==null?void 0:pe.view)==null?void 0:me.toDataURL)==null?void 0:ge.call(me)}setup(ce){if(Vr(this,nd).call(this))throw new Error(Vr(this,nd).call(this));const ue={...defaultD2RendererOptions,...ce};Ko(this,cd,Q1).call(this,ue),this.setOptions(ue),Ko(this,hd,e0).call(this,ue)}destroy(){lodashExports.map(Vr(this,Wa),ce=>ce.terminate()),Vr(this,oa).destroy()}add(ce){var me,ge;const ue=nanoid(),pe=ce.map(({component:ye,meta:ve})=>({...defaultBounds,...lodashExports.pickBy(primitives[ye.$].test(ye),isValue),component:ye,meta:ve,index:Ko(this,ld,Z1).call(this)}));return Vr(this,Ns).load(pe),(ge=(me=Vr(this,Wa))==null?void 0:me.forEach)==null||ge.call(me,ye=>ye.call("add",[ce,ue])),()=>requestIdleCallback(()=>{var ye,ve;for(const xe of pe)Vr(this,Ns).remove(xe);(ve=(ye=Vr(this,Wa))==null?void 0:ye.forEach)==null||ve.call(ye,xe=>xe.call("remove",[ue]))},{timeout:Vr(this,Fo).animationDuration})}setOptions(ce){const ue={...Vr(this,Fo),...ce};Ko(this,fd,t0).call(this,ue),Os(this,Fo,ue),Ko(this,rd,W1).call(this),Ko(this,od,q1).call(this)}}oa=new WeakMap,wo=new WeakMap,Bs=new WeakMap,Ms=new WeakMap,Fo=new WeakMap,Wa=new WeakMap,Ns=new WeakMap,Fs=new WeakMap,sd=new WeakMap,ld=new WeakSet,Z1=function(){return Y1(this,sd)._++},cd=new WeakSet,Q1=function(ce){Os(this,oa,new Application({backgroundAlpha:0,width:ce.screenSize.width,height:ce.screenSize.height,autoDensity:!0,resolution:2})),Os(this,wo,new ht({stopPropagation:!0,screenWidth:ce.screenSize.width,screenHeight:ce.screenSize.height,events:Vr(this,oa).renderer.events,passiveWheel:!1})),Vr(this,wo).on("clicked",ue=>{const{x:pe,y:me}=ue.world,ge=Vr(this,Ns).search({minX:pe,minY:me,maxX:pe+Number.MIN_VALUE,maxY:me+Number.MIN_VALUE}).filter(ye=>primitives[ye.component.$].narrow(ye.component,{x:pe,y:me}));this.emit("click",ue.event,{world:ue.world,components:ge})}),Vr(this,oa).stage.addChild(Vr(this,wo)),Vr(this,wo).drag().pinch().wheel().decelerate({friction:.98}).clampZoom({maxScale:300,minScale:1e-5}),Vr(this,wo).on("moved",()=>{Vr(this,Jl).call(this)(),Vr(this,td).call(this)()}),Vr(this,wo).on("mousemove",ue=>Vr(this,ud).call(this)(ue)),Os(this,Bs,new Container),Vr(this,wo).addChild(Vr(this,Bs)),Os(this,Ms,new Graphics),Vr(this,wo).addChild(Vr(this,Ms)),Os(this,Fs,new Graphics),Vr(this,wo).addChild(Vr(this,Fs)),Ko(this,dd,J1).call(this)},Jl=new WeakMap,td=new WeakMap,ud=new WeakMap,nd=new WeakMap,dd=new WeakSet,J1=function(){const{dynamicResolution:ce}=Vr(this,Fo),{dtMax:ue,dtMin:pe,increment:me,intervalMs:ge,maxScale:ye,minScale:ve}=ce,xe=lodashExports.floor(Ticker.targetFPMS*ge);let _e=0,Se=0,$e=1;Vr(this,oa).ticker.add(Re=>{const{tileResolution:Ae}=Vr(this,Fo);if(!(_e%xe)){const Ie=Se/xe;$e=lodashExports.clamp(Ie>=ue?$e+me:Ie<=pe?$e-me:$e,ve,ye),lodashExports.map(Vr(this,Wa),ke=>{ke.call("setTileResolution",[{width:lodashExports.ceil(Ae.width/$e),height:lodashExports.ceil(Ae.height/$e)}])}),Se=0}Se+=Re,_e++})},hd=new WeakSet,e0=function(ce){lodashExports.map(Vr(this,Wa),ue=>ue.terminate()),Os(this,Wa,lodashExports.times(ce.workerCount,ue=>{const pe=new D2RendererWorkerAdapter;return pe.on("update",me=>Ko(this,pd,n0).call(this,me)),pe.onerror=me=>{throw me},pe.call("setup",[{...ce,workerIndex:ue}]),pe}))},fd=new WeakSet,t0=function(ce){var me,ge,ye,ve;const{width:ue,height:pe}=ce.screenSize;(ye=(ge=(me=Vr(this,oa))==null?void 0:me.renderer)==null?void 0:ge.resize)==null||ye.call(ge,ue,pe),(ve=Vr(this,wo))==null||ve.resize(ue,pe),lodashExports.map(Vr(this,Wa),xe=>{xe.call("setTileResolution",[{width:lodashExports.ceil(ce.tileResolution.width),height:lodashExports.ceil(ce.tileResolution.height)}])})},pd=new WeakSet,n0=function({bounds:ce,bitmap:ue}){const pe=Texture.from(ue);Ko(this,gd,i0).call(this,pe,ce)},rd=new WeakSet,W1=function(){const{top:ce,bottom:ue,left:pe,right:me}=Vr(this,wo);lodashExports.map(Vr(this,Wa),ge=>ge.call("setFrustum",[{top:ce,bottom:ue,left:pe,right:me}]))},od=new WeakSet,q1=function(){var ge,ye,ve,xe,_e;const{tileSubdivision:ce,accentColor:ue}=Vr(this,Fo),{tiles:pe}=getTiles(Vr(this,wo),ce),me=Ko(this,ad,V1).call(this);(ge=Vr(this,Ms))==null||ge.clear(),(ye=Vr(this,Ms))==null||ye.lineStyle(1*me,ue,.5),(ve=Vr(this,Ms))==null||ve.beginFill(ue,.05);for(const{bounds:Se}of pe)lodashExports.find((xe=Vr(this,Bs))==null?void 0:xe.children,$e=>lodashExports.isEqual($e.bounds,Se))||(_e=Vr(this,Ms))==null||_e.drawRect(Se.left,Se.top,Se.right-Se.left,Se.bottom-Se.top)},md=new WeakSet,r0=function(ce){var ve;const{accentColor:ue}=Vr(this,Fo),pe=Ko(this,ad,V1).call(this),{x:me,y:ge}=Vr(this,wo).toWorld(ce.globalX,ce.globalY),ye=Vr(this,Ns).search({minX:me,minY:ge,maxX:me+Number.MIN_VALUE,maxY:ge+Number.MIN_VALUE}).filter(xe=>primitives[xe.component.$].narrow(xe.component,{x:me,y:ge}));Vr(this,Fs).clear();for(const xe of ye)Vr(this,Fs).lineStyle(2*pe,ue,"$info"in xe.component?1:.02),(ve=Vr(this,Fs))==null||ve.drawRect(xe.left,xe.top,xe.right-xe.left,xe.bottom-xe.top)},ad=new WeakSet,V1=function(){const{right:ce,left:ue}=Vr(this,wo),{width:pe}=Vr(this,Fo).screenSize;return(ce-ue)/pe},gd=new WeakSet,i0=async function(ce,ue){var ge,ye;const{tileSubdivision:pe}=Vr(this,Fo),{tiles:me}=getTiles(Vr(this,wo),pe);if(lodashExports.find(me,ve=>lodashExports.isEqual(ve.bounds,ue))){const ve={x:(ue.right-ue.left)/ce.width,y:(ue.bottom-ue.top)/ce.height},xe=new Tile(ce,ue);(ge=Vr(this,Bs))==null||ge.addChild(xe).setTransform(ue.left,ue.top,ve.x,ve.y),Vr(this,td).call(this)(),await Ko(this,yd,o0).call(this,xe),lodashExports.forEach((ye=Vr(this,Bs))==null?void 0:ye.children,async _e=>{intersect(_e.bounds,ue)&&_e.age{const me=ge=>{ce.alpha+=ge/Ticker.targetFPMS/Vr(this,Fo).animationDuration,ce.alpha>1&&(ue.remove(me),pe())};ce.alpha=0,ue.add(me)})},bd=new WeakSet,a0=function(ce){const ue=Vr(this,oa).ticker;return new Promise(pe=>{const me=ge=>{ce.alpha-=ge/Ticker.targetFPMS/Vr(this,Fo).animationDuration,ce.alpha<0&&(ue.remove(me),pe())};ce.alpha=1,ue.add(me)})};const D2Renderer$1=makeRenderer(D2Renderer,{components:["rect","circle","path","polygon"],id:"d2-renderer",name:"Pixel",description:"Comfortably performant 2D renderer",version:"1.0.0"}),renderers={"d2-renderer":D2Renderer$1};class NativeRendererTransport{constructor(oe){this.options=oe}async get(){const{hostname:oe}=url$2(this.options.url);return renderers[oe]}}const transports={native:{name:"Internal",constructor:NativeRendererTransport}};function RendererService(){const[{renderer:ne}]=useSettings(),[,oe]=useRenderers();return useAsync(async()=>{const ce=[];for(const{transport:ue,url:pe,key:me,disabled:ge}of ne??[])if(!ge){const ye=new transports[ue].constructor({url:pe});ce.push({key:me,url:pe,renderer:await ye.get()})}oe(()=>ce)},[JSON.stringify(ne),oe]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}const statusColor$1={connected:"success.light",connecting:"warning.light",error:"error.light",disabled:"text.disabled"};function RendererEditor({value:ne,onValueChange:oe}){const[ce]=useRenderers(),ue=usePaper(),pe=lodashExports$1.find(ce,{key:ne.key});function me(ye){oe==null||oe(merge$4(ne,ye))}const ge=ne!=null&&ne.disabled?"disabled":pe?"connected":"error";return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Flex,{alignItems:"center",py:1,children:jsxRuntimeExports.jsx(ManagedModal,{slotProps:{paper:{sx:{width:480}},popover:{anchorOrigin:{horizontal:-18,vertical:"bottom"}}},popover:!0,trigger:ye=>{var ve;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box$1,{className:ne.key,onClick:ye,flex:1,sx:{width:0,overflow:"hidden","> *":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:pe?`${pe.renderer.meta.name} ${pe.renderer.meta.version}`:lodashExports$1.startCase(ge)}),!!pe&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:pe.renderer.meta.description}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("span",{children:["Contributes"," ",lodashExports$1.join(pe.renderer.meta.components,", ")]})]})}),jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:[(ve=transports[ne==null?void 0:ne.transport])==null?void 0:ve.name,": ",(ne==null?void 0:ne.url)||"No URL"]})]}),jsxRuntimeExports.jsx(Chip$1,{sx:{minWidth:0,maxWidth:"fit-content",flex:1,mx:1,color:statusColor$1[ge],...lodashExports$1.omit(ue(1),"borderRadius")},size:"small",label:lodashExports$1.startCase(ge)}),jsxRuntimeExports.jsx(Tooltip$1,{title:`${ne.disabled?"Enable":"Disable"} Renderer`,children:jsxRuntimeExports.jsx(Box$1,{mr:-3,children:jsxRuntimeExports.jsx(Switch$2,{checked:!ne.disabled,onChange:(xe,_e)=>me({disabled:!_e})})})})]})},appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Edit Renderer"})},children:jsxRuntimeExports.jsxs(Box$1,{p:2.5,children:[jsxRuntimeExports.jsx(TextField$1,{autoFocus:!0,defaultValue:ne.url,onChange:ye=>me({url:ye.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Renderer Type",items:lodashExports$1.entries(transports).map(([ye,{name:ve}])=>({value:ye,label:ve})),fullWidth:!0,value:ne.transport,onChange:ye=>me({transport:ye})})]})})})})}function RendererListEditor(){const[{renderer:ne},oe]=useSettings();return jsxRuntimeExports.jsx(Box$1,{sx:{mx:-2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,editor:ce=>jsxRuntimeExports.jsx(RendererEditor,{value:ce}),icon:null,value:ne,onChange:lodashExports$1.debounce(ce=>oe(()=>({renderer:ce})),300),addItemLabel:"Add renderer",create:()=>({transport:defaultTransport,url:"",disabled:!0}),addItemExtras:jsxRuntimeExports.jsx(FeaturePickerButton,{icon:jsxRuntimeExports.jsx(ResetIcon,{}),onClick:()=>oe(()=>({renderer:defaultRenderers})),children:"Reset"}),onFocus:ce=>{const ue=lodashExports$1.head(document.getElementsByClassName(ce));ue&&"click"in ue&&typeof ue.click=="function"&&ue.click()}})})}function useConnectionStatus(ne){const[{connections:oe}]=useLoading(),ce=useConnectionResolver(),[{remote:ue}]=useSettings(),pe=lodashExports$1.find(ue,{url:ne});return pe&&!(pe!=null&&pe.disabled)?ce({url:ne})?"connected":oe?"connecting":ne?"error":"not-connected":"not-connected"}const statusColor={connected:"success.light",connecting:"warning.light",error:"error.light","not-connected":"text.disabled"};function ServerEditor({value:ne,onValueChange:oe}){const ce=useConnection(ne.url),ue=usePaper(),pe=useConnectionStatus(ne.url),me=reactExports.useMemo(()=>debounce$2(ge=>{oe==null||oe(merge$4(ne,ge))},300),[oe,ne]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Flex,{alignItems:"center",children:jsxRuntimeExports.jsx(ManagedModal,{slotProps:{paper:{sx:{width:480}},popover:{anchorOrigin:{horizontal:-18,vertical:"bottom"}}},popover:!0,trigger:ge=>{var ye;return jsxRuntimeExports.jsxs(Stack$1,{direction:"row",flex:1,alignItems:"center",sx:{py:1,mr:-3},children:[jsxRuntimeExports.jsxs(Stack$1,{className:ne.key,direction:"row",flex:1,alignItems:"center",onClick:ge,children:[jsxRuntimeExports.jsxs(Box$1,{flex:1,sx:{width:0,overflow:"hidden","> *":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:ce?`${ce.name} ${ce.version}`:lodashExports$1.startCase(pe)}),!!(ce!=null&&ce.description)&&jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:ce.description}),jsxRuntimeExports.jsxs(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:[(ye=transports$1[ne==null?void 0:ne.transport])==null?void 0:ye.name,": ",(ne==null?void 0:ne.url)||"No URL"]})]}),jsxRuntimeExports.jsx(Chip$1,{sx:{flex:1,minWidth:0,maxWidth:"fit-content",mx:1,color:statusColor[pe],...lodashExports$1.omit(ue(1),"borderRadius")},size:"small",label:lodashExports$1.startCase(pe)})]}),jsxRuntimeExports.jsx(Tooltip$1,{title:`${ne.disabled?"Enable":"Disable"} adapter`,children:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Switch$2,{defaultChecked:!ne.disabled,onChange:(ve,xe)=>me({disabled:!xe})})})})]})},appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Edit Adapter"})},children:jsxRuntimeExports.jsxs(Box$1,{p:2.5,children:[jsxRuntimeExports.jsx(TextField$1,{autoFocus:!0,defaultValue:ne.url,onChange:ge=>me({url:ge.target.value}),fullWidth:!0,variant:"filled",label:"URL",sx:{mb:2}}),jsxRuntimeExports.jsx(SelectField,{placeholder:"Connection Type",items:lodashExports$1.entries(transports$1).map(([ge,{name:ye}])=>({value:ge,label:ye})),fullWidth:!0,value:ne.transport,onChange:ge=>me({transport:ge})})]})})})})}function ServerListEditor(){const[{remote:ne},oe]=useSettings();return jsxRuntimeExports.jsx(Box$1,{sx:{mx:-2},children:jsxRuntimeExports.jsx(ListEditor,{sortable:!0,editor:ce=>jsxRuntimeExports.jsx(ServerEditor,{value:ce}),icon:null,value:ne,onChange:lodashExports$1.debounce(ce=>oe(()=>({remote:ce})),300),addItemLabel:"Add adapter",create:()=>({transport:defaultTransport,url:"",disabled:!0}),addItemExtras:jsxRuntimeExports.jsx(FeaturePickerButton,{icon:jsxRuntimeExports.jsx(ResetIcon,{}),onClick:()=>oe(()=>({remote:defaultRemotes})),children:"Reset"}),onFocus:ce=>{const ue=lodashExports$1.head(document.getElementsByClassName(ce));ue&&"click"in ue&&typeof ue.click=="function"&&ue.click()}})})}const logo$1=""+new URL("logo512-23eace97.png",import.meta.url).href,contacts=[{name:"Dr Daniel Harabor",email:"daniel.harabor@monash.edu"},{name:"Dr Michael Wybrow",email:"michael.wybrow@monash.edu"},{name:"Kevin Zheng",email:"kevin.zheng@monash.edu"},{name:"Francis Anthony",email:"fant0003@student.monash.edu"},{name:"Karan Batta",email:"krnbatta@gmail.com"},{name:"Jay Wingate",email:"jaypeterwingate@gmail.com"},{name:"Leo Whitehead",email:"leo@whiteheadsoftware.dev"},{name:"Can Wang",email:"camwang@outlook.com"},{name:"Rory Tobin-Underwood",email:"rorytu@gmail.com"}];function parseUrl(ne){const oe=new URL(ne);return lodashExports$1.trimEnd(`${oe.hostname}${oe.pathname}`,"/")}function AboutContent(){function ne(oe,ce){return jsxRuntimeExports.jsxs(Box$1,{sx:{pt:2},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:oe}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",children:ce})]})}return jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(Box$1,{sx:{pt:0,pb:2},children:jsxRuntimeExports.jsx("img",{src:logo$1,height:"64"})}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:name}),ne("Build Info",jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:version_name})),ne("Team",jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(List$2,{sx:{mx:-2},children:contacts.map(({name:oe,email:ce},ue)=>jsxRuntimeExports.jsxs(ListItemButton$1,{href:`mailto:${ce}`,children:[jsxRuntimeExports.jsx(ListItemAvatar$1,{children:jsxRuntimeExports.jsx(Avatar$1,{children:lodashExports$1.head(oe)})}),jsxRuntimeExports.jsx(ListItemText$1,{primary:oe,secondary:ce})]},ue))})})),ne("Resources",jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(List$2,{sx:{mx:-2},children:[jsxRuntimeExports.jsxs(ListItemButton$1,{target:"_blank",href:homepage,children:[jsxRuntimeExports.jsx(ListItemAvatar$1,{children:jsxRuntimeExports.jsx(Avatar$1,{sx:{width:24,height:24},src:logo$1})}),jsxRuntimeExports.jsx(ListItemText$1,{primary:"Home",secondary:parseUrl(homepage)})]}),jsxRuntimeExports.jsxs(ListItemButton$1,{target:"_blank",href:repository,children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(GitHub,{})}),jsxRuntimeExports.jsx(ListItemText$1,{primary:"Repository",secondary:parseUrl(repository)})]})]})}))]})}const formatLabel=ne=>`${ne}x`;function SettingsPage({template:ne}){const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),me=useSmallDisplay(),[ge,ye]=useUIState(),ve=useSnackbar(),xe=useBusyState("reset"),[{"playback/playbackRate":_e=1,"appearance/acrylic":Se,"appearance/theme":$e="light","appearance/accentColor":Re="teal","behaviour/showOnStart":Ae},Ie]=useSettings(),[ke,Be]=reactExports.useState("general");function Ne(Ue){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"overline",color:"text.secondary",children:Ue})}function Fe(Ue){return jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body1",sx:{mr:4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:Ue})}return jsxRuntimeExports.jsx(TabContext,{value:ke,children:jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"settings"}),jsxRuntimeExports.jsx(ne.Title,{children:"Settings"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsxs(TabList$1,{onChange:(Ue,We)=>Be(We),children:[jsxRuntimeExports.jsx(Tab$1,{label:"General",value:"general"}),jsxRuntimeExports.jsx(Tab$1,{label:"Extensions",value:"connections"}),jsxRuntimeExports.jsx(Tab$1,{label:"Security",value:"security"}),jsxRuntimeExports.jsx(Tab$1,{label:"About",value:"about"})]})}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{vertical:!0,children:jsxRuntimeExports.jsx(Scroll,{y:!0,children:jsxRuntimeExports.jsxs(Flex,{vertical:!0,pt:6,children:[jsxRuntimeExports.jsx(TabPanel$1,{value:"general",sx:{p:2},children:jsxRuntimeExports.jsxs(Box$1,{children:[Ne("Playback"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Playback rate"),jsxRuntimeExports.jsx(Slider$1,{sx:{maxWidth:320,mr:2},marks:[1,2,5,10].map(Ue=>({value:Ue*defaultPlaybackRate,label:formatLabel(Ue)})),step:1*defaultPlaybackRate,min:1*defaultPlaybackRate,max:10*defaultPlaybackRate,valueLabelFormat:Ue=>formatLabel(Ue/defaultPlaybackRate),valueLabelDisplay:"auto",defaultValue:_e,onChangeCommitted:(Ue,We)=>Ie(()=>({"playback/playbackRate":We}))})]}),Ne("Appearance"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Acrylic"),jsxRuntimeExports.jsx(Switch$2,{defaultChecked:!!Se,onChange:(Ue,We)=>Ie(()=>({"appearance/acrylic":We}))})]}),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Dark mode"),jsxRuntimeExports.jsx(Space,{flex:1}),jsxRuntimeExports.jsx(Switch$2,{defaultChecked:$e==="dark",onChange:(Ue,We)=>Ie(()=>({"appearance/theme":We?"dark":"light"}))})]}),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Accent"),jsxRuntimeExports.jsx(Box$1,{sx:{p:1},children:jsxRuntimeExports.jsx(FeaturePicker,{paper:!0,value:Re,items:lodashExports$1.map(shades,Ue=>({id:Ue,name:lodashExports$1.startCase(Ue),icon:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Box$1,{sx:{ml:.5,width:12,height:12,backgroundColor:getShade(Ue,$e),borderRadius:4}})})})),arrow:!0,onChange:Ue=>Ie(()=>({"appearance/accentColor":Ue}))})})]}),Ne("Behaviour"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Show explore on start-up"),jsxRuntimeExports.jsx(Switch$2,{defaultChecked:!!Ae,onChange:(Ue,We)=>Ie(()=>({"behaviour/showOnStart":We?"explore":void 0}))})]}),Ne("Advanced"),jsxRuntimeExports.jsxs(Flex,{alignItems:"center",justifyContent:"space-between",children:[Fe("Reset settings and extensions"),jsxRuntimeExports.jsx(ManagedModal,{trigger:Ue=>jsxRuntimeExports.jsx(Button,{sx:{mx:1},color:"error",startIcon:jsxRuntimeExports.jsx(RestartAltOutlined,{}),onClick:Ue,children:"Reset now"}),appBar:{children:jsxRuntimeExports.jsx(AppBarTitle,{children:"Reset settings and extensions"})},children:({close:Ue})=>jsxRuntimeExports.jsxs(Stack$1,{sx:{p:me?2:3,pt:2,gap:4},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",children:"If something's not working correctly, you can try to reset all settings and extensions. This cannot be undone."}),jsxRuntimeExports.jsxs(Stack$1,{direction:"row",justifyContent:"flex-end",gap:2,children:[jsxRuntimeExports.jsx(Button,{variant:"text",onClick:()=>{Ue()},children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:()=>{xe(async()=>{await wait(300),Ie(()=>defaults$3),Ue(),ye(()=>({sidebarOpen:!1,fullscreenModal:void 0})),ve("Reset complete")},"Resetting settings and extensions")},color:"error",startIcon:jsxRuntimeExports.jsx(RestartAltOutlined,{}),children:"Reset settings and extensions"})]})]})})]})]})}),jsxRuntimeExports.jsxs(TabPanel$1,{value:"connections",sx:{p:2},children:[jsxRuntimeExports.jsxs(Box$1,{children:[Ne("Adapters"),jsxRuntimeExports.jsx(ServerListEditor,{})]}),jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(Divider$1,{sx:{mb:2}}),Ne("Renderers"),jsxRuntimeExports.jsx(RendererListEditor,{})]}),jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(Divider$1,{sx:{mb:2}}),Ne("Map support"),jsxRuntimeExports.jsx(MapParserListEditor,{})]})]}),jsxRuntimeExports.jsxs(TabPanel$1,{value:"security",sx:{p:2},children:[Ne("Trusted origins"),jsxRuntimeExports.jsxs(Box$1,{sx:{maxWidth:480},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",variant:"caption",sx:{pt:2},children:"Rendering traces in the viewport and using advanced debugger features sometimes requires running third-party code."}),jsxRuntimeExports.jsx(Type$2,{component:"div",color:"text.secondary",variant:"caption",sx:{pt:2},children:"You'll be prompted to add origins when necessary, and you can stop trusting origins by removing them from this list."})]}),jsxRuntimeExports.jsx(Box$1,{sx:{pt:2},children:jsxRuntimeExports.jsx(TrustedOriginListEditor,{})})]}),jsxRuntimeExports.jsx(TabPanel$1,{value:"about",sx:{p:2},children:jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(AboutContent,{})})})]})})})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})})}const a=lodashExports$1.keys(mapParsers).map(ne=>({key:ne}));function Sink({children:ne}){return ne}function TrustedOriginListEditor(){const[{trustedOrigins:ne},oe]=useSettings(),ce=reactExports.useMemo(()=>lodashExports$1.map(ne,ue=>({key:ue})),[ne]);return jsxRuntimeExports.jsx(Box$1,{sx:{mx:-2},children:jsxRuntimeExports.jsx(ListEditor,{button:!1,sortable:!0,addable:!1,deletable:!0,editor:ue=>jsxRuntimeExports.jsx(Sink,{children:jsxRuntimeExports.jsx(ListItemText$1,{primary:ue.key})},ue.key),icon:null,value:ce,onChange:lodashExports$1.debounce(ue=>oe(()=>({trustedOrigins:lodashExports$1.map(ue,"key")})),300),create:()=>({key:""})})})}function MapParserListEditor(){return jsxRuntimeExports.jsx(Box$1,{sx:{mx:-2},children:jsxRuntimeExports.jsx(ListEditor,{button:!1,sortable:!0,addable:!1,deletable:!1,editor:ne=>jsxRuntimeExports.jsx(Sink,{children:jsxRuntimeExports.jsx(ListItemText$1,{primary:lodashExports$1.startCase(ne.key),secondary:`Support for *.${ne.key} maps`})},ne.key),icon:null,value:a,create:()=>({key:""})})})}const PUBLISH=0,SUBSCRIBE=1,RESET=2,VALUE=4;function compose(ne,oe){return ce=>ne(oe(ce))}function thrush(ne,oe){return oe(ne)}function curry2to1(ne,oe){return ce=>ne(oe,ce)}function curry1to0(ne,oe){return()=>ne(oe)}function tap(ne,oe){return oe(ne),ne}function tup(...ne){return ne}function call(ne){ne()}function always(ne){return()=>ne}function joinProc(...ne){return()=>{ne.map(call)}}function isDefined(ne){return ne!==void 0}function noop$4(){}function subscribe(ne,oe){return ne(SUBSCRIBE,oe)}function publish(ne,oe){ne(PUBLISH,oe)}function reset(ne){ne(RESET)}function getValue(ne){return ne(VALUE)}function connect(ne,oe){return subscribe(ne,curry2to1(oe,PUBLISH))}function handleNext(ne,oe){const ce=ne(SUBSCRIBE,ue=>{ce(),oe(ue)});return ce}function stream(){const ne=[];return(oe,ce)=>{switch(oe){case RESET:ne.splice(0,ne.length);return;case SUBSCRIBE:return ne.push(ce),()=>{const ue=ne.indexOf(ce);ue>-1&&ne.splice(ue,1)};case PUBLISH:ne.slice().forEach(ue=>{ue(ce)});return;default:throw new Error(`unrecognized action ${oe}`)}}}function statefulStream(ne){let oe=ne;const ce=stream();return(ue,pe)=>{switch(ue){case SUBSCRIBE:pe(oe);break;case PUBLISH:oe=pe;break;case VALUE:return oe}return ce(ue,pe)}}function eventHandler(ne){let oe,ce;const ue=()=>oe&&oe();return function(pe,me){switch(pe){case SUBSCRIBE:return me?ce===me?void 0:(ue(),ce=me,oe=subscribe(ne,me),oe):(ue(),noop$4);case RESET:ue(),ce=null;return;default:throw new Error(`unrecognized action ${pe}`)}}}function streamFromEmitter(ne){return tap(stream(),oe=>connect(ne,oe))}function statefulStreamFromEmitter(ne,oe){return tap(statefulStream(oe),ce=>connect(ne,ce))}function combineOperators(...ne){return oe=>ne.reduceRight(thrush,oe)}function pipe(ne,...oe){const ce=combineOperators(...oe);return(ue,pe)=>{switch(ue){case SUBSCRIBE:return subscribe(ne,ce(pe));case RESET:reset(ne);return}}}function defaultComparator(ne,oe){return ne===oe}function distinctUntilChanged(ne=defaultComparator){let oe;return ce=>ue=>{ne(oe,ue)||(oe=ue,ce(ue))}}function filter(ne){return oe=>ce=>{ne(ce)&&oe(ce)}}function map$1(ne){return oe=>compose(oe,ne)}function mapTo(ne){return oe=>()=>oe(ne)}function scan(ne,oe){return ce=>ue=>ce(oe=ne(oe,ue))}function skip(ne){return oe=>ce=>{ne>0?ne--:oe(ce)}}function throttleTime(ne){let oe=null,ce;return ue=>pe=>{oe=pe,!ce&&(ce=setTimeout(()=>{ce=void 0,ue(oe)},ne))}}function debounceTime(ne){let oe,ce;return ue=>pe=>{oe=pe,ce&&clearTimeout(ce),ce=setTimeout(()=>{ue(oe)},ne)}}function withLatestFrom(...ne){const oe=new Array(ne.length);let ce=0,ue=null;const pe=Math.pow(2,ne.length)-1;return ne.forEach((me,ge)=>{const ye=Math.pow(2,ge);subscribe(me,ve=>{const xe=ce;ce=ce|ye,oe[ge]=ve,xe!==pe&&ce===pe&&ue&&(ue(),ue=null)})}),me=>ge=>{const ye=()=>me([ge].concat(oe));ce===pe?ye():ue=ye}}function merge(...ne){return function(oe,ce){switch(oe){case SUBSCRIBE:return joinProc(...ne.map(ue=>subscribe(ue,ce)));case RESET:return;default:throw new Error(`unrecognized action ${oe}`)}}}function duc(ne,oe=defaultComparator){return pipe(ne,distinctUntilChanged(oe))}function combineLatest(...ne){const oe=stream(),ce=new Array(ne.length);let ue=0;const pe=Math.pow(2,ne.length)-1;return ne.forEach((me,ge)=>{const ye=Math.pow(2,ge);subscribe(me,ve=>{ce[ge]=ve,ue=ue|ye,ue===pe&&publish(oe,ce)})}),function(me,ge){switch(me){case SUBSCRIBE:return ue===pe&&ge(ce),subscribe(oe,ge);case RESET:return reset(oe);default:throw new Error(`unrecognized action ${me}`)}}}function system(ne,oe=[],{singleton:ce}={singleton:!0}){return{id:id(),constructor:ne,dependencies:oe,singleton:ce}}const id=()=>Symbol();function init(ne){const oe=new Map,ce=({id:ue,constructor:pe,dependencies:me,singleton:ge})=>{if(ge&&oe.has(ue))return oe.get(ue);const ye=pe(me.map(ve=>ce(ve)));return ge&&oe.set(ue,ye),ye};return ce(ne)}function omit(ne,oe){const ce={},ue={};let pe=0;const me=ne.length;for(;pe(Ne[Fe]=Ue=>{const We=Be[oe.methods[Fe]];publish(We,Ue)},Ne),{})}function _e(Be){return ge.reduce((Ne,Fe)=>(Ne[Fe]=eventHandler(Be[oe.events[Fe]]),Ne),{})}const Se=React$2.forwardRef((Be,Ne)=>{const{children:Fe,...Ue}=Be,[We]=React$2.useState(()=>tap(init(ne),ze=>ve(ze,Ue))),[qe]=React$2.useState(curry1to0(_e,We));return useIsomorphicLayoutEffect$2(()=>{for(const ze of ge)ze in Ue&&subscribe(qe[ze],Ue[ze]);return()=>{Object.values(qe).map(reset)}},[Ue,qe,We]),useIsomorphicLayoutEffect$2(()=>{ve(We,Ue)}),React$2.useImperativeHandle(Ne,always(xe(We))),React$2.createElement(ye.Provider,{value:We},ce?React$2.createElement(ce,omit([...ue,...pe,...ge],Ue),Fe):Fe)}),$e=Be=>React$2.useCallback(curry2to1(publish,React$2.useContext(ye)[Be]),[Be]),Re=Be=>{const Fe=React$2.useContext(ye)[Be],Ue=React$2.useCallback(We=>subscribe(Fe,We),[Fe]);return React$2.useSyncExternalStore(Ue,()=>getValue(Fe),()=>getValue(Fe))},Ae=Be=>{const Fe=React$2.useContext(ye)[Be],[Ue,We]=React$2.useState(curry1to0(getValue,Fe));return useIsomorphicLayoutEffect$2(()=>subscribe(Fe,qe=>{qe!==Ue&&We(always(qe))}),[Fe,Ue]),Ue},Ie=React$2.version.startsWith("18")?Re:Ae;return{Component:Se,usePublisher:$e,useEmitterValue:Ie,useEmitter:(Be,Ne)=>{const Ue=React$2.useContext(ye)[Be];useIsomorphicLayoutEffect$2(()=>subscribe(Ue,Ne),[Ne,Ue])}}}const useIsomorphicLayoutEffect=typeof document<"u"?React$2.useLayoutEffect:React$2.useEffect,useIsomorphicLayoutEffect$1=useIsomorphicLayoutEffect;var LogLevel=(ne=>(ne[ne.DEBUG=0]="DEBUG",ne[ne.INFO=1]="INFO",ne[ne.WARN=2]="WARN",ne[ne.ERROR=3]="ERROR",ne))(LogLevel||{});const CONSOLE_METHOD_MAP={0:"debug",1:"log",2:"warn",3:"error"},getGlobalThis=()=>typeof globalThis>"u"?window:globalThis,loggerSystem=system(()=>{const ne=statefulStream(3);return{log:statefulStream((ce,ue,pe=1)=>{var me;const ge=(me=getGlobalThis().VIRTUOSO_LOG_LEVEL)!=null?me:getValue(ne);pe>=ge&&console[CONSOLE_METHOD_MAP[pe]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",ce,ue)}),logLevel:ne}},[],{singleton:!0});function useSizeWithElRef(ne,oe=!0){const ce=React$2.useRef(null);let ue=pe=>{};if(typeof ResizeObserver<"u"){const pe=React$2.useMemo(()=>new ResizeObserver(me=>{const ge=me[0].target;ge.offsetParent!==null&&ne(ge)}),[ne]);ue=me=>{me&&oe?(pe.observe(me),ce.current=me):(ce.current&&pe.unobserve(ce.current),ce.current=null)}}return{ref:ce,callbackRef:ue}}function useSize(ne,oe=!0){return useSizeWithElRef(ne,oe).callbackRef}function useChangedListContentsSizes(ne,oe,ce,ue,pe,me,ge){const ye=React$2.useCallback(ve=>{const xe=getChangedChildSizes(ve.children,oe,"offsetHeight",pe);let _e=ve.parentElement;for(;!_e.dataset.virtuosoScroller;)_e=_e.parentElement;const Se=_e.lastElementChild.dataset.viewportType==="window",$e=ge?ge.scrollTop:Se?window.pageYOffset||document.documentElement.scrollTop:_e.scrollTop,Re=ge?ge.scrollHeight:Se?document.documentElement.scrollHeight:_e.scrollHeight,Ae=ge?ge.offsetHeight:Se?window.innerHeight:_e.offsetHeight;ue({scrollTop:Math.max($e,0),scrollHeight:Re,viewportHeight:Ae}),me==null||me(resolveGapValue$1("row-gap",getComputedStyle(ve).rowGap,pe)),xe!==null&&ne(xe)},[ne,oe,pe,me,ge,ue]);return useSizeWithElRef(ye,ce)}function getChangedChildSizes(ne,oe,ce,ue){const pe=ne.length;if(pe===0)return null;const me=[];for(let ge=0;ge{const $e=Se.target,Re=$e===window||$e===document,Ae=Re?window.pageYOffset||document.documentElement.scrollTop:$e.scrollTop,Ie=Re?document.documentElement.scrollHeight:$e.scrollHeight,ke=Re?window.innerHeight:$e.offsetHeight,Be=()=>{ne({scrollTop:Math.max(Ae,0),scrollHeight:Ie,viewportHeight:ke})};Se.suppressFlushSync?Be():ReactDOM$1.flushSync(Be),ge.current!==null&&(Ae===ge.current||Ae<=0||Ae===Ie-ke)&&(ge.current=null,oe(!0),ye.current&&(clearTimeout(ye.current),ye.current=null))},[ne,oe]);React$2.useEffect(()=>{const Se=pe||me.current;return ue(pe||me.current),ve({target:Se,suppressFlushSync:!0}),Se.addEventListener("scroll",ve,{passive:!0}),()=>{ue(null),Se.removeEventListener("scroll",ve)}},[me,ve,ce,ue,pe]);function xe(Se){const $e=me.current;if(!$e||"offsetHeight"in $e&&$e.offsetHeight===0)return;const Re=Se.behavior==="smooth";let Ae,Ie,ke;$e===window?(Ie=Math.max(correctItemSize(document.documentElement,"height"),document.documentElement.scrollHeight),Ae=window.innerHeight,ke=document.documentElement.scrollTop):(Ie=$e.scrollHeight,Ae=correctItemSize($e,"height"),ke=$e.scrollTop);const Be=Ie-Ae;if(Se.top=Math.ceil(Math.max(Math.min(Be,Se.top),0)),approximatelyEqual(Ae,Ie)||Se.top===ke){ne({scrollTop:ke,scrollHeight:Ie,viewportHeight:Ae}),Re&&oe(!0);return}Re?(ge.current=Se.top,ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{ye.current=null,ge.current=null,oe(!0)},1e3)):ge.current=null,$e.scrollTo(Se)}function _e(Se){me.current.scrollBy(Se)}return{scrollerRef:me,scrollByCallback:_e,scrollToCallback:xe}}const domIOSystem=system(()=>{const ne=stream(),oe=stream(),ce=statefulStream(0),ue=stream(),pe=statefulStream(0),me=stream(),ge=stream(),ye=statefulStream(0),ve=statefulStream(0),xe=statefulStream(0),_e=statefulStream(0),Se=stream(),$e=stream(),Re=statefulStream(!1);return connect(pipe(ne,map$1(({scrollTop:Ae})=>Ae)),oe),connect(pipe(ne,map$1(({scrollHeight:Ae})=>Ae)),ge),connect(oe,pe),{scrollContainerState:ne,scrollTop:oe,viewportHeight:me,headerHeight:ye,fixedHeaderHeight:ve,fixedFooterHeight:xe,footerHeight:_e,scrollHeight:ge,smoothScrollTargetReached:ue,scrollTo:Se,scrollBy:$e,statefulScrollTop:pe,deviation:ce,scrollingInProgress:Re}},[],{singleton:!0}),NIL_NODE={lvl:0};function newAANode(ne,oe,ce,ue=NIL_NODE,pe=NIL_NODE){return{k:ne,v:oe,lvl:ce,l:ue,r:pe}}function empty(ne){return ne===NIL_NODE}function newTree(){return NIL_NODE}function remove(ne,oe){if(empty(ne))return NIL_NODE;const{k:ce,l:ue,r:pe}=ne;if(oe===ce){if(empty(ue))return pe;if(empty(pe))return ue;{const[me,ge]=last(ue);return adjust(clone(ne,{k:me,v:ge,l:deleteLast(ue)}))}}else return oeoe&&(ye=ye.concat(walkWithin(me,oe,ce))),ue>=oe&&ue<=ce&&ye.push({k:ue,v:pe}),ue<=ce&&(ye=ye.concat(walkWithin(ge,oe,ce))),ye}function walk(ne){return empty(ne)?[]:[...walk(ne.l),{k:ne.k,v:ne.v},...walk(ne.r)]}function last(ne){return empty(ne.r)?[ne.k,ne.v]:last(ne.r)}function deleteLast(ne){return empty(ne.r)?ne.l:adjust(clone(ne,{r:deleteLast(ne.r)}))}function clone(ne,oe){return newAANode(oe.k!==void 0?oe.k:ne.k,oe.v!==void 0?oe.v:ne.v,oe.lvl!==void 0?oe.lvl:ne.lvl,oe.l!==void 0?oe.l:ne.l,oe.r!==void 0?oe.r:ne.r)}function isSingle(ne){return empty(ne)||ne.lvl>ne.r.lvl}function rebalance(ne){return split(skew(ne))}function adjust(ne){const{l:oe,r:ce,lvl:ue}=ne;if(ce.lvl>=ue-1&&oe.lvl>=ue-1)return ne;if(ue>ce.lvl+1){if(isSingle(oe))return skew(clone(ne,{lvl:ue-1}));if(!empty(oe)&&!empty(oe.r))return clone(oe.r,{l:clone(oe,{r:oe.r.l}),r:clone(ne,{l:oe.r.r,lvl:ue-1}),lvl:ue});throw new Error("Unexpected empty nodes")}else{if(isSingle(ne))return split(clone(ne,{lvl:ue-1}));if(!empty(ce)&&!empty(ce.l)){const pe=ce.l,me=isSingle(pe)?ce.lvl-1:ce.lvl;return clone(pe,{l:clone(ne,{r:pe.l,lvl:ue-1}),r:split(clone(ce,{l:pe.r,lvl:me})),lvl:pe.lvl+1})}else throw new Error("Unexpected empty nodes")}}function rangesWithin(ne,oe,ce){if(empty(ne))return[];const ue=findMaxKeyValue(ne,oe)[0];return toRanges(walkWithin(ne,ue,ce))}function arrayToRanges(ne,oe){const ce=ne.length;if(ce===0)return[];let{index:ue,value:pe}=oe(ne[0]);const me=[];for(let ge=1;ge({index:oe,value:ce}))}function split(ne){const{r:oe,lvl:ce}=ne;return!empty(oe)&&!empty(oe.r)&&oe.lvl===ce&&oe.r.lvl===ce?clone(oe,{l:clone(ne,{r:oe.l}),lvl:ce+1}):ne}function skew(ne){const{l:oe}=ne;return!empty(oe)&&oe.lvl===ne.lvl?clone(oe,{r:clone(ne,{l:oe.r})}):ne}function findIndexOfClosestSmallerOrEqual(ne,oe,ce,ue=0){let pe=ne.length-1;for(;ue<=pe;){const me=Math.floor((ue+pe)/2),ge=ne[me],ye=ce(ge,oe);if(ye===0)return me;if(ye===-1){if(pe-ue<2)return me-1;pe=me-1}else{if(pe===ue)return me;ue=me+1}}throw new Error(`Failed binary finding record in array - ${ne.join(",")}, searched for ${oe}`)}function findClosestSmallerOrEqual(ne,oe,ce){return ne[findIndexOfClosestSmallerOrEqual(ne,oe,ce)]}function findRange(ne,oe,ce,ue){const pe=findIndexOfClosestSmallerOrEqual(ne,oe,ue),me=findIndexOfClosestSmallerOrEqual(ne,ce,ue,pe);return ne.slice(pe,me+1)}const recalcSystem=system(()=>({recalcInProgress:statefulStream(!1)}),[],{singleton:!0});function rangeIncludes(ne){const{size:oe,startIndex:ce,endIndex:ue}=ne;return pe=>pe.start===ce&&(pe.end===ue||pe.end===1/0)&&pe.value===oe}function affectedGroupCount(ne,oe){let ce=0,ue=0;for(;ce=_e||pe===$e)&&(ne=remove(ne,_e)):(xe=$e!==pe,ve=!0),Se>ge&&ge>=_e&&$e!==pe&&(ne=insert(ne,ge+1,$e));xe&&(ne=insert(ne,me,pe))}return[ne,ce]}function initialSizeState(){return{offsetTree:[],sizeTree:newTree(),groupOffsetTree:newTree(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function indexComparator({index:ne},oe){return oe===ne?0:oe0&&(oe=Math.max(oe,findClosestSmallerOrEqual(ne,ue,indexComparator).offset)),arrayToRanges(findRange(ne,oe,ce,offsetComparator),offsetPointParser)}function createOffsetTree(ne,oe,ce,ue){let pe=ne,me=0,ge=0,ye=0,ve=0;if(oe!==0){ve=findIndexOfClosestSmallerOrEqual(pe,oe-1,indexComparator),ye=pe[ve].offset;const _e=findMaxKeyValue(ce,oe-1);me=_e[0],ge=_e[1],pe.length&&pe[ve].size===findMaxKeyValue(ce,oe)[1]&&(ve-=1),pe=pe.slice(0,ve+1)}else pe=[];for(const{start:xe,value:_e}of rangesWithin(ce,oe,1/0)){const Se=xe-me,$e=Se*ge+ye+Se*ue;pe.push({offset:$e,size:_e,index:xe}),me=xe,ye=$e,ge=_e}return{offsetTree:pe,lastIndex:me,lastOffset:ye,lastSize:ge}}function sizeStateReducer(ne,[oe,ce,ue,pe]){oe.length>0&&ue("received item sizes",oe,LogLevel.DEBUG);const me=ne.sizeTree;let ge=me,ye=0;if(ce.length>0&&empty(me)&&oe.length===2){const $e=oe[0].size,Re=oe[1].size;ge=ce.reduce((Ae,Ie)=>insert(insert(Ae,Ie,$e),Ie+1,Re),ge)}else[ge,ye]=insertRanges(ge,oe);if(ge===me)return ne;const{offsetTree:ve,lastIndex:xe,lastSize:_e,lastOffset:Se}=createOffsetTree(ne.offsetTree,ye,ge,pe);return{sizeTree:ge,offsetTree:ve,lastIndex:xe,lastOffset:Se,lastSize:_e,groupOffsetTree:ce.reduce(($e,Re)=>insert($e,Re,offsetOf(Re,ve,pe)),newTree()),groupIndices:ce}}function offsetOf(ne,oe,ce){if(oe.length===0)return 0;const{offset:ue,index:pe,size:me}=findClosestSmallerOrEqual(oe,ne,indexComparator),ge=ne-pe,ye=me*ge+(ge-1)*ce+ue;return ye>0?ye+ce:ye}function isGroupLocation(ne){return typeof ne.groupIndex<"u"}function originalIndexFromLocation(ne,oe,ce){if(isGroupLocation(ne))return oe.groupIndices[ne.groupIndex]+1;{const ue=ne.index==="LAST"?ce:ne.index;let pe=originalIndexFromItemIndex(ue,oe);return pe=Math.max(0,pe,Math.min(ce,pe)),pe}}function originalIndexFromItemIndex(ne,oe){if(!hasGroups(oe))return ne;let ce=0;for(;oe.groupIndices[ce]<=ne+ce;)ce++;return ne+ce}function hasGroups(ne){return!empty(ne.groupOffsetTree)}function sizeTreeToRanges(ne){return walk(ne).map(({k:oe,v:ce},ue,pe)=>{const me=pe[ue+1],ge=me?me.k-1:1/0;return{startIndex:oe,endIndex:ge,size:ce}})}const SIZE_MAP={offsetHeight:"height",offsetWidth:"width"},sizeSystem=system(([{log:ne},{recalcInProgress:oe}])=>{const ce=stream(),ue=stream(),pe=statefulStreamFromEmitter(ue,0),me=stream(),ge=stream(),ye=statefulStream(0),ve=statefulStream([]),xe=statefulStream(void 0),_e=statefulStream(void 0),Se=statefulStream((We,qe)=>correctItemSize(We,SIZE_MAP[qe])),$e=statefulStream(void 0),Re=statefulStream(0),Ae=initialSizeState(),Ie=statefulStreamFromEmitter(pipe(ce,withLatestFrom(ve,ne,Re),scan(sizeStateReducer,Ae),distinctUntilChanged()),Ae),ke=statefulStreamFromEmitter(pipe(ve,distinctUntilChanged(),scan((We,qe)=>({prev:We.current,current:qe}),{prev:[],current:[]}),map$1(({prev:We})=>We)),[]);connect(pipe(ve,filter(We=>We.length>0),withLatestFrom(Ie,Re),map$1(([We,qe,ze])=>{const Ge=We.reduce((Ze,Dt,Je)=>insert(Ze,Dt,offsetOf(Dt,qe.offsetTree,ze)||Je),newTree());return{...qe,groupIndices:We,groupOffsetTree:Ge}})),Ie),connect(pipe(ue,withLatestFrom(Ie),filter(([We,{lastIndex:qe}])=>We[{startIndex:We,endIndex:qe,size:ze}])),ce),connect(xe,_e);const Be=statefulStreamFromEmitter(pipe(xe,map$1(We=>We===void 0)),!0);connect(pipe(_e,filter(We=>We!==void 0&&empty(getValue(Ie).sizeTree)),map$1(We=>[{startIndex:0,endIndex:0,size:We}])),ce);const Ne=streamFromEmitter(pipe(ce,withLatestFrom(Ie),scan(({sizes:We},[qe,ze])=>({changed:ze!==We,sizes:ze}),{changed:!1,sizes:Ae}),map$1(We=>We.changed)));subscribe(pipe(ye,scan((We,qe)=>({diff:We.prev-qe,prev:qe}),{diff:0,prev:0}),map$1(We=>We.diff)),We=>{const{groupIndices:qe}=getValue(Ie);if(We>0)publish(oe,!0),publish(me,We+affectedGroupCount(We,qe));else if(We<0){const ze=getValue(ke);ze.length>0&&(We-=affectedGroupCount(-We,ze)),publish(ge,We)}}),subscribe(pipe(ye,withLatestFrom(ne)),([We,qe])=>{We<0&&qe("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:ye},LogLevel.ERROR)});const Fe=streamFromEmitter(me);connect(pipe(me,withLatestFrom(Ie),map$1(([We,qe])=>{const ze=qe.groupIndices.length>0,Ge=[],Ze=qe.lastSize;if(ze){const Dt=find(qe.sizeTree,0);let Je=0,Ut=0;for(;Je{let Kt=an.ranges;return an.prevSize!==0&&(Kt=[...an.ranges,{startIndex:an.prevIndex,endIndex:Zt+We-1,size:an.prevSize}]),{ranges:Kt,prevIndex:Zt+We,prevSize:en}},{ranges:Ge,prevIndex:We,prevSize:0}).ranges}return walk(qe.sizeTree).reduce((Dt,{k:Je,v:Ut})=>({ranges:[...Dt.ranges,{startIndex:Dt.prevIndex,endIndex:Je+We-1,size:Dt.prevSize}],prevIndex:Je+We,prevSize:Ut}),{ranges:[],prevIndex:0,prevSize:Ze}).ranges})),ce);const Ue=streamFromEmitter(pipe(ge,withLatestFrom(Ie,Re),map$1(([We,{offsetTree:qe},ze])=>{const Ge=-We;return offsetOf(Ge,qe,ze)})));return connect(pipe(ge,withLatestFrom(Ie,Re),map$1(([We,qe,ze])=>{if(qe.groupIndices.length>0){if(empty(qe.sizeTree))return qe;let Ze=newTree();const Dt=getValue(ke);let Je=0,Ut=0,jt=0;for(;Je<-We;){jt=Dt[Ut];const an=Dt[Ut+1]-jt-1;Ut++,Je+=an+1}if(Ze=walk(qe.sizeTree).reduce((an,{k:Zt,v:en})=>insert(an,Math.max(0,Zt+We),en),Ze),Je!==-We){const an=find(qe.sizeTree,jt);Ze=insert(Ze,0,an);const Zt=findMaxKeyValue(qe.sizeTree,-We+1)[1];Ze=insert(Ze,1,Zt)}return{...qe,sizeTree:Ze,...createOffsetTree(qe.offsetTree,0,Ze,ze)}}else{const Ze=walk(qe.sizeTree).reduce((Dt,{k:Je,v:Ut})=>insert(Dt,Math.max(0,Je+We),Ut),newTree());return{...qe,sizeTree:Ze,...createOffsetTree(qe.offsetTree,0,Ze,ze)}}})),Ie),{data:$e,totalCount:ue,sizeRanges:ce,groupIndices:ve,defaultItemSize:_e,fixedItemSize:xe,unshiftWith:me,shiftWith:ge,shiftWithOffset:Ue,beforeUnshiftWith:Fe,firstItemIndex:ye,gap:Re,sizes:Ie,listRefresh:Ne,statefulTotalCount:pe,trackItemSizes:Be,itemSize:Se}},tup(loggerSystem,recalcSystem),{singleton:!0}),SUPPORTS_SCROLL_TO_OPTIONS=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function normalizeIndexLocation(ne){const oe=typeof ne=="number"?{index:ne}:ne;return oe.align||(oe.align="start"),(!oe.behavior||!SUPPORTS_SCROLL_TO_OPTIONS)&&(oe.behavior="auto"),oe.offset||(oe.offset=0),oe}const scrollToIndexSystem=system(([{sizes:ne,totalCount:oe,listRefresh:ce,gap:ue},{scrollingInProgress:pe,viewportHeight:me,scrollTo:ge,smoothScrollTargetReached:ye,headerHeight:ve,footerHeight:xe,fixedHeaderHeight:_e,fixedFooterHeight:Se},{log:$e}])=>{const Re=stream(),Ae=statefulStream(0);let Ie=null,ke=null,Be=null;function Ne(){Ie&&(Ie(),Ie=null),Be&&(Be(),Be=null),ke&&(clearTimeout(ke),ke=null),publish(pe,!1)}return connect(pipe(Re,withLatestFrom(ne,me,oe,Ae,ve,xe,$e),withLatestFrom(ue,_e,Se),map$1(([[Fe,Ue,We,qe,ze,Ge,Ze,Dt],Je,Ut,jt])=>{const Ke=normalizeIndexLocation(Fe),{align:an,behavior:Zt,offset:en}=Ke,Kt=qe-1,Wt=originalIndexFromLocation(Ke,Ue,Kt);let un=offsetOf(Wt,Ue.offsetTree,Je)+Ge;an==="end"?(un+=Ut+findMaxKeyValue(Ue.sizeTree,Wt)[1]-We+jt,Wt===Kt&&(un+=Ze)):an==="center"?un+=(Ut+findMaxKeyValue(Ue.sizeTree,Wt)[1]-We+jt)/2:un-=ze,en&&(un+=en);const Xt=nn=>{Ne(),nn?(Dt("retrying to scroll to",{location:Fe},LogLevel.DEBUG),publish(Re,Fe)):Dt("list did not change, scroll successful",{},LogLevel.DEBUG)};if(Ne(),Zt==="smooth"){let nn=!1;Be=subscribe(ce,vn=>{nn=nn||vn}),Ie=handleNext(ye,()=>{Xt(nn)})}else Ie=handleNext(pipe(ce,watchChangesFor(150)),Xt);return ke=setTimeout(()=>{Ne()},1200),publish(pe,!0),Dt("scrolling from index to",{index:Wt,top:un,behavior:Zt},LogLevel.DEBUG),{top:un,behavior:Zt}})),ge),{scrollToIndex:Re,topListHeight:Ae}},tup(sizeSystem,domIOSystem,loggerSystem),{singleton:!0});function watchChangesFor(ne){return oe=>{const ce=setTimeout(()=>{oe(!1)},ne);return ue=>{ue&&(oe(!0),clearTimeout(ce))}}}const UP="up",DOWN="down",NONE$1="none",INITIAL_BOTTOM_STATE={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},DEFAULT_AT_TOP_THRESHOLD=0,stateFlagsSystem=system(([{scrollContainerState:ne,scrollTop:oe,viewportHeight:ce,headerHeight:ue,footerHeight:pe,scrollBy:me}])=>{const ge=statefulStream(!1),ye=statefulStream(!0),ve=stream(),xe=stream(),_e=statefulStream(4),Se=statefulStream(DEFAULT_AT_TOP_THRESHOLD),$e=statefulStreamFromEmitter(pipe(merge(pipe(duc(oe),skip(1),mapTo(!0)),pipe(duc(oe),skip(1),mapTo(!1),debounceTime(100))),distinctUntilChanged()),!1),Re=statefulStreamFromEmitter(pipe(merge(pipe(me,mapTo(!0)),pipe(me,mapTo(!1),debounceTime(200))),distinctUntilChanged()),!1);connect(pipe(combineLatest(duc(oe),duc(Se)),map$1(([Ne,Fe])=>Ne<=Fe),distinctUntilChanged()),ye),connect(pipe(ye,throttleTime(50)),xe);const Ae=streamFromEmitter(pipe(combineLatest(ne,duc(ce),duc(ue),duc(pe),duc(_e)),scan((Ne,[{scrollTop:Fe,scrollHeight:Ue},We,qe,ze,Ge])=>{const Ze=Fe+We-Ue>-Ge,Dt={viewportHeight:We,scrollTop:Fe,scrollHeight:Ue};if(Ze){let Ut,jt;return Fe>Ne.state.scrollTop?(Ut="SCROLLED_DOWN",jt=Ne.state.scrollTop-Fe):(Ut="SIZE_DECREASED",jt=Ne.state.scrollTop-Fe||Ne.scrollTopDelta),{atBottom:!0,state:Dt,atBottomBecause:Ut,scrollTopDelta:jt}}let Je;return Dt.scrollHeight>Ne.state.scrollHeight?Je="SIZE_INCREASED":WeNe&&Ne.atBottom===Fe.atBottom))),Ie=statefulStreamFromEmitter(pipe(ne,scan((Ne,{scrollTop:Fe,scrollHeight:Ue,viewportHeight:We})=>{if(approximatelyEqual(Ne.scrollHeight,Ue))return{scrollTop:Fe,scrollHeight:Ue,jump:0,changed:!1};{const qe=Ue-(Fe+We)<1;return Ne.scrollTop!==Fe&&qe?{scrollHeight:Ue,scrollTop:Fe,jump:Ne.scrollTop-Fe,changed:!0}:{scrollHeight:Ue,scrollTop:Fe,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),filter(Ne=>Ne.changed),map$1(Ne=>Ne.jump)),0);connect(pipe(Ae,map$1(Ne=>Ne.atBottom)),ge),connect(pipe(ge,throttleTime(50)),ve);const ke=statefulStream(DOWN);connect(pipe(ne,map$1(({scrollTop:Ne})=>Ne),distinctUntilChanged(),scan((Ne,Fe)=>getValue(Re)?{direction:Ne.direction,prevScrollTop:Fe}:{direction:FeNe.direction)),ke),connect(pipe(ne,throttleTime(50),mapTo(NONE$1)),ke);const Be=statefulStream(0);return connect(pipe($e,filter(Ne=>!Ne),mapTo(0)),Be),connect(pipe(oe,throttleTime(100),withLatestFrom($e),filter(([Ne,Fe])=>!!Fe),scan(([Ne,Fe],[Ue])=>[Fe,Ue],[0,0]),map$1(([Ne,Fe])=>Fe-Ne)),Be),{isScrolling:$e,isAtTop:ye,isAtBottom:ge,atBottomState:Ae,atTopStateChange:xe,atBottomStateChange:ve,scrollDirection:ke,atBottomThreshold:_e,atTopThreshold:Se,scrollVelocity:Be,lastJumpDueToItemResize:Ie}},tup(domIOSystem)),propsReadySystem=system(([{log:ne}])=>{const oe=statefulStream(!1),ce=streamFromEmitter(pipe(oe,filter(ue=>ue),distinctUntilChanged()));return subscribe(oe,ue=>{ue&&getValue(ne)("props updated",{},LogLevel.DEBUG)}),{propsReady:oe,didMount:ce}},tup(loggerSystem),{singleton:!0});function skipFrames(ne,oe){ne==0?oe():requestAnimationFrame(()=>skipFrames(ne-1,oe))}function getInitialTopMostItemIndexNumber(ne,oe){const ce=oe-1;return typeof ne=="number"?ne:ne.index==="LAST"?ce:ne.index}const initialTopMostItemIndexSystem=system(([{sizes:ne,listRefresh:oe,defaultItemSize:ce},{scrollTop:ue},{scrollToIndex:pe},{didMount:me}])=>{const ge=statefulStream(!0),ye=statefulStream(0),ve=statefulStream(!1);return connect(pipe(me,withLatestFrom(ye),filter(([xe,_e])=>!!_e),mapTo(!1)),ge),subscribe(pipe(combineLatest(oe,me),withLatestFrom(ge,ne,ce,ve),filter(([[,xe],_e,{sizeTree:Se},$e,Re])=>xe&&(!empty(Se)||isDefined($e))&&!_e&&!Re),withLatestFrom(ye)),([,xe])=>{publish(ve,!0),skipFrames(3,()=>{handleNext(ue,()=>publish(ge,!0)),publish(pe,xe)})}),{scrolledToInitialItem:ge,initialTopMostItemIndex:ye}},tup(sizeSystem,domIOSystem,scrollToIndexSystem,propsReadySystem),{singleton:!0});function normalizeFollowOutput(ne){return ne?ne==="smooth"?"smooth":"auto":!1}const behaviorFromFollowOutput=(ne,oe)=>typeof ne=="function"?normalizeFollowOutput(ne(oe)):oe&&normalizeFollowOutput(ne),followOutputSystem=system(([{totalCount:ne,listRefresh:oe},{isAtBottom:ce,atBottomState:ue},{scrollToIndex:pe},{scrolledToInitialItem:me},{propsReady:ge,didMount:ye},{log:ve},{scrollingInProgress:xe}])=>{const _e=statefulStream(!1),Se=stream();let $e=null;function Re(Ie){publish(pe,{index:"LAST",align:"end",behavior:Ie})}subscribe(pipe(combineLatest(pipe(duc(ne),skip(1)),ye),withLatestFrom(duc(_e),ce,me,xe),map$1(([[Ie,ke],Be,Ne,Fe,Ue])=>{let We=ke&&Fe,qe="auto";return We&&(qe=behaviorFromFollowOutput(Be,Ne||Ue),We=We&&!!qe),{totalCount:Ie,shouldFollow:We,followOutputBehavior:qe}}),filter(({shouldFollow:Ie})=>Ie)),({totalCount:Ie,followOutputBehavior:ke})=>{$e&&($e(),$e=null),$e=handleNext(oe,()=>{getValue(ve)("following output to ",{totalCount:Ie},LogLevel.DEBUG),Re(ke),$e=null})});function Ae(Ie){const ke=handleNext(ue,Be=>{Ie&&!Be.atBottom&&Be.notAtBottomBecause==="SIZE_INCREASED"&&!$e&&(getValue(ve)("scrolling to bottom due to increased size",{},LogLevel.DEBUG),Re("auto"))});setTimeout(ke,100)}return subscribe(pipe(combineLatest(duc(_e),ne,ge),filter(([Ie,,ke])=>Ie&&ke),scan(({value:Ie},[,ke])=>({refreshed:Ie===ke,value:ke}),{refreshed:!1,value:0}),filter(({refreshed:Ie})=>Ie),withLatestFrom(_e,ne)),([,Ie])=>{Ae(Ie!==!1)}),subscribe(Se,()=>{Ae(getValue(_e)!==!1)}),subscribe(combineLatest(duc(_e),ue),([Ie,ke])=>{Ie&&!ke.atBottom&&ke.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&Re("auto")}),{followOutput:_e,autoscrollToBottom:Se}},tup(sizeSystem,stateFlagsSystem,scrollToIndexSystem,initialTopMostItemIndexSystem,propsReadySystem,loggerSystem,domIOSystem));function groupCountsToIndicesAndCount(ne){return ne.reduce((oe,ce)=>(oe.groupIndices.push(oe.totalCount),oe.totalCount+=ce+1,oe),{totalCount:0,groupIndices:[]})}const groupedListSystem=system(([{totalCount:ne,groupIndices:oe,sizes:ce},{scrollTop:ue,headerHeight:pe}])=>{const me=stream(),ge=stream(),ye=streamFromEmitter(pipe(me,map$1(groupCountsToIndicesAndCount)));return connect(pipe(ye,map$1(ve=>ve.totalCount)),ne),connect(pipe(ye,map$1(ve=>ve.groupIndices)),oe),connect(pipe(combineLatest(ue,ce,pe),filter(([ve,xe])=>hasGroups(xe)),map$1(([ve,xe,_e])=>findMaxKeyValue(xe.groupOffsetTree,Math.max(ve-_e,0),"v")[0]),distinctUntilChanged(),map$1(ve=>[ve])),ge),{groupCounts:me,topItemsIndexes:ge}},tup(sizeSystem,domIOSystem));function tupleComparator(ne,oe){return!!(ne&&ne[0]===oe[0]&&ne[1]===oe[1])}function rangeComparator(ne,oe){return!!(ne&&ne.startIndex===oe.startIndex&&ne.endIndex===oe.endIndex)}const TOP="top",BOTTOM="bottom",NONE="none";function getOverscan(ne,oe,ce){return typeof ne=="number"?ce===UP&&oe===TOP||ce===DOWN&&oe===BOTTOM?ne:0:ce===UP?oe===TOP?ne.main:ne.reverse:oe===BOTTOM?ne.main:ne.reverse}function getViewportIncrease(ne,oe){return typeof ne=="number"?ne:ne[oe]||0}const sizeRangeSystem=system(([{scrollTop:ne,viewportHeight:oe,deviation:ce,headerHeight:ue,fixedHeaderHeight:pe}])=>{const me=stream(),ge=statefulStream(0),ye=statefulStream(0),ve=statefulStream(0),xe=statefulStreamFromEmitter(pipe(combineLatest(duc(ne),duc(oe),duc(ue),duc(me,tupleComparator),duc(ve),duc(ge),duc(pe),duc(ce),duc(ye)),map$1(([_e,Se,$e,[Re,Ae],Ie,ke,Be,Ne,Fe])=>{const Ue=_e-Ne,We=ke+Be,qe=Math.max($e-Ue,0);let ze=NONE;const Ge=getViewportIncrease(Fe,TOP),Ze=getViewportIncrease(Fe,BOTTOM);return Re-=Ne,Re+=$e+Be,Ae+=$e+Be,Ae-=Ne,Re>_e+We-Ge&&(ze=UP),Ae<_e-qe+Se+Ze&&(ze=DOWN),ze!==NONE?[Math.max(Ue-$e-getOverscan(Ie,TOP,ze)-Ge,0),Ue-qe-Be+Se+getOverscan(Ie,BOTTOM,ze)+Ze]:null}),filter(_e=>_e!=null),distinctUntilChanged(tupleComparator)),[0,0]);return{listBoundary:me,overscan:ve,topListHeight:ge,increaseViewportBy:ye,visibleRange:xe}},tup(domIOSystem),{singleton:!0});function probeItemSet(ne,oe,ce){if(hasGroups(oe)){const ue=originalIndexFromItemIndex(ne,oe);return[{index:findMaxKeyValue(oe.groupOffsetTree,ue)[0],size:0,offset:0},{index:ue,size:0,offset:0,data:ce&&ce[0]}]}return[{index:ne,size:0,offset:0,data:ce&&ce[0]}]}const EMPTY_LIST_STATE={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function transposeItems(ne,oe,ce){if(ne.length===0)return[];if(!hasGroups(oe))return ne.map(xe=>({...xe,index:xe.index+ce,originalIndex:xe.index}));const ue=ne[0].index,pe=ne[ne.length-1].index,me=[],ge=rangesWithin(oe.groupOffsetTree,ue,pe);let ye,ve=0;for(const xe of ne){(!ye||ye.end0){xe=ne[0].offset;const Ie=ne[ne.length-1];_e=Ie.offset+Ie.size}const Se=ce-ve,$e=ye+Se*ge+(Se-1)*ue,Re=xe,Ae=$e-_e;return{items:transposeItems(ne,pe,me),topItems:transposeItems(oe,pe,me),topListHeight:oe.reduce((Ie,ke)=>ke.size+Ie,0),offsetTop:xe,offsetBottom:Ae,top:Re,bottom:_e,totalCount:ce,firstItemIndex:me}}function buildListStateFromItemCount(ne,oe,ce,ue,pe,me){let ge=0;if(ce.groupIndices.length>0)for(const _e of ce.groupIndices){if(_e-ge>=ne)break;ge++}const ye=ne+ge,ve=getInitialTopMostItemIndexNumber(oe,ye),xe=Array.from({length:ye}).map((_e,Se)=>({index:Se+ve,size:0,offset:0,data:me[Se+ve]}));return buildListState(xe,[],ye,pe,ce,ue)}const listStateSystem=system(([{sizes:ne,totalCount:oe,data:ce,firstItemIndex:ue,gap:pe},me,{visibleRange:ge,listBoundary:ye,topListHeight:ve},{scrolledToInitialItem:xe,initialTopMostItemIndex:_e},{topListHeight:Se},$e,{didMount:Re},{recalcInProgress:Ae}])=>{const Ie=statefulStream([]),ke=statefulStream(0),Be=stream();connect(me.topItemsIndexes,Ie);const Ne=statefulStreamFromEmitter(pipe(combineLatest(Re,Ae,duc(ge,tupleComparator),duc(oe),duc(ne),duc(_e),xe,duc(Ie),duc(ue),duc(pe),ce),filter(([qe,ze,,Ge,,,,,,,Ze])=>{const Dt=Ze&&Ze.length!==Ge;return qe&&!ze&&!Dt}),map$1(([,,[qe,ze],Ge,Ze,Dt,Je,Ut,jt,Ke,an])=>{const Zt=Ze,{sizeTree:en,offsetTree:Kt}=Zt,Wt=getValue(ke);if(Ge===0)return{...EMPTY_LIST_STATE,totalCount:Ge};if(qe===0&&ze===0)return Wt===0?{...EMPTY_LIST_STATE,totalCount:Ge}:buildListStateFromItemCount(Wt,Dt,Ze,jt,Ke,an||[]);if(empty(en))return Wt>0?null:buildListState(probeItemSet(getInitialTopMostItemIndexNumber(Dt,Ge),Zt,an),[],Ge,Ke,Zt,jt);const un=[];if(Ut.length>0){const Cn=Ut[0],Nt=Ut[Ut.length-1];let Yt=0;for(const Jt of rangesWithin(en,Cn,Nt)){const hn=Jt.value,Ye=Math.max(Jt.start,Cn),Xe=Math.min(Jt.end,Nt);for(let Pt=Ye;Pt<=Xe;Pt++)un.push({index:Pt,size:hn,offset:Yt,data:an&&an[Pt]}),Yt+=hn}}if(!Je)return buildListState([],un,Ge,Ke,Zt,jt);const Xt=Ut.length>0?Ut[Ut.length-1]+1:0,nn=rangesWithinOffsets(Kt,qe,ze,Xt);if(nn.length===0)return null;const vn=Ge-1,Sn=tap([],Cn=>{for(const Nt of nn){const Yt=Nt.value;let Jt=Yt.offset,hn=Nt.start;const Ye=Yt.size;if(Yt.offset=ze);Pt++)Cn.push({index:Pt,size:Ye,offset:Jt,data:an&&an[Pt]}),Jt+=Ye+Ke}});return buildListState(Sn,un,Ge,Ke,Zt,jt)}),filter(qe=>qe!==null),distinctUntilChanged()),EMPTY_LIST_STATE);connect(pipe(ce,filter(isDefined),map$1(qe=>qe==null?void 0:qe.length)),oe),connect(pipe(Ne,map$1(qe=>qe.topListHeight)),Se),connect(Se,ve),connect(pipe(Ne,map$1(qe=>[qe.top,qe.bottom])),ye),connect(pipe(Ne,map$1(qe=>qe.items)),Be);const Fe=streamFromEmitter(pipe(Ne,filter(({items:qe})=>qe.length>0),withLatestFrom(oe,ce),filter(([{items:qe},ze])=>qe[qe.length-1].originalIndex===ze-1),map$1(([,qe,ze])=>[qe-1,ze]),distinctUntilChanged(tupleComparator),map$1(([qe])=>qe))),Ue=streamFromEmitter(pipe(Ne,throttleTime(200),filter(({items:qe,topItems:ze})=>qe.length>0&&qe[0].originalIndex===ze.length),map$1(({items:qe})=>qe[0].index),distinctUntilChanged())),We=streamFromEmitter(pipe(Ne,filter(({items:qe})=>qe.length>0),map$1(({items:qe})=>{let ze=0,Ge=qe.length-1;for(;qe[ze].type==="group"&&zeze;)Ge--;return{startIndex:qe[ze].index,endIndex:qe[Ge].index}}),distinctUntilChanged(rangeComparator)));return{listState:Ne,topItemsIndexes:Ie,endReached:Fe,startReached:Ue,rangeChanged:We,itemsRendered:Be,initialItemCount:ke,...$e}},tup(sizeSystem,groupedListSystem,sizeRangeSystem,initialTopMostItemIndexSystem,scrollToIndexSystem,stateFlagsSystem,propsReadySystem,recalcSystem),{singleton:!0}),initialItemCountSystem=system(([{sizes:ne,firstItemIndex:oe,data:ce,gap:ue},{initialTopMostItemIndex:pe},{initialItemCount:me,listState:ge},{didMount:ye}])=>(connect(pipe(ye,withLatestFrom(me),filter(([,ve])=>ve!==0),withLatestFrom(pe,ne,oe,ue,ce),map$1(([[,ve],xe,_e,Se,$e,Re=[]])=>buildListStateFromItemCount(ve,xe,_e,Se,$e,Re))),ge),{}),tup(sizeSystem,initialTopMostItemIndexSystem,listStateSystem,propsReadySystem),{singleton:!0}),scrollSeekSystem=system(([{scrollVelocity:ne}])=>{const oe=statefulStream(!1),ce=stream(),ue=statefulStream(!1);return connect(pipe(ne,withLatestFrom(ue,oe,ce),filter(([pe,me])=>!!me),map$1(([pe,me,ge,ye])=>{const{exit:ve,enter:xe}=me;if(ge){if(ve(pe,ye))return!1}else if(xe(pe,ye))return!0;return ge}),distinctUntilChanged()),oe),subscribe(pipe(combineLatest(oe,ne,ce),withLatestFrom(ue)),([[pe,me,ge],ye])=>pe&&ye&&ye.change&&ye.change(me,ge)),{isSeeking:oe,scrollSeekConfiguration:ue,scrollVelocity:ne,scrollSeekRangeChanged:ce}},tup(stateFlagsSystem),{singleton:!0}),topItemCountSystem=system(([{topItemsIndexes:ne}])=>{const oe=statefulStream(0);return connect(pipe(oe,filter(ce=>ce>0),map$1(ce=>Array.from({length:ce}).map((ue,pe)=>pe))),ne),{topItemCount:oe}},tup(listStateSystem)),totalListHeightSystem=system(([{footerHeight:ne,headerHeight:oe,fixedHeaderHeight:ce,fixedFooterHeight:ue},{listState:pe}])=>{const me=stream(),ge=statefulStreamFromEmitter(pipe(combineLatest(ne,ue,oe,ce,pe),map$1(([ye,ve,xe,_e,Se])=>ye+ve+xe+_e+Se.offsetBottom+Se.bottom)),0);return connect(duc(ge),me),{totalListHeight:ge,totalListHeightChanged:me}},tup(domIOSystem,listStateSystem),{singleton:!0});function simpleMemoize(ne){let oe=!1,ce;return()=>(oe||(oe=!0,ce=ne()),ce)}const isMobileSafari=simpleMemoize(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),upwardScrollFixSystem=system(([{scrollBy:ne,scrollTop:oe,deviation:ce,scrollingInProgress:ue},{isScrolling:pe,isAtBottom:me,scrollDirection:ge,lastJumpDueToItemResize:ye},{listState:ve},{beforeUnshiftWith:xe,shiftWithOffset:_e,sizes:Se,gap:$e},{log:Re},{recalcInProgress:Ae}])=>{const Ie=streamFromEmitter(pipe(ve,withLatestFrom(ye),scan(([,Be,Ne,Fe],[{items:Ue,totalCount:We,bottom:qe,offsetBottom:ze},Ge])=>{const Ze=qe+ze;let Dt=0;return Ne===We&&Be.length>0&&Ue.length>0&&(Ue[0].originalIndex===0&&Be[0].originalIndex===0||(Dt=Ze-Fe,Dt!==0&&(Dt+=Ge))),[Dt,Ue,We,Ze]},[0,[],0,0]),filter(([Be])=>Be!==0),withLatestFrom(oe,ge,ue,me,Re,Ae),filter(([,Be,Ne,Fe,,,Ue])=>!Ue&&!Fe&&Be!==0&&Ne===UP),map$1(([[Be],,,,,Ne])=>(Ne("Upward scrolling compensation",{amount:Be},LogLevel.DEBUG),Be))));function ke(Be){Be>0?(publish(ne,{top:-Be,behavior:"auto"}),publish(ce,0)):(publish(ce,0),publish(ne,{top:-Be,behavior:"auto"}))}return subscribe(pipe(Ie,withLatestFrom(ce,pe)),([Be,Ne,Fe])=>{Fe&&isMobileSafari()?publish(ce,Ne-Be):ke(-Be)}),subscribe(pipe(combineLatest(statefulStreamFromEmitter(pe,!1),ce,Ae),filter(([Be,Ne,Fe])=>!Be&&!Fe&&Ne!==0),map$1(([Be,Ne])=>Ne),throttleTime(1)),ke),connect(pipe(_e,map$1(Be=>({top:-Be}))),ne),subscribe(pipe(xe,withLatestFrom(Se,$e),map$1(([Be,{lastSize:Ne,groupIndices:Fe,sizeTree:Ue},We])=>{function qe(ze){return ze*(Ne+We)}if(Fe.length===0)return qe(Be);{let ze=0;const Ge=find(Ue,0);let Ze=0,Dt=0;for(;ZeBe&&(ze-=Ge,Je=Be-Ze+1),Ze+=Je,ze+=qe(Je),Dt++}return ze}})),Be=>{publish(ce,Be),requestAnimationFrame(()=>{publish(ne,{top:Be}),requestAnimationFrame(()=>{publish(ce,0),publish(Ae,!1)})})}),{deviation:ce}},tup(domIOSystem,stateFlagsSystem,listStateSystem,sizeSystem,loggerSystem,recalcSystem)),initialScrollTopSystem=system(([{didMount:ne},{scrollTo:oe},{listState:ce}])=>{const ue=statefulStream(0);return subscribe(pipe(ne,withLatestFrom(ue),filter(([,pe])=>pe!==0),map$1(([,pe])=>({top:pe}))),pe=>{handleNext(pipe(ce,skip(1),filter(me=>me.items.length>1)),()=>{requestAnimationFrame(()=>{publish(oe,pe)})})}),{initialScrollTop:ue}},tup(propsReadySystem,domIOSystem,listStateSystem),{singleton:!0}),alignToBottomSystem=system(([{viewportHeight:ne},{totalListHeight:oe}])=>{const ce=statefulStream(!1),ue=statefulStreamFromEmitter(pipe(combineLatest(ce,ne,oe),filter(([pe])=>pe),map$1(([,pe,me])=>Math.max(0,pe-me)),throttleTime(0),distinctUntilChanged()),0);return{alignToBottom:ce,paddingTopAddition:ue}},tup(domIOSystem,totalListHeightSystem),{singleton:!0}),windowScrollerSystem=system(([{scrollTo:ne,scrollContainerState:oe}])=>{const ce=stream(),ue=stream(),pe=stream(),me=statefulStream(!1),ge=statefulStream(void 0);return connect(pipe(combineLatest(ce,ue),map$1(([{viewportHeight:ye,scrollTop:ve,scrollHeight:xe},{offsetTop:_e}])=>({scrollTop:Math.max(0,ve-_e),scrollHeight:xe,viewportHeight:ye}))),oe),connect(pipe(ne,withLatestFrom(ue),map$1(([ye,{offsetTop:ve}])=>({...ye,top:ye.top+ve}))),pe),{useWindowScroll:me,customScrollParent:ge,windowScrollContainerState:ce,windowViewportRect:ue,windowScrollTo:pe}},tup(domIOSystem)),defaultCalculateViewLocation=({itemTop:ne,itemBottom:oe,viewportTop:ce,viewportBottom:ue,locationParams:{behavior:pe,align:me,...ge}})=>neue?{...ge,behavior:pe,align:me??"end"}:null,scrollIntoViewSystem=system(([{sizes:ne,totalCount:oe,gap:ce},{scrollTop:ue,viewportHeight:pe,headerHeight:me,fixedHeaderHeight:ge,fixedFooterHeight:ye,scrollingInProgress:ve},{scrollToIndex:xe}])=>{const _e=stream();return connect(pipe(_e,withLatestFrom(ne,pe,oe,me,ge,ye,ue),withLatestFrom(ce),map$1(([[Se,$e,Re,Ae,Ie,ke,Be,Ne],Fe])=>{const{done:Ue,behavior:We,align:qe,calculateViewLocation:ze=defaultCalculateViewLocation,...Ge}=Se,Ze=originalIndexFromLocation(Se,$e,Ae-1),Dt=offsetOf(Ze,$e.offsetTree,Fe)+Ie+ke,Je=Dt+findMaxKeyValue($e.sizeTree,Ze)[1],Ut=Ne+ke,jt=Ne+Re-Be,Ke=ze({itemTop:Dt,itemBottom:Je,viewportTop:Ut,viewportBottom:jt,locationParams:{behavior:We,align:qe,...Ge}});return Ke?Ue&&handleNext(pipe(ve,filter(an=>an===!1),skip(getValue(ve)?1:2)),Ue):Ue&&Ue(),Ke}),filter(Se=>Se!==null)),xe),{scrollIntoView:_e}},tup(sizeSystem,domIOSystem,scrollToIndexSystem,listStateSystem,loggerSystem),{singleton:!0}),stateLoadSystem=system(([{sizes:ne,sizeRanges:oe},{scrollTop:ce},{initialTopMostItemIndex:ue},{didMount:pe},{useWindowScroll:me,windowScrollContainerState:ge,windowViewportRect:ye}])=>{const ve=stream(),xe=statefulStream(void 0),_e=statefulStream(null),Se=statefulStream(null);return connect(ge,_e),connect(ye,Se),subscribe(pipe(ve,withLatestFrom(ne,ce,me,_e,Se)),([$e,Re,Ae,Ie,ke,Be])=>{const Ne=sizeTreeToRanges(Re.sizeTree);Ie&&ke!==null&&Be!==null&&(Ae=ke.scrollTop-Be.offsetTop),$e({ranges:Ne,scrollTop:Ae})}),connect(pipe(xe,filter(isDefined),map$1(locationFromSnapshot)),ue),connect(pipe(pe,withLatestFrom(xe),filter(([,$e])=>$e!==void 0),distinctUntilChanged(),map$1(([,$e])=>$e.ranges)),oe),{getState:ve,restoreStateFrom:xe}},tup(sizeSystem,domIOSystem,initialTopMostItemIndexSystem,propsReadySystem,windowScrollerSystem));function locationFromSnapshot(ne){return{offset:ne.scrollTop,index:0,align:"start"}}const featureGroup1System=system(([ne,oe,ce,ue,pe,me,ge,ye,ve,xe])=>({...ne,...oe,...ce,...ue,...pe,...me,...ge,...ye,...ve,...xe}),tup(sizeRangeSystem,initialItemCountSystem,propsReadySystem,scrollSeekSystem,totalListHeightSystem,initialScrollTopSystem,alignToBottomSystem,windowScrollerSystem,scrollIntoViewSystem,loggerSystem)),listSystem=system(([{totalCount:ne,sizeRanges:oe,fixedItemSize:ce,defaultItemSize:ue,trackItemSizes:pe,itemSize:me,data:ge,firstItemIndex:ye,groupIndices:ve,statefulTotalCount:xe,gap:_e,sizes:Se},{initialTopMostItemIndex:$e,scrolledToInitialItem:Re},Ae,Ie,ke,{listState:Be,topItemsIndexes:Ne,...Fe},{scrollToIndex:Ue},We,{topItemCount:qe},{groupCounts:ze},Ge])=>(connect(Fe.rangeChanged,Ge.scrollSeekRangeChanged),connect(pipe(Ge.windowViewportRect,map$1(Ze=>Ze.visibleHeight)),Ae.viewportHeight),{totalCount:ne,data:ge,firstItemIndex:ye,sizeRanges:oe,initialTopMostItemIndex:$e,scrolledToInitialItem:Re,topItemsIndexes:Ne,topItemCount:qe,groupCounts:ze,fixedItemHeight:ce,defaultItemHeight:ue,gap:_e,...ke,statefulTotalCount:xe,listState:Be,scrollToIndex:Ue,trackItemSizes:pe,itemSize:me,groupIndices:ve,...Fe,...Ge,...Ae,sizes:Se,...Ie}),tup(sizeSystem,initialTopMostItemIndexSystem,domIOSystem,stateLoadSystem,followOutputSystem,listStateSystem,scrollToIndexSystem,upwardScrollFixSystem,topItemCountSystem,groupedListSystem,featureGroup1System)),WEBKIT_STICKY="-webkit-sticky",STICKY="sticky",positionStickyCssValue=simpleMemoize(()=>{if(typeof document>"u")return STICKY;const ne=document.createElement("div");return ne.style.position=WEBKIT_STICKY,ne.style.position===WEBKIT_STICKY?WEBKIT_STICKY:STICKY});function useWindowViewportRectRef(ne,oe){const ce=React$2.useRef(null),ue=React$2.useCallback(ye=>{if(ye===null||!ye.offsetParent)return;const ve=ye.getBoundingClientRect(),xe=ve.width;let _e,Se;if(oe){const $e=oe.getBoundingClientRect(),Re=ve.top-$e.top;_e=$e.height-Math.max(0,Re),Se=Re+oe.scrollTop}else _e=window.innerHeight-Math.max(0,ve.top),Se=ve.top+window.pageYOffset;ce.current={offsetTop:Se,visibleHeight:_e,visibleWidth:xe},ne(ce.current)},[ne,oe]),{callbackRef:pe,ref:me}=useSizeWithElRef(ue),ge=React$2.useCallback(()=>{ue(me.current)},[ue,me]);return React$2.useEffect(()=>{if(oe){oe.addEventListener("scroll",ge);const ye=new ResizeObserver(ge);return ye.observe(oe),()=>{oe.removeEventListener("scroll",ge),ye.unobserve(oe)}}else return window.addEventListener("scroll",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("scroll",ge),window.removeEventListener("resize",ge)}},[ge,oe]),pe}const VirtuosoMockContext=React$2.createContext(void 0),VirtuosoGridMockContext=React$2.createContext(void 0);function identity(ne){return ne}const listComponentPropsSystem=system(()=>{const ne=statefulStream(ve=>`Item ${ve}`),oe=statefulStream(null),ce=statefulStream(ve=>`Group ${ve}`),ue=statefulStream({}),pe=statefulStream(identity),me=statefulStream("div"),ge=statefulStream(noop$4),ye=(ve,xe=null)=>statefulStreamFromEmitter(pipe(ue,map$1(_e=>_e[ve]),distinctUntilChanged()),xe);return{context:oe,itemContent:ne,groupContent:ce,components:ue,computeItemKey:pe,headerFooterTag:me,scrollerRef:ge,FooterComponent:ye("Footer"),HeaderComponent:ye("Header"),TopItemListComponent:ye("TopItemList"),ListComponent:ye("List","div"),ItemComponent:ye("Item","div"),GroupComponent:ye("Group","div"),ScrollerComponent:ye("Scroller","div"),EmptyPlaceholder:ye("EmptyPlaceholder"),ScrollSeekPlaceholder:ye("ScrollSeekPlaceholder")}}),combinedSystem$2=system(([ne,oe])=>({...ne,...oe}),tup(listSystem,listComponentPropsSystem)),DefaultScrollSeekPlaceholder$1=({height:ne})=>React$2.createElement("div",{style:{height:ne}}),GROUP_STYLE={position:positionStickyCssValue(),zIndex:1,overflowAnchor:"none"},ITEM_STYLE$1={overflowAnchor:"none"},Items$1=React$2.memo(function({showTopList:oe=!1}){const ce=useEmitterValue$2("listState"),ue=usePublisher$2("sizeRanges"),pe=useEmitterValue$2("useWindowScroll"),me=useEmitterValue$2("customScrollParent"),ge=usePublisher$2("windowScrollContainerState"),ye=usePublisher$2("scrollContainerState"),ve=me||pe?ge:ye,xe=useEmitterValue$2("itemContent"),_e=useEmitterValue$2("context"),Se=useEmitterValue$2("groupContent"),$e=useEmitterValue$2("trackItemSizes"),Re=useEmitterValue$2("itemSize"),Ae=useEmitterValue$2("log"),Ie=usePublisher$2("gap"),{callbackRef:ke}=useChangedListContentsSizes(ue,Re,$e,oe?noop$4:ve,Ae,Ie,me),[Be,Ne]=React$2.useState(0);useEmitter$2("deviation",Ke=>{Be!==Ke&&Ne(Ke)});const Fe=useEmitterValue$2("EmptyPlaceholder"),Ue=useEmitterValue$2("ScrollSeekPlaceholder")||DefaultScrollSeekPlaceholder$1,We=useEmitterValue$2("ListComponent"),qe=useEmitterValue$2("ItemComponent"),ze=useEmitterValue$2("GroupComponent"),Ge=useEmitterValue$2("computeItemKey"),Ze=useEmitterValue$2("isSeeking"),Dt=useEmitterValue$2("groupIndices").length>0,Je=useEmitterValue$2("paddingTopAddition"),Ut=useEmitterValue$2("scrolledToInitialItem"),jt=oe?{}:{boxSizing:"border-box",paddingTop:ce.offsetTop+Je,paddingBottom:ce.offsetBottom,marginTop:Be,...Ut?{}:{visibility:"hidden"}};return!oe&&ce.totalCount===0&&Fe?React$2.createElement(Fe,contextPropIfNotDomElement(Fe,_e)):React$2.createElement(We,{...contextPropIfNotDomElement(We,_e),ref:ke,style:jt,"data-test-id":oe?"virtuoso-top-item-list":"virtuoso-item-list"},(oe?ce.topItems:ce.items).map(Ke=>{const an=Ke.originalIndex,Zt=Ge(an+ce.firstItemIndex,Ke.data,_e);return Ze?React$2.createElement(Ue,{...contextPropIfNotDomElement(Ue,_e),key:Zt,index:Ke.index,height:Ke.size,type:Ke.type||"item",...Ke.type==="group"?{}:{groupIndex:Ke.groupIndex}}):Ke.type==="group"?React$2.createElement(ze,{...contextPropIfNotDomElement(ze,_e),key:Zt,"data-index":an,"data-known-size":Ke.size,"data-item-index":Ke.index,style:GROUP_STYLE},Se(Ke.index,_e)):React$2.createElement(qe,{...contextPropIfNotDomElement(qe,_e),...itemPropIfNotDomElement(qe,Ke.data),key:Zt,"data-index":an,"data-known-size":Ke.size,"data-item-index":Ke.index,"data-item-group-index":Ke.groupIndex,style:ITEM_STYLE$1},Dt?xe(Ke.index,Ke.groupIndex,Ke.data,_e):xe(Ke.index,Ke.data,_e))}))}),scrollerStyle={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},viewportStyle={width:"100%",height:"100%",position:"absolute",top:0},topItemListStyle={width:"100%",position:positionStickyCssValue(),top:0,zIndex:1};function contextPropIfNotDomElement(ne,oe){if(typeof ne!="string")return{context:oe}}function itemPropIfNotDomElement(ne,oe){return{item:typeof ne=="string"?void 0:oe}}const Header$1=React$2.memo(function(){const oe=useEmitterValue$2("HeaderComponent"),ce=usePublisher$2("headerHeight"),ue=useEmitterValue$2("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$2("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null}),Footer$1=React$2.memo(function(){const oe=useEmitterValue$2("FooterComponent"),ce=usePublisher$2("footerHeight"),ue=useEmitterValue$2("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$2("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null});function buildScroller({usePublisher:ne,useEmitter:oe,useEmitterValue:ce}){return React$2.memo(function({style:me,children:ge,...ye}){const ve=ne("scrollContainerState"),xe=ce("ScrollerComponent"),_e=ne("smoothScrollTargetReached"),Se=ce("scrollerRef"),$e=ce("context"),{scrollerRef:Re,scrollByCallback:Ae,scrollToCallback:Ie}=useScrollTop(ve,_e,xe,Se);return oe("scrollTo",Ie),oe("scrollBy",Ae),React$2.createElement(xe,{ref:Re,style:{...scrollerStyle,...me},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...ye,...contextPropIfNotDomElement(xe,$e)},ge)})}function buildWindowScroller({usePublisher:ne,useEmitter:oe,useEmitterValue:ce}){return React$2.memo(function({style:me,children:ge,...ye}){const ve=ne("windowScrollContainerState"),xe=ce("ScrollerComponent"),_e=ne("smoothScrollTargetReached"),Se=ce("totalListHeight"),$e=ce("deviation"),Re=ce("customScrollParent"),Ae=ce("context"),{scrollerRef:Ie,scrollByCallback:ke,scrollToCallback:Be}=useScrollTop(ve,_e,xe,noop$4,Re);return useIsomorphicLayoutEffect$1(()=>(Ie.current=Re||window,()=>{Ie.current=null}),[Ie,Re]),oe("windowScrollTo",Be),oe("scrollBy",ke),React$2.createElement(xe,{style:{position:"relative",...me,...Se!==0?{height:Se+$e}:{}},"data-virtuoso-scroller":!0,...ye,...contextPropIfNotDomElement(xe,Ae)},ge)})}const Viewport$2=({children:ne})=>{const oe=React$2.useContext(VirtuosoMockContext),ce=usePublisher$2("viewportHeight"),ue=usePublisher$2("fixedItemHeight"),pe=useSize(compose(ce,me=>correctItemSize(me,"height")));return React$2.useEffect(()=>{oe&&(ce(oe.viewportHeight),ue(oe.itemHeight))},[oe,ce,ue]),React$2.createElement("div",{style:viewportStyle,ref:pe,"data-viewport-type":"element"},ne)},WindowViewport$2=({children:ne})=>{const oe=React$2.useContext(VirtuosoMockContext),ce=usePublisher$2("windowViewportRect"),ue=usePublisher$2("fixedItemHeight"),pe=useEmitterValue$2("customScrollParent"),me=useWindowViewportRectRef(ce,pe);return React$2.useEffect(()=>{oe&&(ue(oe.itemHeight),ce({offsetTop:0,visibleHeight:oe.viewportHeight,visibleWidth:100}))},[oe,ce,ue]),React$2.createElement("div",{ref:me,style:viewportStyle,"data-viewport-type":"window"},ne)},TopItemListContainer=({children:ne})=>{const oe=useEmitterValue$2("TopItemListComponent")||"div",ce=useEmitterValue$2("headerHeight"),ue={...topItemListStyle,marginTop:`${ce}px`},pe=useEmitterValue$2("context");return React$2.createElement(oe,{style:ue,...contextPropIfNotDomElement(oe,pe)},ne)},ListRoot=React$2.memo(function(oe){const ce=useEmitterValue$2("useWindowScroll"),ue=useEmitterValue$2("topItemsIndexes").length>0,pe=useEmitterValue$2("customScrollParent"),me=pe||ce?WindowScroller$2:Scroller$2,ge=pe||ce?WindowViewport$2:Viewport$2;return React$2.createElement(me,{...oe},ue&&React$2.createElement(TopItemListContainer,null,React$2.createElement(Items$1,{showTopList:!0})),React$2.createElement(ge,null,React$2.createElement(Header$1,null),React$2.createElement(Items$1,null),React$2.createElement(Footer$1,null)))}),{Component:List,usePublisher:usePublisher$2,useEmitterValue:useEmitterValue$2,useEmitter:useEmitter$2}=systemToComponent(combinedSystem$2,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},ListRoot),Scroller$2=buildScroller({usePublisher:usePublisher$2,useEmitterValue:useEmitterValue$2,useEmitter:useEmitter$2}),WindowScroller$2=buildWindowScroller({usePublisher:usePublisher$2,useEmitterValue:useEmitterValue$2,useEmitter:useEmitter$2}),Virtuoso=List,INITIAL_GRID_STATE={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},PROBE_GRID_STATE={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round,ceil,floor,min,max}=Math;function buildProbeGridState(ne){return{...PROBE_GRID_STATE,items:ne}}function buildItems(ne,oe,ce){return Array.from({length:oe-ne+1}).map((ue,pe)=>{const me=ce===null?null:ce[pe+ne];return{index:pe+ne,data:me}})}function gapComparator(ne,oe){return ne&&ne.column===oe.column&&ne.row===oe.row}function dimensionComparator(ne,oe){return ne&&ne.width===oe.width&&ne.height===oe.height}const gridSystem=system(([{overscan:ne,visibleRange:oe,listBoundary:ce},{scrollTop:ue,viewportHeight:pe,scrollBy:me,scrollTo:ge,smoothScrollTargetReached:ye,scrollContainerState:ve,footerHeight:xe,headerHeight:_e},Se,$e,{propsReady:Re,didMount:Ae},{windowViewportRect:Ie,useWindowScroll:ke,customScrollParent:Be,windowScrollContainerState:Ne,windowScrollTo:Fe},Ue])=>{const We=statefulStream(0),qe=statefulStream(0),ze=statefulStream(INITIAL_GRID_STATE),Ge=statefulStream({height:0,width:0}),Ze=statefulStream({height:0,width:0}),Dt=stream(),Je=stream(),Ut=statefulStream(0),jt=statefulStream(null),Ke=statefulStream({row:0,column:0}),an=stream(),Zt=stream(),en=statefulStream(!1),Kt=statefulStream(0),Wt=statefulStream(!0),un=statefulStream(!1);subscribe(pipe(Ae,withLatestFrom(Kt),filter(([Nt,Yt])=>!!Yt)),()=>{publish(Wt,!1),publish(qe,0)}),subscribe(pipe(combineLatest(Ae,Wt,Ze,Ge,Kt,un),filter(([Nt,Yt,Jt,hn,,Ye])=>Nt&&!Yt&&Jt.height!==0&&hn.height!==0&&!Ye)),([,,,,Nt])=>{publish(un,!0),skipFrames(1,()=>{publish(Dt,Nt)}),handleNext(pipe(ue),()=>{publish(ce,[0,0]),publish(Wt,!0)})}),connect(pipe(Zt,filter(Nt=>Nt!=null&&Nt.scrollTop>0),mapTo(0)),qe),subscribe(pipe(Ae,withLatestFrom(Zt),filter(([,Nt])=>Nt!=null)),([,Nt])=>{Nt&&(publish(Ge,Nt.viewport),publish(Ze,Nt==null?void 0:Nt.item),publish(Ke,Nt.gap),Nt.scrollTop>0&&(publish(en,!0),handleNext(pipe(ue,skip(1)),Yt=>{publish(en,!1)}),publish(ge,{top:Nt.scrollTop})))}),connect(pipe(Ge,map$1(({height:Nt})=>Nt)),pe),connect(pipe(combineLatest(duc(Ge,dimensionComparator),duc(Ze,dimensionComparator),duc(Ke,(Nt,Yt)=>Nt&&Nt.column===Yt.column&&Nt.row===Yt.row),duc(ue)),map$1(([Nt,Yt,Jt,hn])=>({viewport:Nt,item:Yt,gap:Jt,scrollTop:hn}))),an),connect(pipe(combineLatest(duc(We),oe,duc(Ke,gapComparator),duc(Ze,dimensionComparator),duc(Ge,dimensionComparator),duc(jt),duc(qe),duc(en),duc(Wt),duc(Kt)),filter(([,,,,,,,Nt])=>!Nt),map$1(([Nt,[Yt,Jt],hn,Ye,Xe,Pt,sn,,yn,qt])=>{const{row:wn,column:Tn}=hn,{height:xn,width:Nn}=Ye,{width:zn}=Xe;if(sn===0&&(Nt===0||zn===0))return INITIAL_GRID_STATE;if(Nn===0){const bn=getInitialTopMostItemIndexNumber(qt,Nt),kn=bn===0?Math.max(sn-1,0):bn;return buildProbeGridState(buildItems(bn,kn,Pt))}const Yn=itemsPerRow(zn,Nn,Tn);let Kn,Rn;yn?Yt===0&&Jt===0&&sn>0?(Kn=0,Rn=sn-1):(Kn=Yn*floor((Yt+wn)/(xn+wn)),Rn=Yn*ceil((Jt+wn)/(xn+wn))-1,Rn=min(Nt-1,max(Rn,Yn-1)),Kn=min(Rn,max(0,Kn))):(Kn=0,Rn=-1);const Mn=buildItems(Kn,Rn,Pt),{top:Xn,bottom:Jn}=gridLayout(Xe,hn,Ye,Mn),pn=ceil(Nt/Yn),Gt=pn*xn+(pn-1)*wn-Jn;return{items:Mn,offsetTop:Xn,offsetBottom:Gt,top:Xn,bottom:Jn,itemHeight:xn,itemWidth:Nn}})),ze),connect(pipe(jt,filter(Nt=>Nt!==null),map$1(Nt=>Nt.length)),We),connect(pipe(combineLatest(Ge,Ze,ze,Ke),filter(([Nt,Yt,{items:Jt}])=>Jt.length>0&&Yt.height!==0&&Nt.height!==0),map$1(([Nt,Yt,{items:Jt},hn])=>{const{top:Ye,bottom:Xe}=gridLayout(Nt,hn,Yt,Jt);return[Ye,Xe]}),distinctUntilChanged(tupleComparator)),ce);const Xt=statefulStream(!1);connect(pipe(ue,withLatestFrom(Xt),map$1(([Nt,Yt])=>Yt||Nt!==0)),Xt);const nn=streamFromEmitter(pipe(duc(ze),filter(({items:Nt})=>Nt.length>0),withLatestFrom(We,Xt),filter(([{items:Nt},Yt,Jt])=>Jt&&Nt[Nt.length-1].index===Yt-1),map$1(([,Nt])=>Nt-1),distinctUntilChanged())),vn=streamFromEmitter(pipe(duc(ze),filter(({items:Nt})=>Nt.length>0&&Nt[0].index===0),mapTo(0),distinctUntilChanged())),Sn=streamFromEmitter(pipe(duc(ze),withLatestFrom(en),filter(([{items:Nt},Yt])=>Nt.length>0&&!Yt),map$1(([{items:Nt}])=>({startIndex:Nt[0].index,endIndex:Nt[Nt.length-1].index})),distinctUntilChanged(rangeComparator),throttleTime(0)));connect(Sn,$e.scrollSeekRangeChanged),connect(pipe(Dt,withLatestFrom(Ge,Ze,We,Ke),map$1(([Nt,Yt,Jt,hn,Ye])=>{const Xe=normalizeIndexLocation(Nt),{align:Pt,behavior:sn,offset:yn}=Xe;let qt=Xe.index;qt==="LAST"&&(qt=hn-1),qt=max(0,qt,min(hn-1,qt));let wn=itemTop(Yt,Ye,Jt,qt);return Pt==="end"?wn=round(wn-Yt.height+Jt.height):Pt==="center"&&(wn=round(wn-Yt.height/2+Jt.height/2)),yn&&(wn+=yn),{top:wn,behavior:sn}})),ge);const Cn=statefulStreamFromEmitter(pipe(ze,map$1(Nt=>Nt.offsetBottom+Nt.bottom)),0);return connect(pipe(Ie,map$1(Nt=>({width:Nt.visibleWidth,height:Nt.visibleHeight}))),Ge),{data:jt,totalCount:We,viewportDimensions:Ge,itemDimensions:Ze,scrollTop:ue,scrollHeight:Je,overscan:ne,scrollBy:me,scrollTo:ge,scrollToIndex:Dt,smoothScrollTargetReached:ye,windowViewportRect:Ie,windowScrollTo:Fe,useWindowScroll:ke,customScrollParent:Be,windowScrollContainerState:Ne,deviation:Ut,scrollContainerState:ve,footerHeight:xe,headerHeight:_e,initialItemCount:qe,gap:Ke,restoreStateFrom:Zt,...$e,initialTopMostItemIndex:Kt,gridState:ze,totalListHeight:Cn,...Se,startReached:vn,endReached:nn,rangeChanged:Sn,stateChanged:an,propsReady:Re,stateRestoreInProgress:en,...Ue}},tup(sizeRangeSystem,domIOSystem,stateFlagsSystem,scrollSeekSystem,propsReadySystem,windowScrollerSystem,loggerSystem));function gridLayout(ne,oe,ce,ue){const{height:pe}=ce;if(pe===void 0||ue.length===0)return{top:0,bottom:0};const me=itemTop(ne,oe,ce,ue[0].index),ge=itemTop(ne,oe,ce,ue[ue.length-1].index)+pe;return{top:me,bottom:ge}}function itemTop(ne,oe,ce,ue){const pe=itemsPerRow(ne.width,ce.width,oe.column),me=floor(ue/pe),ge=me*ce.height+max(0,me-1)*oe.row;return ge>0?ge+oe.row:ge}function itemsPerRow(ne,oe,ce){return max(1,floor((ne+ce)/(floor(oe)+ce)))}const gridComponentPropsSystem=system(()=>{const ne=statefulStream(xe=>`Item ${xe}`),oe=statefulStream({}),ce=statefulStream(null),ue=statefulStream("virtuoso-grid-item"),pe=statefulStream("virtuoso-grid-list"),me=statefulStream(identity),ge=statefulStream("div"),ye=statefulStream(noop$4),ve=(xe,_e=null)=>statefulStreamFromEmitter(pipe(oe,map$1(Se=>Se[xe]),distinctUntilChanged()),_e);return{context:ce,itemContent:ne,components:oe,computeItemKey:me,itemClassName:ue,listClassName:pe,headerFooterTag:ge,scrollerRef:ye,FooterComponent:ve("Footer"),HeaderComponent:ve("Header"),ListComponent:ve("List","div"),ItemComponent:ve("Item","div"),ScrollerComponent:ve("Scroller","div"),ScrollSeekPlaceholder:ve("ScrollSeekPlaceholder","div")}}),combinedSystem$1=system(([ne,oe])=>({...ne,...oe}),tup(gridSystem,gridComponentPropsSystem)),GridItems=React$2.memo(function(){const oe=useEmitterValue$1("gridState"),ce=useEmitterValue$1("listClassName"),ue=useEmitterValue$1("itemClassName"),pe=useEmitterValue$1("itemContent"),me=useEmitterValue$1("computeItemKey"),ge=useEmitterValue$1("isSeeking"),ye=usePublisher$1("scrollHeight"),ve=useEmitterValue$1("ItemComponent"),xe=useEmitterValue$1("ListComponent"),_e=useEmitterValue$1("ScrollSeekPlaceholder"),Se=useEmitterValue$1("context"),$e=usePublisher$1("itemDimensions"),Re=usePublisher$1("gap"),Ae=useEmitterValue$1("log"),Ie=useEmitterValue$1("stateRestoreInProgress"),ke=useSize(Be=>{const Ne=Be.parentElement.parentElement.scrollHeight;ye(Ne);const Fe=Be.firstChild;if(Fe){const{width:Ue,height:We}=Fe.getBoundingClientRect();$e({width:Ue,height:We})}Re({row:resolveGapValue("row-gap",getComputedStyle(Be).rowGap,Ae),column:resolveGapValue("column-gap",getComputedStyle(Be).columnGap,Ae)})});return Ie?null:React$2.createElement(xe,{ref:ke,className:ce,...contextPropIfNotDomElement(xe,Se),style:{paddingTop:oe.offsetTop,paddingBottom:oe.offsetBottom},"data-test-id":"virtuoso-item-list"},oe.items.map(Be=>{const Ne=me(Be.index,Be.data,Se);return ge?React$2.createElement(_e,{key:Ne,...contextPropIfNotDomElement(_e,Se),index:Be.index,height:oe.itemHeight,width:oe.itemWidth}):React$2.createElement(ve,{...contextPropIfNotDomElement(ve,Se),className:ue,"data-index":Be.index,key:Ne},pe(Be.index,Be.data,Se))}))}),Header=React$2.memo(function(){const oe=useEmitterValue$1("HeaderComponent"),ce=usePublisher$1("headerHeight"),ue=useEmitterValue$1("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$1("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null}),Footer=React$2.memo(function(){const oe=useEmitterValue$1("FooterComponent"),ce=usePublisher$1("footerHeight"),ue=useEmitterValue$1("headerFooterTag"),pe=useSize(ge=>ce(correctItemSize(ge,"height"))),me=useEmitterValue$1("context");return oe?React$2.createElement(ue,{ref:pe},React$2.createElement(oe,contextPropIfNotDomElement(oe,me))):null}),Viewport$1=({children:ne})=>{const oe=React$2.useContext(VirtuosoGridMockContext),ce=usePublisher$1("itemDimensions"),ue=usePublisher$1("viewportDimensions"),pe=useSize(me=>{ue(me.getBoundingClientRect())});return React$2.useEffect(()=>{oe&&(ue({height:oe.viewportHeight,width:oe.viewportWidth}),ce({height:oe.itemHeight,width:oe.itemWidth}))},[oe,ue,ce]),React$2.createElement("div",{style:viewportStyle,ref:pe},ne)},WindowViewport$1=({children:ne})=>{const oe=React$2.useContext(VirtuosoGridMockContext),ce=usePublisher$1("windowViewportRect"),ue=usePublisher$1("itemDimensions"),pe=useEmitterValue$1("customScrollParent"),me=useWindowViewportRectRef(ce,pe);return React$2.useEffect(()=>{oe&&(ue({height:oe.itemHeight,width:oe.itemWidth}),ce({offsetTop:0,visibleHeight:oe.viewportHeight,visibleWidth:oe.viewportWidth}))},[oe,ce,ue]),React$2.createElement("div",{ref:me,style:viewportStyle},ne)},GridRoot=React$2.memo(function({...oe}){const ce=useEmitterValue$1("useWindowScroll"),ue=useEmitterValue$1("customScrollParent"),pe=ue||ce?WindowScroller$1:Scroller$1,me=ue||ce?WindowViewport$1:Viewport$1;return React$2.createElement(pe,{...oe},React$2.createElement(me,null,React$2.createElement(Header,null),React$2.createElement(GridItems,null),React$2.createElement(Footer,null)))}),{Component:Grid,usePublisher:usePublisher$1,useEmitterValue:useEmitterValue$1,useEmitter:useEmitter$1}=systemToComponent(combinedSystem$1,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},GridRoot),Scroller$1=buildScroller({usePublisher:usePublisher$1,useEmitterValue:useEmitterValue$1,useEmitter:useEmitter$1}),WindowScroller$1=buildWindowScroller({usePublisher:usePublisher$1,useEmitterValue:useEmitterValue$1,useEmitter:useEmitter$1});function resolveGapValue(ne,oe,ce){return oe!=="normal"&&!(oe!=null&&oe.endsWith("px"))&&ce(`${ne} was not resolved to pixel value correctly`,oe,LogLevel.WARN),oe==="normal"?0:parseInt(oe??"0",10)}const Scroller=reactExports.forwardRef(({style:ne,children:oe,...ce},ue)=>{const pe=reactExports.useRef(null),{palette:me,spacing:ge}=useTheme$1(),ye=useCss$1({"--os-padding-perpendicular":"2px",".os-scrollbar":{visibility:"visible",opacity:1},".os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle":{"min-height":ge(12)},"div.os-scrollbar-vertical > div.os-scrollbar-track":{height:`calc(100% - ${ge(6)})`,marginTop:ge(6)},"div > div.os-scrollbar-track":{"--os-handle-perpendicular-size":"2px","--os-handle-perpendicular-size-hover":"6px","--os-handle-perpendicular-size-active":"6px","> div.os-scrollbar-handle":{borderRadius:0,opacity:.5,"&:hover":{opacity:.8}}}}),[ve]=S$5({options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{autoHide:"move",theme:me.mode==="dark"?"os-theme-light":"os-theme-dark"}}});reactExports.useEffect(()=>{typeof ue!="function"&&(ue!=null&&ue.current)&&(pe!=null&&pe.current)&&ve({target:pe.current,elements:{viewport:ue.current}})},[ve]);const xe=reactExports.useCallback(_e=>{_e&&ue&&(typeof ue=="function"?ue(_e):ue.current=_e)},[ue]);return jsxRuntimeExports.jsx("div",{ref:pe,style:ne,className:ye,children:jsxRuntimeExports.jsx("div",{ref:xe,...ce,children:oe})})});function LazyList({items:ne=[],renderItem:oe,listOptions:ce,placeholder:ue,...pe}){return jsxRuntimeExports.jsx(Box$1,{...pe,children:jsxRuntimeExports.jsx(Virtuoso,{components:{Scroller},totalCount:ne.length,itemContent:me=>oe==null?void 0:oe(ne[me],me),...ce})})}function Dot({label:ne}){return jsxRuntimeExports.jsx(Tooltip$1,{title:ne,children:jsxRuntimeExports.jsx(FiberManualRecord,{sx:{color:"error.main",transform:"scale(0.5)",pl:.5,mr:2},fontSize:"small"})})}function EventInspector({event:ne,index:oe,selected:ce,label:ue,...pe}){const{spacing:me}=useTheme$1(),ge=useCss$1({}),ye=useCss$1({}),ve=lodashExports$1.omit(ne,...OMIT_PROPS),xe=lodashExports$1.pick(ve,...ESSENTIAL_PROPS),_e=lodashExports$1.omit(ve,...ESSENTIAL_PROPS);return jsxRuntimeExports.jsxs(Box$1,{sx:{position:"relative",[`> .${ye}`]:{opacity:0},[`&:hover > .${ye}`]:{opacity:1},[`&:hover > .${ge}`]:{pr:8}},children:[jsxRuntimeExports.jsxs(ListItemButton$1,{className:ge,selected:ce,...pe,sx:{height:80,borderLeft:`${me(.5)} solid ${getColorHex(ne==null?void 0:ne.type)}`,...pe.sx},children:[jsxRuntimeExports.jsxs(ListItemIcon$1,{sx:{alignItems:"center"},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",children:oe}),ue&&jsxRuntimeExports.jsx(Dot,{label:ue})]}),jsxRuntimeExports.jsx(ListItemText$1,{sx:{overflow:"hidden"},primary:jsxRuntimeExports.jsxs(Box$1,{sx:{overflow:"hidden",whiteSpace:"nowrap",display:"block",textOverflow:"ellipsis",my:.5},children:[lodashExports$1.startCase(`${(ne==null?void 0:ne.type)??"event"} ${(ne==null?void 0:ne.id)??"-"}`)," "]}),secondaryTypographyProps:{component:"div",whiteSpace:"nowrap",overflow:"hidden"},secondary:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",justifyContent:"flex-start",sx:{"> *":{flex:0}},children:[jsxRuntimeExports.jsx(PropertyList,{event:xe,simple:!0}),jsxRuntimeExports.jsx(PropertyList,{event:_e,simple:!0})]})})]}),jsxRuntimeExports.jsx(Stack$1,{className:ye,direction:"row",sx:{p:1,justifyContent:"center",position:"absolute",right:0,alignItems:"center",top:0,height:"100%"},children:jsxRuntimeExports.jsx(PropertyDialog,{event:ne,trigger:Se=>jsxRuntimeExports.jsx(IconButtonWithTooltip,{onClick:Se,sx:{p:1.5,color:"text.secondary"},label:"See All Properties",icon:jsxRuntimeExports.jsx(DataObjectOutlined,{fontSize:"small"})})})})]})}function Skeleton({event:ne}){const{spacing:oe}=useTheme$1();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItem$1,{sx:{height:80,borderLeft:`${oe(.5)} solid ${getColorHex(ne==null?void 0:ne.type)}`},children:jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(Placeholder$3,{animation:!1,width:oe(4)})})}),jsxRuntimeExports.jsx(Divider$1,{variant:"inset"})]})}function lerp(ne,oe,ce){return ne+lodashExports$1.clamp(ce,0,1)*(oe-ne)}const ITEM_HEIGHT=80,PADDING_TOP=8,divider$2=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1}}),pxToInt=ne=>Number(ne.replace(/px$/,"")),SYMBOL_ALL=nanoid$1(),stepsLayerGuard=ne=>!!getController(ne).steps;function useStepsPageState(ne,oe){const{key:ce,setKey:ue,layers:pe,layer:me,allLayers:ge}=useLayer(ne==null?void 0:ne.layer,stepsLayerGuard),[ye,ve]=reactExports.useState(ne==null?void 0:ne.selectedType);function xe(Se){oe==null||oe({layer:Se}),ue(Se)}function _e(Se){oe==null||oe({selectedType:Se}),ve(Se)}return{setSelectedType:_e,setKey:xe,selectedType:ye,layers:pe,allLayers:ge,key:ce,layer:me}}const getStepsPageDescription=ne=>ne?`${ne} contains 0 steps.`:"When you load a trace, you'll see its steps here.";function StepsPage({template:ne}){const{spacing:oe}=useTheme$1(),ce=usePaper(),ue=useAcrylic(),pe=reactExports.useRef(null),[me,ge]=reactExports.useState(null),{controls:ye,onChange:ve,state:xe,dragHandle:_e}=useViewTreeContext(),{allLayers:Se,key:$e,layers:Re,selectedType:Ae,setKey:Ie,setSelectedType:ke,layer:Be}=useStepsPageState(xe,ve),{step:Ne,playing:Fe,stepTo:Ue}=usePlaybackState($e),We=reactExports.useMemo(()=>{if(Be){const{steps:Je}=getController(Be);return Je(Be)}},[Be]),{steps:qe,types:ze,stepToFilteredStep:Ge,selectedType:Ze}=reactExports.useMemo(()=>{if(We){const Je=We.map((Zt,en)=>[Zt,en]),Ut=lodashExports$1.chain(Je).map(([Zt])=>Zt.type).filter().uniq().value(),jt=!Ut.includes(Ae),Ke=jt?Je:Je.filter(([Zt])=>Zt.type===Ae),{stepMap:an}=lodashExports$1.reduce(Je,(Zt,[,en])=>{const Kt=lodashExports$1.findIndex(Ke,([,un])=>un>=en,Zt.from),Wt=Kt===-1?Ke.length:Kt;return Zt.from=Wt,Zt.stepMap.push(Wt),Zt},{from:0,stepMap:[]});return{steps:Ke,types:Ut,stepToFilteredStep:Zt=>an[Zt],selectedType:jt?SYMBOL_ALL:Ae}}return{}},[We,Ae]),Dt=useBreakpoints($e);return reactExports.useEffect(()=>{if(Ge&&me&&pe.current){const Je=Ge(Ne);if(Fe){let Ut=!1;const jt=Ke=>{var an;if(!Ut&&"scrollTop"in me&&!lodashExports$1.isUndefined(Ne)){const{scrollTop:Zt}=me,en=Je*ITEM_HEIGHT;(an=pe.current)==null||an.scrollTo({top:lerp(Zt,en,1e-6*Ke)}),requestAnimationFrame(jt)}};return requestAnimationFrame(jt),()=>{Ut=!0}}else pe.current.scrollToIndex({index:Je,behavior:"smooth",offset:-pxToInt(oe(12+PADDING_TOP))})}},[Ne,pe,me,Ge,Fe]),jsxRuntimeExports.jsxs(ne,{onChange:ve,stack:xe,children:[jsxRuntimeExports.jsx(ne.Title,{children:"Steps"}),jsxRuntimeExports.jsx(ne.Handle,{children:_e}),jsxRuntimeExports.jsxs(ne.Content,{children:[jsxRuntimeExports.jsx(Flex,{vertical:!0,alignItems:"center",children:qe?qe.length?jsxRuntimeExports.jsx(LazyList,{sx:{width:"100%",height:"100%"},items:qe,listOptions:{scrollerRef:ge,ref:pe,defaultItemHeight:ITEM_HEIGHT,overscan:0},renderItem:([Je,Ut],jt)=>{var Ke;return Fe?jsxRuntimeExports.jsx(Box$1,{sx:{pt:jt?0:oe(6+PADDING_TOP)},children:jsxRuntimeExports.jsx(Skeleton,{event:Je})},jt):jsxRuntimeExports.jsxs(Box$1,{sx:{height:pxToInt(oe(jt?0:6+PADDING_TOP))+ITEM_HEIGHT,pt:jt?0:oe(6+PADDING_TOP)},children:[jsxRuntimeExports.jsx(EventInspector,{event:Je,index:Ut,selected:Ut===Ne,label:(Ke=Dt(Ut))==null?void 0:Ke.result,onClick:()=>Ue(Ut)}),jsxRuntimeExports.jsx(Divider$1,{variant:"inset"})]},jt)}}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(StepsIcon,{}),label:"Events",secondary:getStepsPageDescription(inferLayerName(Be))}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(StepsIcon,{}),label:"Events",secondary:getStepsPageDescription()})}),!!(qe!=null&&qe.length)&&jsxRuntimeExports.jsx(Stack$1,{direction:"row",sx:{...ce(1),...ue,alignItems:"center",position:"absolute",top:Je=>Je.spacing(6),height:Je=>Je.spacing(6),borderRadius:1,px:1,m:1},children:jsxRuntimeExports.jsx(Playback,{layer:Be})})]}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(LayersIcon,{}),label:"Layer",value:$e,items:lodashExports$1.map(Se,Je=>({id:Je.key,hidden:!lodashExports$1.find(Re,{key:Je.key}),name:inferLayerName(Je)})),onChange:Ie,arrow:!0,ellipsis:12}),divider$2,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(FiberManualRecordOutlined,{sx:{color:Ze===SYMBOL_ALL||!Ze?grey$1[tint]:getColorHex(Ze)}}),label:"Event Type",value:Ze,items:[{id:SYMBOL_ALL,name:"All Events"},...lodashExports$1.map(ze,Je=>({id:`${Je}`,name:lodashExports$1.startCase(Je)}))],onChange:ke,arrow:!0,ellipsis:12})]}),jsxRuntimeExports.jsx(ne.Extras,{children:ye})]})}function SelectMulti({trigger:ne,items:oe,value:ce,onChange:ue,placeholder:pe="Select Options",defaultChecked:me}){return useSmallDisplay(),lodashExports$1.max([lodashExports$1.findIndex(oe,({value:ge})=>!!(ce!=null&&ce[ge])),0]),jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ge=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tooltip$1,{title:pe,children:jsxRuntimeExports.jsx("span",{children:ne==null?void 0:ne(bindTrigger(ge))})}),jsxRuntimeExports.jsx(Menu$1,{...bindMenu(ge),anchorOrigin:{horizontal:"left",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"left"},children:lodashExports$1.map(oe,({value:ye,label:ve,disabled:xe})=>jsxRuntimeExports.jsxs(MenuItem$1,{disabled:xe,onClick:()=>{ue==null||ue({...ce,[ye]:!((ce==null?void 0:ce[ye])??me)})},children:[jsxRuntimeExports.jsx(ListItemIcon$1,{children:jsxRuntimeExports.jsx(Checkbox$1,{sx:{p:0},checked:!!((ce==null?void 0:ce[ye])??me)})}),ve]},ye))})]})})}function FeaturePickerMulti({label:ne,value:oe,onChange:ce,items:ue,icon:pe,showArrow:me,defaultChecked:ge,ellipsis:ye=1/0}){var _e;const ve=lodashExports$1.filter(ue,({id:Se})=>!!((oe==null?void 0:oe[Se])??ge)),xe=ve.length?ve.length===1?(_e=lodashExports$1.head(ve))==null?void 0:_e.name:`${ve.length} Selected`:ne;return jsxRuntimeExports.jsx(SelectMulti,{defaultChecked:!0,placeholder:lodashExports$1.startCase(ne),trigger:Se=>jsxRuntimeExports.jsx(FeaturePickerButton,{...Se,disabled:!(ue!=null&&ue.length),icon:pe,arrow:me,children:lodashExports$1.truncate(xe,{length:ye})}),items:lodashExports$1.map(ue,({id:Se,name:$e,description:Re,hidden:Ae})=>({value:Se,label:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Type$2,{component:"div",children:$e}),jsxRuntimeExports.jsx(Space,{}),jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"body2",color:"text.secondary",children:Re})]}),disabled:Ae})),value:oe,onChange:ce})}function useRendererResolver(ne){var ue,pe;const[oe]=useRenderers(),ce=reactExports.useMemo(()=>lodashExports$1.head(oe),[oe]);return{auto:ce,selected:ne&&ne!=="internal:auto"?ne:(pe=(ue=ce==null?void 0:ce.renderer)==null?void 0:ue.meta)==null?void 0:pe.id}}const divider$1=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1}});function ViewportPage({template:ne}){var ke,Be;const{controls:oe,onChange:ce,state:ue,dragHandle:pe}=useViewTreeContext(),[me]=useRenderers(),ge=usePaper(),ye=useAcrylic(),[{layers:ve}]=useLayers(),[xe,_e]=reactExports.useState({}),Se=reactExports.useMemo(()=>lodashExports$1.filter(ve,Ne=>(xe==null?void 0:xe[Ne.key])??!0),[xe,ve,ve==null?void 0:ve.length]),[$e,Re]=reactExports.useState(),{selected:Ae,auto:Ie}=useRendererResolver(ue==null?void 0:ue.renderer);return reactExports.useEffect(()=>{lodashExports$1.delay(()=>{var Ne;(Ne=$e==null?void 0:$e.fitCamera)==null||Ne.call($e,Fe=>{var Ue;return lodashExports$1.chain(Se).filter("viewKey").map("key").includes(((Ue=Fe.meta)==null?void 0:Ue.sourceLayer)??"").value()})},150)},[$e,lodashExports$1.chain(Se).map("viewKey").sort().join(".").value()]),jsxRuntimeExports.jsxs(ne,{onChange:ce,stack:ue,children:[jsxRuntimeExports.jsx(ne.Key,{children:"viewport"}),jsxRuntimeExports.jsx(ne.Title,{children:"Viewport"}),jsxRuntimeExports.jsx(ne.Handle,{children:pe}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(AutoSizer,{children:Ne=>jsxRuntimeExports.jsxs(Box$1,{children:[jsxRuntimeExports.jsx(TraceRenderer,{...Ne,layers:Se,renderer:Ae,rendererRef:Re}),jsxRuntimeExports.jsx(Stack$1,{sx:{pt:6,position:"absolute",top:0,left:0},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{...ge(1),...ye,alignItems:"center",height:Fe=>Fe.spacing(6),px:1,m:1},children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",disabled:!$e,onClick:()=>{$e==null||$e.fitCamera()},label:"Fit",icon:jsxRuntimeExports.jsx(CenterFocusWeakOutlined,{})}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",disabled:!$e,onClick:()=>{var Fe;(Fe=$e==null?void 0:$e.initialCamera)==null||Fe.call($e)},icon:jsxRuntimeExports.jsx(TimesOneMobiledataOutlined,{}),label:"1 to 1"}),divider$1,jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",disabled:!$e,onClick:async()=>{const Fe=await($e==null?void 0:$e.toDataUrl());Fe&&download(Fe,dist$4.generateUsername("-"))},icon:jsxRuntimeExports.jsx(CameraOutlined,{}),label:"capture-screenshot"})]})})]})})})}),jsxRuntimeExports.jsx(ne.Options,{children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",children:[jsxRuntimeExports.jsx(FeaturePicker,{label:"Renderer",icon:jsxRuntimeExports.jsx(BlurCircularOutlined,{}),value:(ue==null?void 0:ue.renderer)??"internal:auto",onChange:Ne=>ce==null?void 0:ce({renderer:Ne}),items:[{id:"internal:auto",name:`Auto (${((Be=(ke=Ie==null?void 0:Ie.renderer)==null?void 0:ke.meta)==null?void 0:Be.name)??"None"})`},...lodashExports$1.map(me,({renderer:Ne})=>({id:Ne.meta.id,name:Ne.meta.name,description:Ne.meta.id}))],arrow:!0}),divider$1,jsxRuntimeExports.jsx(FeaturePickerMulti,{defaultChecked:!0,label:"Layers",icon:jsxRuntimeExports.jsx(LayersIcon,{}),value:xe,onChange:_e,items:lodashExports$1.map(ve,Ne=>({id:Ne.key,name:inferLayerName(Ne)})),showArrow:!0,ellipsis:12})]})}),jsxRuntimeExports.jsx(ne.Extras,{children:oe})]})}const isSourceLayer=ne=>{var oe;return!!((oe=getController(ne))!=null&&oe.getSources)};function SourcePage({template:ne}){const oe=useTheme$1();useMonacoTheme(oe);const{layers:ce}=useLayer(void 0,isSourceLayer),ue=reactExports.useMemo(()=>{var xe;return(xe=ce==null?void 0:ce.flatMap)==null?void 0:xe.call(ce,_e=>{var Se,$e,Re,Ae;return(Ae=(Re=($e=(Se=getController(_e))==null?void 0:Se.getSources)==null?void 0:$e.call(Se,_e))==null?void 0:Re.map)==null?void 0:Ae.call(Re,Ie=>({layer:_e.key,source:Ie}))})},[ce]),{controls:pe,onChange:me,state:ge,dragHandle:ye}=useViewTreeContext(),ve=reactExports.useMemo(()=>lodashExports$1.find(ue,xe=>xe&&xe.source.id===(ge==null?void 0:ge.source)&&xe.layer===(ge==null?void 0:ge.layer))??lodashExports$1.first(ue),[ue,ge==null?void 0:ge.source,ge==null?void 0:ge.layer]);return jsxRuntimeExports.jsxs(ne,{onChange:me,stack:ge,children:[jsxRuntimeExports.jsx(ne.Key,{children:"source"}),jsxRuntimeExports.jsx(ne.Title,{children:"Source"}),jsxRuntimeExports.jsx(ne.Handle,{children:ye}),jsxRuntimeExports.jsx(ne.Content,{children:ue!=null&&ue.length?jsxRuntimeExports.jsx(Flex,{pt:6,children:jsxRuntimeExports.jsx(AutoSizer,{children:xe=>{var _e,Se;return jsxRuntimeExports.jsx(de,{theme:oe.palette.mode==="dark"?"posthoc-dark":"light",options:{readOnly:!0},language:(_e=ve==null?void 0:ve.source)==null?void 0:_e.language,loading:jsxRuntimeExports.jsx(CircularProgress$1,{variant:"indeterminate"}),...xe,value:(Se=ve==null?void 0:ve.source)==null?void 0:Se.content})}})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(CodeOutlined,{}),label:"Source"})}),jsxRuntimeExports.jsx(ne.Options,{children:!!(ue!=null&&ue.length)&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Tabs$1,{value:`${ve==null?void 0:ve.source.id}::${ve==null?void 0:ve.layer}`,onChange:(xe,_e)=>{const[Se,$e]=_e.split("::");me==null||me({source:Se,layer:$e})},children:lodashExports$1.map(ue,({source:xe,layer:_e})=>jsxRuntimeExports.jsx(Tab$1,{label:xe.name,value:`${xe.id}::${_e}`}))})})}),jsxRuntimeExports.jsx(ne.Extras,{children:pe})]})}const pages={explore:{id:"explore",name:"Explore",color:"deepOrange",description:"Browse examples and guides",icon:jsxRuntimeExports.jsx(RocketIcon,{}),content:ExplorePage,allowFullscreen:!0,showInSidebar:"always"},layers:{id:"layers",name:"Layers",description:"",color:"pink",icon:jsxRuntimeExports.jsx(LayersIcon,{}),content:LayersPage,allowFullscreen:!0,showInSidebar:"mobile-only"},steps:{id:"steps",name:"Events",description:"",color:"pink",icon:jsxRuntimeExports.jsx(StepsIcon,{}),content:StepsPage,allowFullscreen:!0},viewport:{id:"viewport",name:"Viewport",description:"",color:"deepPurple",icon:jsxRuntimeExports.jsx(ViewportIcon,{}),content:ViewportPage,allowFullscreen:!0},tree:{id:"tree",name:"Graph",description:"",color:"deepPurple",icon:jsxRuntimeExports.jsx(TreeIcon,{}),content:TreePage,allowFullscreen:!0},source:{id:"source",name:"Sources",description:"",color:"deepPurple",icon:jsxRuntimeExports.jsx(CodeOutlined,{}),content:SourcePage,allowFullscreen:!0,showInSidebar:"mobile-only"},debug:{id:"debug",name:"Debugger",description:"",color:"indigo",icon:jsxRuntimeExports.jsx(DebuggerIcon,{}),content:DebugPage,allowFullscreen:!0,showInSidebar:"mobile-only"},info:{id:"info",name:"Logs",description:"",color:"grey",icon:jsxRuntimeExports.jsx(ListOutlined,{}),content:InfoPage,allowFullscreen:!0},settings:{id:"settings",name:"Settings",description:"",color:"grey",icon:jsxRuntimeExports.jsx(SettingsIcon,{}),content:SettingsPage,allowFullscreen:!0,showInSidebar:"always"}},ErrorBoundaryContext=reactExports.createContext(null),initialState={didCatch:!1,error:null};class ErrorBoundary extends reactExports.Component{constructor(oe){super(oe),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=initialState}static getDerivedStateFromError(oe){return{didCatch:!0,error:oe}}resetErrorBoundary(){const{error:oe}=this.state;if(oe!==null){for(var ce,ue,pe=arguments.length,me=new Array(pe),ge=0;ge0&&arguments[0]!==void 0?arguments[0]:[],oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return ne.length!==oe.length||ne.some((ce,ue)=>!Object.is(ce,oe[ue]))}const divider=jsxRuntimeExports.jsx(Divider$1,{orientation:"vertical",flexItem:!0,sx:{m:1,height:ne=>ne.spacing(3),alignSelf:"auto"}}),Page=withSlots(({slotProps:ne,onChange:oe,stack:ce})=>{var pe,me,ge,ye;const ue=useAcrylic();return jsxRuntimeExports.jsx(ErrorBoundary,{fallbackRender:ve=>{var xe,_e;return jsxRuntimeExports.jsxs(Stack$1,{sx:{background:Se=>Se.palette.background.paper,height:"100%"},children:[jsxRuntimeExports.jsxs(Stack$1,{direction:"row",sx:{height:Se=>Se.spacing(6),alignItems:"center",pl:1,borderBottom:1,borderColor:"divider"},children:[(xe=ne.Handle)==null?void 0:xe.children,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(WidgetsOutlined,{}),label:"Choose View",onChange:Se=>oe==null?void 0:oe({...ce,type:Se}),value:ce==null?void 0:ce.type,items:lodashExports$1.values(pages),itemOrientation:"vertical"}),jsxRuntimeExports.jsx(Space,{sx:{mx:"auto"}}),(_e=ne.Extras)==null?void 0:_e.children]}),jsxRuntimeExports.jsx(Placeholder$2,{secondary:`${ve.error}`,icon:jsxRuntimeExports.jsx(ErrorOutlineOutlined,{})})]})},children:jsxRuntimeExports.jsxs(Flex,{vertical:!0,children:[jsxRuntimeExports.jsx(Flex,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{width:"100%",height:"100%",bgcolor:"background.paper"},children:(pe=ne.Content)==null?void 0:pe.children})}),jsxRuntimeExports.jsxs(Flex,{sx:{height:ve=>ve.spacing(6),alignItems:"center"},children:[jsxRuntimeExports.jsx(Flex,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",pr:6,...ue},children:jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsxs(Flex,{sx:{width:"max-content",height:ve=>ve.spacing(6),alignItems:"center",p:1},children:[(me=ne.Handle)==null?void 0:me.children,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(WidgetsOutlined,{}),label:"Choose View",onChange:ve=>oe==null?void 0:oe({...ce,type:ve}),value:ce==null?void 0:ce.type,items:lodashExports$1.values(pages),itemOrientation:"vertical"}),((ge=ne.Options)==null?void 0:ge.children)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[divider,ne.Options.children]})]})})}),jsxRuntimeExports.jsx(Space,{sx:{mx:"auto"}}),(ye=ne.Extras)==null?void 0:ye.children]})]})})}),SidebarPage=withSlots(({slotProps:ne})=>{var pe,me,ge;const oe=useSidebarBackground(),ce=useAcrylic(oe),[,ue]=useUIState();return jsxRuntimeExports.jsx(ErrorBoundary,{fallback:jsxRuntimeExports.jsx(Box$1,{sx:{p:6,background:ye=>ye.palette.background.paper,height:"100%"},children:"This page encountered an error."}),children:jsxRuntimeExports.jsxs(Flex,{vertical:!0,children:[jsxRuntimeExports.jsx(Flex,{sx:{position:"absolute",top:0,left:0,width:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{width:"100%",height:"100%",bgcolor:oe},children:(pe=ne.Content)==null?void 0:pe.children})}),jsxRuntimeExports.jsx(Flex,{sx:{height:ye=>ye.spacing(6)},children:jsxRuntimeExports.jsxs(Flex,{sx:{p:0,position:"absolute",top:0,left:0,width:"100%",borderBottom:1,borderColor:"divider",alignItems:"center",...ce},children:[jsxRuntimeExports.jsx(Scroll,{x:!0,children:jsxRuntimeExports.jsxs(Flex,{sx:{width:"max-content",height:ye=>ye.spacing(6),alignItems:"center",p:1},children:[jsxRuntimeExports.jsx(Type$2,{component:"div",sx:{p:1,color:"text.secondary"},children:(me=ne.Title)==null?void 0:me.children}),((ge=ne.Options)==null?void 0:ge.children)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[divider,ne.Options.children]})]})}),jsxRuntimeExports.jsx(IconButtonWithTooltip,{onClick:()=>{ue(()=>{var ye;return{fullscreenModal:(ye=ne.Key)==null?void 0:ye.children,sidebarOpen:!1}})},size:"small",sx:{m:1},icon:jsxRuntimeExports.jsx(FullscreenOutlined,{sx:{color:"text.secondary"},fontSize:"small"}),label:"Maximise"})]})})]})})});var sysend$1={exports:{}};/**@license * sysend.js - send messages between browser windows/tabs version 1.17.4 * * Copyright (C) 2014 Jakub T. Jankiewicz @@ -2441,7 +2441,7 @@ void main(void)\r `+Nt.split(` `).map(function(Jt){return" "+Jt}).join(` `)):Nt=Wt.stylize("[Circular]","special")),ze(Cn)){if(Sn&&vn.match(/^\d+$/))return Nt;(Cn=JSON.stringify(""+vn)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Cn=Cn.substr(1,Cn.length-2),Cn=Wt.stylize(Cn,"name")):(Cn=Cn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Cn=Wt.stylize(Cn,"string"))}return Cn+": "+Nt}function Ne(Wt){return Array.isArray(Wt)}function Fe(Wt){return typeof Wt=="boolean"}function Ue(Wt){return Wt===null}function We(Wt){return typeof Wt=="number"}function qe(Wt){return typeof Wt=="string"}function ze(Wt){return Wt===void 0}function Ge(Wt){return Ze(Wt)&&jt(Wt)==="[object RegExp]"}function Ze(Wt){return typeof Wt=="object"&&Wt!==null}function Dt(Wt){return Ze(Wt)&&jt(Wt)==="[object Date]"}function Je(Wt){return Ze(Wt)&&(jt(Wt)==="[object Error]"||Wt instanceof Error)}function Ut(Wt){return typeof Wt=="function"}function jt(Wt){return Object.prototype.toString.call(Wt)}function Ke(Wt){return Wt<10?"0"+Wt.toString(10):Wt.toString(10)}me.debuglog=function(Wt){if(Wt=Wt.toUpperCase(),!xe[Wt])if(_e.test(Wt)){var un=ge.pid;xe[Wt]=function(){var Xt=me.format.apply(me,arguments);console.error("%s %d: %s",Wt,un,Xt)}}else xe[Wt]=function(){};return xe[Wt]},me.inspect=$e,$e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},$e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},me.types=ue("./support/types"),me.isArray=Ne,me.isBoolean=Fe,me.isNull=Ue,me.isNullOrUndefined=function(Wt){return Wt==null},me.isNumber=We,me.isString=qe,me.isSymbol=function(Wt){return typeof Wt=="symbol"},me.isUndefined=ze,me.isRegExp=Ge,me.types.isRegExp=Ge,me.isObject=Ze,me.isDate=Dt,me.types.isDate=Dt,me.isError=Je,me.types.isNativeError=Je,me.isFunction=Ut,me.isPrimitive=function(Wt){return Wt===null||typeof Wt=="boolean"||typeof Wt=="number"||typeof Wt=="string"||typeof Wt=="symbol"||Wt===void 0},me.isBuffer=ue("./support/isBuffer");var an=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Zt(Wt,un){return Object.prototype.hasOwnProperty.call(Wt,un)}me.log=function(){var Wt,un;console.log("%s - %s",(Wt=new Date,un=[Ke(Wt.getHours()),Ke(Wt.getMinutes()),Ke(Wt.getSeconds())].join(":"),[Wt.getDate(),an[Wt.getMonth()],un].join(" ")),me.format.apply(me,arguments))},me.inherits=ue("inherits"),me._extend=function(Wt,un){if(!un||!Ze(un))return Wt;for(var Xt=Object.keys(un),nn=Xt.length;nn--;)Wt[Xt[nn]]=un[Xt[nn]];return Wt};var en=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function Kt(Wt,un){if(!Wt){var Xt=new Error("Promise was rejected with a falsy value");Xt.reason=Wt,Wt=Xt}return un(Wt)}me.promisify=function(Wt){if(typeof Wt!="function")throw new TypeError('The "original" argument must be of type Function');if(en&&Wt[en]){var un;if(typeof(un=Wt[en])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(un,en,{value:un,enumerable:!1,writable:!1,configurable:!0}),un}function un(){for(var Xt,nn,vn=new Promise(function(Nt,Yt){Xt=Nt,nn=Yt}),Sn=[],Cn=0;Cn{var oe=ne.exports={};oe.nextTick=function(){var ce=typeof window<"u"&&window.setImmediate,ue=typeof window<"u"&&window.postMessage&&window.addEventListener;if(ce)return function(me){return window.setImmediate(me)};if(ue){var pe=[];return window.addEventListener("message",function(me){var ge=me.source;ge!==window&&ge!==null||me.data!=="process-tick"||(me.stopPropagation(),pe.length>0&&pe.shift()())},!0),function(me){pe.push(me),window.postMessage("process-tick","*")}}return function(me){setTimeout(me,0)}}(),oe.title="browser",oe.browser=!0,oe.env={},oe.argv=[],oe.binding=function(ce){throw new Error("process.binding is not supported")},oe.cwd=function(){return"/"},oe.chdir=function(ce){throw new Error("process.chdir is not supported")}},6197:(ne,oe,ce)=>{var ue=ce(8834).lW;Object.defineProperty(oe,"__esModule",{value:!0}),oe.AbstractTokenizer=void 0;const pe=ce(4644);oe.AbstractTokenizer=class{constructor(me){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=me||{}}async readToken(me,ge=this.position){const ye=ue.alloc(me.len);if(await this.readBuffer(ye,{position:ge})ge)return this.position+=ge,ge}return this.position+=me,me}async close(){}normalizeOptions(me,ge){if(ge&&ge.position!==void 0&&ge.position{Object.defineProperty(oe,"__esModule",{value:!0}),oe.BufferTokenizer=void 0;const ue=ce(4644),pe=ce(6197);class me extends pe.AbstractTokenizer{constructor(ye,ve){super(ve),this.uint8Array=ye,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:ye.length}async readBuffer(ye,ve){if(ve&&ve.position){if(ve.position{Object.defineProperty(oe,"__esModule",{value:!0}),oe.fromFile=oe.FileTokenizer=void 0;const ue=ce(6197),pe=ce(4644),me=ce(5187);class ge extends ue.AbstractTokenizer{constructor(ve,xe){super(xe),this.fd=ve}async readBuffer(ve,xe){const _e=this.normalizeOptions(ve,xe);this.position=_e.position;const Se=await me.read(this.fd,ve,_e.offset,_e.length,_e.position);if(this.position+=Se.bytesRead,Se.bytesRead<_e.length&&(!xe||!xe.mayBeLess))throw new pe.EndOfStreamError;return Se.bytesRead}async peekBuffer(ve,xe){const _e=this.normalizeOptions(ve,xe),Se=await me.read(this.fd,ve,_e.offset,_e.length,_e.position);if(!_e.mayBeLess&&Se.bytesRead<_e.length)throw new pe.EndOfStreamError;return Se.bytesRead}async close(){return me.close(this.fd)}}oe.FileTokenizer=ge,oe.fromFile=async function(ye){const ve=await me.stat(ye);if(!ve.isFile)throw new Error(`File not a file: ${ye}`);const xe=await me.open(ye,"r");return new ge(xe,{path:ye,size:ve.size})}},5187:(ne,oe,ce)=>{Object.defineProperty(oe,"__esModule",{value:!0}),oe.readFile=oe.writeFileSync=oe.writeFile=oe.read=oe.open=oe.close=oe.stat=oe.createReadStream=oe.pathExists=void 0;const ue=ce(6777);oe.pathExists=ue.existsSync,oe.createReadStream=ue.createReadStream,oe.stat=async function(pe){return new Promise((me,ge)=>{ue.stat(pe,(ye,ve)=>{ye?ge(ye):me(ve)})})},oe.close=async function(pe){return new Promise((me,ge)=>{ue.close(pe,ye=>{ye?ge(ye):me()})})},oe.open=async function(pe,me){return new Promise((ge,ye)=>{ue.open(pe,me,(ve,xe)=>{ve?ye(ve):ge(xe)})})},oe.read=async function(pe,me,ge,ye,ve){return new Promise((xe,_e)=>{ue.read(pe,me,ge,ye,ve,(Se,$e,Re)=>{Se?_e(Se):xe({bytesRead:$e,buffer:Re})})})},oe.writeFile=async function(pe,me){return new Promise((ge,ye)=>{ue.writeFile(pe,me,ve=>{ve?ye(ve):ge()})})},oe.writeFileSync=function(pe,me){ue.writeFileSync(pe,me)},oe.readFile=async function(pe){return new Promise((me,ge)=>{ue.readFile(pe,(ye,ve)=>{ye?ge(ye):me(ve)})})}},8286:(ne,oe,ce)=>{Object.defineProperty(oe,"__esModule",{value:!0}),oe.ReadStreamTokenizer=void 0;const ue=ce(6197),pe=ce(4644);class me extends ue.AbstractTokenizer{constructor(ye,ve){super(ve),this.streamReader=new pe.StreamReader(ye)}async getFileInfo(){return this.fileInfo}async readBuffer(ye,ve){const xe=this.normalizeOptions(ye,ve),_e=xe.position-this.position;if(_e>0)return await this.ignore(_e),this.readBuffer(ye,ve);if(_e<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(xe.length===0)return 0;const Se=await this.streamReader.read(ye,xe.offset,xe.length);if(this.position+=Se,(!ve||!ve.mayBeLess)&&Se0){const $e=new Uint8Array(xe.length+Se);return _e=await this.peekBuffer($e,{mayBeLess:xe.mayBeLess}),ye.set($e.subarray(Se),xe.offset),_e-Se}if(Se<0)throw new Error("Cannot peek from a negative offset in a stream")}if(xe.length>0){try{_e=await this.streamReader.peek(ye,xe.offset,xe.length)}catch(Se){if(ve&&ve.mayBeLess&&Se instanceof pe.EndOfStreamError)return 0;throw Se}if(!xe.mayBeLess&&_e{Object.defineProperty(oe,"__esModule",{value:!0}),oe.fromBuffer=oe.fromStream=oe.EndOfStreamError=void 0;const ue=ce(8286),pe=ce(932);var me=ce(4644);Object.defineProperty(oe,"EndOfStreamError",{enumerable:!0,get:function(){return me.EndOfStreamError}}),oe.fromStream=function(ge,ye){return ye=ye||{},new ue.ReadStreamTokenizer(ge,ye)},oe.fromBuffer=function(ge,ye){return new pe.BufferTokenizer(ge,ye)}},3569:(ne,oe,ce)=>{Object.defineProperty(oe,"__esModule",{value:!0}),oe.fromStream=oe.fromBuffer=oe.EndOfStreamError=oe.fromFile=void 0;const ue=ce(5187),pe=ce(7378);var me=ce(9425);Object.defineProperty(oe,"fromFile",{enumerable:!0,get:function(){return me.fromFile}});var ge=ce(7378);Object.defineProperty(oe,"EndOfStreamError",{enumerable:!0,get:function(){return ge.EndOfStreamError}}),Object.defineProperty(oe,"fromBuffer",{enumerable:!0,get:function(){return ge.fromBuffer}}),oe.fromStream=async function(ye,ve){if(ve=ve||{},ye.path){const xe=await ue.stat(ye.path);ve.path=ye.path,ve.size=xe.size}return pe.fromStream(ye,ve)}},643:(ne,oe)=>{var ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(xe){return typeof xe}:function(xe){return xe&&typeof Symbol=="function"&&xe.constructor===Symbol&&xe!==Symbol.prototype?"symbol":typeof xe};oe.Ee=function(xe,_e,Se,$e,Re,Ae){for(var Ie=arguments.length,ke=Array(Ie>6?Ie-6:0),Be=6;Be3?Ae-3:0),ke=3;ke{var ue=ce(8834).lW;Object.defineProperty(oe,"__esModule",{value:!0}),oe.AnsiStringType=oe.StringType=oe.BufferType=oe.Uint8ArrayType=oe.IgnoreType=oe.Float80_LE=oe.Float80_BE=oe.Float64_LE=oe.Float64_BE=oe.Float32_LE=oe.Float32_BE=oe.Float16_LE=oe.Float16_BE=oe.INT64_BE=oe.UINT64_BE=oe.INT64_LE=oe.UINT64_LE=oe.INT32_LE=oe.INT32_BE=oe.INT24_BE=oe.INT24_LE=oe.INT16_LE=oe.INT16_BE=oe.INT8=oe.UINT32_BE=oe.UINT32_LE=oe.UINT24_BE=oe.UINT24_LE=oe.UINT16_BE=oe.UINT16_LE=oe.UINT8=void 0;const pe=ce(2333);function me(ye){return new DataView(ye.buffer,ye.byteOffset)}oe.UINT8={len:1,get:(ye,ve)=>me(ye).getUint8(ve),put:(ye,ve,xe)=>(me(ye).setUint8(ve,xe),ve+1)},oe.UINT16_LE={len:2,get:(ye,ve)=>me(ye).getUint16(ve,!0),put:(ye,ve,xe)=>(me(ye).setUint16(ve,xe,!0),ve+2)},oe.UINT16_BE={len:2,get:(ye,ve)=>me(ye).getUint16(ve),put:(ye,ve,xe)=>(me(ye).setUint16(ve,xe),ve+2)},oe.UINT24_LE={len:3,get(ye,ve){const xe=me(ye);return xe.getUint8(ve)+(xe.getUint16(ve+1,!0)<<8)},put(ye,ve,xe){const _e=me(ye);return _e.setUint8(ve,255&xe),_e.setUint16(ve+1,xe>>8,!0),ve+3}},oe.UINT24_BE={len:3,get(ye,ve){const xe=me(ye);return(xe.getUint16(ve)<<8)+xe.getUint8(ve+2)},put(ye,ve,xe){const _e=me(ye);return _e.setUint16(ve,xe>>8),_e.setUint8(ve+2,255&xe),ve+3}},oe.UINT32_LE={len:4,get:(ye,ve)=>me(ye).getUint32(ve,!0),put:(ye,ve,xe)=>(me(ye).setUint32(ve,xe,!0),ve+4)},oe.UINT32_BE={len:4,get:(ye,ve)=>me(ye).getUint32(ve),put:(ye,ve,xe)=>(me(ye).setUint32(ve,xe),ve+4)},oe.INT8={len:1,get:(ye,ve)=>me(ye).getInt8(ve),put:(ye,ve,xe)=>(me(ye).setInt8(ve,xe),ve+1)},oe.INT16_BE={len:2,get:(ye,ve)=>me(ye).getInt16(ve),put:(ye,ve,xe)=>(me(ye).setInt16(ve,xe),ve+2)},oe.INT16_LE={len:2,get:(ye,ve)=>me(ye).getInt16(ve,!0),put:(ye,ve,xe)=>(me(ye).setInt16(ve,xe,!0),ve+2)},oe.INT24_LE={len:3,get(ye,ve){const xe=oe.UINT24_LE.get(ye,ve);return xe>8388607?xe-16777216:xe},put(ye,ve,xe){const _e=me(ye);return _e.setUint8(ve,255&xe),_e.setUint16(ve+1,xe>>8,!0),ve+3}},oe.INT24_BE={len:3,get(ye,ve){const xe=oe.UINT24_BE.get(ye,ve);return xe>8388607?xe-16777216:xe},put(ye,ve,xe){const _e=me(ye);return _e.setUint16(ve,xe>>8),_e.setUint8(ve+2,255&xe),ve+3}},oe.INT32_BE={len:4,get:(ye,ve)=>me(ye).getInt32(ve),put:(ye,ve,xe)=>(me(ye).setInt32(ve,xe),ve+4)},oe.INT32_LE={len:4,get:(ye,ve)=>me(ye).getInt32(ve,!0),put:(ye,ve,xe)=>(me(ye).setInt32(ve,xe,!0),ve+4)},oe.UINT64_LE={len:8,get:(ye,ve)=>me(ye).getBigUint64(ve,!0),put:(ye,ve,xe)=>(me(ye).setBigUint64(ve,xe,!0),ve+8)},oe.INT64_LE={len:8,get:(ye,ve)=>me(ye).getBigInt64(ve,!0),put:(ye,ve,xe)=>(me(ye).setBigInt64(ve,xe,!0),ve+8)},oe.UINT64_BE={len:8,get:(ye,ve)=>me(ye).getBigUint64(ve),put:(ye,ve,xe)=>(me(ye).setBigUint64(ve,xe),ve+8)},oe.INT64_BE={len:8,get:(ye,ve)=>me(ye).getBigInt64(ve),put:(ye,ve,xe)=>(me(ye).setBigInt64(ve,xe),ve+8)},oe.Float16_BE={len:2,get(ye,ve){return pe.read(ye,ve,!1,10,this.len)},put(ye,ve,xe){return pe.write(ye,xe,ve,!1,10,this.len),ve+this.len}},oe.Float16_LE={len:2,get(ye,ve){return pe.read(ye,ve,!0,10,this.len)},put(ye,ve,xe){return pe.write(ye,xe,ve,!0,10,this.len),ve+this.len}},oe.Float32_BE={len:4,get:(ye,ve)=>me(ye).getFloat32(ve),put:(ye,ve,xe)=>(me(ye).setFloat32(ve,xe),ve+4)},oe.Float32_LE={len:4,get:(ye,ve)=>me(ye).getFloat32(ve,!0),put:(ye,ve,xe)=>(me(ye).setFloat32(ve,xe,!0),ve+4)},oe.Float64_BE={len:8,get:(ye,ve)=>me(ye).getFloat64(ve),put:(ye,ve,xe)=>(me(ye).setFloat64(ve,xe),ve+8)},oe.Float64_LE={len:8,get:(ye,ve)=>me(ye).getFloat64(ve,!0),put:(ye,ve,xe)=>(me(ye).setFloat64(ve,xe,!0),ve+8)},oe.Float80_BE={len:10,get(ye,ve){return pe.read(ye,ve,!1,63,this.len)},put(ye,ve,xe){return pe.write(ye,xe,ve,!1,63,this.len),ve+this.len}},oe.Float80_LE={len:10,get(ye,ve){return pe.read(ye,ve,!0,63,this.len)},put(ye,ve,xe){return pe.write(ye,xe,ve,!0,63,this.len),ve+this.len}},oe.IgnoreType=class{constructor(ye){this.len=ye}get(ye,ve){}},oe.Uint8ArrayType=class{constructor(ye){this.len=ye}get(ye,ve){return ye.subarray(ve,ve+this.len)}},oe.BufferType=class{constructor(ye){this.len=ye}get(ye,ve){return ue.from(ye.subarray(ve,ve+this.len))}},oe.StringType=class{constructor(ye,ve){this.len=ye,this.encoding=ve}get(ye,ve){return ue.from(ye).toString(this.encoding,ve,ve+this.len)}};class ge{constructor(ve){this.len=ve}static decode(ve,xe,_e){let Se="";for(let $e=xe;$e<_e;++$e)Se+=ge.codePointToString(ge.singleByteDecoder(ve[$e]));return Se}static inRange(ve,xe,_e){return xe<=ve&&ve<=_e}static codePointToString(ve){return ve<=65535?String.fromCharCode(ve):(ve-=65536,String.fromCharCode(55296+(ve>>10),56320+(1023&ve)))}static singleByteDecoder(ve){if(ge.inRange(ve,0,127))return ve;const xe=ge.windows1252[ve-128];if(xe===null)throw Error("invaliding encoding");return xe}get(ve,xe=0){return ge.decode(ve,xe,xe+this.len)}}oe.AnsiStringType=ge,ge.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},311:(ne,oe)=>{(oe=ne.exports=function(ce){return ce.replace(/^\s*|\s*$/g,"")}).left=function(ce){return ce.replace(/^\s*/,"")},oe.right=function(ce){return ce.replace(/\s*$/,"")}},9299:(ne,oe,ce)=>{var ue=ce(4406);(function(){var pe={};function me(){ue===void 0&&console.log.apply(console,arguments)}ne.exports=pe,function(ge,ye){var ve,xe,_e,Se,$e,Re,Ae,Ie,ke,Be,Ne,Fe,Ue,We,qe;(function(){var ze=function(){function Dt(Je){this.message="JPEG error: "+Je}return Dt.prototype=new Error,Dt.prototype.name="JpegError",Dt.constructor=Dt,Dt}(),Ge=function(){var Dt=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),Je=4017,Ut=799,jt=3406,Ke=2276,an=1567,Zt=3784,en=5793,Kt=2896;function Wt(Nt){Nt==null&&(Nt={}),Nt.w==null&&(Nt.w=-1),this.V=Nt.n,this.N=Nt.w}function un(Nt,Yt){for(var Jt,hn,Ye,Xe=0,Pt=[],sn=16;sn>0&&!Nt[sn-1];)sn--;Pt.push({children:[],index:0});var yn=Pt[0];for(Jt=0;Jt0;)yn=Pt.pop();for(yn.index++,Pt.push(yn);Pt.length<=Jt;)Pt.push(Ye={children:[],index:0}),yn.children[yn.index]=Ye.children,yn=Ye;Xe++}Jt+10)return kn--,bn>>kn&1;if((bn=Nt[Yt++])===255){var nr=Nt[Yt++];if(nr){if(nr===220&&qt){var kr=Ze(Nt,Yt+=2);if(Yt+=2,kr>0&&kr!==Jt.s)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",kr)}else if(nr===217){if(qt){var Mr=8*dn;if(Mr>0&&Mr>>7}function Pn(nr){for(var kr=nr;;){switch(typeof(kr=kr[mn()])){case"number":return kr;case"object":continue}throw new ze("invalid huffman sequence")}}function ur(nr){for(var kr=0;nr>0;)kr=kr<<1|mn(),nr--;return kr}function er(nr){if(nr===1)return mn()===1?1:-1;var kr=ur(nr);return kr>=1<0)jn--;else for(var Mr=Xe,Rr=Pt;Mr<=Rr;){var Yr=Pn(nr.i),li=15&Yr,ei=Yr>>4;if(li!==0){var Pr=Dt[Mr+=ei];nr.D[kr+Pr]=er(li)*(1<>4,(Mr=15&Rr)==0)ei<15?(jn=ur(ei)+(1<>4;if(ei!==0){var hi=Dt[Yr+=Pr];nr.D[kr+hi]=er(ei),Yr++}else{if(Pr<15)break;Yr+=16}}},Mn=Sr===1?hn[0].P*hn[0].c:pn*Jt.R;Bn<=Mn;){var sr=Ye?Math.min(Mn-Bn,Ye):Mn;if(sr>0){for(xn=0;xn=65488&&Rn.M<=65495)))break;Yt+=2}return Yt-Gt}function vn(Nt,Yt,Jt){var hn,Ye,Xe,Pt,sn,yn,qt,wn,Tn,xn,Nn,zn,Yn,Kn,Rn,Mn,Xn,Jn=Nt.$,pn=Nt.D;if(!Jn)throw new ze("missing required Quantization Table.");for(var tn=0;tn<64;tn+=8)Tn=pn[Yt+tn],xn=pn[Yt+tn+1],Nn=pn[Yt+tn+2],zn=pn[Yt+tn+3],Yn=pn[Yt+tn+4],Kn=pn[Yt+tn+5],Rn=pn[Yt+tn+6],Mn=pn[Yt+tn+7],Tn*=Jn[tn],xn|Nn|zn|Yn|Kn|Rn|Mn?(xn*=Jn[tn+1],Nn*=Jn[tn+2],zn*=Jn[tn+3],Yn*=Jn[tn+4],Kn*=Jn[tn+5],Rn*=Jn[tn+6],Mn*=Jn[tn+7],Ye=(hn=(hn=en*Tn+128>>8)+(Ye=en*Yn+128>>8)+1>>1)-Ye,Xn=(Xe=Nn)*Zt+(Pt=Rn)*an+128>>8,Xe=Xe*an-Pt*Zt+128>>8,qt=(sn=(sn=Kt*(xn-Mn)+128>>8)+(qt=Kn<<4)+1>>1)-qt,yn=(wn=(wn=Kt*(xn+Mn)+128>>8)+(yn=zn<<4)+1>>1)-yn,Pt=(hn=hn+(Pt=Xn)+1>>1)-Pt,Xe=(Ye=Ye+Xe+1>>1)-Xe,Xn=sn*Ke+wn*jt+2048>>12,sn=sn*jt-wn*Ke+2048>>12,wn=Xn,Xn=yn*Ut+qt*Je+2048>>12,yn=yn*Je-qt*Ut+2048>>12,qt=Xn,Jt[tn]=hn+wn,Jt[tn+7]=hn-wn,Jt[tn+1]=Ye+qt,Jt[tn+6]=Ye-qt,Jt[tn+2]=Xe+yn,Jt[tn+5]=Xe-yn,Jt[tn+3]=Pt+sn,Jt[tn+4]=Pt-sn):(Xn=en*Tn+512>>10,Jt[tn]=Xn,Jt[tn+1]=Xn,Jt[tn+2]=Xn,Jt[tn+3]=Xn,Jt[tn+4]=Xn,Jt[tn+5]=Xn,Jt[tn+6]=Xn,Jt[tn+7]=Xn);for(var Gt=0;Gt<8;++Gt)Tn=Jt[Gt],(xn=Jt[Gt+8])|(Nn=Jt[Gt+16])|(zn=Jt[Gt+24])|(Yn=Jt[Gt+32])|(Kn=Jt[Gt+40])|(Rn=Jt[Gt+48])|(Mn=Jt[Gt+56])?(Ye=(hn=4112+((hn=en*Tn+2048>>12)+(Ye=en*Yn+2048>>12)+1>>1))-Ye,Xn=(Xe=Nn)*Zt+(Pt=Rn)*an+2048>>12,Xe=Xe*an-Pt*Zt+2048>>12,Pt=Xn,qt=(sn=(sn=Kt*(xn-Mn)+2048>>12)+(qt=Kn)+1>>1)-qt,yn=(wn=(wn=Kt*(xn+Mn)+2048>>12)+(yn=zn)+1>>1)-yn,Xn=sn*Ke+wn*jt+2048>>12,sn=sn*jt-wn*Ke+2048>>12,wn=Xn,Xn=yn*Ut+qt*Je+2048>>12,yn=yn*Je-qt*Ut+2048>>12,(Tn=(hn=hn+Pt+1>>1)+wn)<16?Tn=0:Tn>=4080?Tn=255:Tn>>=4,(xn=(Ye=Ye+Xe+1>>1)+(qt=Xn))<16?xn=0:xn>=4080?xn=255:xn>>=4,(Nn=(Xe=Ye-Xe)+yn)<16?Nn=0:Nn>=4080?Nn=255:Nn>>=4,(zn=(Pt=hn-Pt)+sn)<16?zn=0:zn>=4080?zn=255:zn>>=4,(Yn=Pt-sn)<16?Yn=0:Yn>=4080?Yn=255:Yn>>=4,(Kn=Xe-yn)<16?Kn=0:Kn>=4080?Kn=255:Kn>>=4,(Rn=Ye-qt)<16?Rn=0:Rn>=4080?Rn=255:Rn>>=4,(Mn=hn-wn)<16?Mn=0:Mn>=4080?Mn=255:Mn>>=4,pn[Yt+Gt]=Tn,pn[Yt+Gt+8]=xn,pn[Yt+Gt+16]=Nn,pn[Yt+Gt+24]=zn,pn[Yt+Gt+32]=Yn,pn[Yt+Gt+40]=Kn,pn[Yt+Gt+48]=Rn,pn[Yt+Gt+56]=Mn):(Xn=(Xn=en*Tn+8192>>14)<-2040?0:Xn>=2024?255:Xn+2056>>4,pn[Yt+Gt]=Xn,pn[Yt+Gt+8]=Xn,pn[Yt+Gt+16]=Xn,pn[Yt+Gt+24]=Xn,pn[Yt+Gt+32]=Xn,pn[Yt+Gt+40]=Xn,pn[Yt+Gt+48]=Xn,pn[Yt+Gt+56]=Xn)}function Sn(Nt,Yt){for(var Jt=Yt.P,hn=Yt.c,Ye=new Int16Array(64),Xe=0;Xe=hn)return null;var Xe=Ze(Nt,Yt);if(Xe>=65472&&Xe<=65534)return{u:null,M:Xe,offset:Yt};for(var Pt=Ze(Nt,Ye);!(Pt>=65472&&Pt<=65534);){if(++Ye>=hn)return null;Pt=Ze(Nt,Ye)}return{u:Xe.toString(16),M:Pt,offset:Ye}}return Wt.prototype={parse(Nt,Yt){Yt==null&&(Yt={});var Jt,hn,Ye=Yt.F,Xe=0,Pt=null,sn=null,yn=0;function qt(){var yi=Ze(Nt,Xe),Gi=(Xe+=2)+yi-2,gi=Cn(Nt,Gi,Xe);gi&&gi.u&&(Gi=gi.offset);var xi=Nt.subarray(Xe,Gi);return Xe+=xi.length,xi}function wn(yi){for(var Gi=Math.ceil(yi.o/8/yi.X),gi=Math.ceil(yi.s/8/yi.B),xi=0;xi>4){if(Jn>>4!=1)throw new ze("DQT - invalid table spec");for(Kn=0;Kn<64;Kn++)pn[Dt[Kn]]=Ze(Nt,Xe),Xe+=2}else for(Kn=0;Kn<64;Kn++)pn[Dt[Kn]]=Nt[Xe++];Tn[15&Jn]=pn}break;case 65472:case 65473:case 65474:if(Jt)throw new ze("Only single frame JPEGs supported");Xe+=2,(Jt={}).G=zn===65473,Jt.Z=zn===65474,Jt.precision=Nt[Xe++];var tn,Gt=Ze(Nt,Xe),bn=0,kn=0;Xe+=2,Jt.s=Ye||Gt,Jt.o=Ze(Nt,Xe),Xe+=2,Jt.W=[],Jt._={};var jn=Nt[Xe++];for(Yn=0;Yn>4,dn=15&Nt[Xe+1];bn>4?xn:Nn)[15&Pn]=un(ur,_r)}break;case 65501:hn=Ze(Nt,Xe+=2),Xe+=2;break;case 65498:var dr,Sr=++yn==1&&!Ye;Xe+=2;var sr=Nt[Xe++],nr=[];for(Yn=0;Yn>4],dr.i=xn[15&Rr],nr.push(dr)}var Yr=Nt[Xe++],li=Nt[Xe++],ei=Nt[Xe++];try{var Pr=nn(Nt,Xe,Jt,nr,hn,Yr,li,ei>>4,15&ei,Sr);Xe+=Pr}catch(yi){if(yi instanceof DNLMarkerError)return this.parse(Nt,{F:yi.s});if(yi instanceof EOIMarkerError)break e;throw yi}break;case 65500:Xe+=4;break;case 65535:Nt[Xe]!==255&&Xe--;break;default:var hi=Cn(Nt,Xe-2,Xe-3);if(hi&&hi.u){Xe=hi.offset;break}if(Xe>=Nt.length-1)break e;throw new ze("JpegImage.parse - unknown marker: "+zn.toString(16))}zn=Ze(Nt,Xe),Xe+=2}for(this.width=Jt.o,this.height=Jt.s,this.g=Pt,this.b=sn,this.W=[],Yn=0;Yn>8)+Gt[Tn+1];return Jn},get f(){return this.b?!!this.b.a:this.p===3?this.N!==0&&(this.W[0].index!==82||this.W[1].index!==71||this.W[2].index!==66):this.N===1},z:function(Nt){for(var Yt,Jt,hn,Ye=0,Xe=Nt.length;Ye4)throw new ze("Unsupported color mode");var Xe=this.Y(Yt,Jt,Ye);if(this.p===1&&hn){for(var Pt=Xe.length,sn=new Uint8ClampedArray(3*Pt),yn=0,qt=0;qt3&&(Ge.t258=Ge.t258.slice(0,3)),Ut=Ge.t258?Math.min(32,Ge.t258[0])*Ge.t258.length:Ge.t277?Ge.t277[0]:1,jt==1&&Ge.t279!=null&&Ge.t278&&Ge.t262[0]==32803&&(Ut=Math.round(8*Ge.t279[0]/(Ge.width*Ge.t278[0]))),Ge.t50885&&Ge.t50885[0]==4&&(Ut=3*Ge.t258[0]);var an=8*Math.ceil(Ge.width*Ut/8),Zt=Ge.t273;(Zt==null||Ge.t322)&&(Zt=Ge.t324);var en=Ge.t279;jt==1&&Zt.length==1&&(en=[Ge.height*(an>>>3)]),(en==null||Ge.t322)&&(en=Ge.t325);var Kt=new Uint8Array(Ge.height*(an>>>3)),Wt=0;if(Ge.t322!=null){var un=Ge.t322[0],Xt=Ge.t323[0],nn=Math.floor((Ge.width+un-1)/un),vn=Math.floor((Ge.height+Xt-1)/Xt),Sn=new Uint8Array(0|Math.ceil(un*Xt*Ut/8));console.log("====",nn,vn);for(var Cn=0;Cn>>3,vn=ze.t278?ze.t278[0]:ze.height,Sn=Math.ceil(un*Xt*ze.width/8);if(un==16&&!ze.isLE&&ze.t33422==null)for(var Cn=0;Cn>>8&255}else if(Xt==3)for(Zt=3;Zt>>3]>>>7-(7&Xt)&1;return un[1]++,nn}function jt(un,Xt){if(ze==null){ze={};for(var nn=0;nn>>=1;return un}function an(un,Xt){return un>>Xt}function Zt(un,Xt,nn,vn,Sn,Cn){Xt[nn]=an(an(11*un[Sn]-4*un[Sn+Cn]+un[Sn+Cn+Cn]+4,3)+un[vn],1),Xt[nn+Cn]=an(an(5*un[Sn]+4*un[Sn+Cn]-un[Sn+Cn+Cn]+4,3)-un[vn],1)}function en(un,Xt,nn,vn,Sn,Cn){var Nt=un[Sn-Cn]-un[Sn+Cn],Yt=un[Sn],Jt=un[vn];Xt[nn]=an(an(Nt+4,3)+Yt+Jt,1),Xt[nn+Cn]=an(an(4-Nt,3)+Yt-Jt,1)}function Kt(un,Xt,nn,vn,Sn,Cn){Xt[nn]=an(an(5*un[Sn]+4*un[Sn-Cn]-un[Sn-Cn-Cn]+4,3)+un[vn],1),Xt[nn+Cn]=an(an(11*un[Sn]-4*un[Sn-Cn]+un[Sn-Cn-Cn]+4,3)-un[vn],1)}function Wt(un){return Ze[un=un<0?0:un>4095?4095:un]>>>2}return function(un,Xt,nn,vn,Sn){vn=new Uint16Array(vn.buffer);var Cn,Nt,Yt,Jt,hn,Ye,Xe,Pt,sn=Date.now(),yn=ge._binBE,qt=Xt+nn;for(Xt+=4;Xt>>1)*(Nt>>>1));for(Pt=new Int16Array((Cn>>>1)*(Nt>>>1)),Ge=new Int16Array(1024),Yn=0;Yn<1024;Yn++){var Kn=Yn-512,Rn=Math.abs(Kn),Mn=Math.floor(768*Rn*Rn*Rn/16581375)+Rn;Ge[Yn]=Math.sign(Kn)*Mn}for(Ze=new Uint16Array(4096),Yn=0;Yn<4096;Yn++){var Xn=Yn,Jn=65535*(Math.pow(113,Xn/4095)-1)/112;Ze[Yn]=Math.min(Jn,65535)}}var pn=Xe[hn],tn=Ke(Cn,1+Je[Yt]),Gt=Ke(Nt,1+Je[Yt]);if(Yt==0)for(var bn=0;bn>>1)+kn]=un[jn]<<8|un[jn+1]}else{var Wn=[un,8*Xt],dn=[],Bn=0,mn=tn*Gt,Pn=[0,0],ur=0;for(Tn=0;Bn0;)dn[Bn++]=Tn,ur--;var er=(Yt-1)%3,_r=er!=1?tn:0,dr=er!=0?Gt:0;for(bn=0;bn>>1)+_r,sr=bn*tn;for(kn=0;kn>>1,kr=2*tn,Mr=2*Gt;for(bn=0;bn>14-2*hi&3;var mi=ei[Pr];if(mi!=0)for(bn=0;bn>>1)*(Cn>>>1)+(kn>>>1)],bi=Gi[jn]-2048,oi=gi[jn]-2048,ki=xi[jn]-2048,Co=(bi<<1)+fi,Wi=(oi<<1)+fi,Di=fi+ki,pi=fi-ki;vn[Ni]=Wt(Co),vn[Ni+1]=Wt(Di),vn[Ni+Cn]=Wt(pi),vn[Ni+Cn+1]=Wt(Wi)}}Xt+=4*zn}else if(xn==16388)Xt+=4*zn;else if(Nn!=8192&&Nn!=8448&&Nn!=9216)throw xn.toString(16)}}}}}}}}}console.log(Date.now()-sn)}}(),ge.decode._decodeLogLuv32=function(ze,Ge,Ze,Dt,Je,Ut){for(var jt=ze.width,Ke=4*jt,an=0,Zt=new Uint8Array(Ke);an>>11,un=15&en>>>22,Xt=15&en>>>26,nn=0;nn<4&&128<>3))>>>(7&vn)&127)<2047&&(Cn[Jt]=2047),vn+=7);for(Jt=0;Jt<16;Jt++,sn+=2)Kn=Cn[Jt]<<1,ge.decode._putsF(Je,(yn*jt+sn)*an,Kn<<16-an);sn-=1&sn?1:31}}}else for(var Jt=0;Jt>>4,Je[Ut+Jt+1]=hn<<4|Xe>>>4,Je[Ut+Jt+2]=Xe<<4|Ye>>>4}else{Ke+=8;var Pt,sn,yn,qt=[Ze,0,0,0],wn=new Uint16Array(32770),Tn=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],xn=0,Nn=ge.decode._ljpeg_diff;for(wn[0]=15,Pt=Jt=0;Jt<18;Jt++)for(var zn=32768>>>(Tn[Jt]>>>8),Yn=0;Yn1&&(Tn=Math.floor(wn/(xn-1))),Cn==68&&Nt==32&&Tn>0&&(Wt=Jt.readShort(vn,562));var Nn=[0,0],zn=un(Ke[Kt]),Yn=[Dt,0,0,0];for(Xe=0;Xe>>4),0)<<1)<>>1)&1<>>3;ze[Dt]|=Ze>>>16,ze[Dt+1]|=Ze>>>8,ze[Dt+2]|=Ze},ge.decode._getbithuff=function(ze,Ge,Ze,Dt){ge.decode._get_byte;var Je,Ut=Ge[0],jt=Ge[1],Ke=Ge[2],an=Ge[3];if(Ze==0||Ke<0)return 0;for(;!an&&Ke>>32-Ze,Dt?(Ke-=Dt[Je+1]>>>8,Je=255&Dt[Je+1]):Ke-=Ze,Ke<0)throw"e";return Ge[0]=Ut,Ge[1]=jt,Ge[2]=Ke,Ge[3]=an,Je},ge.decode._make_decoder=function(ze){var Ge,Ze,Dt,Je,Ut,jt=[];for(Ge=16;Ge!=0&&!ze[Ge];Ge--);var Ke=17;for(jt[0]=Ge,Dt=Ze=1;Ze<=Ge;Ze++)for(Je=0;Je>>8;else for(en=0;en>>8,Je[Ut+(en<<1)+1]=255&Xt[en];else if(un==14||un==12){var vn=16-un;for(en=0;en1),!Wt){if(Ge[Ze]==255&&Ge[Ze+1]==Zt)return{jpegOffset:Ze};if(un!=null&&(Ge[Ze+Xt]==255&&Ge[Ze+Xt+1]==Zt?en=Ze+Xt:me("JPEGInterchangeFormat does not point to SOI"),nn==null?me("JPEGInterchangeFormatLength field is missing"):(Xt>=Kt||Xt+vn<=Kt)&&me("JPEGInterchangeFormatLength field value is invalid"),en!=null))return{jpegOffset:en}}if(Cn!=null&&(Nt=Cn[0],Yt=Cn[1]),un!=null&&nn!=null)if(vn>=2&&Xt+vn<=Kt){for(Je=Ge[Ze+Xt+vn-2]==255&&Ge[Ze+Xt+vn-1]==Zt?new Uint8Array(vn-2):new Uint8Array(vn),jt=0;jt offset to first strip or tile");if(Je==null){var Ye=0,Xe=[];Xe[Ye++]=255,Xe[Ye++]=Zt;var Pt=ze.t519;if(Pt==null)throw new Error("JPEGQTables tag is missing");for(jt=0;jt>>8,Xe[Ye++]=255&yn,Xe[Ye++]=jt|an<<4,Ke=0;Ke<16;Ke++)Xe[Ye++]=Ge[Ze+sn[jt]+Ke];for(Ke=0;Ke>>8&255,Xe[Ye++]=255&ze.height,Xe[Ye++]=ze.width>>>8&255,Xe[Ye++]=255&ze.width,Xe[Ye++]=Jt,Jt==1)Xe[Ye++]=1,Xe[Ye++]=17,Xe[Ye++]=0;else for(jt=0;jt<3;jt++)Xe[Ye++]=jt+1,Xe[Ye++]=jt!=0?17:(15&Nt)<<4|15&Yt,Xe[Ye++]=jt;hn!=null&&hn[0]!=0&&(Xe[Ye++]=255,Xe[Ye++]=221,Xe[Ye++]=0,Xe[Ye++]=4,Xe[Ye++]=hn[0]>>>8&255,Xe[Ye++]=255&hn[0]),Je=new Uint8Array(Xe)}var qt=-1;for(jt=0;jt>>8&255,Je[Tn++]=255&ze.height,Je[Tn++]=ze.width>>>8&255,Je[Tn++]=255&ze.width,Je[Tn++]=Jt,Jt==1)Je[Tn++]=1,Je[Tn++]=17,Je[Tn++]=0;else for(jt=0;jt<3;jt++)Je[Tn++]=jt+1,Je[Tn++]=jt!=0?17:(15&Nt)<<4|15&Yt,Je[Tn++]=jt}if(Ge[Kt]==255&&Ge[Kt+1]==218){var xn=Ge[Kt+2]<<8|Ge[Kt+3];for((Ut=new Uint8Array(xn+2))[0]=Ge[Kt],Ut[1]=Ge[Kt+1],Ut[2]=Ge[Kt+2],Ut[3]=Ge[Kt+3],jt=0;jt>>8&255,an[en.sofPosition+6]=255&ze.height,an[en.sofPosition+7]=ze.width>>>8&255,an[en.sofPosition+8]=255&ze.width,Ge[Ze]==255&&Ge[Ze+1]==SOS||(an.set(en.sosMarker,Zt),Zt+=sosMarker.length),un=0;un=0&&an<128)for(var Zt=0;Zt=-127&&an<0){for(Zt=0;Zt<1-an;Zt++)jt[Je]=Ut[Ge],Je++;Ge++}}return Je},ge.decode._decodeThunder=function(ze,Ge,Ze,Dt,Je){for(var Ut=[0,1,0,-1],jt=[0,1,2,3,0,-3,-2,-1],Ke=Ge+Ze,an=2*Je,Zt=0;Ge>>6,Wt=63&en;if(Ge++,Kt==3&&(Zt=15&Wt,Dt[an>>>1]|=Zt<<4*(1-an&1),an++),Kt==0)for(var un=0;un>>1]|=Zt<<4*(1-an&1),an++;if(Kt==2)for(un=0;un<2;un++)(Xt=Wt>>>3*(1-un)&7)!=4&&(Zt+=jt[Xt],Dt[an>>>1]|=Zt<<4*(1-an&1),an++);if(Kt==1)for(un=0;un<3;un++){var Xt;(Xt=Wt>>>2*(2-un)&3)!=2&&(Zt+=Ut[Xt],Dt[an>>>1]|=Zt<<4*(1-an&1),an++)}}},ge.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},ge.decode._lens=function(){var ze=function(an,Zt,en,Kt){for(var Wt=0;Wt>>3>>3]>>>7-(7&an)&1),jt==2&&(Ye=ze[an>>>3]>>>(7&an)&1),an++,en+=Ye,Yt=="H"){if(Ke._lens[Cn][en]!=null){var Xe=Ke._lens[Cn][en];en="",Zt+=Xe,Xe<64&&(Ke._addNtimes(Kt,Zt,Cn),Xt+=Zt,Cn=1-Cn,Zt=0,--Jt==0&&(Yt=""))}}else en=="0001"&&(en="",Ke._addNtimes(Kt,Sn-Xt,Cn),Xt=Sn),en=="001"&&(en="",Yt="H",Jt=2),Ke._dmap[en]!=null&&(nn=vn+Ke._dmap[en],Ke._addNtimes(Kt,nn-Xt,Cn),Xt=nn,en="",Cn=1-Cn);Kt.length==Ut&&Yt==""&&(Ke._writeBits(Kt,Dt,8*Je+Nt*hn),Cn=0,Nt++,Xt=0,Wt=Ke._makeDiff(Kt),Kt=[])}},ge.decode._findDiff=function(ze,Ge,Ze){for(var Dt=0;Dt=Ge&&ze[Dt+1]==Ze)return ze[Dt]},ge.decode._makeDiff=function(ze){var Ge=[];ze[0]==1&&Ge.push(0,1);for(var Ze=1;Ze>>3>>3]>>>7-(7&an)&1),jt==2&&(nn=ze[an>>>3]>>>(7&an)&1),an++,en+=nn,(Zt=Ke._lens[Wt][en])!=null&&(Ke._addNtimes(Kt,Zt,Wt),en="",Zt<64&&(Wt=1-Wt),Kt.length==Ut&&(Ke._writeBits(Kt,Dt,8*Je+un*Xt),Kt=[],un++,Wt=0,7&an&&(an+=8-(7&an)),Zt>=64&&(an+=8)))}},ge.decode._decodeG3=function(ze,Ge,Ze,Dt,Je,Ut,jt,Ke){for(var an=ge.decode,Zt=Ge<<3,en=0,Kt="",Wt=[],un=[],Xt=0;Xt>>3>>3]>>>7-(7&Zt)&1),jt==2&&(Pt=ze[Zt>>>3]>>>(7&Zt)&1),Zt++,Kt+=Pt,Ye){if(an._lens[Nt][Kt]!=null){var sn=an._lens[Nt][Kt];Kt="",en+=sn,sn<64&&(an._addNtimes(Wt,en,Nt),Nt=1-Nt,en=0)}}else Jt=="H"?an._lens[Nt][Kt]!=null&&(sn=an._lens[Nt][Kt],Kt="",en+=sn,sn<64&&(an._addNtimes(Wt,en,Nt),nn+=en,Nt=1-Nt,en=0,--hn==0&&(Jt=""))):(Kt=="0001"&&(Kt="",an._addNtimes(Wt,Cn-nn,Nt),nn=Cn),Kt=="001"&&(Kt="",Jt="H",hn=2),an._dmap[Kt]!=null&&(vn=Sn+an._dmap[Kt],an._addNtimes(Wt,vn-nn,Nt),nn=vn,Kt="",Nt=1-Nt));Kt.endsWith("000000000001")&&(Yt>=0&&an._writeBits(Wt,Dt,8*Je+Yt*Xe),Ke&&(jt==1&&(Ye=(ze[Zt>>>3]>>>7-(7&Zt)&1)==1),jt==2&&(Ye=(ze[Zt>>>3]>>>(7&Zt)&1)==1),Zt++),Kt="",Nt=0,Yt++,nn=0,un=an._makeDiff(Wt),Wt=[])}Wt.length==Ut&&an._writeBits(Wt,Dt,8*Je+Yt*Xe)},ge.decode._addNtimes=function(ze,Ge,Ze){for(var Dt=0;Dt>>3]|=ze[Dt]<<7-(Ze+Dt&7)},ge.decode._decodeLZW=ge.decode._decodeLZW=($e=0,Re=0,Ae=0,Ie=0,ke=function(){var ze=ve>>>3,Ge=(xe[ze]<<16|xe[ze+1]<<8|xe[ze+2])>>>24-(7&ve)-Re&(1<>>----------------");for(var an=0;an4&&(ze.writeUint(Ze,Dt,Ke),nn=Ke),Kt==1||Kt==7)for(var vn=0;vn4&&(Ke+=Xt+=1&Xt),Dt+=4}}return[Dt,Ke]},ge.toRGBA8=function(ze,Ge){var Ze=ze.width,Dt=ze.height,Je=Ze*Dt,Ut=4*Je,jt=ze.data,Ke=new Uint8Array(4*Je),an=ze.t262?ze.t262[0]:2,Zt=ze.t258?Math.min(32,ze.t258[0]):1;if(ze.t262==null&&Zt==1&&(an=0),an==0)for(var en=Math.ceil(Zt*Ze/8),Kt=0;Kt>3)]>>7-(7&Xt)&1;Ke[nn]=Ke[nn+1]=Ke[nn+2]=255*(1-vn),Ke[nn+3]=255}if(Zt==4)for(Xt=0;Xt>1)]>>4-4*(1&Xt)&15,Ke[nn]=Ke[nn+1]=Ke[nn+2]=17*(15-vn),Ke[nn+3]=255;if(Zt==8)for(Xt=0;Xt>3)]>>7-(7&Xt)&1,Ke[nn]=Ke[nn+1]=Ke[nn+2]=255*vn,Ke[nn+3]=255;if(Zt==2)for(Xt=0;Xt>2)]>>6-2*(3&Xt)&3,Ke[nn]=Ke[nn+1]=Ke[nn+2]=85*vn,Ke[nn+3]=255;if(Zt==8)for(Xt=0;Xt>>3)]>>>7-(7&Xe)&1;else if(Zt==2)Pt=jt[sn+(Xe>>>2)]>>>6-2*(3&Xe)&3;else if(Zt==4)Pt=jt[sn+(Xe>>>1)]>>>4-4*(1&Xe)&15;else{if(Zt!=8)throw Zt;Pt=jt[sn+Xe*Sn]}Ke[nn]=hn[Pt]>>8,Ke[nn+1]=hn[Ye+Pt]>>8,Ke[nn+2]=hn[Ye+Ye+Pt]>>8,Ke[nn+3]=255}}else if(an==5){var yn=(Sn=ze.t258?ze.t258.length:4)>4?1:0;for(Xt=0;Xt>>1))+(1&Rn)];var Mn=jt[qt+2]-128,Xn=jt[qt+3]-128,Jn=xn+((Xn>>2)+(Xn>>3)+(Xn>>5)),pn=xn-((Mn>>2)+(Mn>>4)+(Mn>>5))-((Xn>>1)+(Xn>>3)+(Xn>>4)+(Xn>>5)),tn=xn+(Mn+(Mn>>1)+(Mn>>2)+(Mn>>6));Ke[nn]=Math.max(0,Math.min(255,Jn)),Ke[nn+1]=Math.max(0,Math.min(255,pn)),Ke[nn+2]=Math.max(0,Math.min(255,tn)),Ke[nn+3]=255}}}else if(an==32845){let mn=function(Pn){return Pn<.0031308?12.92*Pn:1.055*Math.pow(Pn,.4166666666666667)-.055};for(Kt=0;KtDt&&(Dt=Ke,Je=jt)}}ge.decodeImage(ze,Je,Ge);var an=ge.toRGBA8(Je),Zt=Je.width,en=Je.height,Kt=document.createElement("canvas");Kt.width=Zt,Kt.height=en;var Wt=Kt.getContext("2d"),un=new ImageData(new Uint8ClampedArray(an.buffer),Zt,en);return Wt.putImageData(un,0,0),Kt.toDataURL()},ge._binBE={nextZero:function(ze,Ge){for(;ze[Ge]!=0;)Ge++;return Ge},readUshort:function(ze,Ge){return ze[Ge]<<8|ze[Ge+1]},readShort:function(ze,Ge){var Ze=ge._binBE.ui8;return Ze[0]=ze[Ge+1],Ze[1]=ze[Ge+0],ge._binBE.i16[0]},readInt:function(ze,Ge){var Ze=ge._binBE.ui8;return Ze[0]=ze[Ge+3],Ze[1]=ze[Ge+2],Ze[2]=ze[Ge+1],Ze[3]=ze[Ge+0],ge._binBE.i32[0]},readUint:function(ze,Ge){var Ze=ge._binBE.ui8;return Ze[0]=ze[Ge+3],Ze[1]=ze[Ge+2],Ze[2]=ze[Ge+1],Ze[3]=ze[Ge+0],ge._binBE.ui32[0]},readASCII:function(ze,Ge,Ze){for(var Dt="",Je=0;Je>8&255,ze[Ge+1]=255&Ze},writeInt:function(ze,Ge,Ze){var Dt=ge._binBE.ui8;ge._binBE.i32[0]=Ze,ze[Ge+3]=Dt[0],ze[Ge+2]=Dt[1],ze[Ge+1]=Dt[2],ze[Ge+0]=Dt[3]},writeUint:function(ze,Ge,Ze){ze[Ge]=Ze>>24&255,ze[Ge+1]=Ze>>16&255,ze[Ge+2]=Ze>>8&255,ze[Ge+3]=Ze>>0&255},writeASCII:function(ze,Ge,Ze){for(var Dt=0;Dt>8&255},writeInt:function(ze,Ge,Ze){var Dt=ge._binBE.ui8;ge._binBE.i32[0]=Ze,ze[Ge+0]=Dt[0],ze[Ge+1]=Dt[1],ze[Ge+2]=Dt[2],ze[Ge+3]=Dt[3]},writeUint:function(ze,Ge,Ze){ze[Ge]=Ze>>>0&255,ze[Ge+1]=Ze>>>8&255,ze[Ge+2]=Ze>>>16&255,ze[Ge+3]=Ze>>>24&255},writeASCII:ge._binBE.writeASCII},ge._copyTile=function(ze,Ge,Ze,Dt,Je,Ut,jt,Ke){for(var an=Math.min(Ge,Je-jt),Zt=Math.min(Ze,Ut-Ke),en=0;en>--Jt&1)];Yt[Cn]=Ye}}function Ut(Xt,nn,vn,Sn){if(Xt[nn+3]!=255)return 0;if(vn==0)return nn;for(var Cn=0;Cn<2;Cn++){Xt[nn+Cn]==0&&(Xt[nn+Cn]=Xt.length,Xt.push(0,0,Sn,255));var Nt=Ut(Xt,Xt[nn+Cn],vn-1,Sn+1);if(Nt!=0)return Nt}return 0}function jt(Xt){for(var nn=Xt.b,vn=Xt.a;nn<25&&Xt.e>>8),vn=vn<<8|Sn,nn+=8}if(nn<0)throw"e";Xt.b=nn,Xt.a=vn}function Ke(Xt,nn){return nn.b>(nn.b-=Xt)&65535>>16-Xt}function an(Xt,nn){var vn=Xt[0],Sn=0,Cn=255;nn.b<16&&jt(nn);var Nt=nn.a>>nn.b-8&255;for(Cn=vn[(Sn=Xt[1][Nt])+3],nn.b-=vn[Sn+2];Cn==255;)Cn=vn[(Sn=vn[Sn+(nn.a>>--nn.b&1)])+3];return Cn}function Zt(Xt,nn){return Xt<32768>>16-nn&&(Xt+=1-(1<>>1);else if(nn==6)Tn=Xt[qt]+(wn-Xt[qt-Yt]>>>1);else{if(nn!=7)throw nn;Tn=wn+Xt[qt]>>>1}Xt[yn]+=Tn}}}return function(Xt){if(ze=Xt,Ge=0,Dt()!=65496)throw"e";for(var nn=[],vn=0,Sn=0,Cn=[],Nt=[],Yt=[],Jt=0,hn=0,Ye=0;;){var Xe=Dt();if(Xe!=65535){var Pt=Dt();if(Xe==65475){Sn=Ze(),hn=Dt(),Ye=Dt(),Jt=Ze();for(var sn=0;sn>4,15&qt]}}else if(Xe==65476)for(var wn=Ge+Pt-2;Ge>>4],Cn[Tn[0]]=Tn.slice(1)}vn=Ze(),Ge+=2;break}Ge+=Pt-2}}else Ge--}var xn=new(Sn>8?Uint16Array:Uint8Array)(hn*Ye*Jt),Nn={b:0,a:0,c:vn==8,e:Ge,data:ze,d:ze.length};if(Nn.c)(function(Pn,ur,er,_r,dr){for(var Sr=ze.length-Ge,sr=0;srYn&&(Yn=kn),(bn=Rn[1])>Kn&&(Kn=bn),zn.push(kn*bn)}if(Yn!=1||Kn!=1){var Mn=[],Xn=0;for(sn=0;sn>>6),yn=0;yn<3;yn++)for(var qt=0;qt<41;qt++)Pt[yn][qt]=[sn,1];return Pt}function Sn(Xe,Pt){var sn=0,yn=8-Xe.a;if(Xe.j,Xe.a,Pt){if(Pt>=yn)do sn<<=yn,Pt-=yn,sn|=Xe[Xe.j]&(1<=8);Pt&&(sn<<=Pt,yn-=Pt,sn|=Xe[Xe.j]>>>yn&(1<Rn&&Kn>>2,xn)return void(tn[Xn]=Mn);Nn=Pt.t*Pt.c[Xe.g+jn-bn]+Pt.c[Xe.g+kn-jn]}else Mn=jn>kn&&jn>Wn||jn>>2:dn+Bn>>>1,Nn=Pt.t*Pt.c[Xe.g+jn-kn]+Pt.c[Xe.g+kn-dn];zn=mn(Nn);var Pn=function(er){for(var _r=-1,dr=0;!dr;_r++)dr=er[er.j]>>>7-er.a&1,er.a++,er.a&=7,er.a||er.j++;return _r}(sn);if(Pn>>1):pn>>>1,Tn[zn][0]+=mn(pn),Tn[zn][1]==Xe.f&&(Tn[zn][0]>>>=1,Tn[zn][1]>>>=1),Tn[zn][1]++,Mn=Nn<0?Mn-pn:Mn+pn,Xe.i&&(Mn<0?Mn+=Pt.w:Mn>Xe.g&&(Mn-=Pt.w)),tn[Xn]=Mn>=0?Math.min(Mn,Xe.g):0}function Nt(Xe,Pt,sn){for(var yn=Xe[0].length,qt=Pt;qt<=sn;qt++)Xe[qt][0]=Xe[qt-1][1],Xe[qt][yn-1]=Xe[qt-1][yn-2]}function Yt(Xe){Nt(Xe,Ut,en),Nt(Xe,ze,Ze),Nt(Xe,un,nn)}function Jt(Xe,Pt,sn,yn,qt,wn,Tn,xn,Nn,zn,Yn,Kn,Rn){for(var Mn=0,Xn=1,Jn=qtZe;Xn8&&(Cn(Xe,Pt,sn,yn,qt,Xn,xn[Nn]),Cn(Xe,Pt,sn,yn,wn,Xn,xn[Nn]),Xn+=2);Yt(yn)}function hn(Xe,Pt,sn,yn,qt,wn){Jt(Xe,Pt,sn,yn,ze,Ut,qt,wn,0,0,1,0,8),Jt(Xe,Pt,sn,yn,jt,un,qt,wn,1,0,1,0,8),Jt(Xe,Pt,sn,yn,Ge,Ke,qt,wn,2,1,0,3,0),Jt(Xe,Pt,sn,yn,an,Xt,qt,wn,0,0,0,3,2),Jt(Xe,Pt,sn,yn,Ze,Zt,qt,wn,1,0,0,3,2),Jt(Xe,Pt,sn,yn,en,nn,qt,wn,2,1,0,3,0)}function Ye(Xe,Pt,sn,yn,qt,wn){var Tn=wn.length,xn=Xe.l;qt+1==Xe.s&&(xn=Xe.e-qt*Xe.l);for(var Nn=6*Xe.e*yn+qt*Xe.l,zn=0;zn<6;zn++){for(var Yn=0;Yn>>1):Rn==2?un+(zn>>>1):Ut+zn;var Mn=Xe.h?(2*Yn/3&2147483646|Yn%3&1)+(Yn%3>>>1):Yn>>>1;Pt[Nn+Yn]=sn[Kn][Mn+1]}Nn+=Xe.e}}ge._decompressRAF=function(Xe,Pt){var sn=function(Xn){var Jn=ge._binBE.readUshort,pn={b:Jn(Xn,0),i:Xn[2],C:Xn[3],u:Xn[4],q:Jn(Xn,5),k:Jn(Xn,7),e:Jn(Xn,9),l:Jn(Xn,11),s:Xn[13],d:Jn(Xn,14)};if(pn.b!=18771||pn.i>1||pn.q<6||pn.q%6||pn.e<768||pn.e%24||pn.l!=768||pn.k=pn.l||pn.s>16||pn.s!=pn.k/pn.l||pn.s!=Math.ceil(pn.e/pn.l)||pn.d!=pn.q/6||pn.u!=12&&pn.u!=14&&pn.u!=16||pn.C!=16&&pn.C!=0)throw"Invalid data";if(pn.i==0)throw"Not implemented. We need this file!";return pn.h=pn.C==16,pn.m=0|(pn.h?2*pn.l/3:pn.l>>>1),pn.A=pn.m+2,pn.f=64,pn.g=(1<{ce.r(oe),ce.d(oe,{DOMException:()=>We,Headers:()=>_e,Request:()=>Be,Response:()=>Fe,fetch:()=>qe});var ue=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||ue!==void 0&&ue,pe={searchParams:"URLSearchParams"in ue,iterable:"Symbol"in ue&&"iterator"in Symbol,blob:"FileReader"in ue&&"Blob"in ue&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in ue,arrayBuffer:"ArrayBuffer"in ue};if(pe.arrayBuffer)var me=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],ge=ArrayBuffer.isView||function(ze){return ze&&me.indexOf(Object.prototype.toString.call(ze))>-1};function ye(ze){if(typeof ze!="string"&&(ze=String(ze)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(ze)||ze==="")throw new TypeError('Invalid character in header field name: "'+ze+'"');return ze.toLowerCase()}function ve(ze){return typeof ze!="string"&&(ze=String(ze)),ze}function xe(ze){var Ge={next:function(){var Ze=ze.shift();return{done:Ze===void 0,value:Ze}}};return pe.iterable&&(Ge[Symbol.iterator]=function(){return Ge}),Ge}function _e(ze){this.map={},ze instanceof _e?ze.forEach(function(Ge,Ze){this.append(Ze,Ge)},this):Array.isArray(ze)?ze.forEach(function(Ge){this.append(Ge[0],Ge[1])},this):ze&&Object.getOwnPropertyNames(ze).forEach(function(Ge){this.append(Ge,ze[Ge])},this)}function Se(ze){if(ze.bodyUsed)return Promise.reject(new TypeError("Already read"));ze.bodyUsed=!0}function $e(ze){return new Promise(function(Ge,Ze){ze.onload=function(){Ge(ze.result)},ze.onerror=function(){Ze(ze.error)}})}function Re(ze){var Ge=new FileReader,Ze=$e(Ge);return Ge.readAsArrayBuffer(ze),Ze}function Ae(ze){if(ze.slice)return ze.slice(0);var Ge=new Uint8Array(ze.byteLength);return Ge.set(new Uint8Array(ze)),Ge.buffer}function Ie(){return this.bodyUsed=!1,this._initBody=function(ze){var Ge;this.bodyUsed=this.bodyUsed,this._bodyInit=ze,ze?typeof ze=="string"?this._bodyText=ze:pe.blob&&Blob.prototype.isPrototypeOf(ze)?this._bodyBlob=ze:pe.formData&&FormData.prototype.isPrototypeOf(ze)?this._bodyFormData=ze:pe.searchParams&&URLSearchParams.prototype.isPrototypeOf(ze)?this._bodyText=ze.toString():pe.arrayBuffer&&pe.blob&&(Ge=ze)&&DataView.prototype.isPrototypeOf(Ge)?(this._bodyArrayBuffer=Ae(ze.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):pe.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(ze)||ge(ze))?this._bodyArrayBuffer=Ae(ze):this._bodyText=ze=Object.prototype.toString.call(ze):this._bodyText="",this.headers.get("content-type")||(typeof ze=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):pe.searchParams&&URLSearchParams.prototype.isPrototypeOf(ze)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},pe.blob&&(this.blob=function(){var ze=Se(this);if(ze)return ze;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Se(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(Re)}),this.text=function(){var ze,Ge,Ze,Dt=Se(this);if(Dt)return Dt;if(this._bodyBlob)return ze=this._bodyBlob,Ze=$e(Ge=new FileReader),Ge.readAsText(ze),Ze;if(this._bodyArrayBuffer)return Promise.resolve(function(Je){for(var Ut=new Uint8Array(Je),jt=new Array(Ut.length),Ke=0;Ke-1?Dt:Ze),this.mode=Ge.mode||this.mode||null,this.signal=Ge.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Je)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Je),!(this.method!=="GET"&&this.method!=="HEAD"||Ge.cache!=="no-store"&&Ge.cache!=="no-cache")){var Ut=/([?&])_=[^&]*/;Ut.test(this.url)?this.url=this.url.replace(Ut,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function Ne(ze){var Ge=new FormData;return ze.trim().split("&").forEach(function(Ze){if(Ze){var Dt=Ze.split("="),Je=Dt.shift().replace(/\+/g," "),Ut=Dt.join("=").replace(/\+/g," ");Ge.append(decodeURIComponent(Je),decodeURIComponent(Ut))}}),Ge}function Fe(ze,Ge){if(!(this instanceof Fe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Ge||(Ge={}),this.type="default",this.status=Ge.status===void 0?200:Ge.status,this.ok=this.status>=200&&this.status<300,this.statusText=Ge.statusText===void 0?"":""+Ge.statusText,this.headers=new _e(Ge.headers),this.url=Ge.url||"",this._initBody(ze)}Be.prototype.clone=function(){return new Be(this,{body:this._bodyInit})},Ie.call(Be.prototype),Ie.call(Fe.prototype),Fe.prototype.clone=function(){return new Fe(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _e(this.headers),url:this.url})},Fe.error=function(){var ze=new Fe(null,{status:0,statusText:""});return ze.type="error",ze};var Ue=[301,302,303,307,308];Fe.redirect=function(ze,Ge){if(Ue.indexOf(Ge)===-1)throw new RangeError("Invalid status code");return new Fe(null,{status:Ge,headers:{location:ze}})};var We=ue.DOMException;try{new We}catch{(We=function(Ge,Ze){this.message=Ge,this.name=Ze;var Dt=Error(Ge);this.stack=Dt.stack}).prototype=Object.create(Error.prototype),We.prototype.constructor=We}function qe(ze,Ge){return new Promise(function(Ze,Dt){var Je=new Be(ze,Ge);if(Je.signal&&Je.signal.aborted)return Dt(new We("Aborted","AbortError"));var Ut=new XMLHttpRequest;function jt(){Ut.abort()}Ut.onload=function(){var Ke,an,Zt={status:Ut.status,statusText:Ut.statusText,headers:(Ke=Ut.getAllResponseHeaders()||"",an=new _e,Ke.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(Kt){return Kt.indexOf(` -`)===0?Kt.substr(1,Kt.length):Kt}).forEach(function(Kt){var Wt=Kt.split(":"),un=Wt.shift().trim();if(un){var Xt=Wt.join(":").trim();an.append(un,Xt)}}),an)};Zt.url="responseURL"in Ut?Ut.responseURL:Zt.headers.get("X-Request-URL");var en="response"in Ut?Ut.response:Ut.responseText;setTimeout(function(){Ze(new Fe(en,Zt))},0)},Ut.onerror=function(){setTimeout(function(){Dt(new TypeError("Network request failed"))},0)},Ut.ontimeout=function(){setTimeout(function(){Dt(new TypeError("Network request failed"))},0)},Ut.onabort=function(){setTimeout(function(){Dt(new We("Aborted","AbortError"))},0)},Ut.open(Je.method,function(Ke){try{return Ke===""&&ue.location.href?ue.location.href:Ke}catch{return Ke}}(Je.url),!0),Je.credentials==="include"?Ut.withCredentials=!0:Je.credentials==="omit"&&(Ut.withCredentials=!1),"responseType"in Ut&&(pe.blob?Ut.responseType="blob":pe.arrayBuffer&&Je.headers.get("Content-Type")&&Je.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Ut.responseType="arraybuffer")),!Ge||typeof Ge.headers!="object"||Ge.headers instanceof _e?Je.headers.forEach(function(Ke,an){Ut.setRequestHeader(an,Ke)}):Object.getOwnPropertyNames(Ge.headers).forEach(function(Ke){Ut.setRequestHeader(Ke,ve(Ge.headers[Ke]))}),Je.signal&&(Je.signal.addEventListener("abort",jt),Ut.onreadystatechange=function(){Ut.readyState===4&&Je.signal.removeEventListener("abort",jt)}),Ut.send(Je._bodyInit===void 0?null:Je._bodyInit)})}qe.polyfill=!0,ue.fetch||(ue.fetch=qe,ue.Headers=_e,ue.Request=Be,ue.Response=Fe)},6290:(ne,oe,ce)=>{var ue=ce(5048),pe=ce(9748),me=ce(4655),ge=ce(1960);function ye(_e,Se,$e){var Re=_e;return pe(Se)?($e=Se,typeof _e=="string"&&(Re={uri:_e})):Re=ge(Se,{uri:_e}),Re.callback=$e,Re}function ve(_e,Se,$e){return xe(Se=ye(_e,Se,$e))}function xe(_e){if(_e.callback===void 0)throw new Error("callback argument missing");var Se=!1,$e=function(Je,Ut,jt){Se||(Se=!0,_e.callback(Je,Ut,jt))};function Re(){var Je=void 0;if(Je=Ne.response?Ne.response:Ne.responseText||function(Ut){try{if(Ut.responseType==="document")return Ut.responseXML;var jt=Ut.responseXML&&Ut.responseXML.documentElement.nodeName==="parsererror";if(Ut.responseType===""&&!jt)return Ut.responseXML}catch{}return null}(Ne),Ze)try{Je=JSON.parse(Je)}catch{}return Je}function Ae(Je){return clearTimeout(Fe),Je instanceof Error||(Je=new Error(""+(Je||"Unknown XMLHttpRequest Error"))),Je.statusCode=0,$e(Je,Dt)}function Ie(){if(!Be){var Je;clearTimeout(Fe),Je=_e.useXDR&&Ne.status===void 0?200:Ne.status===1223?204:Ne.status;var Ut=Dt,jt=null;return Je!==0?(Ut={body:Re(),statusCode:Je,method:We,headers:{},url:Ue,rawRequest:Ne},Ne.getAllResponseHeaders&&(Ut.headers=me(Ne.getAllResponseHeaders()))):jt=new Error("Internal XMLHttpRequest Error"),$e(jt,Ut,Ut.body)}}var ke,Be,Ne=_e.xhr||null;Ne||(Ne=_e.cors||_e.useXDR?new ve.XDomainRequest:new ve.XMLHttpRequest);var Fe,Ue=Ne.url=_e.uri||_e.url,We=Ne.method=_e.method||"GET",qe=_e.body||_e.data,ze=Ne.headers=_e.headers||{},Ge=!!_e.sync,Ze=!1,Dt={body:void 0,headers:{},statusCode:0,method:We,url:Ue,rawRequest:Ne};if("json"in _e&&_e.json!==!1&&(Ze=!0,ze.accept||ze.Accept||(ze.Accept="application/json"),We!=="GET"&&We!=="HEAD"&&(ze["content-type"]||ze["Content-Type"]||(ze["Content-Type"]="application/json"),qe=JSON.stringify(_e.json===!0?qe:_e.json))),Ne.onreadystatechange=function(){Ne.readyState===4&&setTimeout(Ie,0)},Ne.onload=Ie,Ne.onerror=Ae,Ne.onprogress=function(){},Ne.onabort=function(){Be=!0},Ne.ontimeout=Ae,Ne.open(We,Ue,!Ge,_e.username,_e.password),Ge||(Ne.withCredentials=!!_e.withCredentials),!Ge&&_e.timeout>0&&(Fe=setTimeout(function(){if(!Be){Be=!0,Ne.abort("timeout");var Je=new Error("XMLHttpRequest timeout");Je.code="ETIMEDOUT",Ae(Je)}},_e.timeout)),Ne.setRequestHeader)for(ke in ze)ze.hasOwnProperty(ke)&&Ne.setRequestHeader(ke,ze[ke]);else if(_e.headers&&!function(Je){for(var Ut in Je)if(Je.hasOwnProperty(Ut))return!1;return!0}(_e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in _e&&(Ne.responseType=_e.responseType),"beforeSend"in _e&&typeof _e.beforeSend=="function"&&_e.beforeSend(Ne),Ne.send(qe||null),Ne}ne.exports=ve,ne.exports.default=ve,ve.XMLHttpRequest=ue.XMLHttpRequest||function(){},ve.XDomainRequest="withCredentials"in new ve.XMLHttpRequest?ve.XMLHttpRequest:ue.XDomainRequest,function(_e,Se){for(var $e=0;$e<_e.length;$e++)Se(_e[$e])}(["get","put","post","patch","head","delete"],function(_e){ve[_e==="delete"?"del":_e]=function(Se,$e,Re){return($e=ye(Se,$e,Re)).method=_e.toUpperCase(),xe($e)}})},1596:ne=>{ne.exports=self.DOMParser!==void 0?function(oe){return new self.DOMParser().parseFromString(oe,"application/xml")}:self.ActiveXObject!==void 0&&new self.ActiveXObject("Microsoft.XMLDOM")?function(oe){var ce=new self.ActiveXObject("Microsoft.XMLDOM");return ce.async="false",ce.loadXML(oe),ce}:function(oe){var ce=document.createElement("div");return ce.innerHTML=oe,ce}},1960:ne=>{ne.exports=function(){for(var ce={},ue=0;ue{},6777:()=>{},5546:()=>{},2460:(ne,oe,ce)=>{var ue=ce(4406),pe=Object.defineProperty,me=Object.getOwnPropertyDescriptor,ge=Object.getOwnPropertyNames,ye=Object.prototype.hasOwnProperty,ve=(Qt,On)=>{for(var Un in On)pe(Qt,Un,{get:On[Un],enumerable:!0})},xe=(Qt=>(On,Un)=>Qt&&Qt.get(On)||(Un=((Zn,or,mr,cr)=>{if(or&&typeof or=="object"||typeof or=="function")for(let Er of ge(or))ye.call(Zn,Er)||pe(Zn,Er,{get:()=>or[Er],enumerable:!(cr=me(or,Er))||cr.enumerable});return Zn})(pe({},"__esModule",{value:!0}),On),Qt&&Qt.set(On,Un),Un))(typeof WeakMap<"u"?new WeakMap:0),_e=(Qt,On,Un)=>(((Zn,or,mr)=>{or in Zn?pe(Zn,or,{enumerable:!0,configurable:!0,writable:!0,value:mr}):Zn[or]=mr})(Qt,typeof On!="symbol"?On+"":On,Un),Un),Se={};ve(Se,{applyPalette:()=>ca,applyPaletteSync:()=>Ao,buildPalette:()=>la,buildPaletteSync:()=>Ro,constants:()=>$e,conversion:()=>Be,distance:()=>Yt,image:()=>mi,palette:()=>Mn,quality:()=>ki,utils:()=>bn});var $e={};ve($e,{bt709:()=>Re});var Re={};ve(Re,{Y:()=>Ae,x:()=>Ie,y:()=>ke});var Ae=(Qt=>(Qt[Qt.RED=.2126]="RED",Qt[Qt.GREEN=.7152]="GREEN",Qt[Qt.BLUE=.0722]="BLUE",Qt[Qt.WHITE=1]="WHITE",Qt))(Ae||{}),Ie=(Qt=>(Qt[Qt.RED=.64]="RED",Qt[Qt.GREEN=.3]="GREEN",Qt[Qt.BLUE=.15]="BLUE",Qt[Qt.WHITE=.3127]="WHITE",Qt))(Ie||{}),ke=(Qt=>(Qt[Qt.RED=.33]="RED",Qt[Qt.GREEN=.6]="GREEN",Qt[Qt.BLUE=.06]="BLUE",Qt[Qt.WHITE=.329]="WHITE",Qt))(ke||{}),Be={};function Ne(Qt){return Qt>.04045?((Qt+.055)/1.055)**2.4:Qt/12.92}function Fe(Qt,On,Un){return{x:.4124*(Qt=Ne(Qt/255))+.3576*(On=Ne(On/255))+.1805*(Un=Ne(Un/255)),y:.2126*Qt+.7152*On+.0722*Un,z:.0193*Qt+.1192*On+.9505*Un}}ve(Be,{lab2rgb:()=>Nt,lab2xyz:()=>vn,rgb2hsl:()=>Ut,rgb2lab:()=>Kt,rgb2xyz:()=>Fe,xyz2lab:()=>en,xyz2rgb:()=>Cn});var Ue={};function We(Qt){return Qt*(Math.PI/180)}function qe(Qt,On,Un){let Zn=Qt;return ZnOn&&(Zn=On),Zn>Un&&(Zn=Un),Zn}function Ge(Qt,On,Un){return Qt>Un&&(Qt=Un),Qt255?Qt=255:Qt<0&&(Qt=0),Qt}function Dt(Qt){return Qt>255?Qt=255:Qt<0&&(Qt=0),Qt}function Je(Qt,On){const Un=typeof Qt[0];let Zn;if(Un==="number"||Un==="string"){const or=Object.create(null);for(let mr=0,cr=Qt.length;mrOn(mr,cr)||or[mr]-or[cr])}else{const or=Qt.slice(0);Zn=Qt.sort((mr,cr)=>On(mr,cr)||or.indexOf(mr)-or.indexOf(cr))}return Zn}function Ut(Qt,On,Un){const Zn=ze(Qt,On,Un),or=qe(Qt,On,Un),mr=or-Zn,cr=(Zn+or)/510;let Er=0;cr>0&&cr<1&&(Er=mr/(cr<.5?or+Zn:510-or-Zn));let pr=0;return mr>0&&(pr=or===Qt?(On-Un)/mr:or===On?2+(Un-Qt)/mr:4+(Qt-On)/mr,pr*=60,pr<0&&(pr+=360)),{h:pr,s:Er,l:cr}}ve(Ue,{degrees2radians:()=>We,inRange0to255:()=>Dt,inRange0to255Rounded:()=>Ze,intInRange:()=>Ge,max3:()=>qe,min3:()=>ze,stableSort:()=>Je});var jt=.95047,Ke=1,an=1.08883;function Zt(Qt){return Qt>.008856?Qt**.3333333333333333:7.787*Qt+.13793103448275862}function en(Qt,On,Un){if(Qt=Zt(Qt/jt),On=Zt(On/Ke),Un=Zt(Un/an),116*On-16<0)throw new Error("xxx");return{L:Math.max(0,116*On-16),a:500*(Qt-On),b:200*(On-Un)}}function Kt(Qt,On,Un){const Zn=Fe(Qt,On,Un);return en(Zn.x,Zn.y,Zn.z)}var Wt=.95047,un=1,Xt=1.08883;function nn(Qt){return Qt>.206893034?Qt**3:(Qt-.13793103448275862)/7.787}function vn(Qt,On,Un){const Zn=(Qt+16)/116,or=Zn-Un/200;return{x:Wt*nn(On/500+Zn),y:un*nn(Zn),z:Xt*nn(or)}}function Sn(Qt){return Qt>.0031308?1.055*Qt**.4166666666666667-.055:12.92*Qt}function Cn(Qt,On,Un){const Zn=Sn(3.2406*Qt+-1.5372*On+-.4986*Un),or=Sn(-.9689*Qt+1.8758*On+.0415*Un),mr=Sn(.0557*Qt+-.204*On+1.057*Un);return{r:Ze(255*Zn),g:Ze(255*or),b:Ze(255*mr)}}function Nt(Qt,On,Un){const Zn=vn(Qt,On,Un);return Cn(Zn.x,Zn.y,Zn.z)}var Yt={};ve(Yt,{AbstractDistanceCalculator:()=>Jt,AbstractEuclidean:()=>qt,AbstractManhattan:()=>Nn,CIE94GraphicArts:()=>Xe,CIE94Textiles:()=>Ye,CIEDE2000:()=>sn,CMetric:()=>yn,Euclidean:()=>wn,EuclideanBT709:()=>Tn,EuclideanBT709NoAlpha:()=>xn,Manhattan:()=>zn,ManhattanBT709:()=>Kn,ManhattanNommyde:()=>Yn,PNGQuant:()=>Rn});var Jt=class{constructor(){_e(this,"_maxDistance"),_e(this,"_whitePoint"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}setWhitePoint(Qt,On,Un,Zn){this._whitePoint={r:Qt>0?255/Qt:0,g:On>0?255/On:0,b:Un>0?255/Un:0,a:Zn>0?255/Zn:0},this._maxDistance=this.calculateRaw(Qt,On,Un,Zn,0,0,0,0)}calculateNormalized(Qt,On){return this.calculateRaw(Qt.r,Qt.g,Qt.b,Qt.a,On.r,On.g,On.b,On.a)/this._maxDistance}},hn=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){const pr=Kt(Dt(Qt*this._whitePoint.r),Dt(On*this._whitePoint.g),Dt(Un*this._whitePoint.b)),Ar=Kt(Dt(or*this._whitePoint.r),Dt(mr*this._whitePoint.g),Dt(cr*this._whitePoint.b)),vr=pr.L-Ar.L,Cr=pr.a-Ar.a,$r=pr.b-Ar.b,Jr=Math.sqrt(pr.a*pr.a+pr.b*pr.b),Zr=Jr-Math.sqrt(Ar.a*Ar.a+Ar.b*Ar.b);let jr=Cr*Cr+$r*$r-Zr*Zr;jr=jr<0?0:Math.sqrt(jr);const Ur=(Er-Zn)*this._whitePoint.a*this._kA;return Math.sqrt((vr/this._Kl)**2+(Zr/(1+this._K1*Jr))**2+(jr/(1+this._K2*Jr))**2+Ur**2)}},Ye=class extends hn{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},Xe=class extends hn{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},Pt=class extends Jt{_setDefaults(){}static _calculatehp(Qt,On){const Un=Math.atan2(Qt,On);return Un>=0?Un:Un+Pt._deg360InRad}static _calculateRT(Qt,On){const Un=On**7,Zn=2*Math.sqrt(Un/(Un+Pt._pow25to7)),or=Pt._deg30InRad*Math.exp(-(((Qt-Pt._deg275InRad)/Pt._deg25InRad)**2));return-Math.sin(2*or)*Zn}static _calculateT(Qt){return 1-.17*Math.cos(Qt-Pt._deg30InRad)+.24*Math.cos(2*Qt)+.32*Math.cos(3*Qt+Pt._deg6InRad)-.2*Math.cos(4*Qt-Pt._deg63InRad)}static _calculate_ahp(Qt,On,Un,Zn){const or=Un+Zn;return Qt===0?or:On<=Pt._deg180InRad?or/2:or>8)+4*vr*vr+((767-pr)*Cr*Cr>>8),Jr=(Er-Zn)*this._whitePoint.a;return Math.sqrt($r+Jr*Jr)}_setDefaults(){}},qt=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){const pr=or-Qt,Ar=mr-On,vr=cr-Un,Cr=Er-Zn;return Math.sqrt(this._kR*pr*pr+this._kG*Ar*Ar+this._kB*vr*vr+this._kA*Cr*Cr)}},wn=class extends qt{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},Tn=class extends qt{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},xn=class extends qt{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},Nn=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){let pr=or-Qt,Ar=mr-On,vr=cr-Un,Cr=Er-Zn;return pr<0&&(pr=0-pr),Ar<0&&(Ar=0-Ar),vr<0&&(vr=0-vr),Cr<0&&(Cr=0-Cr),this._kR*pr+this._kG*Ar+this._kB*vr+this._kA*Cr}},zn=class extends Nn{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},Yn=class extends Nn{_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},Kn=class extends Nn{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},Rn=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){const pr=(Er-Zn)*this._whitePoint.a;return this._colordifferenceCh(Qt*this._whitePoint.r,or*this._whitePoint.r,pr)+this._colordifferenceCh(On*this._whitePoint.g,mr*this._whitePoint.g,pr)+this._colordifferenceCh(Un*this._whitePoint.b,cr*this._whitePoint.b,pr)}_colordifferenceCh(Qt,On,Un){const Zn=Qt-On,or=Zn+Un;return Zn*Zn+or*or}_setDefaults(){}},Mn={};ve(Mn,{AbstractPaletteQuantizer:()=>Xn,ColorHistogram:()=>Sr,NeuQuant:()=>Pn,NeuQuantFloat:()=>_r,RGBQuant:()=>nr,WuColorCube:()=>ei,WuQuant:()=>hi});var Xn=class{quantizeSync(){for(const Qt of this.quantize())if(Qt.palette)return Qt.palette;throw new Error("unreachable")}},Jn=class{constructor(){_e(this,"r"),_e(this,"g"),_e(this,"b"),_e(this,"a"),_e(this,"uint32"),_e(this,"rgba"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}static createByQuadruplet(Qt){const On=new Jn;return On.r=0|Qt[0],On.g=0|Qt[1],On.b=0|Qt[2],On.a=0|Qt[3],On._loadUINT32(),On._loadQuadruplet(),On}static createByRGBA(Qt,On,Un,Zn){const or=new Jn;return or.r=0|Qt,or.g=0|On,or.b=0|Un,or.a=0|Zn,or._loadUINT32(),or._loadQuadruplet(),or}static createByUint32(Qt){const On=new Jn;return On.uint32=Qt>>>0,On._loadRGBA(),On._loadQuadruplet(),On}from(Qt){this.r=Qt.r,this.g=Qt.g,this.b=Qt.b,this.a=Qt.a,this.uint32=Qt.uint32,this.rgba[0]=Qt.r,this.rgba[1]=Qt.g,this.rgba[2]=Qt.b,this.rgba[3]=Qt.a}getLuminosity(Qt){let On=this.r,Un=this.g,Zn=this.b;return Qt&&(On=Math.min(255,255-this.a+this.a*On/255),Un=Math.min(255,255-this.a+this.a*Un/255),Zn=Math.min(255,255-this.a+this.a*Zn/255)),.2126*On+.7152*Un+.0722*Zn}_loadUINT32(){this.uint32=(this.a<<24|this.b<<16|this.g<<8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}},pn=class{constructor(){_e(this,"_pointArray"),_e(this,"_width"),_e(this,"_height"),this._width=0,this._height=0,this._pointArray=[]}getWidth(){return this._width}getHeight(){return this._height}setWidth(Qt){this._width=Qt}setHeight(Qt){this._height=Qt}getPointArray(){return this._pointArray}clone(){const Qt=new pn;Qt._width=this._width,Qt._height=this._height;for(let On=0,Un=this._pointArray.length;On=or&&Qt=0;On--)if(Qt.uint32===this._pointArray[On].uint32)return!0;return!1}getNearestColor(Qt,On){return this._pointArray[0|this._getNearestIndex(Qt,On)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(Qt){return typeof this._i32idx[Qt]=="number"?this._i32idx[Qt]:-1}_getNearestIndex(Qt,On){let Un=this._nearestPointFromCache(""+On.uint32);if(Un>=0)return Un;let Zn=Number.MAX_VALUE;Un=0;for(let or=0,mr=this._pointArray.length;or{const Un=Ut(Qt.r,Qt.g,Qt.b),Zn=Ut(On.r,On.g,On.b),or=Qt.r===Qt.g&&Qt.g===Qt.b?0:1+tn(Un.h,10),mr=(On.r===On.g&&On.g===On.b?0:1+tn(Zn.h,10))-or;if(mr)return-mr;const cr=Qt.getLuminosity(!0),Er=On.getLuminosity(!0);if(Er-cr!=0)return Er-cr;const pr=(100*Zn.s|0)-(100*Un.s|0);return pr?-pr:0})}},bn={};ve(bn,{HueStatistics:()=>jn,Palette:()=>Gt,Point:()=>Jn,PointContainer:()=>pn,ProgressTracker:()=>dn,arithmetic:()=>Ue});var kn=class{constructor(){_e(this,"num",0),_e(this,"cols",[])}},jn=class{constructor(Qt,On){_e(this,"_numGroups"),_e(this,"_minCols"),_e(this,"_stats"),_e(this,"_groupsFull"),this._numGroups=Qt,this._minCols=On,this._stats=[];for(let Un=0;Un<=Qt;Un++)this._stats[Un]=new kn;this._groupsFull=0}check(Qt){this._groupsFull===this._numGroups+1&&(this.check=()=>{});const On=255&Qt,Un=Qt>>>8&255,Zn=Qt>>>16&255,or=On===Un&&Un===Zn?0:1+tn(Ut(On,Un,Zn).h,this._numGroups),mr=this._stats[or],cr=this._minCols;mr.num++,mr.num>cr||(mr.num===cr&&this._groupsFull++,mr.num<=cr&&this._stats[or].cols.push(Qt))}injectIntoDictionary(Qt){for(let On=0;On<=this._numGroups;On++)this._stats[On].num<=this._minCols&&this._stats[On].cols.forEach(Un=>{Qt[Un]?Qt[Un]++:Qt[Un]=1})}injectIntoArray(Qt){for(let On=0;On<=this._numGroups;On++)this._stats[On].num<=this._minCols&&this._stats[On].cols.forEach(Un=>{Qt.indexOf(Un)===-1&&Qt.push(Un)})}},Wn=class{constructor(Qt,On){_e(this,"progress"),_e(this,"_step"),_e(this,"_range"),_e(this,"_last"),_e(this,"_progressRange"),this._range=Qt,this._progressRange=On,this._step=Math.max(1,this._range/(Wn.steps+1)|0),this._last=-this._step,this.progress=0}shouldNotify(Qt){return Qt-this._last>=this._step&&(this._last=Qt,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}},dn=Wn;_e(dn,"steps",100);var Bn=class{constructor(Qt){_e(this,"r"),_e(this,"g"),_e(this,"b"),_e(this,"a"),this.r=this.g=this.b=this.a=Qt}toPoint(){return Jn.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)}subtract(Qt,On,Un,Zn){this.r-=0|Qt,this.g-=0|On,this.b-=0|Un,this.a-=0|Zn}},mn=class extends Xn{constructor(Qt,On=256){super(),_e(this,"_pointArray"),_e(this,"_networkSize"),_e(this,"_network"),_e(this,"_sampleFactor"),_e(this,"_radPower"),_e(this,"_freq"),_e(this,"_bias"),_e(this,"_distance"),this._distance=Qt,this._pointArray=[],this._sampleFactor=1,this._networkSize=On,this._distance.setWhitePoint(2040,2040,2040,2040)}sample(Qt){this._pointArray=this._pointArray.concat(Qt.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let Qt=0;Qt>3)*mn._radiusBias,pr=Er>>mn._radiusBiasShift;pr<=1&&(pr=0);for(let vr=0;vr>>0;or=On=On&&(Cr-=On),vr++,mr===0&&(mr=1),vr%mr==0){cr-=cr/Un|0,Er-=Er/mn._radiusDecrease|0,pr=Er>>mn._radiusBiasShift,pr<=1&&(pr=0);for(let Pi=0;Pi>>0}}}_buildPalette(){const Qt=new Gt;return this._network.forEach(On=>{Qt.add(On.toPoint())}),Qt.sort(),Qt}_alterNeighbour(Qt,On,Un,Zn,or,mr){let cr=On-Qt;cr<-1&&(cr=-1);let Er=On+Qt;Er>this._networkSize&&(Er=this._networkSize);let pr=On+1,Ar=On-1,vr=1;for(;prcr;){const Cr=this._radPower[vr++]/mn._alphaRadBias;if(prcr){const $r=this._network[Ar--];$r.subtract(Cr*($r.r-or),Cr*($r.g-Zn),Cr*($r.b-Un),Cr*($r.a-mr))}}}_alterSingle(Qt,On,Un,Zn,or,mr){Qt/=mn._initAlpha;const cr=this._network[On];cr.subtract(Qt*(cr.r-or),Qt*(cr.g-Zn),Qt*(cr.b-Un),Qt*(cr.a-mr))}_contest(Qt,On,Un,Zn){let or=2147483647,mr=or,cr=-1,Er=cr;for(let pr=0;pr>mn._initialBiasShift-3);Cr>mn._betaShift;this._freq[pr]-=$r,this._bias[pr]+=$r<>mn._betaShift),_e(Pn,"_betaGamma",mn._initialBias<>3,this.g>>3,this.b>>3,this.a>>3)}subtract(Qt,On,Un,Zn){this.r-=Qt,this.g-=On,this.b-=Un,this.a-=Zn}},er=class extends Xn{constructor(Qt,On=256){super(),_e(this,"_pointArray"),_e(this,"_networkSize"),_e(this,"_network"),_e(this,"_sampleFactor"),_e(this,"_radPower"),_e(this,"_freq"),_e(this,"_bias"),_e(this,"_distance"),this._distance=Qt,this._pointArray=[],this._sampleFactor=1,this._networkSize=On,this._distance.setWhitePoint(2040,2040,2040,2040)}sample(Qt){this._pointArray=this._pointArray.concat(Qt.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let Qt=0;Qt>3)*er._radiusBias,pr=Er>>er._radiusBiasShift;pr<=1&&(pr=0);for(let vr=0;vr=On&&(Cr-=On),vr++,mr===0&&(mr=1),vr%mr==0){cr-=cr/Un,Er-=Er/er._radiusDecrease,pr=Er>>er._radiusBiasShift,pr<=1&&(pr=0);for(let Pi=0;Pi{Qt.add(On.toPoint())}),Qt.sort(),Qt}_alterNeighbour(Qt,On,Un,Zn,or,mr){let cr=On-Qt;cr<-1&&(cr=-1);let Er=On+Qt;Er>this._networkSize&&(Er=this._networkSize);let pr=On+1,Ar=On-1,vr=1;for(;prcr;){const Cr=this._radPower[vr++]/er._alphaRadBias;if(prcr){const $r=this._network[Ar--];$r.subtract(Cr*($r.r-or),Cr*($r.g-Zn),Cr*($r.b-Un),Cr*($r.a-mr))}}}_alterSingle(Qt,On,Un,Zn,or,mr){Qt/=er._initAlpha;const cr=this._network[On];cr.subtract(Qt*(cr.r-or),Qt*(cr.g-Zn),Qt*(cr.b-Un),Qt*(cr.a-mr))}_contest(Qt,On,Un,Zn){let or=2147483647,mr=or,cr=-1,Er=cr;for(let pr=0;pr>er._initialBiasShift-3);Cr>er._betaShift;this._freq[pr]-=$r,this._bias[pr]+=$r<>er._betaShift),_e(_r,"_betaGamma",er._initialBias<this._histogram[Zn]-this._histogram[Un]);if(Qt.length===0)return[];let On;switch(this._method){case 1:const Un=Math.min(Qt.length,this._initColors),Zn=Qt[Un-1],or=this._histogram[Zn];On=Qt.slice(0,Un);let mr=Un;const cr=Qt.length;for(;mr+Un)}_colorStats1D(Qt){const On=this._histogram,Un=Qt.getPointArray(),Zn=Un.length;for(let or=0;or{let vr=Math.round(Ar.w*Ar.h/cr)*dr._boxPixels;vr<2&&(vr=2);const Cr={};this._iterateBox(Ar,On,$r=>{const Jr=Zn[$r].uint32;this._hueStats.check(Jr),Jr in pr?pr[Jr]++:Jr in Cr?++Cr[Jr]>=vr&&(pr[Jr]=Cr[Jr]):Cr[Jr]=1})}),this._hueStats.injectIntoDictionary(pr)}_iterateBox(Qt,On,Un){const Zn=Qt,or=Zn.y*On+Zn.x,mr=(Zn.y+Zn.h-1)*On+(Zn.x+Zn.w-1),cr=On-Zn.w+1;let Er=0,pr=or;do Un.call(this,pr),pr+=++Er%Zn.w==0?cr:1;while(pr<=mr)}_makeBoxes(Qt,On,Un,Zn){const or=Qt%Un,mr=On%Zn,cr=Qt-or,Er=On-mr,pr=[];for(let Ar=0;Arthis._colors;){mr.length=0;for(let vr=0;vr3*this._colors?this._initialDistance:this._distanceIncrement}if(cr$r.distance-Cr.distance);let vr=0;for(;cr=0;vr--)Zn[vr]===0&&(vr!==Ar-1&&(Un[vr]=Un[Ar-1]),--Ar);Un.length=Ar,On.sort(),yield{palette:On,progress:100}}};function kr(Qt){const On=[];for(let Un=0;Un0){const Un=this._sums[On],Zn=this._reds[On]/Un,or=this._greens[On]/Un,mr=this._blues[On]/Un,cr=this._alphas[On]/Un,Er=Jn.createByRGBA(0|Zn,0|or,0|mr,0|cr);Qt.add(Er)}Qt.sort(),yield{palette:Qt,progress:100}}*_preparePalette(){yield*this._calculateMoments();let Qt=0;const On=kr(this._colors);for(let cr=1;cr1?this._calculateVariance(this._cubes[Qt]):0,On[cr]=this._cubes[cr].volume>1?this._calculateVariance(this._cubes[cr]):0):(On[Qt]=0,cr--),Qt=0;let Er=On[0];for(let pr=1;pr<=cr;++pr)On[pr]>Er&&(Er=On[pr],Qt=pr);if(Er<=0){this._colors=cr+1;break}}const Un=[],Zn=[],or=[],mr=[];for(let cr=0;cr0?(Un[cr]=Pr._volume(this._cubes[cr],this._momentsRed)/Er|0,Zn[cr]=Pr._volume(this._cubes[cr],this._momentsGreen)/Er|0,or[cr]=Pr._volume(this._cubes[cr],this._momentsBlue)/Er|0,mr[cr]=Pr._volume(this._cubes[cr],this._momentsAlpha)/Er|0):(Un[cr]=0,Zn[cr]=0,or[cr]=0,mr[cr]=0)}this._reds=kr(this._colors+1),this._greens=kr(this._colors+1),this._blues=kr(this._colors+1),this._alphas=kr(this._colors+1),this._sums=kr(this._colors+1);for(let cr=0,Er=this._pixels.length;cr>On),Zn=1+(Qt.g>>On),or=1+(Qt.b>>On),mr=1+(Qt.a>>On);this._weights[mr][Un][Zn][or]++,this._momentsRed[mr][Un][Zn][or]+=Qt.r,this._momentsGreen[mr][Un][Zn][or]+=Qt.g,this._momentsBlue[mr][Un][Zn][or]+=Qt.b,this._momentsAlpha[mr][Un][Zn][or]+=Qt.a,this._moments[mr][Un][Zn][or]+=this._table[Qt.r]+this._table[Qt.g]+this._table[Qt.b]+this._table[Qt.a]}*_calculateMoments(){const Qt=[],On=[],Un=[],Zn=[],or=[],mr=[],cr=Rr(this._sideSize,this._sideSize,this._sideSize),Er=Rr(this._sideSize,this._sideSize,this._sideSize),pr=Rr(this._sideSize,this._sideSize,this._sideSize),Ar=Rr(this._sideSize,this._sideSize,this._sideSize),vr=Rr(this._sideSize,this._sideSize,this._sideSize),Cr=Rr(this._sideSize,this._sideSize,this._sideSize);let $r=0;const Jr=new dn(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let Zr=1;Zr<=this._alphaMaxSideIndex;++Zr){Yr(cr,this._sideSize,this._sideSize,this._sideSize,0),Yr(Er,this._sideSize,this._sideSize,this._sideSize,0),Yr(pr,this._sideSize,this._sideSize,this._sideSize,0),Yr(Ar,this._sideSize,this._sideSize,this._sideSize,0),Yr(vr,this._sideSize,this._sideSize,this._sideSize,0),Yr(Cr,this._sideSize,this._sideSize,this._sideSize,0);for(let jr=1;jr<=this._maxSideIndex;++jr,++$r){Jr.shouldNotify($r)&&(yield{progress:Jr.progress}),li(Qt,this._sideSize,0),li(On,this._sideSize,0),li(Un,this._sideSize,0),li(Zn,this._sideSize,0),li(or,this._sideSize,0),li(mr,this._sideSize,0);for(let Ur=1;Ur<=this._maxSideIndex;++Ur){let Ci=0,Pi=0,qi=0,Fi=0,so=0,Ui=0;for(let ti=1;ti<=this._maxSideIndex;++ti)Ci+=this._weights[Zr][jr][Ur][ti],Pi+=this._momentsRed[Zr][jr][Ur][ti],qi+=this._momentsGreen[Zr][jr][Ur][ti],Fi+=this._momentsBlue[Zr][jr][Ur][ti],so+=this._momentsAlpha[Zr][jr][Ur][ti],Ui+=this._moments[Zr][jr][Ur][ti],Qt[ti]+=Ci,On[ti]+=Pi,Un[ti]+=qi,Zn[ti]+=Fi,or[ti]+=so,mr[ti]+=Ui,cr[jr][Ur][ti]=cr[jr-1][Ur][ti]+Qt[ti],Er[jr][Ur][ti]=Er[jr-1][Ur][ti]+On[ti],pr[jr][Ur][ti]=pr[jr-1][Ur][ti]+Un[ti],Ar[jr][Ur][ti]=Ar[jr-1][Ur][ti]+Zn[ti],vr[jr][Ur][ti]=vr[jr-1][Ur][ti]+or[ti],Cr[jr][Ur][ti]=Cr[jr-1][Ur][ti]+mr[ti],this._weights[Zr][jr][Ur][ti]=this._weights[Zr-1][jr][Ur][ti]+cr[jr][Ur][ti],this._momentsRed[Zr][jr][Ur][ti]=this._momentsRed[Zr-1][jr][Ur][ti]+Er[jr][Ur][ti],this._momentsGreen[Zr][jr][Ur][ti]=this._momentsGreen[Zr-1][jr][Ur][ti]+pr[jr][Ur][ti],this._momentsBlue[Zr][jr][Ur][ti]=this._momentsBlue[Zr-1][jr][Ur][ti]+Ar[jr][Ur][ti],this._momentsAlpha[Zr][jr][Ur][ti]=this._momentsAlpha[Zr-1][jr][Ur][ti]+vr[jr][Ur][ti],this._moments[Zr][jr][Ur][ti]=this._moments[Zr-1][jr][Ur][ti]+Cr[jr][Ur][ti]}}}}static _volumeFloat(Qt,On){return On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]-On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]-On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]+On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]+On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]+On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]-On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]-On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]-On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]-On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]-On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum])}static _volume(Qt,On){return 0|Pr._volumeFloat(Qt,On)}static _top(Qt,On,Un,Zn){let or;switch(On){case Pr._alpha:or=Zn[Un][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]-Zn[Un][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]-Zn[Un][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]+Zn[Un][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(Zn[Un][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]-Zn[Un][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]-Zn[Un][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+Zn[Un][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);break;case Pr._red:or=Zn[Qt.alphaMaximum][Un][Qt.greenMaximum][Qt.blueMaximum]-Zn[Qt.alphaMaximum][Un][Qt.greenMinimum][Qt.blueMaximum]-Zn[Qt.alphaMinimum][Un][Qt.greenMaximum][Qt.blueMaximum]+Zn[Qt.alphaMinimum][Un][Qt.greenMinimum][Qt.blueMaximum]-(Zn[Qt.alphaMaximum][Un][Qt.greenMaximum][Qt.blueMinimum]-Zn[Qt.alphaMaximum][Un][Qt.greenMinimum][Qt.blueMinimum]-Zn[Qt.alphaMinimum][Un][Qt.greenMaximum][Qt.blueMinimum]+Zn[Qt.alphaMinimum][Un][Qt.greenMinimum][Qt.blueMinimum]);break;case Pr._green:or=Zn[Qt.alphaMaximum][Qt.redMaximum][Un][Qt.blueMaximum]-Zn[Qt.alphaMaximum][Qt.redMinimum][Un][Qt.blueMaximum]-Zn[Qt.alphaMinimum][Qt.redMaximum][Un][Qt.blueMaximum]+Zn[Qt.alphaMinimum][Qt.redMinimum][Un][Qt.blueMaximum]-(Zn[Qt.alphaMaximum][Qt.redMaximum][Un][Qt.blueMinimum]-Zn[Qt.alphaMaximum][Qt.redMinimum][Un][Qt.blueMinimum]-Zn[Qt.alphaMinimum][Qt.redMaximum][Un][Qt.blueMinimum]+Zn[Qt.alphaMinimum][Qt.redMinimum][Un][Qt.blueMinimum]);break;case Pr._blue:or=Zn[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Un]-Zn[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Un]-Zn[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Un]+Zn[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Un]-(Zn[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Un]-Zn[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Un]-Zn[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Un]+Zn[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Un]);break;default:throw new Error("impossible")}return 0|or}static _bottom(Qt,On,Un){switch(On){case Pr._alpha:return-Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(-Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);case Pr._red:return-Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(-Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);case Pr._green:return-Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(-Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);case Pr._blue:return-Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]-(-Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);default:return 0}}_calculateVariance(Qt){const On=Pr._volume(Qt,this._momentsRed),Un=Pr._volume(Qt,this._momentsGreen),Zn=Pr._volume(Qt,this._momentsBlue),or=Pr._volume(Qt,this._momentsAlpha);return Pr._volumeFloat(Qt,this._moments)-(On*On+Un*Un+Zn*Zn+or*or)/Pr._volume(Qt,this._weights)}_maximize(Qt,On,Un,Zn,or,mr,cr,Er,pr){const Ar=0|Pr._bottom(Qt,On,this._momentsRed),vr=0|Pr._bottom(Qt,On,this._momentsGreen),Cr=0|Pr._bottom(Qt,On,this._momentsBlue),$r=0|Pr._bottom(Qt,On,this._momentsAlpha),Jr=0|Pr._bottom(Qt,On,this._weights);let Zr=0,jr=-1;for(let Ur=Un;UrZr&&(Zr=ti,jr=Ur))}}return{max:Zr,position:jr}}_cut(Qt,On){let Un;const Zn=Pr._volume(Qt,this._momentsRed),or=Pr._volume(Qt,this._momentsGreen),mr=Pr._volume(Qt,this._momentsBlue),cr=Pr._volume(Qt,this._momentsAlpha),Er=Pr._volume(Qt,this._weights),pr=this._maximize(Qt,Pr._red,Qt.redMinimum+1,Qt.redMaximum,Zn,or,mr,cr,Er),Ar=this._maximize(Qt,Pr._green,Qt.greenMinimum+1,Qt.greenMaximum,Zn,or,mr,cr,Er),vr=this._maximize(Qt,Pr._blue,Qt.blueMinimum+1,Qt.blueMaximum,Zn,or,mr,cr,Er),Cr=this._maximize(Qt,Pr._alpha,Qt.alphaMinimum+1,Qt.alphaMaximum,Zn,or,mr,cr,Er);if(Cr.max>=pr.max&&Cr.max>=Ar.max&&Cr.max>=vr.max){if(Un=Pr._alpha,Cr.position<0)return!1}else Un=pr.max>=Cr.max&&pr.max>=Ar.max&&pr.max>=vr.max?Pr._red:Ar.max>=Cr.max&&Ar.max>=pr.max&&Ar.max>=vr.max?Pr._green:Pr._blue;switch(On.redMaximum=Qt.redMaximum,On.greenMaximum=Qt.greenMaximum,On.blueMaximum=Qt.blueMaximum,On.alphaMaximum=Qt.alphaMaximum,Un){case Pr._red:On.redMinimum=Qt.redMaximum=pr.position,On.greenMinimum=Qt.greenMinimum,On.blueMinimum=Qt.blueMinimum,On.alphaMinimum=Qt.alphaMinimum;break;case Pr._green:On.greenMinimum=Qt.greenMaximum=Ar.position,On.redMinimum=Qt.redMinimum,On.blueMinimum=Qt.blueMinimum,On.alphaMinimum=Qt.alphaMinimum;break;case Pr._blue:On.blueMinimum=Qt.blueMaximum=vr.position,On.redMinimum=Qt.redMinimum,On.greenMinimum=Qt.greenMinimum,On.alphaMinimum=Qt.alphaMinimum;break;case Pr._alpha:On.alphaMinimum=Qt.alphaMaximum=Cr.position,On.blueMinimum=Qt.blueMinimum,On.redMinimum=Qt.redMinimum,On.greenMinimum=Qt.greenMinimum}return Qt.volume=(Qt.redMaximum-Qt.redMinimum)*(Qt.greenMaximum-Qt.greenMinimum)*(Qt.blueMaximum-Qt.blueMinimum)*(Qt.alphaMaximum-Qt.alphaMinimum),On.volume=(On.redMaximum-On.redMinimum)*(On.greenMaximum-On.greenMinimum)*(On.blueMaximum-On.blueMinimum)*(On.alphaMaximum-On.alphaMinimum),!0}_initialize(Qt){this._colors=Qt,this._cubes=[];for(let On=0;Onyi,ErrorDiffusionArray:()=>xi,ErrorDiffusionArrayKernel:()=>gi,ErrorDiffusionRiemersma:()=>oi,NearestColor:()=>Gi});var yi=class{quantizeSync(Qt,On){for(const Un of this.quantize(Qt,On))if(Un.pointContainer)return Un.pointContainer;throw new Error("unreachable")}},Gi=class extends yi{constructor(Qt){super(),_e(this,"_distance"),this._distance=Qt}*quantize(Qt,On){const Un=Qt.getPointArray(),Zn=Qt.getWidth(),or=Qt.getHeight(),mr=new dn(or,99);for(let cr=0;cr(Qt[Qt.FloydSteinberg=0]="FloydSteinberg",Qt[Qt.FalseFloydSteinberg=1]="FalseFloydSteinberg",Qt[Qt.Stucki=2]="Stucki",Qt[Qt.Atkinson=3]="Atkinson",Qt[Qt.Jarvis=4]="Jarvis",Qt[Qt.Burkes=5]="Burkes",Qt[Qt.Sierra=6]="Sierra",Qt[Qt.TwoSierra=7]="TwoSierra",Qt[Qt.SierraLite=8]="SierraLite",Qt))(gi||{}),xi=class extends yi{constructor(Qt,On,Un=!0,Zn=0,or=!1){super(),_e(this,"_minColorDistance"),_e(this,"_serpentine"),_e(this,"_kernel"),_e(this,"_calculateErrorLikeGIMP"),_e(this,"_distance"),this._setKernel(On),this._distance=Qt,this._minColorDistance=Zn,this._serpentine=Un,this._calculateErrorLikeGIMP=or}*quantize(Qt,On){const Un=Qt.getPointArray(),Zn=new Jn,or=Qt.getWidth(),mr=Qt.getHeight(),cr=[];let Er=1,pr=1;for(const vr of this._kernel){const Cr=vr[2]+1;pr=0&&$a+jr=0&&mo+vrOn&&(Qt.length=On);const Un=Qt.length;for(let Zn=0;Zn=0&&Qt.x=0&&Qt.y{const Ar=Un[Er+pr*Zn];let{r:vr,g:Cr,b:$r,a:Jr}=Ar;for(let Ci=0;CiDi});var Co=.01,Wi=.03;function Di(Qt,On){if(Qt.getHeight()!==On.getHeight()||Qt.getWidth()!==On.getWidth())throw new Error("Images have different sizes!");const Un=(255*Co)**2,Zn=(255*Wi)**2;let or=0,mr=0;return function(cr,Er,pr){const Ar=cr.getWidth(),vr=cr.getHeight();for(let Cr=0;Cr{let vr=0,Cr=0,$r=0;for(let Zr=0;Zrue.nextTick(Qt):Qt=>setTimeout(Qt,0);function Ro(Qt,{colorDistanceFormula:On,paletteQuantization:Un,colors:Zn}={}){const or=ua(Ei(On),Un,Zn);return Qt.forEach(mr=>or.sample(mr)),or.quantizeSync()}async function la(Qt,{colorDistanceFormula:On,paletteQuantization:Un,colors:Zn,onProgress:or}={}){return new Promise((mr,cr)=>{const Er=ua(Ei(On),Un,Zn);let pr;Qt.forEach(Cr=>Er.sample(Cr));const Ar=Er.quantize(),vr=()=>{try{const Cr=Ar.next();Cr.done?mr(pr):(Cr.value.palette&&(pr=Cr.value.palette),or&&or(Cr.value.progress),bo(vr))}catch(Cr){cr(Cr)}};bo(vr)})}function Ao(Qt,On,{colorDistanceFormula:Un,imageQuantization:Zn}={}){return aa(Ei(Un),Zn).quantizeSync(Qt,On)}async function ca(Qt,On,{colorDistanceFormula:Un,imageQuantization:Zn,onProgress:or}={}){return new Promise((mr,cr)=>{let Er;const pr=aa(Ei(Un),Zn).quantize(Qt,On),Ar=()=>{try{const vr=pr.next();vr.done?mr(Er):(vr.value.pointContainer&&(Er=vr.value.pointContainer),or&&or(vr.value.progress),bo(Ar))}catch(vr){cr(vr)}};bo(Ar)})}function Ei(Qt="euclidean-bt709"){switch(Qt){case"cie94-graphic-arts":return new Xe;case"cie94-textiles":return new Ye;case"ciede2000":return new sn;case"color-metric":return new yn;case"euclidean":return new wn;case"euclidean-bt709":return new Tn;case"euclidean-bt709-noalpha":return new xn;case"manhattan":return new zn;case"manhattan-bt709":return new Kn;case"manhattan-nommyde":return new Yn;case"pngquant":return new Rn;default:throw new Error(`Unknown colorDistanceFormula ${Qt}`)}}function aa(Qt,On="floyd-steinberg"){switch(On){case"nearest":return new Gi(Qt);case"riemersma":return new oi(Qt);case"floyd-steinberg":return new xi(Qt,0);case"false-floyd-steinberg":return new xi(Qt,1);case"stucki":return new xi(Qt,2);case"atkinson":return new xi(Qt,3);case"jarvis":return new xi(Qt,4);case"burkes":return new xi(Qt,5);case"sierra":return new xi(Qt,6);case"two-sierra":return new xi(Qt,7);case"sierra-lite":return new xi(Qt,8);default:throw new Error(`Unknown imageQuantization ${On}`)}}function ua(Qt,On="wuquant",Un=256){switch(On){case"neuquant":return new Pn(Qt,Un);case"rgbquant":return new nr(Qt,Un);case"wuquant":return new hi(Qt,Un);case"neuquant-float":return new _r(Qt,Un);default:throw new Error(`Unknown paletteQuantization ${On}`)}}ne.exports=xe(Se)}},__webpack_module_cache__={};function __webpack_require__(ne){var oe=__webpack_module_cache__[ne];if(oe!==void 0)return oe.exports;var ce=__webpack_module_cache__[ne]={exports:{}};return __webpack_modules__[ne](ce,ce.exports,__webpack_require__),ce.exports}__webpack_require__.n=ne=>{var oe=ne&&ne.__esModule?()=>ne.default:()=>ne;return __webpack_require__.d(oe,{a:oe}),oe},__webpack_require__.d=(ne,oe)=>{for(var ce in oe)__webpack_require__.o(oe,ce)&&!__webpack_require__.o(ne,ce)&&Object.defineProperty(ne,ce,{enumerable:!0,get:oe[ce]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),__webpack_require__.r=ne=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ne,"__esModule",{value:!0})},(()=>{var ne={};__webpack_require__.r(ne),__webpack_require__.d(ne,{AUTO:()=>Nn,BLEND_ADD:()=>Gt,BLEND_DARKEN:()=>jn,BLEND_DESTINATION_OVER:()=>pn,BLEND_DIFFERENCE:()=>Bn,BLEND_EXCLUSION:()=>mn,BLEND_HARDLIGHT:()=>dn,BLEND_LIGHTEN:()=>Wn,BLEND_MULTIPLY:()=>tn,BLEND_OVERLAY:()=>kn,BLEND_SCREEN:()=>bn,BLEND_SOURCE_OVER:()=>Jn,EDGE_CROP:()=>er,EDGE_EXTEND:()=>Pn,EDGE_WRAP:()=>ur,HORIZONTAL_ALIGN_CENTER:()=>Yn,HORIZONTAL_ALIGN_LEFT:()=>zn,HORIZONTAL_ALIGN_RIGHT:()=>Kn,VERTICAL_ALIGN_BOTTOM:()=>Xn,VERTICAL_ALIGN_MIDDLE:()=>Mn,VERTICAL_ALIGN_TOP:()=>Rn});var oe={};__webpack_require__.r(oe),__webpack_require__.d(oe,{add:()=>sr,darken:()=>Mr,difference:()=>li,dstOver:()=>dr,exclusion:()=>ei,hardLight:()=>Yr,lighten:()=>Rr,multiply:()=>Sr,overlay:()=>kr,screen:()=>nr,srcOver:()=>_r});var ce=__webpack_require__(5546),ue=__webpack_require__.n(ce),pe=__webpack_require__(1023),me=__webpack_require__.n(pe),ge=__webpack_require__(2699),ye=__webpack_require__.n(ge);function ve(rn){if(rn===void 0)return!1;if(typeof rn!="function")throw new TypeError("Callback must be a function");return!0}function xe(rn,ln){if(typeof rn=="string"&&(rn=new Error(rn)),typeof ln=="function")return ln.call(this,rn);throw rn}function _e(rn,ln,En,$n,An,Ln){ln=Math.round(ln),En=Math.round(En),$n=Math.round($n),An=Math.round(An);for(let qn=En;qn1&&($i-=1),$i<1/6?vi+6*(Ri-vi)*$i:$i<.5?Ri:$i<2/3?vi+(Ri-vi)*(2/3-$i)*6:vi}if(gr=nn(gr,360),yr=nn(yr,100),xr=nn(xr,100),yr===0)Lr=Hr=si=xr;else{var ni=xr<.5?xr*(1+yr):xr+yr-xr*yr,wi=2*xr-ni;Lr=_i(wi,ni,gr+1/3),Hr=_i(wi,ni,gr),si=_i(wi,ni,gr-1/3)}return{r:255*Lr,g:255*Hr,b:255*si}}($n.h,ar,fr),Or=!0,wr="hsl"),$n.hasOwnProperty("a")&&(Vn=$n.a)),Vn=Xt(Vn),{ok:Or,format:$n.format||wr,r:Math.min(255,Math.max(Gn.r,0)),g:Math.min(255,Math.max(Gn.g,0)),b:Math.min(255,Math.max(Gn.b,0)),a:Vn}}(rn);this._originalInput=rn,this._r=En.r,this._g=En.g,this._b=En.b,this._a=En.a,this._roundA=Math.round(100*this._a)/100,this._format=ln.format||En.format,this._gradientType=ln.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=En.ok}function Fe(rn,ln,En){rn=nn(rn,255),ln=nn(ln,255),En=nn(En,255);var $n,An,Ln=Math.max(rn,ln,En),qn=Math.min(rn,ln,En),Gn=(Ln+qn)/2;if(Ln==qn)$n=An=0;else{var Vn=Ln-qn;switch(An=Gn>.5?Vn/(2-Ln-qn):Vn/(Ln+qn),Ln){case rn:$n=(ln-En)/Vn+(ln>1)+720)%360;--ln;)$n.h=($n.h+An)%360,Ln.push(Ne($n));return Ln}function Kt(rn,ln){ln=ln||6;for(var En=Ne(rn).toHsv(),$n=En.h,An=En.s,Ln=En.v,qn=[],Gn=1/ln;ln--;)qn.push(Ne({h:$n,s:An,v:Ln})),Ln=(Ln+Gn)%1;return qn}Ne.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var rn=this.toRgb();return(299*rn.r+587*rn.g+114*rn.b)/1e3},getLuminance:function(){var rn,ln,En,$n=this.toRgb();return rn=$n.r/255,ln=$n.g/255,En=$n.b/255,.2126*(rn<=.03928?rn/12.92:Math.pow((rn+.055)/1.055,2.4))+.7152*(ln<=.03928?ln/12.92:Math.pow((ln+.055)/1.055,2.4))+.0722*(En<=.03928?En/12.92:Math.pow((En+.055)/1.055,2.4))},setAlpha:function(rn){return this._a=Xt(rn),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var rn=Ue(this._r,this._g,this._b);return{h:360*rn.h,s:rn.s,v:rn.v,a:this._a}},toHsvString:function(){var rn=Ue(this._r,this._g,this._b),ln=Math.round(360*rn.h),En=Math.round(100*rn.s),$n=Math.round(100*rn.v);return this._a==1?"hsv("+ln+", "+En+"%, "+$n+"%)":"hsva("+ln+", "+En+"%, "+$n+"%, "+this._roundA+")"},toHsl:function(){var rn=Fe(this._r,this._g,this._b);return{h:360*rn.h,s:rn.s,l:rn.l,a:this._a}},toHslString:function(){var rn=Fe(this._r,this._g,this._b),ln=Math.round(360*rn.h),En=Math.round(100*rn.s),$n=Math.round(100*rn.l);return this._a==1?"hsl("+ln+", "+En+"%, "+$n+"%)":"hsla("+ln+", "+En+"%, "+$n+"%, "+this._roundA+")"},toHex:function(rn){return We(this._r,this._g,this._b,rn)},toHexString:function(rn){return"#"+this.toHex(rn)},toHex8:function(rn){return function(ln,En,$n,An,Ln){var qn=[Cn(Math.round(ln).toString(16)),Cn(Math.round(En).toString(16)),Cn(Math.round($n).toString(16)),Cn(Yt(An))];return Ln&&qn[0].charAt(0)==qn[0].charAt(1)&&qn[1].charAt(0)==qn[1].charAt(1)&&qn[2].charAt(0)==qn[2].charAt(1)&&qn[3].charAt(0)==qn[3].charAt(1)?qn[0].charAt(0)+qn[1].charAt(0)+qn[2].charAt(0)+qn[3].charAt(0):qn.join("")}(this._r,this._g,this._b,this._a,rn)},toHex8String:function(rn){return"#"+this.toHex8(rn)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*nn(this._r,255))+"%",g:Math.round(100*nn(this._g,255))+"%",b:Math.round(100*nn(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*nn(this._r,255))+"%, "+Math.round(100*nn(this._g,255))+"%, "+Math.round(100*nn(this._b,255))+"%)":"rgba("+Math.round(100*nn(this._r,255))+"%, "+Math.round(100*nn(this._g,255))+"%, "+Math.round(100*nn(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(un[We(this._r,this._g,this._b,!0)]||!1)},toFilter:function(rn){var ln="#"+qe(this._r,this._g,this._b,this._a),En=ln,$n=this._gradientType?"GradientType = 1, ":"";if(rn){var An=Ne(rn);En="#"+qe(An._r,An._g,An._b,An._a)}return"progid:DXImageTransform.Microsoft.gradient("+$n+"startColorstr="+ln+",endColorstr="+En+")"},toString:function(rn){var ln=!!rn;rn=rn||this._format;var En=!1,$n=this._a<1&&this._a>=0;return ln||!$n||rn!=="hex"&&rn!=="hex6"&&rn!=="hex3"&&rn!=="hex4"&&rn!=="hex8"&&rn!=="name"?(rn==="rgb"&&(En=this.toRgbString()),rn==="prgb"&&(En=this.toPercentageRgbString()),rn!=="hex"&&rn!=="hex6"||(En=this.toHexString()),rn==="hex3"&&(En=this.toHexString(!0)),rn==="hex4"&&(En=this.toHex8String(!0)),rn==="hex8"&&(En=this.toHex8String()),rn==="name"&&(En=this.toName()),rn==="hsl"&&(En=this.toHslString()),rn==="hsv"&&(En=this.toHsvString()),En||this.toHexString()):rn==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return Ne(this.toString())},_applyModification:function(rn,ln){var En=rn.apply(null,[this].concat([].slice.call(ln)));return this._r=En._r,this._g=En._g,this._b=En._b,this.setAlpha(En._a),this},lighten:function(){return this._applyModification(Dt,arguments)},brighten:function(){return this._applyModification(Je,arguments)},darken:function(){return this._applyModification(Ut,arguments)},desaturate:function(){return this._applyModification(ze,arguments)},saturate:function(){return this._applyModification(Ge,arguments)},greyscale:function(){return this._applyModification(Ze,arguments)},spin:function(){return this._applyModification(jt,arguments)},_applyCombination:function(rn,ln){return rn.apply(null,[this].concat([].slice.call(ln)))},analogous:function(){return this._applyCombination(en,arguments)},complement:function(){return this._applyCombination(Ke,arguments)},monochromatic:function(){return this._applyCombination(Kt,arguments)},splitcomplement:function(){return this._applyCombination(Zt,arguments)},triad:function(){return this._applyCombination(an,[3])},tetrad:function(){return this._applyCombination(an,[4])}},Ne.fromRatio=function(rn,ln){if(Ie(rn)=="object"){var En={};for(var $n in rn)rn.hasOwnProperty($n)&&(En[$n]=$n==="a"?rn[$n]:Nt(rn[$n]));rn=En}return Ne(rn,ln)},Ne.equals=function(rn,ln){return!(!rn||!ln)&&Ne(rn).toRgbString()==Ne(ln).toRgbString()},Ne.random=function(){return Ne.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Ne.mix=function(rn,ln,En){En=En===0?0:En||50;var $n=Ne(rn).toRgb(),An=Ne(ln).toRgb(),Ln=En/100;return Ne({r:(An.r-$n.r)*Ln+$n.r,g:(An.g-$n.g)*Ln+$n.g,b:(An.b-$n.b)*Ln+$n.b,a:(An.a-$n.a)*Ln+$n.a})},Ne.readability=function(rn,ln){var En=Ne(rn),$n=Ne(ln);return(Math.max(En.getLuminance(),$n.getLuminance())+.05)/(Math.min(En.getLuminance(),$n.getLuminance())+.05)},Ne.isReadable=function(rn,ln,En){var $n,An,Ln,qn,Gn,Vn=Ne.readability(rn,ln);switch(An=!1,(Ln=En,(qn=((Ln=Ln||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&qn!=="AAA"&&(qn="AA"),(Gn=(Ln.size||"small").toLowerCase())!=="small"&&Gn!=="large"&&(Gn="small"),$n={level:qn,size:Gn}).level+$n.size){case"AAsmall":case"AAAlarge":An=Vn>=4.5;break;case"AAlarge":An=Vn>=3;break;case"AAAsmall":An=Vn>=7}return An},Ne.mostReadable=function(rn,ln,En){var $n,An,Ln,qn,Gn=null,Vn=0;An=(En=En||{}).includeFallbackColors,Ln=En.level,qn=En.size;for(var ar=0;arVn&&(Vn=$n,Gn=Ne(ln[ar]));return Ne.isReadable(rn,Gn,{level:Ln,size:qn})||!An?Gn:(En.includeFallbackColors=!1,Ne.mostReadable(rn,["#fff","#000"],En))};var Wt=Ne.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},un=Ne.hexNames=function(rn){var ln={};for(var En in rn)rn.hasOwnProperty(En)&&(ln[rn[En]]=En);return ln}(Wt);function Xt(rn){return rn=parseFloat(rn),(isNaN(rn)||rn<0||rn>1)&&(rn=1),rn}function nn(rn,ln){(function($n){return typeof $n=="string"&&$n.indexOf(".")!=-1&&parseFloat($n)===1})(rn)&&(rn="100%");var En=function($n){return typeof $n=="string"&&$n.indexOf("%")!=-1}(rn);return rn=Math.min(ln,Math.max(0,parseFloat(rn))),En&&(rn=parseInt(rn*ln,10)/100),Math.abs(rn-ln)<1e-6?1:rn%ln/parseFloat(ln)}function vn(rn){return Math.min(1,Math.max(0,rn))}function Sn(rn){return parseInt(rn,16)}function Cn(rn){return rn.length==1?"0"+rn:""+rn}function Nt(rn){return rn<=1&&(rn=100*rn+"%"),rn}function Yt(rn){return Math.round(255*parseFloat(rn)).toString(16)}function Jt(rn){return Sn(rn)/255}var hn,Ye,Xe,Pt=(Ye="[\\s|\\(]+("+(hn="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+hn+")[,|\\s]+("+hn+")\\s*\\)?",Xe="[\\s|\\(]+("+hn+")[,|\\s]+("+hn+")[,|\\s]+("+hn+")[,|\\s]+("+hn+")\\s*\\)?",{CSS_UNIT:new RegExp(hn),rgb:new RegExp("rgb"+Ye),rgba:new RegExp("rgba"+Xe),hsl:new RegExp("hsl"+Ye),hsla:new RegExp("hsla"+Xe),hsv:new RegExp("hsv"+Ye),hsva:new RegExp("hsva"+Xe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function sn(rn){return!!Pt.CSS_UNIT.exec(rn)}function yn(rn,ln){this.size=this.size||rn,this.smallerSize=this.smallerSize||ln,function(En){for(let $n=1;$nAn?"1":"0";return Ln};const wn=[],Tn=yn;__webpack_require__(9307);const xn=(rn,ln)=>{let{url:En,...$n}=rn;fetch(En,$n).then(An=>{if(An.ok)return An.arrayBuffer().catch(Ln=>{throw new Error(`Response is not a buffer for url ${En}. Error: ${Ln.message}`)});throw new Error(`HTTP Status ${An.status} for url ${En}`)}).then(An=>ln(null,An)).catch(An=>ln(An))},Nn=-1,zn=1,Yn=2,Kn=4,Rn=8,Mn=16,Xn=32,Jn="srcOver",pn="dstOver",tn="multiply",Gt="add",bn="screen",kn="overlay",jn="darken",Wn="lighten",dn="hardLight",Bn="difference",mn="exclusion",Pn=1,ur=2,er=3;function _r(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a;return{r:(rn.r*rn.a+ln.r*ln.a*(1-rn.a))/$n,g:(rn.g*rn.a+ln.g*ln.a*(1-rn.a))/$n,b:(rn.b*rn.a+ln.b*ln.a*(1-rn.a))/$n,a:$n}}function dr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a;return{r:(ln.r*ln.a+rn.r*rn.a*(1-ln.a))/$n,g:(ln.g*ln.a+rn.g*rn.a*(1-ln.a))/$n,b:(ln.b*ln.a+rn.b*rn.a*(1-ln.a))/$n,a:$n}}function Sr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An*Gn+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(qn*ar+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function sr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a;return{r:(An+ln.r*ln.a)/$n,g:(Ln+ln.g*ln.a)/$n,b:(qn+ln.b*ln.a)/$n,a:$n}}function nr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An*ln.a+Gn*rn.a-An*Gn+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Ln*ln.a+Vn*rn.a-Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(qn*ln.a+ar*rn.a-qn*ar+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function kr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(2*Gn<=ln.a?2*An*Gn+An*(1-ln.a)+Gn*(1-rn.a):An*(1+ln.a)+Gn*(1+rn.a)-2*Gn*An-ln.a*rn.a)/$n,g:(2*Vn<=ln.a?2*Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a):Ln*(1+ln.a)+Vn*(1+rn.a)-2*Vn*Ln-ln.a*rn.a)/$n,b:(2*ar<=ln.a?2*qn*ar+qn*(1-ln.a)+ar*(1-rn.a):qn*(1+ln.a)+ar*(1+rn.a)-2*ar*qn-ln.a*rn.a)/$n,a:$n}}function Mr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(Math.min(An*ln.a,Gn*rn.a)+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Math.min(Ln*ln.a,Vn*rn.a)+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(Math.min(qn*ln.a,ar*rn.a)+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function Rr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(Math.max(An*ln.a,Gn*rn.a)+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Math.max(Ln*ln.a,Vn*rn.a)+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(Math.max(qn*ln.a,ar*rn.a)+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function Yr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(2*An<=rn.a?2*An*Gn+An*(1-ln.a)+Gn*(1-rn.a):An*(1+ln.a)+Gn*(1+rn.a)-2*Gn*An-ln.a*rn.a)/$n,g:(2*Ln<=rn.a?2*Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a):Ln*(1+ln.a)+Vn*(1+rn.a)-2*Vn*Ln-ln.a*rn.a)/$n,b:(2*qn<=rn.a?2*qn*ar+qn*(1-ln.a)+ar*(1-rn.a):qn*(1+ln.a)+ar*(1+rn.a)-2*ar*qn-ln.a*rn.a)/$n,a:$n}}function li(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An+Gn-2*Math.min(An*ln.a,Gn*rn.a))/$n,g:(Ln+Vn-2*Math.min(Ln*ln.a,Vn*rn.a))/$n,b:(qn+ar-2*Math.min(qn*ln.a,ar*rn.a))/$n,a:$n}}function ei(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An*ln.a+Gn*rn.a-2*An*Gn+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Ln*ln.a+Vn*rn.a-2*Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(qn*ln.a+ar*rn.a-2*qn*ar+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}const Pr=function(rn,ln){for(var En=arguments.length,$n=new Array(En>2?En-2:0),An=2;An{$n.push((Gn,Vn)=>{Gn&&qn(Gn),Ln(Vn)}),rn.bind(ln)(...$n)})},hi={},mi=(rn,ln)=>{hi[rn]=ln},yi=rn=>{const ln=rn.split("/").slice(-1);var En;return(En=ln[ln.length-1].split(".").pop(),Object.entries(hi).find($n=>$n[1].includes(En))||[])[0]};var Gi=__webpack_require__(5025),gi=__webpack_require__.n(Gi),xi=__webpack_require__(6551),Ni=__webpack_require__.n(xi),fi=__webpack_require__(8834).lW;function bi(rn){return rn._exif&&rn._exif.tags&&rn._exif.tags.Orientation||1}async function oi(rn,ln,En){const $n=await async function(An,Ln){const qn=await gi().fromBuffer(An);return qn?qn.mime:Ln?yi(Ln):null}(rn,ln);if(typeof $n!="string")return En(new Error("Could not find MIME for Buffer <"+ln+">"));this._originalMime=$n.toLowerCase();try{const An=this.getMIME();if(!this.constructor.decoders[An])return xe.call(this,"Unsupported MIME type: "+An,En);this.bitmap=this.constructor.decoders[An](rn)}catch(An){return En.call(this,An,this)}try{this._exif=Ni().create(rn).parse(),function(An){if(bi(An)<2)return;const Ln=function(Gn){const Vn=Gn.getWidth(),ar=Gn.getHeight();switch(bi(Gn)){case 1:default:return null;case 2:return function(lr,fr){return[Vn-lr-1,fr]};case 3:return function(lr,fr){return[Vn-lr-1,ar-fr-1]};case 4:return function(lr,fr){return[lr,ar-fr-1]};case 5:return function(lr,fr){return[fr,lr]};case 6:return function(lr,fr){return[fr,ar-lr-1]};case 7:return function(lr,fr){return[Vn-fr-1,ar-lr-1]};case 8:return function(lr,fr){return[Vn-fr-1,lr]}}}(An),qn=bi(An)>4;(function(Gn,Vn,ar,lr){const fr=Gn.bitmap.data,Or=Gn.bitmap.width,wr=fi.alloc(fr.length);for(let gr=0;gr{ln.call(this,null,$n)}):ln.call(this,null,En)}return this}function Co(rn){return Pr(ki,this,rn)}var Wi=__webpack_require__(8834).lW;function Di(rn,ln,En){return(ln=function($n){var An=function(Ln,qn){if(typeof Ln!="object"||Ln===null)return Ln;var Gn=Ln[Symbol.toPrimitive];if(Gn!==void 0){var Vn=Gn.call(Ln,"string");if(typeof Vn!="object")return Vn;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ln)}($n);return typeof An=="symbol"?An:String(An)}(ln))in rn?Object.defineProperty(rn,ln,{value:En,enumerable:!0,configurable:!0,writable:!0}):rn[ln]=En,rn}const pi="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",Ki=[NaN,NaN];for(let rn=2;rn<65;rn++){const ln=$e()($e().BIN,pi.slice(0,rn))(new Array(65).join("1"));Ki.push(ln.length)}function bo(){}function Ro(rn){return Object.prototype.toString.call(rn).toLowerCase().indexOf("arraybuffer")>-1}function la(rn){const ln=Wi.alloc(rn.byteLength),En=new Uint8Array(rn);for(let $n=0;$nEn?ln(En):typeof $n=="object"&&Wi.isBuffer($n)?ln(null,$n):typeof $n=="object"&&Ro($n)?ln(null,la($n)):new Error(`Could not load Buffer from <${rn.url}>`))}const ca={data:null,width:null,height:null};class Ei extends ye(){constructor(){for(var ln=arguments.length,En=new Array(ln),$n=0;$nPr(this.write,this,Vn)),Di(this,"getBase64Async",Vn=>Pr(this.getBase64,this,Vn)),Di(this,"getBuffer",ki),Di(this,"getBufferAsync",Co),Di(this,"getPixelColour",this.getPixelColor),Di(this,"setPixelColour",this.setPixelColor);const An=this;let Ln=bo;function qn(){for(var Vn=arguments.length,ar=new Array(Vn),lr=0;lr{fr&&Ln===bo?An.emitError("constructor",fr):fr||An.emitMulti("constructor","initialized"),Ln.call(An,...ar)},1)}if(Ro(En[0])&&(En[0]=la(En[0])),typeof En[0]=="number"&&typeof En[1]=="number"||parseInt(En[0],10)&&parseInt(En[1],10)){const Vn=parseInt(En[0],10),ar=parseInt(En[1],10);if(Ln=En[2],typeof En[2]=="number"&&(this._background=En[2],Ln=En[3]),typeof En[2]=="string"&&(this._background=Ei.cssColorToHex(En[2]),Ln=En[3]),Ln===void 0&&(Ln=bo),typeof Ln!="function")return xe.call(this,"cb must be a function",qn);this.bitmap={data:Wi.alloc(Vn*ar*4),width:Vn,height:ar};for(let lr=0;lr{if(Vn)return xe.call(this,Vn,qn);this.parseBitmap(ar,En[0].url,qn)})}else if(En[0]instanceof Ei){const[Vn]=En;if(Ln=En[1],Ln===void 0&&(Ln=bo),typeof Ln!="function")return xe.call(this,"cb must be a function",qn);this.bitmap={data:Wi.from(Vn.bitmap.data),width:Vn.bitmap.width,height:Vn.bitmap.height},this._quality=Vn._quality,this._deflateLevel=Vn._deflateLevel,this._deflateStrategy=Vn._deflateStrategy,this._filterType=Vn._filterType,this._rgba=Vn._rgba,this._background=Vn._background,this._originalMime=Vn._originalMime,qn(null,this)}else if((Gn=En[0])&&typeof Gn=="object"&&typeof Gn.width=="number"&&typeof Gn.height=="number"&&(Wi.isBuffer(Gn.data)||Gn.data instanceof Uint8Array||typeof Uint8ClampedArray=="function"&&Gn.data instanceof Uint8ClampedArray)&&(Gn.data.length===Gn.width*Gn.height*4||Gn.data.length===Gn.width*Gn.height*3)){const[Vn]=En;Ln=En[1]||bo;const ar=Vn.width*Vn.height*4===Vn.data.length?Wi.from(Vn.data):function(lr){if(lr.length%3!=0)throw new Error("Buffer length is incorrect");const fr=Wi.allocUnsafe(lr.length/3*4);let Or=0;for(let wr=0;wr{if(ar)return xe.call(this,ar,qn);this.parseBitmap(lr,Vn,qn)})}else if(typeof En[0]=="object"&&Wi.isBuffer(En[0])){const Vn=En[0];if(Ln=En[1],typeof Ln!="function")return xe.call(this,"cb must be a function",qn);this.parseBitmap(Vn,null,qn)}else{Ln=En[En.length-1],typeof Ln!="function"&&(Ln=En[En.length-2],typeof Ln!="function"&&(Ln=bo));const Vn=Ei.__extraConstructors.find(ar=>ar.test(...En));if(!Vn)return xe.call(this,"No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.",qn);new Promise((ar,lr)=>{Vn.run.call(this,ar,lr,...En)}).then(()=>qn(null,this)).catch(qn)}var Gn}parseBitmap(ln,En,$n){oi.call(this,ln,null,$n)}rgba(ln,En){return typeof ln!="boolean"?xe.call(this,"bool must be a boolean, true for RGBA or false for RGB",En):(this._rgba=ln,ve(En)&&En.call(this,null,this),this)}emitMulti(ln,En){let $n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};$n=Object.assign($n,{methodName:ln,eventName:En}),this.emit("any",$n),ln&&this.emit(ln,$n),this.emit(En,$n)}emitError(ln,En){this.emitMulti(ln,"error",En)}getHeight(){return this.bitmap.height}getWidth(){return this.bitmap.width}inspect(){return""}toString(){return"[object Jimp]"}getMIME(){return this._originalMime||Ei.MIME_PNG}getExtension(){const ln=this.getMIME();return(hi[ln.toLowerCase()]||[])[0]}write(ln,En){if(!ue()||!ue().createWriteStream)throw new Error("Cant access the filesystem. You can use the getBase64 method.");if(typeof ln!="string")return xe.call(this,"path must be a string",En);if(En===void 0&&(En=bo),typeof En!="function")return xe.call(this,"cb must be a function",En);const $n=yi(ln)||this.getMIME(),An=me().parse(ln);return An.dir&&ue().mkdirSync(An.dir,{recursive:!0}),this.getBuffer($n,(Ln,qn)=>{if(Ln)return xe.call(this,Ln,En);const Gn=ue().createWriteStream(ln);Gn.on("open",()=>{Gn.write(qn),Gn.end()}).on("error",Vn=>xe.call(this,Vn,En)),Gn.on("finish",()=>{En.call(this,null,this)})}),this}getBase64(ln,En){return ln===Ei.AUTO&&(ln=this.getMIME()),typeof ln!="string"?xe.call(this,"mime must be a string",En):typeof En!="function"?xe.call(this,"cb must be a function",En):(this.getBuffer(ln,function($n,An){if($n)return xe.call(this,$n,En);const Ln="data:"+ln+";base64,"+An.toString("base64");En.call(this,null,Ln)}),this)}hash(ln,En){if(typeof(ln=ln||64)=="function"&&(En=ln,ln=64),typeof ln!="number")return xe.call(this,"base must be a number",En);if(ln<2||ln>64)return xe.call(this,"base must be a number between 2 and 64",En);let $n=this.pHash();for($n=$e()($e().BIN,pi.slice(0,ln))($n);$n.length=this.bitmap.width&&(Ln=this.bitmap.width-1),En<0&&(qn=0),En>=this.bitmap.height&&(qn=this.bitmap.height-1)),$n===Ei.EDGE_WRAP&&(ln<0&&(Ln=this.bitmap.width+ln),ln>=this.bitmap.width&&(Ln=ln%this.bitmap.width),En<0&&(qn=this.bitmap.height+En),En>=this.bitmap.height&&(qn=En%this.bitmap.height));let Gn=this.bitmap.width*qn+Ln<<2;return(Ln<0||Ln>=this.bitmap.width)&&(Gn=-1),(qn<0||qn>=this.bitmap.height)&&(Gn=-1),ve(An)&&An.call(this,null,Gn),Gn}getPixelColor(ln,En,$n){if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",$n);ln=Math.round(ln),En=Math.round(En);const An=this.getPixelIndex(ln,En),Ln=this.bitmap.data.readUInt32BE(An);return ve($n)&&$n.call(this,null,Ln),Ln}setPixelColor(ln,En,$n,An){if(typeof ln!="number"||typeof En!="number"||typeof $n!="number")return xe.call(this,"hex, x and y must be numbers",An);En=Math.round(En),$n=Math.round($n);const Ln=this.getPixelIndex(En,$n);return this.bitmap.data.writeUInt32BE(ln,Ln),ve(An)&&An.call(this,null,this),this}hasAlpha(){for(let ln=0;ln1&&arguments[1]!==void 0?arguments[1]:Ei;Object.entries(rn).forEach(En=>{let[$n,An]=En;ln[$n]=An})}function ua(rn){let ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei;Object.entries(rn).forEach(En=>{let[$n,An]=En;ln.prototype[$n]=An})}function Qt(rn,ln,En){const $n="before-"+ln,An=ln.replace(/e$/,"")+"ed";Ei.prototype[rn]=function(){let Ln;for(var qn=arguments.length,Gn=new Array(qn),Vn=0;Vn3&&arguments[3]!==void 0?arguments[3]:{},An=arguments.length>4?arguments[4]:void 0;if(typeof $n=="function"&&(An=$n,$n={}),!(rn instanceof this.constructor))return xe.call(this,"The source must be a Jimp image",An);if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",An);let{mode:Ln,opacitySource:qn,opacityDest:Gn}=$n;Ln||(Ln=Jn),(typeof qn!="number"||qn<0||qn>1)&&(qn=1),(typeof Gn!="number"||Gn<0||Gn>1)&&(Gn=1);const Vn=oe[Ln];ln=Math.round(ln),En=Math.round(En);const ar=this;return Gn!==1&&ar.opacity(Gn),rn.scanQuiet(0,0,rn.bitmap.width,rn.bitmap.height,function(lr,fr,Or){const wr=ar.getPixelIndex(ln+lr,En+fr,er);if(wr===-1)return;const gr=Vn({r:this.bitmap.data[Or+0]/255,g:this.bitmap.data[Or+1]/255,b:this.bitmap.data[Or+2]/255,a:this.bitmap.data[Or+3]/255},{r:ar.bitmap.data[wr+0]/255,g:ar.bitmap.data[wr+1]/255,b:ar.bitmap.data[wr+2]/255,a:ar.bitmap.data[wr+3]/255},qn);ar.bitmap.data[wr+0]=this.constructor.limit255(255*gr.r),ar.bitmap.data[wr+1]=this.constructor.limit255(255*gr.g),ar.bitmap.data[wr+2]=this.constructor.limit255(255*gr.b),ar.bitmap.data[wr+3]=this.constructor.limit255(255*gr.a)}),ve(An)&&An.call(this,null,this),this}}),Ei.__extraConstructors=[],Ei.appendConstructorOption=function(rn,ln,En){Ei.__extraConstructors.push({name:rn,test:ln,run:En})},Ei.read=function(){for(var rn=arguments.length,ln=new Array(rn),En=0;En{new Ei(...ln,(Ln,qn)=>{Ln?An(Ln):$n(qn)})})},Ei.create=Ei.read,Ei.rgbaToInt=function(rn,ln,En,$n,An){if(typeof rn!="number"||typeof ln!="number"||typeof En!="number"||typeof $n!="number")return xe.call(this,"r, g, b and a must be numbers",An);if(rn<0||rn>255)return xe.call(this,"r must be between 0 and 255",An);if((ln<0||ln>255)&&xe.call(this,"g must be between 0 and 255",An),En<0||En>255)return xe.call(this,"b must be between 0 and 255",An);if($n<0||$n>255)return xe.call(this,"a must be between 0 and 255",An);rn=Math.round(rn),En=Math.round(En),ln=Math.round(ln),$n=Math.round($n);const Ln=rn*Math.pow(256,3)+ln*Math.pow(256,2)+En*Math.pow(256,1)+$n*Math.pow(256,0);return ve(An)&&An.call(this,null,Ln),Ln},Ei.intToRGBA=function(rn,ln){if(typeof rn!="number")return xe.call(this,"i must be a number",ln);const En={};return En.r=Math.floor(rn/Math.pow(256,3)),En.g=Math.floor((rn-En.r*Math.pow(256,3))/Math.pow(256,2)),En.b=Math.floor((rn-En.r*Math.pow(256,3)-En.g*Math.pow(256,2))/Math.pow(256,1)),En.a=Math.floor((rn-En.r*Math.pow(256,3)-En.g*Math.pow(256,2)-En.b*Math.pow(256,1))/Math.pow(256,0)),ve(ln)&&ln.call(this,null,En),En},Ei.cssColorToHex=function(rn){return typeof(rn=rn||0)=="number"?Number(rn):parseInt(Ne(rn).toHex8(),16)},Ei.limit255=function(rn){return rn=Math.max(rn,0),Math.min(rn,255)},Ei.diff=function(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.1;if(!(rn instanceof Ei&&ln instanceof Ei))return xe.call(this,"img1 and img2 must be an Jimp images");const $n=rn.bitmap,An=ln.bitmap;if($n.width===An.width&&$n.height===An.height||($n.width*$n.height>An.width*An.height?rn=rn.cloneQuiet().resize(An.width,An.height):ln=ln.cloneQuiet().resize($n.width,$n.height)),typeof En!="number"||En<0||En>1)return xe.call(this,"threshold must be a number between 0 and 1");const Ln=new Ei($n.width,$n.height,4294967295);return{percent:Ae()($n.data,An.data,Ln.bitmap.data,Ln.bitmap.width,Ln.bitmap.height,{threshold:En})/(Ln.bitmap.width*Ln.bitmap.height),image:Ln}},Ei.distance=function(rn,ln){const En=new Tn,$n=En.getHash(rn),An=En.getHash(ln);return En.distance($n,An)},Ei.compareHashes=function(rn,ln){return new Tn().distance(rn,ln)},Ei.colorDiff=function(rn,ln){const En=An=>Math.pow(An,2),{max:$n}=Math;return rn.a===0||rn.a||(rn.a=255),ln.a===0||ln.a||(ln.a=255),($n(En(rn.r-ln.r),En(rn.r-ln.r-rn.a+ln.a))+$n(En(rn.g-ln.g),En(rn.g-ln.g-rn.a+ln.a))+$n(En(rn.b-ln.b),En(rn.b-ln.b-rn.a+ln.a)))/195075},Qt("clone","clone",function(rn){const ln=new Ei(this);return ve(rn)&&rn.call(ln,null,ln),ln}),On("background",function(rn,ln){return typeof rn!="number"?xe.call(this,"hex must be a hexadecimal rgba value",ln):(this._background=rn,ve(ln)&&ln.call(this,null,this),this)}),On("scan",function(rn,ln,En,$n,An,Ln){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"x and y must be numbers",Ln);if(typeof En!="number"||typeof $n!="number")return xe.call(this,"w and h must be numbers",Ln);if(typeof An!="function")return xe.call(this,"f must be a function",Ln);const qn=_e(this,rn,ln,En,$n,An);return ve(Ln)&&Ln.call(this,null,qn),qn});{let rn;typeof window<"u"&&typeof window=="object"&&(rn=window),typeof self<"u"&&typeof self=="object"&&(rn=self),rn.Jimp=Ei,rn.Buffer=Wi}const Un=Ei;var Zn=__webpack_require__(643),or=__webpack_require__(2691),mr=__webpack_require__.n(or);const cr="image/jpeg",Er=()=>({mime:{[cr]:["jpeg","jpg","jpe"]},constants:{MIME_JPEG:cr},decoders:{[cr]:mr().decode},encoders:{[cr]:rn=>mr().encode(rn.bitmap,rn._quality).data},class:{_quality:100,quality(rn,ln){return typeof rn!="number"?xe.call(this,"n must be a number",ln):rn<0||rn>100?xe.call(this,"n must be a number 0 - 100",ln):(this._quality=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)}}});var pr=__webpack_require__(9902);const Ar="image/png",vr=()=>({mime:{[Ar]:["png"]},constants:{MIME_PNG:Ar,PNG_FILTER_AUTO:-1,PNG_FILTER_NONE:0,PNG_FILTER_SUB:1,PNG_FILTER_UP:2,PNG_FILTER_AVERAGE:3,PNG_FILTER_PATH:4},hasAlpha:{[Ar]:!0},decoders:{[Ar]:pr.PNG.sync.read},encoders:{[Ar](rn){const ln=new pr.PNG({width:rn.bitmap.width,height:rn.bitmap.height});return ln.data=rn.bitmap.data,pr.PNG.sync.write(ln,{deflateLevel:rn._deflateLevel,deflateStrategy:rn._deflateStrategy,filterType:rn._filterType,colorType:typeof rn._colorType=="number"?rn._colorType:rn._rgba?6:2,inputHasAlpha:rn._rgba})}},class:{_deflateLevel:9,_deflateStrategy:3,_filterType:-1,_colorType:null,deflateLevel(rn,ln){return typeof rn!="number"?xe.call(this,"l must be a number",ln):rn<0||rn>9?xe.call(this,"l must be a number 0 - 9",ln):(this._deflateLevel=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)},deflateStrategy(rn,ln){return typeof rn!="number"?xe.call(this,"s must be a number",ln):rn<0||rn>3?xe.call(this,"s must be a number 0 - 3",ln):(this._deflateStrategy=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)},filterType(rn,ln){return typeof rn!="number"?xe.call(this,"n must be a number",ln):rn<-1||rn>4?xe.call(this,"n must be -1 (auto) or a number 0 - 4",ln):(this._filterType=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)},colorType(rn,ln){return typeof rn!="number"?xe.call(this,"s must be a number",ln):rn!==0&&rn!==2&&rn!==4&&rn!==6?xe.call(this,"s must be a number 0, 2, 4, 6.",ln):(this._colorType=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)}}});var Cr=__webpack_require__(486),$r=__webpack_require__.n(Cr);const Jr="image/bmp",Zr="image/x-ms-bmp",jr=rn=>{return _e({bitmap:ln=$r().decode(rn)},0,0,ln.width,ln.height,function(En,$n,An){const Ln=this.bitmap.data[An+0],qn=this.bitmap.data[An+1],Gn=this.bitmap.data[An+2],Vn=this.bitmap.data[An+3];this.bitmap.data[An+0]=Vn,this.bitmap.data[An+1]=Gn,this.bitmap.data[An+2]=qn,this.bitmap.data[An+3]=ln.is_with_alpha?Ln:255}).bitmap;var ln},Ur=rn=>$r().encode(function(ln){return _e(ln,0,0,ln.bitmap.width,ln.bitmap.height,function(En,$n,An){const Ln=this.bitmap.data[An+0],qn=this.bitmap.data[An+1],Gn=this.bitmap.data[An+2],Vn=this.bitmap.data[An+3];this.bitmap.data[An+0]=Vn,this.bitmap.data[An+1]=Gn,this.bitmap.data[An+2]=qn,this.bitmap.data[An+3]=Ln}).bitmap}(rn)).data;var Ci=__webpack_require__(9299),Pi=__webpack_require__.n(Ci),qi=__webpack_require__(8834).lW;const Fi="image/tiff";var so=__webpack_require__(63),Ui=__webpack_require__(9455),ti=__webpack_require__(8834).lW;const jo="image/gif",qa=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],Va=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];var da=__webpack_require__(8834).lW;function $a(rn,ln,En,$n){const An=[0,0,0],Ln=(ln.length-1)/2;for(let qn=0;qnrn!=null;function Ra(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){const An=parseInt(.2126*this.bitmap.data[$n]+.7152*this.bitmap.data[$n+1]+.0722*this.bitmap.data[$n+2],10);this.bitmap.data[$n]=An,this.bitmap.data[$n+1]=An,this.bitmap.data[$n+2]=An}),ve(rn)&&rn.call(this,null,this),this}function Ta(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:50;return{r:(ln.r-rn.r)*(En/100)+rn.r,g:(ln.g-rn.g)*(En/100)+rn.g,b:(ln.b-rn.b)*(En/100)+rn.b}}function Wl(rn,ln){return rn&&Array.isArray(rn)?(rn=rn.map(En=>(En.apply!=="xor"&&En.apply!=="mix"||(En.params[0]=Ne(En.params[0]).toRgb()),En)),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(En,$n,An)=>{let Ln={r:this.bitmap.data[An],g:this.bitmap.data[An+1],b:this.bitmap.data[An+2]};const qn=(Gn,Vn)=>this.constructor.limit255(Ln[Gn]+Vn);rn.forEach(Gn=>{if(Gn.apply==="mix")Ln=Ta(Ln,Gn.params[0],Gn.params[1]);else if(Gn.apply==="tint")Ln=Ta(Ln,{r:255,g:255,b:255},Gn.params[0]);else if(Gn.apply==="shade")Ln=Ta(Ln,{r:0,g:0,b:0},Gn.params[0]);else if(Gn.apply==="xor")Ln={r:Ln.r^Gn.params[0].r,g:Ln.g^Gn.params[0].g,b:Ln.b^Gn.params[0].b};else if(Gn.apply==="red")Ln.r=qn("r",Gn.params[0]);else if(Gn.apply==="green")Ln.g=qn("g",Gn.params[0]);else if(Gn.apply==="blue")Ln.b=qn("b",Gn.params[0]);else{if(Gn.apply==="hue"&&(Gn.apply="spin"),Ln=Ne(Ln),!Ln[Gn.apply])return xe.call(this,"action "+Gn.apply+" not supported",ln);Ln=Ln[Gn.apply](...Gn.params).toRgb()}}),this.bitmap.data[An]=Ln.r,this.bitmap.data[An+1]=Ln.g,this.bitmap.data[An+2]=Ln.b}),ve(ln)&&ln.call(this,null,this),this):xe.call(this,"actions must be an array",ln)}var js=__webpack_require__(8834).lW;function ql(rn){const ln=[1,9,3,11,13,5,15,7,4,12,2,10,16,8,14,6];return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){const Ln=ln[((3&$n)<<2)+En%4];this.bitmap.data[An]=Math.min(this.bitmap.data[An]+Ln,255),this.bitmap.data[An+1]=Math.min(this.bitmap.data[An+1]+Ln,255),this.bitmap.data[An+2]=Math.min(this.bitmap.data[An+2]+Ln,255)}),ve(rn)&&rn.call(this,null,this),this}var Vl=__webpack_require__(8834).lW;function Yl(rn,ln,En){if(typeof rn!="boolean"||typeof ln!="boolean")return xe.call(this,"horizontal and vertical must be Booleans",En);const $n=Vl.alloc(this.bitmap.data.length);return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(An,Ln,qn){const Gn=rn?this.bitmap.width-1-An:An,Vn=ln?this.bitmap.height-1-Ln:Ln,ar=this.bitmap.width*Vn+Gn<<2,lr=this.bitmap.data.readUInt32BE(qn);$n.writeUInt32BE(lr,ar)}),this.bitmap.data=Vl.from($n),ve(En)&&En.call(this,null,this),this}function ec(){const rn={r:new Array(256).fill(0),g:new Array(256).fill(0),b:new Array(256).fill(0)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){rn.r[this.bitmap.data[$n+0]]++,rn.g[this.bitmap.data[$n+1]]++,rn.b[this.bitmap.data[$n+2]]++}),rn}const Aa=function(rn,ln,En){return 255*(rn-ln)/(En-ln)},Us=function(rn){return[rn.findIndex(ln=>ln>0),255-rn.slice().reverse().findIndex(ln=>ln>0)]};var tc=__webpack_require__(8058),nc=__webpack_require__.n(tc);function Ls(rn,ln){let En=0;for(let $n=0;$n{const Vn=[...Ln,Gn].join(" "),ar=Ls(rn,Vn);ar<=En?(ar>qn&&(qn=ar),Ln.push(Gn)):(An.push(Ln),Ln=[Gn])}),An.push(Ln),{lines:An,longestLine:qn}}function ci(rn,ln,En){const{lines:$n}=Xl(rn,ln,En);return $n.length*rn.common.lineHeight}function ui(rn,ln,En,$n,An){if(An.width>0&&An.height>0){const Ln=ln.pages[An.page];rn.blit(Ln,En+An.xoffset,$n+An.yoffset,An.x,An.y,An.width,An.height)}return rn}function rc(rn,ln,En,$n,An){for(let Ln=0;Ln<$n.length;Ln++){let qn;qn=rn.chars[$n[Ln]]?$n[Ln]:/\s/.test($n[Ln])?"":"?";const Gn=rn.chars[qn]||{},Vn=rn.kernings[qn];ui(this,rn,ln,En,Gn||{}),ln+=(Vn&&Vn[$n[Ln+1]]?Vn[$n[Ln+1]]:0)+(Gn.xadvance||An)}}const Uo="//../";function go(rn,ln,En,$n,An,Ln,qn){this.widthOriginal=Math.abs(Math.floor(rn)||0),this.heightOriginal=Math.abs(Math.floor(ln)||0),this.targetWidth=Math.abs(Math.floor(En)||0),this.targetHeight=Math.abs(Math.floor($n)||0),this.colorChannels=An?4:3,this.interpolationPass=!!Ln,this.resizeCallback=typeof qn=="function"?qn:function(){},this.targetWidthMultipliedByChannels=this.targetWidth*this.colorChannels,this.originalWidthMultipliedByChannels=this.widthOriginal*this.colorChannels,this.originalHeightMultipliedByChannels=this.heightOriginal*this.colorChannels,this.widthPassResultSize=this.targetWidthMultipliedByChannels*this.heightOriginal,this.finalResultSize=this.targetWidthMultipliedByChannels*this.targetHeight,this.initialize()}go.prototype.initialize=function(){if(!(this.widthOriginal>0&&this.heightOriginal>0&&this.targetWidth>0&&this.targetHeight>0))throw new Error("Invalid settings specified for the resizer.");this.configurePasses()},go.prototype.configurePasses=function(){this.widthOriginal===this.targetWidth?this.resizeWidth=this.bypassResizer:(this.ratioWeightWidthPass=this.widthOriginal/this.targetWidth,this.ratioWeightWidthPass<1&&this.interpolationPass?(this.initializeFirstPassBuffers(!0),this.resizeWidth=this.colorChannels===4?this.resizeWidthInterpolatedRGBA:this.resizeWidthInterpolatedRGB):(this.initializeFirstPassBuffers(!1),this.resizeWidth=this.colorChannels===4?this.resizeWidthRGBA:this.resizeWidthRGB)),this.heightOriginal===this.targetHeight?this.resizeHeight=this.bypassResizer:(this.ratioWeightHeightPass=this.heightOriginal/this.targetHeight,this.ratioWeightHeightPass<1&&this.interpolationPass?(this.initializeSecondPassBuffers(!0),this.resizeHeight=this.resizeHeightInterpolated):(this.initializeSecondPassBuffers(!1),this.resizeHeight=this.colorChannels===4?this.resizeHeightRGBA:this.resizeHeightRGB))},go.prototype._resizeWidthInterpolatedRGBChannels=function(rn,ln){const En=ln?4:3,$n=this.ratioWeightWidthPass,An=this.widthBuffer;let Ln,qn,Gn=0,Vn=0,ar=0,lr=0,fr=0;for(Ln=0;Gn<1/3;Ln+=En,Gn+=$n)for(Vn=Ln,ar=0;Vn=fr)){wr+=lr;break}Or+=En,wr=Or,lr-=fr}while(lr>0&&Or=Vn)){lr+=Gn;break}ar=wr,lr=ar,Gn-=Vn}while(Gn>0&&ar3&&(this.outputWidthWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.heightOriginal)))},go.prototype.initializeSecondPassBuffers=function(rn){this.heightBuffer=this.generateUint8Buffer(this.finalResultSize),rn||(this.outputHeightWorkBench=this.generateFloatBuffer(this.targetWidthMultipliedByChannels),this.colorChannels>3&&(this.outputHeightWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.targetWidth)))},go.prototype.generateFloatBuffer=function(rn){try{return new Float32Array(rn)}catch{return[]}},go.prototype.generateFloat64Buffer=function(rn){try{return new Float64Array(rn)}catch{return[]}},go.prototype.generateUint8Buffer=function(rn){try{return new Uint8Array(rn)}catch{return[]}};const ic=go;var Kl=__webpack_require__(8834).lW;const oc={nearestNeighbor(rn,ln){const En=rn.width,$n=rn.height,An=ln.width,Ln=ln.height,qn=rn.data,Gn=ln.data;for(let Vn=0;Vn0?An[$i-4]:2*An[$i]-An[$i+4],ha=An[$i],sa=An[$i+4],Ca=_i0?gr[$i-4*fr]:2*gr[$i]-gr[$i+4*fr],ha=gr[$i],sa=gr[$i+4*fr],Ca=_i1)for(let Lr=0;Lr=0&&xr.x=0&&xr.y({blit(rn,ln,En,$n,An,Ln,qn,Gn){if(!(rn instanceof this.constructor))return xe.call(this,"The source must be a Jimp image",Gn);if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",Gn);if(typeof $n=="function")Gn=$n,$n=0,An=0,Ln=rn.bitmap.width,qn=rn.bitmap.height;else{if(typeof $n!=typeof An||typeof An!=typeof Ln||typeof Ln!=typeof qn)return xe.call(this,"srcx, srcy, srcw, srch must be numbers",Gn);$n=$n||0,An=An||0,Ln=Ln||rn.bitmap.width,qn=qn||rn.bitmap.height}ln=Math.round(ln),En=Math.round(En),$n=Math.round($n),An=Math.round(An),Ln=Math.round(Ln),qn=Math.round(qn);const Vn=this.bitmap.width,ar=this.bitmap.height,lr=this;return rn.scanQuiet($n,An,Ln,qn,function(fr,Or,wr){const gr=ln+fr-$n,yr=En+Or-An;if(gr>=0&&yr>=0&&Vn-gr>0&&ar-yr>0){const xr=lr.getPixelIndex(gr,yr),Lr={r:this.bitmap.data[wr],g:this.bitmap.data[wr+1],b:this.bitmap.data[wr+2],a:this.bitmap.data[wr+3]},Hr={r:lr.bitmap.data[xr],g:lr.bitmap.data[xr+1],b:lr.bitmap.data[xr+2],a:lr.bitmap.data[xr+3]};lr.bitmap.data[xr]=(Lr.a*(Lr.r-Hr.r)-Hr.r+255>>8)+Hr.r,lr.bitmap.data[xr+1]=(Lr.a*(Lr.g-Hr.g)-Hr.g+255>>8)+Hr.g,lr.bitmap.data[xr+2]=(Lr.a*(Lr.b-Hr.b)-Hr.b+255>>8)+Hr.b,lr.bitmap.data[xr+3]=this.constructor.limit255(Hr.a+Lr.a)}}),ve(Gn)&&Gn.call(this,null,this),this}}),()=>({blur(rn,ln){if(typeof rn!="number")return xe.call(this,"r must be a number",ln);if(rn<1)return xe.call(this,"r must be greater than 0",ln);let En,$n,An,Ln,qn,Gn,Vn,ar,lr,fr,Or,wr,gr,yr;const xr=this.bitmap.width-1,Lr=this.bitmap.height-1,Hr=rn+1,si=qa[rn],_i=Va[rn],ni=[],wi=[],vi=[],Ri=[],$i=[],yo=[];let ha=2;for(;ha-- >0;){for(wr=0,gr=0,Gn=0;Gnxr?xr:Vn)<<2),En+=this.bitmap.data[ar++],$n+=this.bitmap.data[ar++],An+=this.bitmap.data[ar++],Ln+=this.bitmap.data[ar];for(qn=0;qn0?ar<<2:0),lr=gr+$i[qn],fr=gr+yo[qn],En+=this.bitmap.data[lr++]-this.bitmap.data[fr++],$n+=this.bitmap.data[lr++]-this.bitmap.data[fr++],An+=this.bitmap.data[lr++]-this.bitmap.data[fr++],Ln+=this.bitmap.data[lr]-this.bitmap.data[fr],wr++;gr+=this.bitmap.width<<2}for(qn=0;qnLr?0:this.bitmap.width,En+=ni[Or],$n+=wi[Or],An+=vi[Or],Ln+=Ri[Or];for(wr=qn<<2,Gn=0;Gn>>_i,this.bitmap.data[wr+3]=yr,yr>255&&(this.bitmap.data[wr+3]=255),yr>0?(yr=255/yr,this.bitmap.data[wr]=(En*si>>>_i)*yr,this.bitmap.data[wr+1]=($n*si>>>_i)*yr,this.bitmap.data[wr+2]=(An*si>>>_i)*yr):(this.bitmap.data[wr+2]=0,this.bitmap.data[wr+1]=0,this.bitmap.data[wr]=0),qn===0&&($i[Gn]=((ar=Gn+Hr)0?ar*this.bitmap.width:0),lr=qn+$i[Gn],fr=qn+yo[Gn],En+=ni[lr]-ni[fr],$n+=wi[lr]-wi[fr],An+=vi[lr]-vi[fr],Ln+=Ri[lr]-Ri[fr],wr+=this.bitmap.width<<2}}return ve(ln)&&ln.call(this,null,this),this}}),()=>({circle(){let rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ln=arguments.length>1?arguments[1]:void 0;typeof rn=="function"&&(ln=rn,rn={});const En=rn.radius||(this.bitmap.width>this.bitmap.height?this.bitmap.height:this.bitmap.width)/2,$n=typeof rn.x=="number"?rn.x:this.bitmap.width/2,An=typeof rn.y=="number"?rn.y:this.bitmap.height/2;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(Ln,qn,Gn){const Vn=Math.sqrt(Math.pow(Ln-$n,2)+Math.pow(qn-An,2));En-Vn<=0?this.bitmap.data[Gn+3]=0:En-Vn<1&&(this.bitmap.data[Gn+3]=255*(En-Vn))}),ve(ln)&&ln.call(this,null,this),this}}),()=>({brightness(rn,ln){return typeof rn!="number"?xe.call(this,"val must be numbers",ln):rn<-1||rn>1?xe.call(this,"val must be a number between -1 and +1",ln):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){rn<0?(this.bitmap.data[An]*=1+rn,this.bitmap.data[An+1]*=1+rn,this.bitmap.data[An+2]*=1+rn):(this.bitmap.data[An]+=(255-this.bitmap.data[An])*rn,this.bitmap.data[An+1]+=(255-this.bitmap.data[An+1])*rn,this.bitmap.data[An+2]+=(255-this.bitmap.data[An+2])*rn)}),ve(ln)&&ln.call(this,null,this),this)},contrast(rn,ln){if(typeof rn!="number")return xe.call(this,"val must be numbers",ln);if(rn<-1||rn>1)return xe.call(this,"val must be a number between -1 and +1",ln);const En=(rn+1)/(1-rn);function $n(An){return(An=Math.floor(En*(An-127)+127))<0?0:An>255?255:An}return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(An,Ln,qn){this.bitmap.data[qn]=$n(this.bitmap.data[qn]),this.bitmap.data[qn+1]=$n(this.bitmap.data[qn+1]),this.bitmap.data[qn+2]=$n(this.bitmap.data[qn+2])}),ve(ln)&&ln.call(this,null,this),this},posterize(rn,ln){return typeof rn!="number"?xe.call(this,"n must be numbers",ln):(rn<2&&(rn=2),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){this.bitmap.data[An]=Math.floor(this.bitmap.data[An]/255*(rn-1))/(rn-1)*255,this.bitmap.data[An+1]=Math.floor(this.bitmap.data[An+1]/255*(rn-1))/(rn-1)*255,this.bitmap.data[An+2]=Math.floor(this.bitmap.data[An+2]/255*(rn-1))/(rn-1)*255}),ve(ln)&&ln.call(this,null,this),this)},greyscale:Ra,grayscale:Ra,opacity(rn,ln){return typeof rn!="number"?xe.call(this,"f must be a number",ln):rn<0||rn>1?xe.call(this,"f must be a number from 0 to 1",ln):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){const Ln=this.bitmap.data[An+3]*rn;this.bitmap.data[An+3]=Ln}),ve(ln)&&ln.call(this,null,this),this)},sepia(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){let An=this.bitmap.data[$n],Ln=this.bitmap.data[$n+1],qn=this.bitmap.data[$n+2];An=.393*An+.769*Ln+.189*qn,Ln=.349*An+.686*Ln+.168*qn,qn=.272*An+.534*Ln+.131*qn,this.bitmap.data[$n]=An<255?An:255,this.bitmap.data[$n+1]=Ln<255?Ln:255,this.bitmap.data[$n+2]=qn<255?qn:255}),ve(rn)&&rn.call(this,null,this),this},fade(rn,ln){return typeof rn!="number"?xe.call(this,"f must be a number",ln):rn<0||rn>1?xe.call(this,"f must be a number from 0 to 1",ln):(this.opacity(1-rn),ve(ln)&&ln.call(this,null,this),this)},convolution(rn,ln,En){typeof ln=="function"&&En===void 0&&(En=ln,ln=null),ln||(ln=this.constructor.EDGE_EXTEND);const $n=da.from(this.bitmap.data),An=rn.length,Ln=rn[0].length,qn=Math.floor(An/2),Gn=Math.floor(Ln/2),Vn=-qn,ar=-Gn;let lr,fr,Or,wr,gr,yr,xr,Lr,Hr,si;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(_i,ni,wi){wr=0,Or=0,fr=0;for(let vi=Vn;vi<=qn;vi++)for(let Ri=ar;Ri<=Gn;Ri++)Lr=_i+Ri,Hr=ni+vi,lr=rn[vi+qn][Ri+Gn],si=this.getPixelIndex(Lr,Hr,ln),si===-1?(xr=0,yr=0,gr=0):(gr=this.bitmap.data[si+0],yr=this.bitmap.data[si+1],xr=this.bitmap.data[si+2]),fr+=lr*gr,Or+=lr*yr,wr+=lr*xr;fr<0&&(fr=0),Or<0&&(Or=0),wr<0&&(wr=0),fr>255&&(fr=255),Or>255&&(Or=255),wr>255&&(wr=255),$n[wi+0]=fr,$n[wi+1]=Or,$n[wi+2]=wr}),this.bitmap.data=$n,ve(En)&&En.call(this,null,this),this},opaque(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){this.bitmap.data[$n+3]=255}),ve(rn)&&rn.call(this,null,this),this},pixelate(rn,ln,En,$n,An,Ln){if(typeof ln=="function")Ln=ln,An=null,$n=null,En=null,ln=null;else{if(typeof rn!="number")return xe.call(this,"size must be a number",Ln);if(mo(ln)&&typeof ln!="number")return xe.call(this,"x must be a number",Ln);if(mo(En)&&typeof En!="number")return xe.call(this,"y must be a number",Ln);if(mo($n)&&typeof $n!="number")return xe.call(this,"w must be a number",Ln);if(mo(An)&&typeof An!="number")return xe.call(this,"h must be a number",Ln)}const qn=[[1/16,2/16,1/16],[2/16,.25,2/16],[1/16,2/16,1/16]];ln=ln||0,En=En||0,$n=mo($n)?$n:this.bitmap.width-ln,An=mo(An)?An:this.bitmap.height-En;const Gn=this.cloneQuiet();return this.scanQuiet(ln,En,$n,An,function(Vn,ar,lr){Vn=rn*Math.floor(Vn/rn),ar=rn*Math.floor(ar/rn);const fr=$a(Gn,qn,Vn,ar);this.bitmap.data[lr]=fr[0],this.bitmap.data[lr+1]=fr[1],this.bitmap.data[lr+2]=fr[2]}),ve(Ln)&&Ln.call(this,null,this),this},convolute(rn,ln,En,$n,An,Ln){if(!Array.isArray(rn))return xe.call(this,"the kernel must be an array",Ln);if(typeof ln=="function")Ln=ln,ln=null,En=null,$n=null,An=null;else{if(mo(ln)&&typeof ln!="number")return xe.call(this,"x must be a number",Ln);if(mo(En)&&typeof En!="number")return xe.call(this,"y must be a number",Ln);if(mo($n)&&typeof $n!="number")return xe.call(this,"w must be a number",Ln);if(mo(An)&&typeof An!="number")return xe.call(this,"h must be a number",Ln)}ln=mo(ln)?ln:0,En=mo(En)?En:0,$n=mo($n)?$n:this.bitmap.width-ln,An=mo(An)?An:this.bitmap.height-En;const qn=this.cloneQuiet();return this.scanQuiet(ln,En,$n,An,function(Gn,Vn,ar){const lr=$a(qn,rn,Gn,Vn);this.bitmap.data[ar]=this.constructor.limit255(lr[0]),this.bitmap.data[ar+1]=this.constructor.limit255(lr[1]),this.bitmap.data[ar+2]=this.constructor.limit255(lr[2])}),ve(Ln)&&Ln.call(this,null,this),this},color:Wl,colour:Wl}),()=>({contain(rn,ln,En,$n,An){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",An);typeof En=="string"&&(typeof $n=="function"&&An===void 0&&(An=$n),$n=En,En=null),typeof En=="function"&&(An===void 0&&(An=En),$n=null,En=null),typeof $n=="function"&&An===void 0&&(An=$n,$n=null);const Ln=7&(En=En||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),qn=En>>3;if((Ln===0||Ln&Ln-1)&&(qn===0||qn&qn-1))return xe.call(this,"only use one flag per alignment direction",An);const Gn=Ln>>1,Vn=qn>>1,ar=rn/ln>this.bitmap.width/this.bitmap.height?ln/this.bitmap.height:rn/this.bitmap.width,lr=this.cloneQuiet().scale(ar,$n);return this.resize(rn,ln,$n),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(fr,Or,wr){this.bitmap.data.writeUInt32BE(this._background,wr)}),this.blit(lr,(this.bitmap.width-lr.bitmap.width)/2*Gn,(this.bitmap.height-lr.bitmap.height)/2*Vn),ve(An)&&An.call(this,null,this),this}}),()=>({cover(rn,ln,En,$n,An){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",An);En&&typeof En=="function"&&An===void 0?(An=En,En=null,$n=null):typeof $n=="function"&&An===void 0&&(An=$n,$n=null);const Ln=7&(En=En||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),qn=En>>3;if((Ln===0||Ln&Ln-1)&&(qn===0||qn&qn-1))return xe.call(this,"only use one flag per alignment direction",An);const Gn=Ln>>1,Vn=qn>>1,ar=rn/ln>this.bitmap.width/this.bitmap.height?rn/this.bitmap.width:ln/this.bitmap.height;return this.scale(ar,$n),this.crop((this.bitmap.width-rn)/2*Gn,(this.bitmap.height-ln)/2*Vn,rn,ln),ve(An)&&An.call(this,null,this),this}}),function(rn){return rn("crop",function(ln,En,$n,An,Ln){if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",Ln);if(typeof $n!="number"||typeof An!="number")return xe.call(this,"w and h must be numbers",Ln);if(ln=Math.round(ln),En=Math.round(En),$n=Math.round($n),An=Math.round(An),ln===0&&$n===this.bitmap.width){const qn=$n*En+ln<<2,Gn=qn+(An*$n<<2);this.bitmap.data=this.bitmap.data.slice(qn,Gn)}else{const qn=js.allocUnsafe($n*An*4);let Gn=0;this.scanQuiet(ln,En,$n,An,function(Vn,ar,lr){const fr=this.bitmap.data.readUInt32BE(lr,!0);qn.writeUInt32BE(fr,Gn,!0),Gn+=4}),this.bitmap.data=qn}return this.bitmap.width=$n,this.bitmap.height=An,ve(Ln)&&Ln.call(this,null,this),this}),{class:{autocrop(){const ln=this.bitmap.width,En=this.bitmap.height;let $n,An=0,Ln=2e-4,qn=!0,Gn=!1,Vn={north:!1,south:!1,east:!1,west:!1};for(var ar=arguments.length,lr=new Array(ar),fr=0;frLn)break e}gr++}if(Or=this.getPixelColor(ln,0),!Vn.west)e:for(let ni=0;niLn)break e}Lr++}if(Or=this.getPixelColor(0,En),!Vn.south)e:for(let ni=En-1;ni>=gr+1;ni--){for(let wi=ln-yr-1;wi>=0;wi--){const vi=this.getPixelColor(wi,ni),Ri=this.constructor.intToRGBA(vi);if(this.constructor.colorDiff(wr,Ri)>Ln)break e}xr++}if(Or=this.getPixelColor(ln,En),!Vn.east)e:for(let ni=ln-1;ni>=0+Lr+1;ni--){for(let wi=En-1;wi>=0+gr;wi--){const vi=this.getPixelColor(ni,wi),Ri=this.constructor.intToRGBA(vi);if(this.constructor.colorDiff(wr,Ri)>Ln)break e}yr++}let Hr=!1;if(Lr-=An,yr-=An,gr-=An,xr-=An,Gn){const ni=Math.min(yr,Lr),wi=Math.min(gr,xr);Lr=ni,yr=ni,gr=wi,xr=wi}Lr=Lr>=0?Lr:0,yr=yr>=0?yr:0,gr=gr>=0?gr:0,xr=xr>=0?xr:0;const si=ln-(Lr+yr),_i=En-(xr+gr);return Hr=qn?yr!==0&&gr!==0&&Lr!==0&&xr!==0:yr!==0||gr!==0||Lr!==0||xr!==0,Hr&&this.crop(Lr,gr,si,_i),ve($n)&&$n.call(this,null,this),this}}}},()=>({displace(rn,ln,En){if(typeof rn!="object"||rn.constructor!==this.constructor)return xe.call(this,"The source must be a Jimp image",En);if(typeof ln!="number")return xe.call(this,"factor must be a number",En);const $n=this.cloneQuiet();return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(An,Ln,qn){let Gn=rn.bitmap.data[qn]/256*ln;Gn=Math.round(Gn);const Vn=this.getPixelIndex(An+Gn,Ln);this.bitmap.data[Vn]=$n.bitmap.data[qn],this.bitmap.data[Vn+1]=$n.bitmap.data[qn+1],this.bitmap.data[Vn+2]=$n.bitmap.data[qn+2]}),ve(En)&&En.call(this,null,this),this}}),()=>({dither565:ql,dither16:ql}),()=>({fisheye(){let rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{r:2.5},ln=arguments.length>1?arguments[1]:void 0;typeof rn=="function"&&(ln=rn,rn={r:2.5});const En=this.cloneQuiet(),{width:$n,height:An}=En.bitmap;return En.scanQuiet(0,0,$n,An,(Ln,qn)=>{const Gn=Ln/$n,Vn=qn/An,ar=Math.sqrt(Math.pow(Gn-.5,2)+Math.pow(Vn-.5,2)),lr=2*Math.pow(ar,rn.r),fr=(Gn-.5)/ar,Or=(Vn-.5)/ar,wr=Math.round((lr*fr+.5)*$n),gr=Math.round((lr*Or+.5)*An),yr=En.getPixelColor(wr,gr);this.setPixelColor(yr,Ln,qn)}),this.setPixelColor(En.getPixelColor($n/2,An/2),$n/2,An/2),ve(ln)&&ln.call(this,null,this),this}}),()=>({flip:Yl,mirror:Yl}),()=>({gaussian(rn,ln){if(typeof rn!="number")return xe.call(this,"r must be a number",ln);if(rn<1)return xe.call(this,"r must be greater than 0",ln);const En=Math.ceil(2.57*rn),$n=2*En+1,An=rn*rn*2,Ln=An*Math.PI,qn=[];for(let Gn=0;Gn<$n;Gn++){qn[Gn]=[];for(let Vn=0;Vn<$n;Vn++){const ar=(Vn-En)**2+(Gn-En)**2;qn[Gn][Vn]=Math.exp(-ar/An)/Ln}}for(let Gn=0;Gn({invert(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){this.bitmap.data[$n]=255-this.bitmap.data[$n],this.bitmap.data[$n+1]=255-this.bitmap.data[$n+1],this.bitmap.data[$n+2]=255-this.bitmap.data[$n+2]}),ve(rn)&&rn.call(this,null,this),this}}),()=>({mask(rn){let ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$n=arguments.length>3?arguments[3]:void 0;if(!(rn instanceof this.constructor))return xe.call(this,"The source must be a Jimp image",$n);if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",$n);ln=Math.round(ln),En=Math.round(En);const An=this.bitmap.width,Ln=this.bitmap.height,qn=this;return rn.scanQuiet(0,0,rn.bitmap.width,rn.bitmap.height,function(Gn,Vn,ar){const lr=ln+Gn,fr=En+Vn;if(lr>=0&&fr>=0&&lr({normalize(rn){const ln=ec.call(this),En={r:Us(ln.r),g:Us(ln.g),b:Us(ln.b)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function($n,An,Ln){const qn=this.bitmap.data[Ln+0],Gn=this.bitmap.data[Ln+1],Vn=this.bitmap.data[Ln+2];this.bitmap.data[Ln+0]=Aa(qn,En.r[0],En.r[1]),this.bitmap.data[Ln+1]=Aa(Gn,En.g[0],En.g[1]),this.bitmap.data[Ln+2]=Aa(Vn,En.b[0],En.b[1])}),ve(rn)&&rn.call(this,null,this),this}}),()=>({constants:{measureText:Ls,measureTextHeight:ci,FONT_SANS_8_BLACK:me().join(Uo,"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt"),FONT_SANS_10_BLACK:me().join(Uo,"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt"),FONT_SANS_12_BLACK:me().join(Uo,"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt"),FONT_SANS_14_BLACK:me().join(Uo,"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt"),FONT_SANS_16_BLACK:me().join(Uo,"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"),FONT_SANS_32_BLACK:me().join(Uo,"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt"),FONT_SANS_64_BLACK:me().join(Uo,"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt"),FONT_SANS_128_BLACK:me().join(Uo,"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt"),FONT_SANS_8_WHITE:me().join(Uo,"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt"),FONT_SANS_16_WHITE:me().join(Uo,"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt"),FONT_SANS_32_WHITE:me().join(Uo,"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt"),FONT_SANS_64_WHITE:me().join(Uo,"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt"),FONT_SANS_128_WHITE:me().join(Uo,"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt"),loadFont(rn,ln){return typeof rn!="string"?xe.call(this,"file must be a string",ln):new Promise((En,$n)=>{ln=ln||function(An,Ln){An?$n(An):En(Ln)},nc()(rn,(An,Ln)=>{const qn={},Gn={};if(An)return xe.call(this,An,ln);for(let Vn=0;VnVn.read(ar+"/"+Or));return Promise.all(fr)})(this,me().dirname(rn),Ln.pages).then(Vn=>{ln(null,{chars:qn,kernings:Gn,pages:Vn,common:Ln.common,info:Ln.info})})})})}},class:{print(rn,ln,En,$n,An,Ln,qn){if(typeof An=="function"&&qn===void 0&&(qn=An,An=1/0),An===void 0&&(An=1/0),typeof Ln=="function"&&qn===void 0&&(qn=Ln,Ln=1/0),Ln===void 0&&(Ln=1/0),typeof rn!="object")return xe.call(this,"font must be a Jimp loadFont",qn);if(typeof ln!="number"||typeof En!="number"||typeof An!="number")return xe.call(this,"x, y and maxWidth must be numbers",qn);if(typeof An!="number")return xe.call(this,"maxWidth must be a number",qn);if(typeof Ln!="number")return xe.call(this,"maxHeight must be a number",qn);let Gn,Vn;typeof $n=="object"&&$n.text!==null&&$n.text!==void 0?(Gn=$n.alignmentX||this.constructor.HORIZONTAL_ALIGN_LEFT,Vn=$n.alignmentY||this.constructor.VERTICAL_ALIGN_TOP,{text:$n}=$n):(Gn=this.constructor.HORIZONTAL_ALIGN_LEFT,Vn=this.constructor.VERTICAL_ALIGN_TOP,$n=$n.toString()),Ln!==1/0&&Vn===this.constructor.VERTICAL_ALIGN_BOTTOM?En+=Ln-ci(rn,$n,An):Ln!==1/0&&Vn===this.constructor.VERTICAL_ALIGN_MIDDLE&&(En+=Ln/2-ci(rn,$n,An)/2);const ar=Object.entries(rn.chars)[0][1].xadvance,{lines:lr,longestLine:fr}=Xl(rn,$n,An);return lr.forEach(Or=>{const wr=Or.join(" "),gr=function(yr,xr,Lr,Hr,si){return si===yr.HORIZONTAL_ALIGN_LEFT?0:si===yr.HORIZONTAL_ALIGN_CENTER?(Hr-Ls(xr,Lr))/2:Hr-Ls(xr,Lr)}(this.constructor,rn,wr,An,Gn);rc.call(this,rn,ln+gr,En,wr,ar),En+=rn.common.lineHeight}),ve(qn)&&qn.call(this,null,this,{x:ln+fr,y:En}),this}}}),()=>({constants:{RESIZE_NEAREST_NEIGHBOR:"nearestNeighbor",RESIZE_BILINEAR:"bilinearInterpolation",RESIZE_BICUBIC:"bicubicInterpolation",RESIZE_HERMITE:"hermiteInterpolation",RESIZE_BEZIER:"bezierInterpolation"},class:{resize(rn,ln,En,$n){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",$n);if(typeof En=="function"&&$n===void 0&&($n=En,En=null),rn===this.constructor.AUTO&&ln===this.constructor.AUTO)return xe.call(this,"w and h cannot both be set to auto",$n);if(rn===this.constructor.AUTO&&(rn=this.bitmap.width*(ln/this.bitmap.height)),ln===this.constructor.AUTO&&(ln=this.bitmap.height*(rn/this.bitmap.width)),rn<0||ln<0)return xe.call(this,"w and h must be positive numbers",$n);if(rn=Math.round(rn)||1,ln=Math.round(ln)||1,typeof Ds[En]=="function"){const An={data:Zl.alloc(rn*ln*4),width:rn,height:ln};Ds[En](this.bitmap,An),this.bitmap=An}else{const An=this;new ic(this.bitmap.width,this.bitmap.height,rn,ln,!0,!0,Ln=>{An.bitmap.data=Zl.from(Ln),An.bitmap.width=rn,An.bitmap.height=ln}).resize(this.bitmap.data)}return ve($n)&&$n.call(this,null,this),this}}}),()=>({rotate(rn,ln,En){return ln==null&&(ln=!0),typeof ln=="function"&&En===void 0&&(En=ln,ln=!0),typeof rn!="number"?xe.call(this,"deg must be a number",En):typeof ln!="boolean"&&typeof ln!="string"?xe.call(this,"mode must be a boolean or a string",En):(rn%90!=0||!ln&&this.bitmap.width!==this.bitmap.height&&rn%180!=0?zo.call(this,rn,ln,En):Ya.call(this,rn),ve(En)&&En.call(this,null,this),this)}}),()=>({scale(rn,ln,En){if(typeof rn!="number")return xe.call(this,"f must be a number",En);if(rn<0)return xe.call(this,"f must be a positive number",En);typeof ln=="function"&&En===void 0&&(En=ln,ln=null);const $n=this.bitmap.width*rn,An=this.bitmap.height*rn;return this.resize($n,An,ln),ve(En)&&En.call(this,null,this),this},scaleToFit(rn,ln,En,$n){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",$n);typeof En=="function"&&$n===void 0&&($n=En,En=null);const An=rn/ln>this.bitmap.width/this.bitmap.height?ln/this.bitmap.height:rn/this.bitmap.width;return this.scale(An,En),ve($n)&&$n.call(this,null,this),this}}),()=>({shadow(){let rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ln=arguments.length>1?arguments[1]:void 0;typeof rn=="function"&&(ln=rn,rn={});const{opacity:En=.7,size:$n=1.1,x:An=-25,y:Ln=25,blur:qn=5}=rn,Gn=this.clone(),Vn=this.clone();return Vn.scan(0,0,Vn.bitmap.width,Vn.bitmap.height,(ar,lr,fr)=>{Vn.bitmap.data[fr]=0,Vn.bitmap.data[fr+1]=0,Vn.bitmap.data[fr+2]=0,Vn.bitmap.data[fr+3]=Vn.constructor.limit255(Vn.bitmap.data[fr+3]*En),this.bitmap.data[fr]=0,this.bitmap.data[fr+1]=0,this.bitmap.data[fr+2]=0,this.bitmap.data[fr+3]=0}),Vn.resize(Vn.bitmap.width*$n,Vn.bitmap.height*$n).blur(qn),this.composite(Vn,An,Ln),this.composite(Gn,0,0),ve(ln)&&ln.call(this,null,this),this}}),()=>({threshold(rn,ln){let{max:En,replace:$n=255,autoGreyscale:An=!0}=rn;return typeof En!="number"?xe.call(this,"max must be a number",ln):typeof $n!="number"?xe.call(this,"replace must be a number",ln):typeof An!="boolean"?xe.call(this,"autoGreyscale must be a boolean",ln):(En=this.constructor.limit255(En),$n=this.constructor.limit255($n),An&&this.greyscale(),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(Ln,qn,Gn)=>{const Vn=this.bitmap.data[Gn]1&&arguments[1]!==void 0?arguments[1]:Un;const En={hasAlpha:{},encoders:{},decoders:{},class:{},constants:{}};function $n(An){Object.entries(An).forEach(Ln=>{let[qn,Gn]=Ln;En[qn]={...En[qn],...Gn}})}rn.types&&(rn.types.forEach(function(An){const Ln=An();Array.isArray(Ln.mime)?mi(...Ln.mime):Object.entries(Ln.mime).forEach(qn=>mi(...qn)),delete Ln.mime,$n(Ln)}),ln.decoders={...ln.decoders,...En.decoders},ln.encoders={...ln.encoders,...En.encoders},ln.hasAlpha={...ln.hasAlpha,...En.hasAlpha}),rn.plugins&&rn.plugins.forEach(function(An){const Ln=An(On)||{};Ln.class||Ln.constants?$n(Ln):$n({class:Ln})}),ua(En.class,ln),aa(En.constants,ln)})({types:[()=>(0,Zn.Ee)(Er(),vr(),{mime:{[Jr]:["bmp"]},constants:{MIME_BMP:Jr,MIME_X_MS_BMP:Zr},decoders:{[Jr]:jr,[Zr]:jr},encoders:{[Jr]:Ur,[Zr]:Ur}},{mime:{[Fi]:["tiff","tif"]},constants:{MIME_TIFF:Fi},decoders:{[Fi]:rn=>{const ln=Pi().decode(rn),En=ln[0];ln.forEach(An=>{Pi().decodeImage(rn,An)});const $n=Pi().toRGBA8(En);return{data:qi.from($n),width:En.t256[0],height:En.t257[0]}}},encoders:{[Fi]:rn=>{const ln=Pi().encodeImage(rn.bitmap.data,rn.bitmap.width,rn.bitmap.height);return qi.from(ln)}}},{mime:{[jo]:["gif"]},constants:{MIME_GIF:jo},decoders:{[jo]:rn=>{const ln=new so.N(rn),En=ti.alloc(ln.width*ln.height*4);return ln.decodeAndBlitFrameRGBA(0,En),{data:En,width:ln.width,height:ln.height}}},encoders:{[jo]:rn=>{const ln=new Ui.BitmapImage(rn.bitmap);Ui.GifUtil.quantizeDekker(ln,256);const En=new Ui.GifFrame(ln);return new Ui.GifCodec().encodeGif([En],{}).then($n=>$n.buffer)}}})],plugins:[rn=>{const ln=zs.map(En=>{let $n=En(rn)||{};return $n.class||$n.constants||($n={class:$n}),$n});return(0,Zn.Ee)(...ln)}]})})()})();const _Jimp=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Jimp=typeof self<"u"&&self.Jimp||_Jimp;function isPlainObject(ne){return(ne==null?void 0:ne.constructor)===Object}var validPathRegex=/^[^.[\]]+(?:\.[^.[\]]+)*(?:\[\d+])*(?:\.[^.[\]]+(?:\[\d+])*)*$/,pathSplitRegex=/\.|(?=\[)/g,matchBracketsRegex=/[[\]]/g;function set$1(ne,oe,ce){if(!validPathRegex.test(oe))throw new Error("Invalid path, look at the examples for the correct format.");const ue=oe.split(pathSplitRegex);let pe=ne;for(let me=0;mejsxRuntimeExports.jsx("img",{src:ne});function Screenshot({screenshot:ne,renderScreenshot:oe=defaultScreenshotRenderer}){const{result:ce,loading:ue}=useAsync(async()=>await(ne==null?void 0:ne()),[ne]);return oe(ce,ue)}function Gallery({onChange:ne}){const oe=usePaper(),[ce]=useScreenshots(),[ue,{set:pe,remove:me}]=useMap$1();reactExports.useEffect(()=>{ne==null||ne(lodashExports$1.values(ue))},[ue]);function ge(ye,ve,xe){ve&&xe?pe(`${ye}`,xe):me(`${ye}`)}return useAsync(async()=>{const ye=lodashExports$1.head(lodashExports$1.values(ce)),ve=await(ye==null?void 0:ye());ve&&ge(0,!0,ve)},[ce]),jsxRuntimeExports.jsx(Scroll,{x:!0,py:2,children:jsxRuntimeExports.jsx(Stack$1,{direction:"row",children:lodashExports$1.values(ce).map((ye,ve)=>jsxRuntimeExports.jsx(Screenshot,{screenshot:ye,renderScreenshot:(xe,_e)=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Box$1,{sx:{minWidth:"320px",height:"320px",flex:0,p:2,"&:not(:last-child)":{pr:1}},children:jsxRuntimeExports.jsxs(Box$1,{sx:{position:"relative",...oe(1),height:"100%"},children:[!!xe&&jsxRuntimeExports.jsx(Box$1,{sx:{backgroundImage:Se=>`linear-gradient(to bottom, ${alpha$1(Se.palette.background.paper,.5)}, transparent), url("${xe}")`,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center"}}),jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",p:1,top:0,left:0},children:jsxRuntimeExports.jsx(FormControlLabel$1,{control:jsxRuntimeExports.jsx(Checkbox$1,{checked:!!ue[ve],disabled:!xe,color:"primary",sx:{ml:1},onChange:(Se,$e)=>ge(ve,$e,xe)}),label:`Viewport ${ve+1}`})}),_e&&jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",m:2,top:0,right:0},children:jsxRuntimeExports.jsx(CircularProgress$1,{})})]})})})},ve))})})}const replacements={"*":"star","/":"slash","+":"plus","@":"at","%":"percent","&":"and"};function getFilename(ne=""){return lodashExports$1.kebabCase(lodashExports$1.reduce(lodashExports$1.entries(replacements),(oe,[ce,ue])=>oe.replace(ce,` ${ue} `),ne))||"untitled"}const imageSize=64;async function resizeImage(ne){const oe=await Jimp.read(Buffer.from(ne.split(",")[1],"base64")),ce=oe.getWidth()set(Ae,`workspaceMeta.${$e}`,Re)))}const{save:ge,estimateWorkspaceSize:ye}=useWorkspace(),ve=useLoadingState("general"),xe=useSnackbar(),_e=reactExports.useMemo(ye,[]);async function Se($e){return{...ue,id:nanoid$1(),size:$e,screenshots:await map((ue==null?void 0:ue.screenshots)??[],resizeImage),lastModified:Date.now()}}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Gallery,{onChange:$e=>me("screenshots",$e)})}),jsxRuntimeExports.jsxs(Stack$1,{p:2,gap:2,children:[jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,defaultValue:ue.name,onChange:$e=>me("name",$e.target.value),label:"Name",fullWidth:!0}),jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,minRows:3,defaultValue:ue.description,size:"small",onChange:$e=>me("description",$e.target.value),label:"Description",fullWidth:!0,multiline:!0}),jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,defaultValue:ue.author,size:"small",onChange:$e=>me("author",$e.target.value),label:"Author",fullWidth:!0,multiline:!0}),jsxRuntimeExports.jsx(Box$1,{sx:{pt:2,width:"100%"},children:jsxRuntimeExports.jsx(Button,{sx:{justifyContent:"flex-start",width:"100%",...ne(1)},onClick:()=>ve(async()=>{const $e=getFilename(ue.name),{size:Re}=await ge(!1,$e);download(JSON.stringify(await Se(Re)),`${$e}.workspace.meta`),xe(`Metadata saved, ${$e}.workspace.meta`)}),startIcon:jsxRuntimeExports.jsx(DownloadOutlined,{}),size:"large",children:jsxRuntimeExports.jsxs(Stack$1,{sx:{ml:1},alignItems:"baseline",children:[ue.name||"Untitled",jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",children:[getFilename(ue.name),".workspace"]}),jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",children:[lodashExports$1.ceil(_e/1024/1024,2)," MB"]})]})})})]})]})}function ExportWorkspaceModal(ne){return jsxRuntimeExports.jsxs(Modal,{...ne,children:[jsxRuntimeExports.jsx(ModalAppBar,{onClose:()=>{var oe;return(oe=ne==null?void 0:ne.onClose)==null?void 0:oe.call(ne,{},"backdropClick")},children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:"Publish Workspace"})}),jsxRuntimeExports.jsx(A,{})]})}const canOpenWindows=!distExports$1.isMobile,alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";function MenuEntry({startIcon:ne,endIcon:oe,label:ce}){return jsxRuntimeExports.jsxs(Stack$1,{direction:"row",gap:1,children:[!!ne&&reactExports.cloneElement(ne,{fontSize:"small",color:"disabled"}),jsxRuntimeExports.jsx("span",{children:ce}),!!oe&&reactExports.cloneElement(oe,{fontSize:"small",color:"disabled"})]})}function useTitleBarVisible(){const[ne,oe]=reactExports.useState(!1),[ce,ue]=reactExports.useState(new DOMRect);return reactExports.useEffect(()=>{if("windowControlsOverlay"in navigator){const pe=()=>{oe(!!navigator.windowControlsOverlay.visible),ue(navigator.windowControlsOverlay.getTitlebarAreaRect())};return navigator.windowControlsOverlay.addEventListener("geometrychange",pe),pe(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",pe)}},[oe]),{visible:ne,rect:ce}}const WorkspaceChip=()=>{const ne=useTheme$1(),{index:oe,isPrimary:ce,participants:ue,peers:pe}=useSyncStatus(),me=shades[(oe+1)*2%shades.length],ge=alphabet[oe],ye=getShade(me,ne.palette.mode);return jsxRuntimeExports.jsx(Tooltip$1,{title:`${ce?"Primary":"Secondary"} window, ${ue.length+1} in group`,children:jsxRuntimeExports.jsx(Collapse$1,{in:!!pe.length,orientation:"horizontal",sx:{ml:"0px !important",overflow:"hidden"},children:jsxRuntimeExports.jsx(Chip$1,{size:"small",icon:jsxRuntimeExports.jsx(WorkspacesOutlined,{sx:{color:`${ye} !important`}}),sx:{ml:1,flex:0,WebkitAppRegion:"no-drag",color:ye,background:alpha$1(ye,.08)},label:`Group ${ge}`})})})},TitleBarPlaceholder=()=>{const ne=useTitleBarVisible(),{palette:oe}=useTheme$1(),ce=oe.background.default;return useTitleBar(ce),jsxRuntimeExports.jsx(Box$1,{sx:{bgcolor:"background.default",minHeight:36,width:"100%",height:ne?"env(titlebar-area-height, 50px)":0}})},TitleBar=()=>{const{palette:ne}=useTheme$1(),oe=ne.background.default;useTitleBar(oe);const{save:ce,load:ue}=useWorkspace(),{visible:pe,rect:me}=useTitleBarVisible(),[,ge]=useView(),[ye,ve]=reactExports.useState(!1);function xe(_e){ge(({view:Se})=>({view:{type:"branch",orientation:_e,key:nanoid$1(),children:[{...Se,size:80},{type:"leaf",key:nanoid$1(),content:{type:""},size:20,acceptDrop:!0}]}}))}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box$1,{sx:{mx:.5,borderBottom:_e=>`1px solid ${_e.palette.background.default}`,minHeight:36,paddingLeft:"env(titlebar-area-x, 0px)",height:pe?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag",overflowX:"auto"},children:jsxRuntimeExports.jsx(Scroll,{x:!0,style:{height:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{height:"100%"},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",justifyContent:"flex-start",children:[(!pe||me.x===0)&&jsxRuntimeExports.jsx(Box$1,{sx:{p:1,height:"100%",maxWidth:"min-content",aspectRatio:1},children:jsxRuntimeExports.jsx("img",{src:logo$1,style:{height:"100%"}})}),jsxRuntimeExports.jsx(WorkspaceChip,{}),[{key:"view",items:[{disabled:!canOpenWindows,key:"panel-new-window",type:"action",name:"New window",action:()=>openWindow()},{type:"divider"},{type:"action",key:"panel-new-right",name:"Add view to the right",action:()=>xe("horizontal")},{type:"action",key:"panel-new-bottom",name:"Add view below",action:()=>xe("vertical")},{type:"divider"},{type:"action",name:"Reset layout",key:"panel-reset",action:()=>ge(getDefaultViewTree)},{type:"action",name:"Reload window",key:"panel-reload",action:()=>location.reload()}]},{key:"workspace",items:[{type:"action",name:"Open workspace",key:"workspace-load",action:ue},{type:"action",name:"Save workspace",key:"workspace-save",action:ce},{type:"divider"},{type:"action",name:jsxRuntimeExports.jsx(MenuEntry,{label:"Publish workspace",endIcon:jsxRuntimeExports.jsx(OpenInNewOutlined,{})}),key:"workspace-save-metadata",action:()=>ve(!0)}]},{key:"help",items:[{type:"action",name:"Open repository in GitHub",key:"github",action:()=>open(repository,"_blank")},{type:"action",name:"Changelog",key:"changelog",action:()=>open(`${changelog}/${version}`,"_blank")},{type:"action",name:"Documentation",key:"documentation",action:()=>open(docs,"_blank")}]}].map(({key:_e,items:Se})=>jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:$e=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Menu$1,{...bindMenu($e),children:jsxRuntimeExports.jsx(MenuList$1,{dense:!0,sx:{p:0},children:Se.map((Re,Ae)=>{if(Re.type==="action"){const{name:Ie,key:ke,action:Be}=Re;return jsxRuntimeExports.jsx(MenuItem$1,{disabled:lodashExports$1.get(Re,"disabled"),onClick:()=>{Be==null||Be(),$e.close()},children:Ie},ke)}else return jsxRuntimeExports.jsx(Divider$1,{},Ae)})})}),jsxRuntimeExports.jsx(FeaturePickerButton,{...bindTrigger($e),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:lodashExports$1.startCase(_e)},_e)]})},_e))]})})})}),jsxRuntimeExports.jsx(ExportWorkspaceModal,{open:ye,onClose:()=>ve(!1)})]})},logo=""+new URL("logo192-5e372a8c.png",import.meta.url).href;function BootstrapService(){const{load:ne}=useWorkspace();return useAsync(async()=>{try{const oe=new URLSearchParams(location.search).get("workspace");if(oe&&isWorkspace(oe)&&isWorkspace(oe)){const ce=oe.split("/").pop()??oe,ue=await fetch(oe);ne(new File([await ue.blob()],ce,{lastModified:lodashExports$1.now()}))}}catch(oe){console.warn(oe)}},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function ConnectionsService(){const ne=useSnackbar(),[{remote:oe}]=useSettings(),[,ce]=useConnections(),ue=useLoadingState("connections");return reactExports.useEffect(()=>{let pe=!1,me=[];return ue(async()=>{if(oe!=null&&oe.length){for(const{transport:ge,url:ye,disabled:ve}of oe){if(ve!==!0){ne(`Connecting to ${ye}...`);const xe=new(getTransport(ge))({url:ye});await xe.connect();const{result:_e,delta:Se}=await timed(()=>xe.call("about"));_e?(ne(`Connected to ${_e.name}`),me=[...me,{..._e,url:ye,ping:Se,transport:()=>xe}]):await xe.disconnect()}pe||ce(()=>me)}pe||ne(`Connected to ${me.length} of ${oe.length} solvers`)}}),()=>{pe=!0,me.map(ge=>ge.transport().disconnect())}},[JSON.stringify(oe),ce,ne,ue]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function withSource(ne){return oe=>({...oe,source:ne})}const getFeatures=async({transport:ne,url:oe})=>lodashExports$1.chain(await map(["algorithms","formats","maps","traces"],async ce=>{const{result:ue}=await timed(()=>ne().call(`features/${ce}`),1e3);return{prop:ce,result:lodashExports$1.map(ue,withSource(oe))}})).keyBy("prop").mapValues("result").value();function FeaturesService(){const[ne]=useConnections(),[,oe]=useFeatures(),[{connections:ce}]=useLoading(),ue=useLoadingState("features");return useAsyncAbortable(async pe=>{ue(async()=>{if(!ce){const me={default:{algorithms:[],formats:lodashExports$1.keys(mapParsers).map(ye=>({id:ye,source:"internal"})),traces:[],maps:[]}},ge=()=>{if(!pe.aborted){const ye=lodashExports$1.chain(me).values().reduce((ve,xe)=>lodashExports$1.mergeWith({},ve,xe,(_e,Se)=>lodashExports$1.isArray(_e)?lodashExports$1.uniqBy([..._e,...Se],"id"):void 0)).value();oe(()=>ye)}};for(const ye of ne){const ve=async()=>{me[ye.url]=await getFeatures(ye),ge()};ye.transport().on("features/changed",ve),ve()}}})},[ne,getFeatures,oe,ce]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function useLayerServices(){const{isPrimary:ne}=useSyncStatus(),[{layers:oe},ce,,ue]=useLayers();return reactExports.useMemo(()=>ne?lodashExports$1.map(oe,pe=>{const me=getController(pe).service;if(me)return reactExports.createElement(me,{key:pe.key,value:pe,onChange:ge=>ce(({layers:ye})=>({layers:lodashExports$1.map(ye,ve=>ve.key===pe.key?ge(ve):ve)}))})}):[],[ue,ce,ne])}function LayerService(){const ne=useLayerServices();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne})}var dist={},ConsoleCapture$1={},logs={};Object.defineProperty(logs,"__esModule",{value:!0});logs.overridableFunctionNames=void 0;logs.overridableFunctionNames=["log","warn","info","debug","error"];Object.defineProperty(ConsoleCapture$1,"__esModule",{value:!0});ConsoleCapture$1.ConsoleCapture=void 0;var logs_1=logs;console.original={};var ConsoleCapture=function(){function ne(){ne.captures=[]}return ne.saveLog=function(oe,ce){var ue=ce.map(function(pe){return typeof pe=="object"?pe instanceof Error?JSON.stringify(pe,Object.getOwnPropertyNames(pe)):JSON.stringify(pe):pe});ne.captures.push({function:oe,args:ue,ts:Date.now()})},ne.setNewFunctions=function(oe){oe===void 0&&(oe=!1);var ce={apply:function(ue,pe,me){if(ne.saveLog(ue.name,me),ue.bind(pe),oe)return ue.apply(void 0,me)}};logs_1.overridableFunctionNames.forEach(function(ue){ne.consoleOverriden||(console.original[ue]=console[ue]),console[ue]=new Proxy(console[ue],ce)}),ne.consoleOverriden=!0},ne.resetToOriginalFunctions=function(){ne.consoleOverriden&&logs_1.overridableFunctionNames.forEach(function(oe){console[oe]=console.original[oe]}),ne.consoleOverriden=!1},ne.prototype.start=function(oe){oe===void 0&&(oe=!1),ne.captures=[],ne.setNewFunctions(oe)},ne.prototype.stop=function(){ne.resetToOriginalFunctions()},ne.prototype.flush=function(){ne.captures=[]},ne.prototype.getCaptures=function(){return ne.captures},ne.makeOriginalLog=function(oe){if(ne.resetToOriginalFunctions(),logs_1.overridableFunctionNames.includes(oe.function)){var ce=oe.args.map(function(ue){if(typeof ue=="string")try{var pe=JSON.parse(ue);return pe.stack?pe.stack:pe}catch{return ue}return ue});console[oe.function].apply(console,ce)}else throw Error("Invalid Log type")},ne.consoleOverriden=!1,ne}();ConsoleCapture$1.ConsoleCapture=ConsoleCapture;Object.defineProperty(dist,"__esModule",{value:!0});var ConsoleCapture_1=ConsoleCapture$1;dist.default=ConsoleCapture_1.ConsoleCapture;function LogCaptureService(){return useSnackbar(),reactExports.useEffect(()=>{},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function SettingsService(){const[{"behaviour/showOnStart":ne},,oe]=useSettings(),[,ce]=useUIState();return reactExports.useEffect(()=>{const ue=new URLSearchParams(location.search).get("workspace");!minimal&&ne&&oe&&!ue&&ce(()=>({fullscreenModal:ne}))},[oe,minimal]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function SliceProvider({slices:ne,children:oe,services:ce}){return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:lodashExports$1.reduce(lodashExports$1.map(ne,ue=>reactExports.createElement(ue)),(ue,pe)=>reactExports.cloneElement(pe,{},ue),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[oe,lodashExports$1.map(ce,(ue,pe)=>reactExports.createElement(ue,{key:pe}))]}))})}const services=[SyncService,ConnectionsService,FeaturesService,RendererService,LayerService,LogCaptureService,SettingsService,BootstrapService];function App(){const{palette:ne}=useTheme$1(),oe=ne.background.default,{loading:ce}=useSyncStatus();return jsxRuntimeExports.jsx(Flex,{vertical:!0,sx:{bgcolor:oe,color:"text.primary",WebkitAppRegion:"no-drag"},children:ce?minimal?jsxRuntimeExports.jsx(Fade$1,{in:!0,children:jsxRuntimeExports.jsxs(Stack$1,{sx:{WebkitAppRegion:"drag",background:ue=>ue.palette.background.paper,width:"100vw",height:"100dvh"},children:[jsxRuntimeExports.jsx(TitleBarPlaceholder,{}),jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(CircularProgress$1,{})})]})}):jsxRuntimeExports.jsx(Fade$1,{in:!0,children:jsxRuntimeExports.jsxs(Stack$1,{sx:{WebkitAppRegion:"drag",width:"100vw",height:"100dvh",alignItems:"center",justifyContent:"center",gap:6},children:[jsxRuntimeExports.jsx(Image$1,{src:logo,style:{height:64,width:64}}),jsxRuntimeExports.jsx(CircularProgress$1,{})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TitleBar,{}),jsxRuntimeExports.jsx(Flex,{flex:1,children:jsxRuntimeExports.jsx(Inspector,{flex:1})})]})})}function ThemedApp(){const[{"appearance/theme":ne="dark","appearance/accentColor":oe="teal"}]=useSettings(),ce=reactExports.useMemo(()=>makeTheme(ne,oe),[ne,oe]);return jsxRuntimeExports.jsx(ThemeProvider,{theme:ce,children:jsxRuntimeExports.jsx(CssBaseline,{children:jsxRuntimeExports.jsx(SnackbarProvider,{children:jsxRuntimeExports.jsx(SliceProvider,{services,children:jsxRuntimeExports.jsx(App,{})})})})})}const index$1="",overlayscrollbars="";var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};/** +`)===0?Kt.substr(1,Kt.length):Kt}).forEach(function(Kt){var Wt=Kt.split(":"),un=Wt.shift().trim();if(un){var Xt=Wt.join(":").trim();an.append(un,Xt)}}),an)};Zt.url="responseURL"in Ut?Ut.responseURL:Zt.headers.get("X-Request-URL");var en="response"in Ut?Ut.response:Ut.responseText;setTimeout(function(){Ze(new Fe(en,Zt))},0)},Ut.onerror=function(){setTimeout(function(){Dt(new TypeError("Network request failed"))},0)},Ut.ontimeout=function(){setTimeout(function(){Dt(new TypeError("Network request failed"))},0)},Ut.onabort=function(){setTimeout(function(){Dt(new We("Aborted","AbortError"))},0)},Ut.open(Je.method,function(Ke){try{return Ke===""&&ue.location.href?ue.location.href:Ke}catch{return Ke}}(Je.url),!0),Je.credentials==="include"?Ut.withCredentials=!0:Je.credentials==="omit"&&(Ut.withCredentials=!1),"responseType"in Ut&&(pe.blob?Ut.responseType="blob":pe.arrayBuffer&&Je.headers.get("Content-Type")&&Je.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Ut.responseType="arraybuffer")),!Ge||typeof Ge.headers!="object"||Ge.headers instanceof _e?Je.headers.forEach(function(Ke,an){Ut.setRequestHeader(an,Ke)}):Object.getOwnPropertyNames(Ge.headers).forEach(function(Ke){Ut.setRequestHeader(Ke,ve(Ge.headers[Ke]))}),Je.signal&&(Je.signal.addEventListener("abort",jt),Ut.onreadystatechange=function(){Ut.readyState===4&&Je.signal.removeEventListener("abort",jt)}),Ut.send(Je._bodyInit===void 0?null:Je._bodyInit)})}qe.polyfill=!0,ue.fetch||(ue.fetch=qe,ue.Headers=_e,ue.Request=Be,ue.Response=Fe)},6290:(ne,oe,ce)=>{var ue=ce(5048),pe=ce(9748),me=ce(4655),ge=ce(1960);function ye(_e,Se,$e){var Re=_e;return pe(Se)?($e=Se,typeof _e=="string"&&(Re={uri:_e})):Re=ge(Se,{uri:_e}),Re.callback=$e,Re}function ve(_e,Se,$e){return xe(Se=ye(_e,Se,$e))}function xe(_e){if(_e.callback===void 0)throw new Error("callback argument missing");var Se=!1,$e=function(Je,Ut,jt){Se||(Se=!0,_e.callback(Je,Ut,jt))};function Re(){var Je=void 0;if(Je=Ne.response?Ne.response:Ne.responseText||function(Ut){try{if(Ut.responseType==="document")return Ut.responseXML;var jt=Ut.responseXML&&Ut.responseXML.documentElement.nodeName==="parsererror";if(Ut.responseType===""&&!jt)return Ut.responseXML}catch{}return null}(Ne),Ze)try{Je=JSON.parse(Je)}catch{}return Je}function Ae(Je){return clearTimeout(Fe),Je instanceof Error||(Je=new Error(""+(Je||"Unknown XMLHttpRequest Error"))),Je.statusCode=0,$e(Je,Dt)}function Ie(){if(!Be){var Je;clearTimeout(Fe),Je=_e.useXDR&&Ne.status===void 0?200:Ne.status===1223?204:Ne.status;var Ut=Dt,jt=null;return Je!==0?(Ut={body:Re(),statusCode:Je,method:We,headers:{},url:Ue,rawRequest:Ne},Ne.getAllResponseHeaders&&(Ut.headers=me(Ne.getAllResponseHeaders()))):jt=new Error("Internal XMLHttpRequest Error"),$e(jt,Ut,Ut.body)}}var ke,Be,Ne=_e.xhr||null;Ne||(Ne=_e.cors||_e.useXDR?new ve.XDomainRequest:new ve.XMLHttpRequest);var Fe,Ue=Ne.url=_e.uri||_e.url,We=Ne.method=_e.method||"GET",qe=_e.body||_e.data,ze=Ne.headers=_e.headers||{},Ge=!!_e.sync,Ze=!1,Dt={body:void 0,headers:{},statusCode:0,method:We,url:Ue,rawRequest:Ne};if("json"in _e&&_e.json!==!1&&(Ze=!0,ze.accept||ze.Accept||(ze.Accept="application/json"),We!=="GET"&&We!=="HEAD"&&(ze["content-type"]||ze["Content-Type"]||(ze["Content-Type"]="application/json"),qe=JSON.stringify(_e.json===!0?qe:_e.json))),Ne.onreadystatechange=function(){Ne.readyState===4&&setTimeout(Ie,0)},Ne.onload=Ie,Ne.onerror=Ae,Ne.onprogress=function(){},Ne.onabort=function(){Be=!0},Ne.ontimeout=Ae,Ne.open(We,Ue,!Ge,_e.username,_e.password),Ge||(Ne.withCredentials=!!_e.withCredentials),!Ge&&_e.timeout>0&&(Fe=setTimeout(function(){if(!Be){Be=!0,Ne.abort("timeout");var Je=new Error("XMLHttpRequest timeout");Je.code="ETIMEDOUT",Ae(Je)}},_e.timeout)),Ne.setRequestHeader)for(ke in ze)ze.hasOwnProperty(ke)&&Ne.setRequestHeader(ke,ze[ke]);else if(_e.headers&&!function(Je){for(var Ut in Je)if(Je.hasOwnProperty(Ut))return!1;return!0}(_e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in _e&&(Ne.responseType=_e.responseType),"beforeSend"in _e&&typeof _e.beforeSend=="function"&&_e.beforeSend(Ne),Ne.send(qe||null),Ne}ne.exports=ve,ne.exports.default=ve,ve.XMLHttpRequest=ue.XMLHttpRequest||function(){},ve.XDomainRequest="withCredentials"in new ve.XMLHttpRequest?ve.XMLHttpRequest:ue.XDomainRequest,function(_e,Se){for(var $e=0;$e<_e.length;$e++)Se(_e[$e])}(["get","put","post","patch","head","delete"],function(_e){ve[_e==="delete"?"del":_e]=function(Se,$e,Re){return($e=ye(Se,$e,Re)).method=_e.toUpperCase(),xe($e)}})},1596:ne=>{ne.exports=self.DOMParser!==void 0?function(oe){return new self.DOMParser().parseFromString(oe,"application/xml")}:self.ActiveXObject!==void 0&&new self.ActiveXObject("Microsoft.XMLDOM")?function(oe){var ce=new self.ActiveXObject("Microsoft.XMLDOM");return ce.async="false",ce.loadXML(oe),ce}:function(oe){var ce=document.createElement("div");return ce.innerHTML=oe,ce}},1960:ne=>{ne.exports=function(){for(var ce={},ue=0;ue{},6777:()=>{},5546:()=>{},2460:(ne,oe,ce)=>{var ue=ce(4406),pe=Object.defineProperty,me=Object.getOwnPropertyDescriptor,ge=Object.getOwnPropertyNames,ye=Object.prototype.hasOwnProperty,ve=(Qt,On)=>{for(var Un in On)pe(Qt,Un,{get:On[Un],enumerable:!0})},xe=(Qt=>(On,Un)=>Qt&&Qt.get(On)||(Un=((Zn,or,mr,cr)=>{if(or&&typeof or=="object"||typeof or=="function")for(let Er of ge(or))ye.call(Zn,Er)||pe(Zn,Er,{get:()=>or[Er],enumerable:!(cr=me(or,Er))||cr.enumerable});return Zn})(pe({},"__esModule",{value:!0}),On),Qt&&Qt.set(On,Un),Un))(typeof WeakMap<"u"?new WeakMap:0),_e=(Qt,On,Un)=>(((Zn,or,mr)=>{or in Zn?pe(Zn,or,{enumerable:!0,configurable:!0,writable:!0,value:mr}):Zn[or]=mr})(Qt,typeof On!="symbol"?On+"":On,Un),Un),Se={};ve(Se,{applyPalette:()=>ca,applyPaletteSync:()=>Ao,buildPalette:()=>la,buildPaletteSync:()=>Ro,constants:()=>$e,conversion:()=>Be,distance:()=>Yt,image:()=>mi,palette:()=>Mn,quality:()=>ki,utils:()=>bn});var $e={};ve($e,{bt709:()=>Re});var Re={};ve(Re,{Y:()=>Ae,x:()=>Ie,y:()=>ke});var Ae=(Qt=>(Qt[Qt.RED=.2126]="RED",Qt[Qt.GREEN=.7152]="GREEN",Qt[Qt.BLUE=.0722]="BLUE",Qt[Qt.WHITE=1]="WHITE",Qt))(Ae||{}),Ie=(Qt=>(Qt[Qt.RED=.64]="RED",Qt[Qt.GREEN=.3]="GREEN",Qt[Qt.BLUE=.15]="BLUE",Qt[Qt.WHITE=.3127]="WHITE",Qt))(Ie||{}),ke=(Qt=>(Qt[Qt.RED=.33]="RED",Qt[Qt.GREEN=.6]="GREEN",Qt[Qt.BLUE=.06]="BLUE",Qt[Qt.WHITE=.329]="WHITE",Qt))(ke||{}),Be={};function Ne(Qt){return Qt>.04045?((Qt+.055)/1.055)**2.4:Qt/12.92}function Fe(Qt,On,Un){return{x:.4124*(Qt=Ne(Qt/255))+.3576*(On=Ne(On/255))+.1805*(Un=Ne(Un/255)),y:.2126*Qt+.7152*On+.0722*Un,z:.0193*Qt+.1192*On+.9505*Un}}ve(Be,{lab2rgb:()=>Nt,lab2xyz:()=>vn,rgb2hsl:()=>Ut,rgb2lab:()=>Kt,rgb2xyz:()=>Fe,xyz2lab:()=>en,xyz2rgb:()=>Cn});var Ue={};function We(Qt){return Qt*(Math.PI/180)}function qe(Qt,On,Un){let Zn=Qt;return ZnOn&&(Zn=On),Zn>Un&&(Zn=Un),Zn}function Ge(Qt,On,Un){return Qt>Un&&(Qt=Un),Qt255?Qt=255:Qt<0&&(Qt=0),Qt}function Dt(Qt){return Qt>255?Qt=255:Qt<0&&(Qt=0),Qt}function Je(Qt,On){const Un=typeof Qt[0];let Zn;if(Un==="number"||Un==="string"){const or=Object.create(null);for(let mr=0,cr=Qt.length;mrOn(mr,cr)||or[mr]-or[cr])}else{const or=Qt.slice(0);Zn=Qt.sort((mr,cr)=>On(mr,cr)||or.indexOf(mr)-or.indexOf(cr))}return Zn}function Ut(Qt,On,Un){const Zn=ze(Qt,On,Un),or=qe(Qt,On,Un),mr=or-Zn,cr=(Zn+or)/510;let Er=0;cr>0&&cr<1&&(Er=mr/(cr<.5?or+Zn:510-or-Zn));let pr=0;return mr>0&&(pr=or===Qt?(On-Un)/mr:or===On?2+(Un-Qt)/mr:4+(Qt-On)/mr,pr*=60,pr<0&&(pr+=360)),{h:pr,s:Er,l:cr}}ve(Ue,{degrees2radians:()=>We,inRange0to255:()=>Dt,inRange0to255Rounded:()=>Ze,intInRange:()=>Ge,max3:()=>qe,min3:()=>ze,stableSort:()=>Je});var jt=.95047,Ke=1,an=1.08883;function Zt(Qt){return Qt>.008856?Qt**.3333333333333333:7.787*Qt+.13793103448275862}function en(Qt,On,Un){if(Qt=Zt(Qt/jt),On=Zt(On/Ke),Un=Zt(Un/an),116*On-16<0)throw new Error("xxx");return{L:Math.max(0,116*On-16),a:500*(Qt-On),b:200*(On-Un)}}function Kt(Qt,On,Un){const Zn=Fe(Qt,On,Un);return en(Zn.x,Zn.y,Zn.z)}var Wt=.95047,un=1,Xt=1.08883;function nn(Qt){return Qt>.206893034?Qt**3:(Qt-.13793103448275862)/7.787}function vn(Qt,On,Un){const Zn=(Qt+16)/116,or=Zn-Un/200;return{x:Wt*nn(On/500+Zn),y:un*nn(Zn),z:Xt*nn(or)}}function Sn(Qt){return Qt>.0031308?1.055*Qt**.4166666666666667-.055:12.92*Qt}function Cn(Qt,On,Un){const Zn=Sn(3.2406*Qt+-1.5372*On+-.4986*Un),or=Sn(-.9689*Qt+1.8758*On+.0415*Un),mr=Sn(.0557*Qt+-.204*On+1.057*Un);return{r:Ze(255*Zn),g:Ze(255*or),b:Ze(255*mr)}}function Nt(Qt,On,Un){const Zn=vn(Qt,On,Un);return Cn(Zn.x,Zn.y,Zn.z)}var Yt={};ve(Yt,{AbstractDistanceCalculator:()=>Jt,AbstractEuclidean:()=>qt,AbstractManhattan:()=>Nn,CIE94GraphicArts:()=>Xe,CIE94Textiles:()=>Ye,CIEDE2000:()=>sn,CMetric:()=>yn,Euclidean:()=>wn,EuclideanBT709:()=>Tn,EuclideanBT709NoAlpha:()=>xn,Manhattan:()=>zn,ManhattanBT709:()=>Kn,ManhattanNommyde:()=>Yn,PNGQuant:()=>Rn});var Jt=class{constructor(){_e(this,"_maxDistance"),_e(this,"_whitePoint"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}setWhitePoint(Qt,On,Un,Zn){this._whitePoint={r:Qt>0?255/Qt:0,g:On>0?255/On:0,b:Un>0?255/Un:0,a:Zn>0?255/Zn:0},this._maxDistance=this.calculateRaw(Qt,On,Un,Zn,0,0,0,0)}calculateNormalized(Qt,On){return this.calculateRaw(Qt.r,Qt.g,Qt.b,Qt.a,On.r,On.g,On.b,On.a)/this._maxDistance}},hn=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){const pr=Kt(Dt(Qt*this._whitePoint.r),Dt(On*this._whitePoint.g),Dt(Un*this._whitePoint.b)),Ar=Kt(Dt(or*this._whitePoint.r),Dt(mr*this._whitePoint.g),Dt(cr*this._whitePoint.b)),vr=pr.L-Ar.L,Cr=pr.a-Ar.a,$r=pr.b-Ar.b,Jr=Math.sqrt(pr.a*pr.a+pr.b*pr.b),Zr=Jr-Math.sqrt(Ar.a*Ar.a+Ar.b*Ar.b);let jr=Cr*Cr+$r*$r-Zr*Zr;jr=jr<0?0:Math.sqrt(jr);const Ur=(Er-Zn)*this._whitePoint.a*this._kA;return Math.sqrt((vr/this._Kl)**2+(Zr/(1+this._K1*Jr))**2+(jr/(1+this._K2*Jr))**2+Ur**2)}},Ye=class extends hn{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},Xe=class extends hn{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},Pt=class extends Jt{_setDefaults(){}static _calculatehp(Qt,On){const Un=Math.atan2(Qt,On);return Un>=0?Un:Un+Pt._deg360InRad}static _calculateRT(Qt,On){const Un=On**7,Zn=2*Math.sqrt(Un/(Un+Pt._pow25to7)),or=Pt._deg30InRad*Math.exp(-(((Qt-Pt._deg275InRad)/Pt._deg25InRad)**2));return-Math.sin(2*or)*Zn}static _calculateT(Qt){return 1-.17*Math.cos(Qt-Pt._deg30InRad)+.24*Math.cos(2*Qt)+.32*Math.cos(3*Qt+Pt._deg6InRad)-.2*Math.cos(4*Qt-Pt._deg63InRad)}static _calculate_ahp(Qt,On,Un,Zn){const or=Un+Zn;return Qt===0?or:On<=Pt._deg180InRad?or/2:or>8)+4*vr*vr+((767-pr)*Cr*Cr>>8),Jr=(Er-Zn)*this._whitePoint.a;return Math.sqrt($r+Jr*Jr)}_setDefaults(){}},qt=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){const pr=or-Qt,Ar=mr-On,vr=cr-Un,Cr=Er-Zn;return Math.sqrt(this._kR*pr*pr+this._kG*Ar*Ar+this._kB*vr*vr+this._kA*Cr*Cr)}},wn=class extends qt{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},Tn=class extends qt{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},xn=class extends qt{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},Nn=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){let pr=or-Qt,Ar=mr-On,vr=cr-Un,Cr=Er-Zn;return pr<0&&(pr=0-pr),Ar<0&&(Ar=0-Ar),vr<0&&(vr=0-vr),Cr<0&&(Cr=0-Cr),this._kR*pr+this._kG*Ar+this._kB*vr+this._kA*Cr}},zn=class extends Nn{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},Yn=class extends Nn{_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},Kn=class extends Nn{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},Rn=class extends Jt{calculateRaw(Qt,On,Un,Zn,or,mr,cr,Er){const pr=(Er-Zn)*this._whitePoint.a;return this._colordifferenceCh(Qt*this._whitePoint.r,or*this._whitePoint.r,pr)+this._colordifferenceCh(On*this._whitePoint.g,mr*this._whitePoint.g,pr)+this._colordifferenceCh(Un*this._whitePoint.b,cr*this._whitePoint.b,pr)}_colordifferenceCh(Qt,On,Un){const Zn=Qt-On,or=Zn+Un;return Zn*Zn+or*or}_setDefaults(){}},Mn={};ve(Mn,{AbstractPaletteQuantizer:()=>Xn,ColorHistogram:()=>Sr,NeuQuant:()=>Pn,NeuQuantFloat:()=>_r,RGBQuant:()=>nr,WuColorCube:()=>ei,WuQuant:()=>hi});var Xn=class{quantizeSync(){for(const Qt of this.quantize())if(Qt.palette)return Qt.palette;throw new Error("unreachable")}},Jn=class{constructor(){_e(this,"r"),_e(this,"g"),_e(this,"b"),_e(this,"a"),_e(this,"uint32"),_e(this,"rgba"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}static createByQuadruplet(Qt){const On=new Jn;return On.r=0|Qt[0],On.g=0|Qt[1],On.b=0|Qt[2],On.a=0|Qt[3],On._loadUINT32(),On._loadQuadruplet(),On}static createByRGBA(Qt,On,Un,Zn){const or=new Jn;return or.r=0|Qt,or.g=0|On,or.b=0|Un,or.a=0|Zn,or._loadUINT32(),or._loadQuadruplet(),or}static createByUint32(Qt){const On=new Jn;return On.uint32=Qt>>>0,On._loadRGBA(),On._loadQuadruplet(),On}from(Qt){this.r=Qt.r,this.g=Qt.g,this.b=Qt.b,this.a=Qt.a,this.uint32=Qt.uint32,this.rgba[0]=Qt.r,this.rgba[1]=Qt.g,this.rgba[2]=Qt.b,this.rgba[3]=Qt.a}getLuminosity(Qt){let On=this.r,Un=this.g,Zn=this.b;return Qt&&(On=Math.min(255,255-this.a+this.a*On/255),Un=Math.min(255,255-this.a+this.a*Un/255),Zn=Math.min(255,255-this.a+this.a*Zn/255)),.2126*On+.7152*Un+.0722*Zn}_loadUINT32(){this.uint32=(this.a<<24|this.b<<16|this.g<<8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}},pn=class{constructor(){_e(this,"_pointArray"),_e(this,"_width"),_e(this,"_height"),this._width=0,this._height=0,this._pointArray=[]}getWidth(){return this._width}getHeight(){return this._height}setWidth(Qt){this._width=Qt}setHeight(Qt){this._height=Qt}getPointArray(){return this._pointArray}clone(){const Qt=new pn;Qt._width=this._width,Qt._height=this._height;for(let On=0,Un=this._pointArray.length;On=or&&Qt=0;On--)if(Qt.uint32===this._pointArray[On].uint32)return!0;return!1}getNearestColor(Qt,On){return this._pointArray[0|this._getNearestIndex(Qt,On)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(Qt){return typeof this._i32idx[Qt]=="number"?this._i32idx[Qt]:-1}_getNearestIndex(Qt,On){let Un=this._nearestPointFromCache(""+On.uint32);if(Un>=0)return Un;let Zn=Number.MAX_VALUE;Un=0;for(let or=0,mr=this._pointArray.length;or{const Un=Ut(Qt.r,Qt.g,Qt.b),Zn=Ut(On.r,On.g,On.b),or=Qt.r===Qt.g&&Qt.g===Qt.b?0:1+tn(Un.h,10),mr=(On.r===On.g&&On.g===On.b?0:1+tn(Zn.h,10))-or;if(mr)return-mr;const cr=Qt.getLuminosity(!0),Er=On.getLuminosity(!0);if(Er-cr!=0)return Er-cr;const pr=(100*Zn.s|0)-(100*Un.s|0);return pr?-pr:0})}},bn={};ve(bn,{HueStatistics:()=>jn,Palette:()=>Gt,Point:()=>Jn,PointContainer:()=>pn,ProgressTracker:()=>dn,arithmetic:()=>Ue});var kn=class{constructor(){_e(this,"num",0),_e(this,"cols",[])}},jn=class{constructor(Qt,On){_e(this,"_numGroups"),_e(this,"_minCols"),_e(this,"_stats"),_e(this,"_groupsFull"),this._numGroups=Qt,this._minCols=On,this._stats=[];for(let Un=0;Un<=Qt;Un++)this._stats[Un]=new kn;this._groupsFull=0}check(Qt){this._groupsFull===this._numGroups+1&&(this.check=()=>{});const On=255&Qt,Un=Qt>>>8&255,Zn=Qt>>>16&255,or=On===Un&&Un===Zn?0:1+tn(Ut(On,Un,Zn).h,this._numGroups),mr=this._stats[or],cr=this._minCols;mr.num++,mr.num>cr||(mr.num===cr&&this._groupsFull++,mr.num<=cr&&this._stats[or].cols.push(Qt))}injectIntoDictionary(Qt){for(let On=0;On<=this._numGroups;On++)this._stats[On].num<=this._minCols&&this._stats[On].cols.forEach(Un=>{Qt[Un]?Qt[Un]++:Qt[Un]=1})}injectIntoArray(Qt){for(let On=0;On<=this._numGroups;On++)this._stats[On].num<=this._minCols&&this._stats[On].cols.forEach(Un=>{Qt.indexOf(Un)===-1&&Qt.push(Un)})}},Wn=class{constructor(Qt,On){_e(this,"progress"),_e(this,"_step"),_e(this,"_range"),_e(this,"_last"),_e(this,"_progressRange"),this._range=Qt,this._progressRange=On,this._step=Math.max(1,this._range/(Wn.steps+1)|0),this._last=-this._step,this.progress=0}shouldNotify(Qt){return Qt-this._last>=this._step&&(this._last=Qt,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}},dn=Wn;_e(dn,"steps",100);var Bn=class{constructor(Qt){_e(this,"r"),_e(this,"g"),_e(this,"b"),_e(this,"a"),this.r=this.g=this.b=this.a=Qt}toPoint(){return Jn.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)}subtract(Qt,On,Un,Zn){this.r-=0|Qt,this.g-=0|On,this.b-=0|Un,this.a-=0|Zn}},mn=class extends Xn{constructor(Qt,On=256){super(),_e(this,"_pointArray"),_e(this,"_networkSize"),_e(this,"_network"),_e(this,"_sampleFactor"),_e(this,"_radPower"),_e(this,"_freq"),_e(this,"_bias"),_e(this,"_distance"),this._distance=Qt,this._pointArray=[],this._sampleFactor=1,this._networkSize=On,this._distance.setWhitePoint(2040,2040,2040,2040)}sample(Qt){this._pointArray=this._pointArray.concat(Qt.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let Qt=0;Qt>3)*mn._radiusBias,pr=Er>>mn._radiusBiasShift;pr<=1&&(pr=0);for(let vr=0;vr>>0;or=On=On&&(Cr-=On),vr++,mr===0&&(mr=1),vr%mr==0){cr-=cr/Un|0,Er-=Er/mn._radiusDecrease|0,pr=Er>>mn._radiusBiasShift,pr<=1&&(pr=0);for(let Pi=0;Pi>>0}}}_buildPalette(){const Qt=new Gt;return this._network.forEach(On=>{Qt.add(On.toPoint())}),Qt.sort(),Qt}_alterNeighbour(Qt,On,Un,Zn,or,mr){let cr=On-Qt;cr<-1&&(cr=-1);let Er=On+Qt;Er>this._networkSize&&(Er=this._networkSize);let pr=On+1,Ar=On-1,vr=1;for(;prcr;){const Cr=this._radPower[vr++]/mn._alphaRadBias;if(prcr){const $r=this._network[Ar--];$r.subtract(Cr*($r.r-or),Cr*($r.g-Zn),Cr*($r.b-Un),Cr*($r.a-mr))}}}_alterSingle(Qt,On,Un,Zn,or,mr){Qt/=mn._initAlpha;const cr=this._network[On];cr.subtract(Qt*(cr.r-or),Qt*(cr.g-Zn),Qt*(cr.b-Un),Qt*(cr.a-mr))}_contest(Qt,On,Un,Zn){let or=2147483647,mr=or,cr=-1,Er=cr;for(let pr=0;pr>mn._initialBiasShift-3);Cr>mn._betaShift;this._freq[pr]-=$r,this._bias[pr]+=$r<>mn._betaShift),_e(Pn,"_betaGamma",mn._initialBias<>3,this.g>>3,this.b>>3,this.a>>3)}subtract(Qt,On,Un,Zn){this.r-=Qt,this.g-=On,this.b-=Un,this.a-=Zn}},er=class extends Xn{constructor(Qt,On=256){super(),_e(this,"_pointArray"),_e(this,"_networkSize"),_e(this,"_network"),_e(this,"_sampleFactor"),_e(this,"_radPower"),_e(this,"_freq"),_e(this,"_bias"),_e(this,"_distance"),this._distance=Qt,this._pointArray=[],this._sampleFactor=1,this._networkSize=On,this._distance.setWhitePoint(2040,2040,2040,2040)}sample(Qt){this._pointArray=this._pointArray.concat(Qt.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let Qt=0;Qt>3)*er._radiusBias,pr=Er>>er._radiusBiasShift;pr<=1&&(pr=0);for(let vr=0;vr=On&&(Cr-=On),vr++,mr===0&&(mr=1),vr%mr==0){cr-=cr/Un,Er-=Er/er._radiusDecrease,pr=Er>>er._radiusBiasShift,pr<=1&&(pr=0);for(let Pi=0;Pi{Qt.add(On.toPoint())}),Qt.sort(),Qt}_alterNeighbour(Qt,On,Un,Zn,or,mr){let cr=On-Qt;cr<-1&&(cr=-1);let Er=On+Qt;Er>this._networkSize&&(Er=this._networkSize);let pr=On+1,Ar=On-1,vr=1;for(;prcr;){const Cr=this._radPower[vr++]/er._alphaRadBias;if(prcr){const $r=this._network[Ar--];$r.subtract(Cr*($r.r-or),Cr*($r.g-Zn),Cr*($r.b-Un),Cr*($r.a-mr))}}}_alterSingle(Qt,On,Un,Zn,or,mr){Qt/=er._initAlpha;const cr=this._network[On];cr.subtract(Qt*(cr.r-or),Qt*(cr.g-Zn),Qt*(cr.b-Un),Qt*(cr.a-mr))}_contest(Qt,On,Un,Zn){let or=2147483647,mr=or,cr=-1,Er=cr;for(let pr=0;pr>er._initialBiasShift-3);Cr>er._betaShift;this._freq[pr]-=$r,this._bias[pr]+=$r<>er._betaShift),_e(_r,"_betaGamma",er._initialBias<this._histogram[Zn]-this._histogram[Un]);if(Qt.length===0)return[];let On;switch(this._method){case 1:const Un=Math.min(Qt.length,this._initColors),Zn=Qt[Un-1],or=this._histogram[Zn];On=Qt.slice(0,Un);let mr=Un;const cr=Qt.length;for(;mr+Un)}_colorStats1D(Qt){const On=this._histogram,Un=Qt.getPointArray(),Zn=Un.length;for(let or=0;or{let vr=Math.round(Ar.w*Ar.h/cr)*dr._boxPixels;vr<2&&(vr=2);const Cr={};this._iterateBox(Ar,On,$r=>{const Jr=Zn[$r].uint32;this._hueStats.check(Jr),Jr in pr?pr[Jr]++:Jr in Cr?++Cr[Jr]>=vr&&(pr[Jr]=Cr[Jr]):Cr[Jr]=1})}),this._hueStats.injectIntoDictionary(pr)}_iterateBox(Qt,On,Un){const Zn=Qt,or=Zn.y*On+Zn.x,mr=(Zn.y+Zn.h-1)*On+(Zn.x+Zn.w-1),cr=On-Zn.w+1;let Er=0,pr=or;do Un.call(this,pr),pr+=++Er%Zn.w==0?cr:1;while(pr<=mr)}_makeBoxes(Qt,On,Un,Zn){const or=Qt%Un,mr=On%Zn,cr=Qt-or,Er=On-mr,pr=[];for(let Ar=0;Arthis._colors;){mr.length=0;for(let vr=0;vr3*this._colors?this._initialDistance:this._distanceIncrement}if(cr$r.distance-Cr.distance);let vr=0;for(;cr=0;vr--)Zn[vr]===0&&(vr!==Ar-1&&(Un[vr]=Un[Ar-1]),--Ar);Un.length=Ar,On.sort(),yield{palette:On,progress:100}}};function kr(Qt){const On=[];for(let Un=0;Un0){const Un=this._sums[On],Zn=this._reds[On]/Un,or=this._greens[On]/Un,mr=this._blues[On]/Un,cr=this._alphas[On]/Un,Er=Jn.createByRGBA(0|Zn,0|or,0|mr,0|cr);Qt.add(Er)}Qt.sort(),yield{palette:Qt,progress:100}}*_preparePalette(){yield*this._calculateMoments();let Qt=0;const On=kr(this._colors);for(let cr=1;cr1?this._calculateVariance(this._cubes[Qt]):0,On[cr]=this._cubes[cr].volume>1?this._calculateVariance(this._cubes[cr]):0):(On[Qt]=0,cr--),Qt=0;let Er=On[0];for(let pr=1;pr<=cr;++pr)On[pr]>Er&&(Er=On[pr],Qt=pr);if(Er<=0){this._colors=cr+1;break}}const Un=[],Zn=[],or=[],mr=[];for(let cr=0;cr0?(Un[cr]=Pr._volume(this._cubes[cr],this._momentsRed)/Er|0,Zn[cr]=Pr._volume(this._cubes[cr],this._momentsGreen)/Er|0,or[cr]=Pr._volume(this._cubes[cr],this._momentsBlue)/Er|0,mr[cr]=Pr._volume(this._cubes[cr],this._momentsAlpha)/Er|0):(Un[cr]=0,Zn[cr]=0,or[cr]=0,mr[cr]=0)}this._reds=kr(this._colors+1),this._greens=kr(this._colors+1),this._blues=kr(this._colors+1),this._alphas=kr(this._colors+1),this._sums=kr(this._colors+1);for(let cr=0,Er=this._pixels.length;cr>On),Zn=1+(Qt.g>>On),or=1+(Qt.b>>On),mr=1+(Qt.a>>On);this._weights[mr][Un][Zn][or]++,this._momentsRed[mr][Un][Zn][or]+=Qt.r,this._momentsGreen[mr][Un][Zn][or]+=Qt.g,this._momentsBlue[mr][Un][Zn][or]+=Qt.b,this._momentsAlpha[mr][Un][Zn][or]+=Qt.a,this._moments[mr][Un][Zn][or]+=this._table[Qt.r]+this._table[Qt.g]+this._table[Qt.b]+this._table[Qt.a]}*_calculateMoments(){const Qt=[],On=[],Un=[],Zn=[],or=[],mr=[],cr=Rr(this._sideSize,this._sideSize,this._sideSize),Er=Rr(this._sideSize,this._sideSize,this._sideSize),pr=Rr(this._sideSize,this._sideSize,this._sideSize),Ar=Rr(this._sideSize,this._sideSize,this._sideSize),vr=Rr(this._sideSize,this._sideSize,this._sideSize),Cr=Rr(this._sideSize,this._sideSize,this._sideSize);let $r=0;const Jr=new dn(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let Zr=1;Zr<=this._alphaMaxSideIndex;++Zr){Yr(cr,this._sideSize,this._sideSize,this._sideSize,0),Yr(Er,this._sideSize,this._sideSize,this._sideSize,0),Yr(pr,this._sideSize,this._sideSize,this._sideSize,0),Yr(Ar,this._sideSize,this._sideSize,this._sideSize,0),Yr(vr,this._sideSize,this._sideSize,this._sideSize,0),Yr(Cr,this._sideSize,this._sideSize,this._sideSize,0);for(let jr=1;jr<=this._maxSideIndex;++jr,++$r){Jr.shouldNotify($r)&&(yield{progress:Jr.progress}),li(Qt,this._sideSize,0),li(On,this._sideSize,0),li(Un,this._sideSize,0),li(Zn,this._sideSize,0),li(or,this._sideSize,0),li(mr,this._sideSize,0);for(let Ur=1;Ur<=this._maxSideIndex;++Ur){let Ci=0,Pi=0,qi=0,Fi=0,so=0,Ui=0;for(let ti=1;ti<=this._maxSideIndex;++ti)Ci+=this._weights[Zr][jr][Ur][ti],Pi+=this._momentsRed[Zr][jr][Ur][ti],qi+=this._momentsGreen[Zr][jr][Ur][ti],Fi+=this._momentsBlue[Zr][jr][Ur][ti],so+=this._momentsAlpha[Zr][jr][Ur][ti],Ui+=this._moments[Zr][jr][Ur][ti],Qt[ti]+=Ci,On[ti]+=Pi,Un[ti]+=qi,Zn[ti]+=Fi,or[ti]+=so,mr[ti]+=Ui,cr[jr][Ur][ti]=cr[jr-1][Ur][ti]+Qt[ti],Er[jr][Ur][ti]=Er[jr-1][Ur][ti]+On[ti],pr[jr][Ur][ti]=pr[jr-1][Ur][ti]+Un[ti],Ar[jr][Ur][ti]=Ar[jr-1][Ur][ti]+Zn[ti],vr[jr][Ur][ti]=vr[jr-1][Ur][ti]+or[ti],Cr[jr][Ur][ti]=Cr[jr-1][Ur][ti]+mr[ti],this._weights[Zr][jr][Ur][ti]=this._weights[Zr-1][jr][Ur][ti]+cr[jr][Ur][ti],this._momentsRed[Zr][jr][Ur][ti]=this._momentsRed[Zr-1][jr][Ur][ti]+Er[jr][Ur][ti],this._momentsGreen[Zr][jr][Ur][ti]=this._momentsGreen[Zr-1][jr][Ur][ti]+pr[jr][Ur][ti],this._momentsBlue[Zr][jr][Ur][ti]=this._momentsBlue[Zr-1][jr][Ur][ti]+Ar[jr][Ur][ti],this._momentsAlpha[Zr][jr][Ur][ti]=this._momentsAlpha[Zr-1][jr][Ur][ti]+vr[jr][Ur][ti],this._moments[Zr][jr][Ur][ti]=this._moments[Zr-1][jr][Ur][ti]+Cr[jr][Ur][ti]}}}}static _volumeFloat(Qt,On){return On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]-On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]-On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]+On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]+On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]+On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]-On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]-On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]-On[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+On[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]-On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+On[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]-On[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum])}static _volume(Qt,On){return 0|Pr._volumeFloat(Qt,On)}static _top(Qt,On,Un,Zn){let or;switch(On){case Pr._alpha:or=Zn[Un][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]-Zn[Un][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]-Zn[Un][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]+Zn[Un][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(Zn[Un][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]-Zn[Un][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]-Zn[Un][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+Zn[Un][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);break;case Pr._red:or=Zn[Qt.alphaMaximum][Un][Qt.greenMaximum][Qt.blueMaximum]-Zn[Qt.alphaMaximum][Un][Qt.greenMinimum][Qt.blueMaximum]-Zn[Qt.alphaMinimum][Un][Qt.greenMaximum][Qt.blueMaximum]+Zn[Qt.alphaMinimum][Un][Qt.greenMinimum][Qt.blueMaximum]-(Zn[Qt.alphaMaximum][Un][Qt.greenMaximum][Qt.blueMinimum]-Zn[Qt.alphaMaximum][Un][Qt.greenMinimum][Qt.blueMinimum]-Zn[Qt.alphaMinimum][Un][Qt.greenMaximum][Qt.blueMinimum]+Zn[Qt.alphaMinimum][Un][Qt.greenMinimum][Qt.blueMinimum]);break;case Pr._green:or=Zn[Qt.alphaMaximum][Qt.redMaximum][Un][Qt.blueMaximum]-Zn[Qt.alphaMaximum][Qt.redMinimum][Un][Qt.blueMaximum]-Zn[Qt.alphaMinimum][Qt.redMaximum][Un][Qt.blueMaximum]+Zn[Qt.alphaMinimum][Qt.redMinimum][Un][Qt.blueMaximum]-(Zn[Qt.alphaMaximum][Qt.redMaximum][Un][Qt.blueMinimum]-Zn[Qt.alphaMaximum][Qt.redMinimum][Un][Qt.blueMinimum]-Zn[Qt.alphaMinimum][Qt.redMaximum][Un][Qt.blueMinimum]+Zn[Qt.alphaMinimum][Qt.redMinimum][Un][Qt.blueMinimum]);break;case Pr._blue:or=Zn[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Un]-Zn[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Un]-Zn[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Un]+Zn[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Un]-(Zn[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Un]-Zn[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Un]-Zn[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Un]+Zn[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Un]);break;default:throw new Error("impossible")}return 0|or}static _bottom(Qt,On,Un){switch(On){case Pr._alpha:return-Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(-Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);case Pr._red:return-Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMaximum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(-Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);case Pr._green:return-Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMaximum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMaximum]-(-Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);case Pr._blue:return-Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMaximum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]-(-Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMaximum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMaximum][Qt.greenMinimum][Qt.blueMinimum]+Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMaximum][Qt.blueMinimum]-Un[Qt.alphaMinimum][Qt.redMinimum][Qt.greenMinimum][Qt.blueMinimum]);default:return 0}}_calculateVariance(Qt){const On=Pr._volume(Qt,this._momentsRed),Un=Pr._volume(Qt,this._momentsGreen),Zn=Pr._volume(Qt,this._momentsBlue),or=Pr._volume(Qt,this._momentsAlpha);return Pr._volumeFloat(Qt,this._moments)-(On*On+Un*Un+Zn*Zn+or*or)/Pr._volume(Qt,this._weights)}_maximize(Qt,On,Un,Zn,or,mr,cr,Er,pr){const Ar=0|Pr._bottom(Qt,On,this._momentsRed),vr=0|Pr._bottom(Qt,On,this._momentsGreen),Cr=0|Pr._bottom(Qt,On,this._momentsBlue),$r=0|Pr._bottom(Qt,On,this._momentsAlpha),Jr=0|Pr._bottom(Qt,On,this._weights);let Zr=0,jr=-1;for(let Ur=Un;UrZr&&(Zr=ti,jr=Ur))}}return{max:Zr,position:jr}}_cut(Qt,On){let Un;const Zn=Pr._volume(Qt,this._momentsRed),or=Pr._volume(Qt,this._momentsGreen),mr=Pr._volume(Qt,this._momentsBlue),cr=Pr._volume(Qt,this._momentsAlpha),Er=Pr._volume(Qt,this._weights),pr=this._maximize(Qt,Pr._red,Qt.redMinimum+1,Qt.redMaximum,Zn,or,mr,cr,Er),Ar=this._maximize(Qt,Pr._green,Qt.greenMinimum+1,Qt.greenMaximum,Zn,or,mr,cr,Er),vr=this._maximize(Qt,Pr._blue,Qt.blueMinimum+1,Qt.blueMaximum,Zn,or,mr,cr,Er),Cr=this._maximize(Qt,Pr._alpha,Qt.alphaMinimum+1,Qt.alphaMaximum,Zn,or,mr,cr,Er);if(Cr.max>=pr.max&&Cr.max>=Ar.max&&Cr.max>=vr.max){if(Un=Pr._alpha,Cr.position<0)return!1}else Un=pr.max>=Cr.max&&pr.max>=Ar.max&&pr.max>=vr.max?Pr._red:Ar.max>=Cr.max&&Ar.max>=pr.max&&Ar.max>=vr.max?Pr._green:Pr._blue;switch(On.redMaximum=Qt.redMaximum,On.greenMaximum=Qt.greenMaximum,On.blueMaximum=Qt.blueMaximum,On.alphaMaximum=Qt.alphaMaximum,Un){case Pr._red:On.redMinimum=Qt.redMaximum=pr.position,On.greenMinimum=Qt.greenMinimum,On.blueMinimum=Qt.blueMinimum,On.alphaMinimum=Qt.alphaMinimum;break;case Pr._green:On.greenMinimum=Qt.greenMaximum=Ar.position,On.redMinimum=Qt.redMinimum,On.blueMinimum=Qt.blueMinimum,On.alphaMinimum=Qt.alphaMinimum;break;case Pr._blue:On.blueMinimum=Qt.blueMaximum=vr.position,On.redMinimum=Qt.redMinimum,On.greenMinimum=Qt.greenMinimum,On.alphaMinimum=Qt.alphaMinimum;break;case Pr._alpha:On.alphaMinimum=Qt.alphaMaximum=Cr.position,On.blueMinimum=Qt.blueMinimum,On.redMinimum=Qt.redMinimum,On.greenMinimum=Qt.greenMinimum}return Qt.volume=(Qt.redMaximum-Qt.redMinimum)*(Qt.greenMaximum-Qt.greenMinimum)*(Qt.blueMaximum-Qt.blueMinimum)*(Qt.alphaMaximum-Qt.alphaMinimum),On.volume=(On.redMaximum-On.redMinimum)*(On.greenMaximum-On.greenMinimum)*(On.blueMaximum-On.blueMinimum)*(On.alphaMaximum-On.alphaMinimum),!0}_initialize(Qt){this._colors=Qt,this._cubes=[];for(let On=0;Onyi,ErrorDiffusionArray:()=>xi,ErrorDiffusionArrayKernel:()=>gi,ErrorDiffusionRiemersma:()=>oi,NearestColor:()=>Gi});var yi=class{quantizeSync(Qt,On){for(const Un of this.quantize(Qt,On))if(Un.pointContainer)return Un.pointContainer;throw new Error("unreachable")}},Gi=class extends yi{constructor(Qt){super(),_e(this,"_distance"),this._distance=Qt}*quantize(Qt,On){const Un=Qt.getPointArray(),Zn=Qt.getWidth(),or=Qt.getHeight(),mr=new dn(or,99);for(let cr=0;cr(Qt[Qt.FloydSteinberg=0]="FloydSteinberg",Qt[Qt.FalseFloydSteinberg=1]="FalseFloydSteinberg",Qt[Qt.Stucki=2]="Stucki",Qt[Qt.Atkinson=3]="Atkinson",Qt[Qt.Jarvis=4]="Jarvis",Qt[Qt.Burkes=5]="Burkes",Qt[Qt.Sierra=6]="Sierra",Qt[Qt.TwoSierra=7]="TwoSierra",Qt[Qt.SierraLite=8]="SierraLite",Qt))(gi||{}),xi=class extends yi{constructor(Qt,On,Un=!0,Zn=0,or=!1){super(),_e(this,"_minColorDistance"),_e(this,"_serpentine"),_e(this,"_kernel"),_e(this,"_calculateErrorLikeGIMP"),_e(this,"_distance"),this._setKernel(On),this._distance=Qt,this._minColorDistance=Zn,this._serpentine=Un,this._calculateErrorLikeGIMP=or}*quantize(Qt,On){const Un=Qt.getPointArray(),Zn=new Jn,or=Qt.getWidth(),mr=Qt.getHeight(),cr=[];let Er=1,pr=1;for(const vr of this._kernel){const Cr=vr[2]+1;pr=0&&$a+jr=0&&mo+vrOn&&(Qt.length=On);const Un=Qt.length;for(let Zn=0;Zn=0&&Qt.x=0&&Qt.y{const Ar=Un[Er+pr*Zn];let{r:vr,g:Cr,b:$r,a:Jr}=Ar;for(let Ci=0;CiDi});var Co=.01,Wi=.03;function Di(Qt,On){if(Qt.getHeight()!==On.getHeight()||Qt.getWidth()!==On.getWidth())throw new Error("Images have different sizes!");const Un=(255*Co)**2,Zn=(255*Wi)**2;let or=0,mr=0;return function(cr,Er,pr){const Ar=cr.getWidth(),vr=cr.getHeight();for(let Cr=0;Cr{let vr=0,Cr=0,$r=0;for(let Zr=0;Zrue.nextTick(Qt):Qt=>setTimeout(Qt,0);function Ro(Qt,{colorDistanceFormula:On,paletteQuantization:Un,colors:Zn}={}){const or=ua(Ei(On),Un,Zn);return Qt.forEach(mr=>or.sample(mr)),or.quantizeSync()}async function la(Qt,{colorDistanceFormula:On,paletteQuantization:Un,colors:Zn,onProgress:or}={}){return new Promise((mr,cr)=>{const Er=ua(Ei(On),Un,Zn);let pr;Qt.forEach(Cr=>Er.sample(Cr));const Ar=Er.quantize(),vr=()=>{try{const Cr=Ar.next();Cr.done?mr(pr):(Cr.value.palette&&(pr=Cr.value.palette),or&&or(Cr.value.progress),bo(vr))}catch(Cr){cr(Cr)}};bo(vr)})}function Ao(Qt,On,{colorDistanceFormula:Un,imageQuantization:Zn}={}){return aa(Ei(Un),Zn).quantizeSync(Qt,On)}async function ca(Qt,On,{colorDistanceFormula:Un,imageQuantization:Zn,onProgress:or}={}){return new Promise((mr,cr)=>{let Er;const pr=aa(Ei(Un),Zn).quantize(Qt,On),Ar=()=>{try{const vr=pr.next();vr.done?mr(Er):(vr.value.pointContainer&&(Er=vr.value.pointContainer),or&&or(vr.value.progress),bo(Ar))}catch(vr){cr(vr)}};bo(Ar)})}function Ei(Qt="euclidean-bt709"){switch(Qt){case"cie94-graphic-arts":return new Xe;case"cie94-textiles":return new Ye;case"ciede2000":return new sn;case"color-metric":return new yn;case"euclidean":return new wn;case"euclidean-bt709":return new Tn;case"euclidean-bt709-noalpha":return new xn;case"manhattan":return new zn;case"manhattan-bt709":return new Kn;case"manhattan-nommyde":return new Yn;case"pngquant":return new Rn;default:throw new Error(`Unknown colorDistanceFormula ${Qt}`)}}function aa(Qt,On="floyd-steinberg"){switch(On){case"nearest":return new Gi(Qt);case"riemersma":return new oi(Qt);case"floyd-steinberg":return new xi(Qt,0);case"false-floyd-steinberg":return new xi(Qt,1);case"stucki":return new xi(Qt,2);case"atkinson":return new xi(Qt,3);case"jarvis":return new xi(Qt,4);case"burkes":return new xi(Qt,5);case"sierra":return new xi(Qt,6);case"two-sierra":return new xi(Qt,7);case"sierra-lite":return new xi(Qt,8);default:throw new Error(`Unknown imageQuantization ${On}`)}}function ua(Qt,On="wuquant",Un=256){switch(On){case"neuquant":return new Pn(Qt,Un);case"rgbquant":return new nr(Qt,Un);case"wuquant":return new hi(Qt,Un);case"neuquant-float":return new _r(Qt,Un);default:throw new Error(`Unknown paletteQuantization ${On}`)}}ne.exports=xe(Se)}},__webpack_module_cache__={};function __webpack_require__(ne){var oe=__webpack_module_cache__[ne];if(oe!==void 0)return oe.exports;var ce=__webpack_module_cache__[ne]={exports:{}};return __webpack_modules__[ne](ce,ce.exports,__webpack_require__),ce.exports}__webpack_require__.n=ne=>{var oe=ne&&ne.__esModule?()=>ne.default:()=>ne;return __webpack_require__.d(oe,{a:oe}),oe},__webpack_require__.d=(ne,oe)=>{for(var ce in oe)__webpack_require__.o(oe,ce)&&!__webpack_require__.o(ne,ce)&&Object.defineProperty(ne,ce,{enumerable:!0,get:oe[ce]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),__webpack_require__.r=ne=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ne,"__esModule",{value:!0})},(()=>{var ne={};__webpack_require__.r(ne),__webpack_require__.d(ne,{AUTO:()=>Nn,BLEND_ADD:()=>Gt,BLEND_DARKEN:()=>jn,BLEND_DESTINATION_OVER:()=>pn,BLEND_DIFFERENCE:()=>Bn,BLEND_EXCLUSION:()=>mn,BLEND_HARDLIGHT:()=>dn,BLEND_LIGHTEN:()=>Wn,BLEND_MULTIPLY:()=>tn,BLEND_OVERLAY:()=>kn,BLEND_SCREEN:()=>bn,BLEND_SOURCE_OVER:()=>Jn,EDGE_CROP:()=>er,EDGE_EXTEND:()=>Pn,EDGE_WRAP:()=>ur,HORIZONTAL_ALIGN_CENTER:()=>Yn,HORIZONTAL_ALIGN_LEFT:()=>zn,HORIZONTAL_ALIGN_RIGHT:()=>Kn,VERTICAL_ALIGN_BOTTOM:()=>Xn,VERTICAL_ALIGN_MIDDLE:()=>Mn,VERTICAL_ALIGN_TOP:()=>Rn});var oe={};__webpack_require__.r(oe),__webpack_require__.d(oe,{add:()=>sr,darken:()=>Mr,difference:()=>li,dstOver:()=>dr,exclusion:()=>ei,hardLight:()=>Yr,lighten:()=>Rr,multiply:()=>Sr,overlay:()=>kr,screen:()=>nr,srcOver:()=>_r});var ce=__webpack_require__(5546),ue=__webpack_require__.n(ce),pe=__webpack_require__(1023),me=__webpack_require__.n(pe),ge=__webpack_require__(2699),ye=__webpack_require__.n(ge);function ve(rn){if(rn===void 0)return!1;if(typeof rn!="function")throw new TypeError("Callback must be a function");return!0}function xe(rn,ln){if(typeof rn=="string"&&(rn=new Error(rn)),typeof ln=="function")return ln.call(this,rn);throw rn}function _e(rn,ln,En,$n,An,Ln){ln=Math.round(ln),En=Math.round(En),$n=Math.round($n),An=Math.round(An);for(let qn=En;qn1&&($i-=1),$i<1/6?vi+6*(Ri-vi)*$i:$i<.5?Ri:$i<2/3?vi+(Ri-vi)*(2/3-$i)*6:vi}if(gr=nn(gr,360),yr=nn(yr,100),xr=nn(xr,100),yr===0)Lr=Hr=si=xr;else{var ni=xr<.5?xr*(1+yr):xr+yr-xr*yr,wi=2*xr-ni;Lr=_i(wi,ni,gr+1/3),Hr=_i(wi,ni,gr),si=_i(wi,ni,gr-1/3)}return{r:255*Lr,g:255*Hr,b:255*si}}($n.h,ar,fr),Or=!0,wr="hsl"),$n.hasOwnProperty("a")&&(Vn=$n.a)),Vn=Xt(Vn),{ok:Or,format:$n.format||wr,r:Math.min(255,Math.max(Gn.r,0)),g:Math.min(255,Math.max(Gn.g,0)),b:Math.min(255,Math.max(Gn.b,0)),a:Vn}}(rn);this._originalInput=rn,this._r=En.r,this._g=En.g,this._b=En.b,this._a=En.a,this._roundA=Math.round(100*this._a)/100,this._format=ln.format||En.format,this._gradientType=ln.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=En.ok}function Fe(rn,ln,En){rn=nn(rn,255),ln=nn(ln,255),En=nn(En,255);var $n,An,Ln=Math.max(rn,ln,En),qn=Math.min(rn,ln,En),Gn=(Ln+qn)/2;if(Ln==qn)$n=An=0;else{var Vn=Ln-qn;switch(An=Gn>.5?Vn/(2-Ln-qn):Vn/(Ln+qn),Ln){case rn:$n=(ln-En)/Vn+(ln>1)+720)%360;--ln;)$n.h=($n.h+An)%360,Ln.push(Ne($n));return Ln}function Kt(rn,ln){ln=ln||6;for(var En=Ne(rn).toHsv(),$n=En.h,An=En.s,Ln=En.v,qn=[],Gn=1/ln;ln--;)qn.push(Ne({h:$n,s:An,v:Ln})),Ln=(Ln+Gn)%1;return qn}Ne.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var rn=this.toRgb();return(299*rn.r+587*rn.g+114*rn.b)/1e3},getLuminance:function(){var rn,ln,En,$n=this.toRgb();return rn=$n.r/255,ln=$n.g/255,En=$n.b/255,.2126*(rn<=.03928?rn/12.92:Math.pow((rn+.055)/1.055,2.4))+.7152*(ln<=.03928?ln/12.92:Math.pow((ln+.055)/1.055,2.4))+.0722*(En<=.03928?En/12.92:Math.pow((En+.055)/1.055,2.4))},setAlpha:function(rn){return this._a=Xt(rn),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var rn=Ue(this._r,this._g,this._b);return{h:360*rn.h,s:rn.s,v:rn.v,a:this._a}},toHsvString:function(){var rn=Ue(this._r,this._g,this._b),ln=Math.round(360*rn.h),En=Math.round(100*rn.s),$n=Math.round(100*rn.v);return this._a==1?"hsv("+ln+", "+En+"%, "+$n+"%)":"hsva("+ln+", "+En+"%, "+$n+"%, "+this._roundA+")"},toHsl:function(){var rn=Fe(this._r,this._g,this._b);return{h:360*rn.h,s:rn.s,l:rn.l,a:this._a}},toHslString:function(){var rn=Fe(this._r,this._g,this._b),ln=Math.round(360*rn.h),En=Math.round(100*rn.s),$n=Math.round(100*rn.l);return this._a==1?"hsl("+ln+", "+En+"%, "+$n+"%)":"hsla("+ln+", "+En+"%, "+$n+"%, "+this._roundA+")"},toHex:function(rn){return We(this._r,this._g,this._b,rn)},toHexString:function(rn){return"#"+this.toHex(rn)},toHex8:function(rn){return function(ln,En,$n,An,Ln){var qn=[Cn(Math.round(ln).toString(16)),Cn(Math.round(En).toString(16)),Cn(Math.round($n).toString(16)),Cn(Yt(An))];return Ln&&qn[0].charAt(0)==qn[0].charAt(1)&&qn[1].charAt(0)==qn[1].charAt(1)&&qn[2].charAt(0)==qn[2].charAt(1)&&qn[3].charAt(0)==qn[3].charAt(1)?qn[0].charAt(0)+qn[1].charAt(0)+qn[2].charAt(0)+qn[3].charAt(0):qn.join("")}(this._r,this._g,this._b,this._a,rn)},toHex8String:function(rn){return"#"+this.toHex8(rn)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*nn(this._r,255))+"%",g:Math.round(100*nn(this._g,255))+"%",b:Math.round(100*nn(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*nn(this._r,255))+"%, "+Math.round(100*nn(this._g,255))+"%, "+Math.round(100*nn(this._b,255))+"%)":"rgba("+Math.round(100*nn(this._r,255))+"%, "+Math.round(100*nn(this._g,255))+"%, "+Math.round(100*nn(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(un[We(this._r,this._g,this._b,!0)]||!1)},toFilter:function(rn){var ln="#"+qe(this._r,this._g,this._b,this._a),En=ln,$n=this._gradientType?"GradientType = 1, ":"";if(rn){var An=Ne(rn);En="#"+qe(An._r,An._g,An._b,An._a)}return"progid:DXImageTransform.Microsoft.gradient("+$n+"startColorstr="+ln+",endColorstr="+En+")"},toString:function(rn){var ln=!!rn;rn=rn||this._format;var En=!1,$n=this._a<1&&this._a>=0;return ln||!$n||rn!=="hex"&&rn!=="hex6"&&rn!=="hex3"&&rn!=="hex4"&&rn!=="hex8"&&rn!=="name"?(rn==="rgb"&&(En=this.toRgbString()),rn==="prgb"&&(En=this.toPercentageRgbString()),rn!=="hex"&&rn!=="hex6"||(En=this.toHexString()),rn==="hex3"&&(En=this.toHexString(!0)),rn==="hex4"&&(En=this.toHex8String(!0)),rn==="hex8"&&(En=this.toHex8String()),rn==="name"&&(En=this.toName()),rn==="hsl"&&(En=this.toHslString()),rn==="hsv"&&(En=this.toHsvString()),En||this.toHexString()):rn==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return Ne(this.toString())},_applyModification:function(rn,ln){var En=rn.apply(null,[this].concat([].slice.call(ln)));return this._r=En._r,this._g=En._g,this._b=En._b,this.setAlpha(En._a),this},lighten:function(){return this._applyModification(Dt,arguments)},brighten:function(){return this._applyModification(Je,arguments)},darken:function(){return this._applyModification(Ut,arguments)},desaturate:function(){return this._applyModification(ze,arguments)},saturate:function(){return this._applyModification(Ge,arguments)},greyscale:function(){return this._applyModification(Ze,arguments)},spin:function(){return this._applyModification(jt,arguments)},_applyCombination:function(rn,ln){return rn.apply(null,[this].concat([].slice.call(ln)))},analogous:function(){return this._applyCombination(en,arguments)},complement:function(){return this._applyCombination(Ke,arguments)},monochromatic:function(){return this._applyCombination(Kt,arguments)},splitcomplement:function(){return this._applyCombination(Zt,arguments)},triad:function(){return this._applyCombination(an,[3])},tetrad:function(){return this._applyCombination(an,[4])}},Ne.fromRatio=function(rn,ln){if(Ie(rn)=="object"){var En={};for(var $n in rn)rn.hasOwnProperty($n)&&(En[$n]=$n==="a"?rn[$n]:Nt(rn[$n]));rn=En}return Ne(rn,ln)},Ne.equals=function(rn,ln){return!(!rn||!ln)&&Ne(rn).toRgbString()==Ne(ln).toRgbString()},Ne.random=function(){return Ne.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Ne.mix=function(rn,ln,En){En=En===0?0:En||50;var $n=Ne(rn).toRgb(),An=Ne(ln).toRgb(),Ln=En/100;return Ne({r:(An.r-$n.r)*Ln+$n.r,g:(An.g-$n.g)*Ln+$n.g,b:(An.b-$n.b)*Ln+$n.b,a:(An.a-$n.a)*Ln+$n.a})},Ne.readability=function(rn,ln){var En=Ne(rn),$n=Ne(ln);return(Math.max(En.getLuminance(),$n.getLuminance())+.05)/(Math.min(En.getLuminance(),$n.getLuminance())+.05)},Ne.isReadable=function(rn,ln,En){var $n,An,Ln,qn,Gn,Vn=Ne.readability(rn,ln);switch(An=!1,(Ln=En,(qn=((Ln=Ln||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&qn!=="AAA"&&(qn="AA"),(Gn=(Ln.size||"small").toLowerCase())!=="small"&&Gn!=="large"&&(Gn="small"),$n={level:qn,size:Gn}).level+$n.size){case"AAsmall":case"AAAlarge":An=Vn>=4.5;break;case"AAlarge":An=Vn>=3;break;case"AAAsmall":An=Vn>=7}return An},Ne.mostReadable=function(rn,ln,En){var $n,An,Ln,qn,Gn=null,Vn=0;An=(En=En||{}).includeFallbackColors,Ln=En.level,qn=En.size;for(var ar=0;arVn&&(Vn=$n,Gn=Ne(ln[ar]));return Ne.isReadable(rn,Gn,{level:Ln,size:qn})||!An?Gn:(En.includeFallbackColors=!1,Ne.mostReadable(rn,["#fff","#000"],En))};var Wt=Ne.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},un=Ne.hexNames=function(rn){var ln={};for(var En in rn)rn.hasOwnProperty(En)&&(ln[rn[En]]=En);return ln}(Wt);function Xt(rn){return rn=parseFloat(rn),(isNaN(rn)||rn<0||rn>1)&&(rn=1),rn}function nn(rn,ln){(function($n){return typeof $n=="string"&&$n.indexOf(".")!=-1&&parseFloat($n)===1})(rn)&&(rn="100%");var En=function($n){return typeof $n=="string"&&$n.indexOf("%")!=-1}(rn);return rn=Math.min(ln,Math.max(0,parseFloat(rn))),En&&(rn=parseInt(rn*ln,10)/100),Math.abs(rn-ln)<1e-6?1:rn%ln/parseFloat(ln)}function vn(rn){return Math.min(1,Math.max(0,rn))}function Sn(rn){return parseInt(rn,16)}function Cn(rn){return rn.length==1?"0"+rn:""+rn}function Nt(rn){return rn<=1&&(rn=100*rn+"%"),rn}function Yt(rn){return Math.round(255*parseFloat(rn)).toString(16)}function Jt(rn){return Sn(rn)/255}var hn,Ye,Xe,Pt=(Ye="[\\s|\\(]+("+(hn="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+hn+")[,|\\s]+("+hn+")\\s*\\)?",Xe="[\\s|\\(]+("+hn+")[,|\\s]+("+hn+")[,|\\s]+("+hn+")[,|\\s]+("+hn+")\\s*\\)?",{CSS_UNIT:new RegExp(hn),rgb:new RegExp("rgb"+Ye),rgba:new RegExp("rgba"+Xe),hsl:new RegExp("hsl"+Ye),hsla:new RegExp("hsla"+Xe),hsv:new RegExp("hsv"+Ye),hsva:new RegExp("hsva"+Xe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function sn(rn){return!!Pt.CSS_UNIT.exec(rn)}function yn(rn,ln){this.size=this.size||rn,this.smallerSize=this.smallerSize||ln,function(En){for(let $n=1;$nAn?"1":"0";return Ln};const wn=[],Tn=yn;__webpack_require__(9307);const xn=(rn,ln)=>{let{url:En,...$n}=rn;fetch(En,$n).then(An=>{if(An.ok)return An.arrayBuffer().catch(Ln=>{throw new Error(`Response is not a buffer for url ${En}. Error: ${Ln.message}`)});throw new Error(`HTTP Status ${An.status} for url ${En}`)}).then(An=>ln(null,An)).catch(An=>ln(An))},Nn=-1,zn=1,Yn=2,Kn=4,Rn=8,Mn=16,Xn=32,Jn="srcOver",pn="dstOver",tn="multiply",Gt="add",bn="screen",kn="overlay",jn="darken",Wn="lighten",dn="hardLight",Bn="difference",mn="exclusion",Pn=1,ur=2,er=3;function _r(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a;return{r:(rn.r*rn.a+ln.r*ln.a*(1-rn.a))/$n,g:(rn.g*rn.a+ln.g*ln.a*(1-rn.a))/$n,b:(rn.b*rn.a+ln.b*ln.a*(1-rn.a))/$n,a:$n}}function dr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a;return{r:(ln.r*ln.a+rn.r*rn.a*(1-ln.a))/$n,g:(ln.g*ln.a+rn.g*rn.a*(1-ln.a))/$n,b:(ln.b*ln.a+rn.b*rn.a*(1-ln.a))/$n,a:$n}}function Sr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An*Gn+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(qn*ar+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function sr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a;return{r:(An+ln.r*ln.a)/$n,g:(Ln+ln.g*ln.a)/$n,b:(qn+ln.b*ln.a)/$n,a:$n}}function nr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An*ln.a+Gn*rn.a-An*Gn+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Ln*ln.a+Vn*rn.a-Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(qn*ln.a+ar*rn.a-qn*ar+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function kr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(2*Gn<=ln.a?2*An*Gn+An*(1-ln.a)+Gn*(1-rn.a):An*(1+ln.a)+Gn*(1+rn.a)-2*Gn*An-ln.a*rn.a)/$n,g:(2*Vn<=ln.a?2*Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a):Ln*(1+ln.a)+Vn*(1+rn.a)-2*Vn*Ln-ln.a*rn.a)/$n,b:(2*ar<=ln.a?2*qn*ar+qn*(1-ln.a)+ar*(1-rn.a):qn*(1+ln.a)+ar*(1+rn.a)-2*ar*qn-ln.a*rn.a)/$n,a:$n}}function Mr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(Math.min(An*ln.a,Gn*rn.a)+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Math.min(Ln*ln.a,Vn*rn.a)+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(Math.min(qn*ln.a,ar*rn.a)+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function Rr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(Math.max(An*ln.a,Gn*rn.a)+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Math.max(Ln*ln.a,Vn*rn.a)+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(Math.max(qn*ln.a,ar*rn.a)+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}function Yr(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(2*An<=rn.a?2*An*Gn+An*(1-ln.a)+Gn*(1-rn.a):An*(1+ln.a)+Gn*(1+rn.a)-2*Gn*An-ln.a*rn.a)/$n,g:(2*Ln<=rn.a?2*Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a):Ln*(1+ln.a)+Vn*(1+rn.a)-2*Vn*Ln-ln.a*rn.a)/$n,b:(2*qn<=rn.a?2*qn*ar+qn*(1-ln.a)+ar*(1-rn.a):qn*(1+ln.a)+ar*(1+rn.a)-2*ar*qn-ln.a*rn.a)/$n,a:$n}}function li(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An+Gn-2*Math.min(An*ln.a,Gn*rn.a))/$n,g:(Ln+Vn-2*Math.min(Ln*ln.a,Vn*rn.a))/$n,b:(qn+ar-2*Math.min(qn*ln.a,ar*rn.a))/$n,a:$n}}function ei(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;rn.a*=En;const $n=ln.a+rn.a-ln.a*rn.a,An=rn.r*rn.a,Ln=rn.g*rn.a,qn=rn.b*rn.a,Gn=ln.r*ln.a,Vn=ln.g*ln.a,ar=ln.b*ln.a;return{r:(An*ln.a+Gn*rn.a-2*An*Gn+An*(1-ln.a)+Gn*(1-rn.a))/$n,g:(Ln*ln.a+Vn*rn.a-2*Ln*Vn+Ln*(1-ln.a)+Vn*(1-rn.a))/$n,b:(qn*ln.a+ar*rn.a-2*qn*ar+qn*(1-ln.a)+ar*(1-rn.a))/$n,a:$n}}const Pr=function(rn,ln){for(var En=arguments.length,$n=new Array(En>2?En-2:0),An=2;An{$n.push((Gn,Vn)=>{Gn&&qn(Gn),Ln(Vn)}),rn.bind(ln)(...$n)})},hi={},mi=(rn,ln)=>{hi[rn]=ln},yi=rn=>{const ln=rn.split("/").slice(-1);var En;return(En=ln[ln.length-1].split(".").pop(),Object.entries(hi).find($n=>$n[1].includes(En))||[])[0]};var Gi=__webpack_require__(5025),gi=__webpack_require__.n(Gi),xi=__webpack_require__(6551),Ni=__webpack_require__.n(xi),fi=__webpack_require__(8834).lW;function bi(rn){return rn._exif&&rn._exif.tags&&rn._exif.tags.Orientation||1}async function oi(rn,ln,En){const $n=await async function(An,Ln){const qn=await gi().fromBuffer(An);return qn?qn.mime:Ln?yi(Ln):null}(rn,ln);if(typeof $n!="string")return En(new Error("Could not find MIME for Buffer <"+ln+">"));this._originalMime=$n.toLowerCase();try{const An=this.getMIME();if(!this.constructor.decoders[An])return xe.call(this,"Unsupported MIME type: "+An,En);this.bitmap=this.constructor.decoders[An](rn)}catch(An){return En.call(this,An,this)}try{this._exif=Ni().create(rn).parse(),function(An){if(bi(An)<2)return;const Ln=function(Gn){const Vn=Gn.getWidth(),ar=Gn.getHeight();switch(bi(Gn)){case 1:default:return null;case 2:return function(lr,fr){return[Vn-lr-1,fr]};case 3:return function(lr,fr){return[Vn-lr-1,ar-fr-1]};case 4:return function(lr,fr){return[lr,ar-fr-1]};case 5:return function(lr,fr){return[fr,lr]};case 6:return function(lr,fr){return[fr,ar-lr-1]};case 7:return function(lr,fr){return[Vn-fr-1,ar-lr-1]};case 8:return function(lr,fr){return[Vn-fr-1,lr]}}}(An),qn=bi(An)>4;(function(Gn,Vn,ar,lr){const fr=Gn.bitmap.data,Or=Gn.bitmap.width,wr=fi.alloc(fr.length);for(let gr=0;gr{ln.call(this,null,$n)}):ln.call(this,null,En)}return this}function Co(rn){return Pr(ki,this,rn)}var Wi=__webpack_require__(8834).lW;function Di(rn,ln,En){return(ln=function($n){var An=function(Ln,qn){if(typeof Ln!="object"||Ln===null)return Ln;var Gn=Ln[Symbol.toPrimitive];if(Gn!==void 0){var Vn=Gn.call(Ln,"string");if(typeof Vn!="object")return Vn;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ln)}($n);return typeof An=="symbol"?An:String(An)}(ln))in rn?Object.defineProperty(rn,ln,{value:En,enumerable:!0,configurable:!0,writable:!0}):rn[ln]=En,rn}const pi="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",Ki=[NaN,NaN];for(let rn=2;rn<65;rn++){const ln=$e()($e().BIN,pi.slice(0,rn))(new Array(65).join("1"));Ki.push(ln.length)}function bo(){}function Ro(rn){return Object.prototype.toString.call(rn).toLowerCase().indexOf("arraybuffer")>-1}function la(rn){const ln=Wi.alloc(rn.byteLength),En=new Uint8Array(rn);for(let $n=0;$nEn?ln(En):typeof $n=="object"&&Wi.isBuffer($n)?ln(null,$n):typeof $n=="object"&&Ro($n)?ln(null,la($n)):new Error(`Could not load Buffer from <${rn.url}>`))}const ca={data:null,width:null,height:null};class Ei extends ye(){constructor(){for(var ln=arguments.length,En=new Array(ln),$n=0;$nPr(this.write,this,Vn)),Di(this,"getBase64Async",Vn=>Pr(this.getBase64,this,Vn)),Di(this,"getBuffer",ki),Di(this,"getBufferAsync",Co),Di(this,"getPixelColour",this.getPixelColor),Di(this,"setPixelColour",this.setPixelColor);const An=this;let Ln=bo;function qn(){for(var Vn=arguments.length,ar=new Array(Vn),lr=0;lr{fr&&Ln===bo?An.emitError("constructor",fr):fr||An.emitMulti("constructor","initialized"),Ln.call(An,...ar)},1)}if(Ro(En[0])&&(En[0]=la(En[0])),typeof En[0]=="number"&&typeof En[1]=="number"||parseInt(En[0],10)&&parseInt(En[1],10)){const Vn=parseInt(En[0],10),ar=parseInt(En[1],10);if(Ln=En[2],typeof En[2]=="number"&&(this._background=En[2],Ln=En[3]),typeof En[2]=="string"&&(this._background=Ei.cssColorToHex(En[2]),Ln=En[3]),Ln===void 0&&(Ln=bo),typeof Ln!="function")return xe.call(this,"cb must be a function",qn);this.bitmap={data:Wi.alloc(Vn*ar*4),width:Vn,height:ar};for(let lr=0;lr{if(Vn)return xe.call(this,Vn,qn);this.parseBitmap(ar,En[0].url,qn)})}else if(En[0]instanceof Ei){const[Vn]=En;if(Ln=En[1],Ln===void 0&&(Ln=bo),typeof Ln!="function")return xe.call(this,"cb must be a function",qn);this.bitmap={data:Wi.from(Vn.bitmap.data),width:Vn.bitmap.width,height:Vn.bitmap.height},this._quality=Vn._quality,this._deflateLevel=Vn._deflateLevel,this._deflateStrategy=Vn._deflateStrategy,this._filterType=Vn._filterType,this._rgba=Vn._rgba,this._background=Vn._background,this._originalMime=Vn._originalMime,qn(null,this)}else if((Gn=En[0])&&typeof Gn=="object"&&typeof Gn.width=="number"&&typeof Gn.height=="number"&&(Wi.isBuffer(Gn.data)||Gn.data instanceof Uint8Array||typeof Uint8ClampedArray=="function"&&Gn.data instanceof Uint8ClampedArray)&&(Gn.data.length===Gn.width*Gn.height*4||Gn.data.length===Gn.width*Gn.height*3)){const[Vn]=En;Ln=En[1]||bo;const ar=Vn.width*Vn.height*4===Vn.data.length?Wi.from(Vn.data):function(lr){if(lr.length%3!=0)throw new Error("Buffer length is incorrect");const fr=Wi.allocUnsafe(lr.length/3*4);let Or=0;for(let wr=0;wr{if(ar)return xe.call(this,ar,qn);this.parseBitmap(lr,Vn,qn)})}else if(typeof En[0]=="object"&&Wi.isBuffer(En[0])){const Vn=En[0];if(Ln=En[1],typeof Ln!="function")return xe.call(this,"cb must be a function",qn);this.parseBitmap(Vn,null,qn)}else{Ln=En[En.length-1],typeof Ln!="function"&&(Ln=En[En.length-2],typeof Ln!="function"&&(Ln=bo));const Vn=Ei.__extraConstructors.find(ar=>ar.test(...En));if(!Vn)return xe.call(this,"No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.",qn);new Promise((ar,lr)=>{Vn.run.call(this,ar,lr,...En)}).then(()=>qn(null,this)).catch(qn)}var Gn}parseBitmap(ln,En,$n){oi.call(this,ln,null,$n)}rgba(ln,En){return typeof ln!="boolean"?xe.call(this,"bool must be a boolean, true for RGBA or false for RGB",En):(this._rgba=ln,ve(En)&&En.call(this,null,this),this)}emitMulti(ln,En){let $n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};$n=Object.assign($n,{methodName:ln,eventName:En}),this.emit("any",$n),ln&&this.emit(ln,$n),this.emit(En,$n)}emitError(ln,En){this.emitMulti(ln,"error",En)}getHeight(){return this.bitmap.height}getWidth(){return this.bitmap.width}inspect(){return""}toString(){return"[object Jimp]"}getMIME(){return this._originalMime||Ei.MIME_PNG}getExtension(){const ln=this.getMIME();return(hi[ln.toLowerCase()]||[])[0]}write(ln,En){if(!ue()||!ue().createWriteStream)throw new Error("Cant access the filesystem. You can use the getBase64 method.");if(typeof ln!="string")return xe.call(this,"path must be a string",En);if(En===void 0&&(En=bo),typeof En!="function")return xe.call(this,"cb must be a function",En);const $n=yi(ln)||this.getMIME(),An=me().parse(ln);return An.dir&&ue().mkdirSync(An.dir,{recursive:!0}),this.getBuffer($n,(Ln,qn)=>{if(Ln)return xe.call(this,Ln,En);const Gn=ue().createWriteStream(ln);Gn.on("open",()=>{Gn.write(qn),Gn.end()}).on("error",Vn=>xe.call(this,Vn,En)),Gn.on("finish",()=>{En.call(this,null,this)})}),this}getBase64(ln,En){return ln===Ei.AUTO&&(ln=this.getMIME()),typeof ln!="string"?xe.call(this,"mime must be a string",En):typeof En!="function"?xe.call(this,"cb must be a function",En):(this.getBuffer(ln,function($n,An){if($n)return xe.call(this,$n,En);const Ln="data:"+ln+";base64,"+An.toString("base64");En.call(this,null,Ln)}),this)}hash(ln,En){if(typeof(ln=ln||64)=="function"&&(En=ln,ln=64),typeof ln!="number")return xe.call(this,"base must be a number",En);if(ln<2||ln>64)return xe.call(this,"base must be a number between 2 and 64",En);let $n=this.pHash();for($n=$e()($e().BIN,pi.slice(0,ln))($n);$n.length=this.bitmap.width&&(Ln=this.bitmap.width-1),En<0&&(qn=0),En>=this.bitmap.height&&(qn=this.bitmap.height-1)),$n===Ei.EDGE_WRAP&&(ln<0&&(Ln=this.bitmap.width+ln),ln>=this.bitmap.width&&(Ln=ln%this.bitmap.width),En<0&&(qn=this.bitmap.height+En),En>=this.bitmap.height&&(qn=En%this.bitmap.height));let Gn=this.bitmap.width*qn+Ln<<2;return(Ln<0||Ln>=this.bitmap.width)&&(Gn=-1),(qn<0||qn>=this.bitmap.height)&&(Gn=-1),ve(An)&&An.call(this,null,Gn),Gn}getPixelColor(ln,En,$n){if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",$n);ln=Math.round(ln),En=Math.round(En);const An=this.getPixelIndex(ln,En),Ln=this.bitmap.data.readUInt32BE(An);return ve($n)&&$n.call(this,null,Ln),Ln}setPixelColor(ln,En,$n,An){if(typeof ln!="number"||typeof En!="number"||typeof $n!="number")return xe.call(this,"hex, x and y must be numbers",An);En=Math.round(En),$n=Math.round($n);const Ln=this.getPixelIndex(En,$n);return this.bitmap.data.writeUInt32BE(ln,Ln),ve(An)&&An.call(this,null,this),this}hasAlpha(){for(let ln=0;ln1&&arguments[1]!==void 0?arguments[1]:Ei;Object.entries(rn).forEach(En=>{let[$n,An]=En;ln[$n]=An})}function ua(rn){let ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei;Object.entries(rn).forEach(En=>{let[$n,An]=En;ln.prototype[$n]=An})}function Qt(rn,ln,En){const $n="before-"+ln,An=ln.replace(/e$/,"")+"ed";Ei.prototype[rn]=function(){let Ln;for(var qn=arguments.length,Gn=new Array(qn),Vn=0;Vn3&&arguments[3]!==void 0?arguments[3]:{},An=arguments.length>4?arguments[4]:void 0;if(typeof $n=="function"&&(An=$n,$n={}),!(rn instanceof this.constructor))return xe.call(this,"The source must be a Jimp image",An);if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",An);let{mode:Ln,opacitySource:qn,opacityDest:Gn}=$n;Ln||(Ln=Jn),(typeof qn!="number"||qn<0||qn>1)&&(qn=1),(typeof Gn!="number"||Gn<0||Gn>1)&&(Gn=1);const Vn=oe[Ln];ln=Math.round(ln),En=Math.round(En);const ar=this;return Gn!==1&&ar.opacity(Gn),rn.scanQuiet(0,0,rn.bitmap.width,rn.bitmap.height,function(lr,fr,Or){const wr=ar.getPixelIndex(ln+lr,En+fr,er);if(wr===-1)return;const gr=Vn({r:this.bitmap.data[Or+0]/255,g:this.bitmap.data[Or+1]/255,b:this.bitmap.data[Or+2]/255,a:this.bitmap.data[Or+3]/255},{r:ar.bitmap.data[wr+0]/255,g:ar.bitmap.data[wr+1]/255,b:ar.bitmap.data[wr+2]/255,a:ar.bitmap.data[wr+3]/255},qn);ar.bitmap.data[wr+0]=this.constructor.limit255(255*gr.r),ar.bitmap.data[wr+1]=this.constructor.limit255(255*gr.g),ar.bitmap.data[wr+2]=this.constructor.limit255(255*gr.b),ar.bitmap.data[wr+3]=this.constructor.limit255(255*gr.a)}),ve(An)&&An.call(this,null,this),this}}),Ei.__extraConstructors=[],Ei.appendConstructorOption=function(rn,ln,En){Ei.__extraConstructors.push({name:rn,test:ln,run:En})},Ei.read=function(){for(var rn=arguments.length,ln=new Array(rn),En=0;En{new Ei(...ln,(Ln,qn)=>{Ln?An(Ln):$n(qn)})})},Ei.create=Ei.read,Ei.rgbaToInt=function(rn,ln,En,$n,An){if(typeof rn!="number"||typeof ln!="number"||typeof En!="number"||typeof $n!="number")return xe.call(this,"r, g, b and a must be numbers",An);if(rn<0||rn>255)return xe.call(this,"r must be between 0 and 255",An);if((ln<0||ln>255)&&xe.call(this,"g must be between 0 and 255",An),En<0||En>255)return xe.call(this,"b must be between 0 and 255",An);if($n<0||$n>255)return xe.call(this,"a must be between 0 and 255",An);rn=Math.round(rn),En=Math.round(En),ln=Math.round(ln),$n=Math.round($n);const Ln=rn*Math.pow(256,3)+ln*Math.pow(256,2)+En*Math.pow(256,1)+$n*Math.pow(256,0);return ve(An)&&An.call(this,null,Ln),Ln},Ei.intToRGBA=function(rn,ln){if(typeof rn!="number")return xe.call(this,"i must be a number",ln);const En={};return En.r=Math.floor(rn/Math.pow(256,3)),En.g=Math.floor((rn-En.r*Math.pow(256,3))/Math.pow(256,2)),En.b=Math.floor((rn-En.r*Math.pow(256,3)-En.g*Math.pow(256,2))/Math.pow(256,1)),En.a=Math.floor((rn-En.r*Math.pow(256,3)-En.g*Math.pow(256,2)-En.b*Math.pow(256,1))/Math.pow(256,0)),ve(ln)&&ln.call(this,null,En),En},Ei.cssColorToHex=function(rn){return typeof(rn=rn||0)=="number"?Number(rn):parseInt(Ne(rn).toHex8(),16)},Ei.limit255=function(rn){return rn=Math.max(rn,0),Math.min(rn,255)},Ei.diff=function(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.1;if(!(rn instanceof Ei&&ln instanceof Ei))return xe.call(this,"img1 and img2 must be an Jimp images");const $n=rn.bitmap,An=ln.bitmap;if($n.width===An.width&&$n.height===An.height||($n.width*$n.height>An.width*An.height?rn=rn.cloneQuiet().resize(An.width,An.height):ln=ln.cloneQuiet().resize($n.width,$n.height)),typeof En!="number"||En<0||En>1)return xe.call(this,"threshold must be a number between 0 and 1");const Ln=new Ei($n.width,$n.height,4294967295);return{percent:Ae()($n.data,An.data,Ln.bitmap.data,Ln.bitmap.width,Ln.bitmap.height,{threshold:En})/(Ln.bitmap.width*Ln.bitmap.height),image:Ln}},Ei.distance=function(rn,ln){const En=new Tn,$n=En.getHash(rn),An=En.getHash(ln);return En.distance($n,An)},Ei.compareHashes=function(rn,ln){return new Tn().distance(rn,ln)},Ei.colorDiff=function(rn,ln){const En=An=>Math.pow(An,2),{max:$n}=Math;return rn.a===0||rn.a||(rn.a=255),ln.a===0||ln.a||(ln.a=255),($n(En(rn.r-ln.r),En(rn.r-ln.r-rn.a+ln.a))+$n(En(rn.g-ln.g),En(rn.g-ln.g-rn.a+ln.a))+$n(En(rn.b-ln.b),En(rn.b-ln.b-rn.a+ln.a)))/195075},Qt("clone","clone",function(rn){const ln=new Ei(this);return ve(rn)&&rn.call(ln,null,ln),ln}),On("background",function(rn,ln){return typeof rn!="number"?xe.call(this,"hex must be a hexadecimal rgba value",ln):(this._background=rn,ve(ln)&&ln.call(this,null,this),this)}),On("scan",function(rn,ln,En,$n,An,Ln){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"x and y must be numbers",Ln);if(typeof En!="number"||typeof $n!="number")return xe.call(this,"w and h must be numbers",Ln);if(typeof An!="function")return xe.call(this,"f must be a function",Ln);const qn=_e(this,rn,ln,En,$n,An);return ve(Ln)&&Ln.call(this,null,qn),qn});{let rn;typeof window<"u"&&typeof window=="object"&&(rn=window),typeof self<"u"&&typeof self=="object"&&(rn=self),rn.Jimp=Ei,rn.Buffer=Wi}const Un=Ei;var Zn=__webpack_require__(643),or=__webpack_require__(2691),mr=__webpack_require__.n(or);const cr="image/jpeg",Er=()=>({mime:{[cr]:["jpeg","jpg","jpe"]},constants:{MIME_JPEG:cr},decoders:{[cr]:mr().decode},encoders:{[cr]:rn=>mr().encode(rn.bitmap,rn._quality).data},class:{_quality:100,quality(rn,ln){return typeof rn!="number"?xe.call(this,"n must be a number",ln):rn<0||rn>100?xe.call(this,"n must be a number 0 - 100",ln):(this._quality=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)}}});var pr=__webpack_require__(9902);const Ar="image/png",vr=()=>({mime:{[Ar]:["png"]},constants:{MIME_PNG:Ar,PNG_FILTER_AUTO:-1,PNG_FILTER_NONE:0,PNG_FILTER_SUB:1,PNG_FILTER_UP:2,PNG_FILTER_AVERAGE:3,PNG_FILTER_PATH:4},hasAlpha:{[Ar]:!0},decoders:{[Ar]:pr.PNG.sync.read},encoders:{[Ar](rn){const ln=new pr.PNG({width:rn.bitmap.width,height:rn.bitmap.height});return ln.data=rn.bitmap.data,pr.PNG.sync.write(ln,{deflateLevel:rn._deflateLevel,deflateStrategy:rn._deflateStrategy,filterType:rn._filterType,colorType:typeof rn._colorType=="number"?rn._colorType:rn._rgba?6:2,inputHasAlpha:rn._rgba})}},class:{_deflateLevel:9,_deflateStrategy:3,_filterType:-1,_colorType:null,deflateLevel(rn,ln){return typeof rn!="number"?xe.call(this,"l must be a number",ln):rn<0||rn>9?xe.call(this,"l must be a number 0 - 9",ln):(this._deflateLevel=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)},deflateStrategy(rn,ln){return typeof rn!="number"?xe.call(this,"s must be a number",ln):rn<0||rn>3?xe.call(this,"s must be a number 0 - 3",ln):(this._deflateStrategy=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)},filterType(rn,ln){return typeof rn!="number"?xe.call(this,"n must be a number",ln):rn<-1||rn>4?xe.call(this,"n must be -1 (auto) or a number 0 - 4",ln):(this._filterType=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)},colorType(rn,ln){return typeof rn!="number"?xe.call(this,"s must be a number",ln):rn!==0&&rn!==2&&rn!==4&&rn!==6?xe.call(this,"s must be a number 0, 2, 4, 6.",ln):(this._colorType=Math.round(rn),ve(ln)&&ln.call(this,null,this),this)}}});var Cr=__webpack_require__(486),$r=__webpack_require__.n(Cr);const Jr="image/bmp",Zr="image/x-ms-bmp",jr=rn=>{return _e({bitmap:ln=$r().decode(rn)},0,0,ln.width,ln.height,function(En,$n,An){const Ln=this.bitmap.data[An+0],qn=this.bitmap.data[An+1],Gn=this.bitmap.data[An+2],Vn=this.bitmap.data[An+3];this.bitmap.data[An+0]=Vn,this.bitmap.data[An+1]=Gn,this.bitmap.data[An+2]=qn,this.bitmap.data[An+3]=ln.is_with_alpha?Ln:255}).bitmap;var ln},Ur=rn=>$r().encode(function(ln){return _e(ln,0,0,ln.bitmap.width,ln.bitmap.height,function(En,$n,An){const Ln=this.bitmap.data[An+0],qn=this.bitmap.data[An+1],Gn=this.bitmap.data[An+2],Vn=this.bitmap.data[An+3];this.bitmap.data[An+0]=Vn,this.bitmap.data[An+1]=Gn,this.bitmap.data[An+2]=qn,this.bitmap.data[An+3]=Ln}).bitmap}(rn)).data;var Ci=__webpack_require__(9299),Pi=__webpack_require__.n(Ci),qi=__webpack_require__(8834).lW;const Fi="image/tiff";var so=__webpack_require__(63),Ui=__webpack_require__(9455),ti=__webpack_require__(8834).lW;const jo="image/gif",qa=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],Va=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];var da=__webpack_require__(8834).lW;function $a(rn,ln,En,$n){const An=[0,0,0],Ln=(ln.length-1)/2;for(let qn=0;qnrn!=null;function Ra(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){const An=parseInt(.2126*this.bitmap.data[$n]+.7152*this.bitmap.data[$n+1]+.0722*this.bitmap.data[$n+2],10);this.bitmap.data[$n]=An,this.bitmap.data[$n+1]=An,this.bitmap.data[$n+2]=An}),ve(rn)&&rn.call(this,null,this),this}function Ta(rn,ln){let En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:50;return{r:(ln.r-rn.r)*(En/100)+rn.r,g:(ln.g-rn.g)*(En/100)+rn.g,b:(ln.b-rn.b)*(En/100)+rn.b}}function Wl(rn,ln){return rn&&Array.isArray(rn)?(rn=rn.map(En=>(En.apply!=="xor"&&En.apply!=="mix"||(En.params[0]=Ne(En.params[0]).toRgb()),En)),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(En,$n,An)=>{let Ln={r:this.bitmap.data[An],g:this.bitmap.data[An+1],b:this.bitmap.data[An+2]};const qn=(Gn,Vn)=>this.constructor.limit255(Ln[Gn]+Vn);rn.forEach(Gn=>{if(Gn.apply==="mix")Ln=Ta(Ln,Gn.params[0],Gn.params[1]);else if(Gn.apply==="tint")Ln=Ta(Ln,{r:255,g:255,b:255},Gn.params[0]);else if(Gn.apply==="shade")Ln=Ta(Ln,{r:0,g:0,b:0},Gn.params[0]);else if(Gn.apply==="xor")Ln={r:Ln.r^Gn.params[0].r,g:Ln.g^Gn.params[0].g,b:Ln.b^Gn.params[0].b};else if(Gn.apply==="red")Ln.r=qn("r",Gn.params[0]);else if(Gn.apply==="green")Ln.g=qn("g",Gn.params[0]);else if(Gn.apply==="blue")Ln.b=qn("b",Gn.params[0]);else{if(Gn.apply==="hue"&&(Gn.apply="spin"),Ln=Ne(Ln),!Ln[Gn.apply])return xe.call(this,"action "+Gn.apply+" not supported",ln);Ln=Ln[Gn.apply](...Gn.params).toRgb()}}),this.bitmap.data[An]=Ln.r,this.bitmap.data[An+1]=Ln.g,this.bitmap.data[An+2]=Ln.b}),ve(ln)&&ln.call(this,null,this),this):xe.call(this,"actions must be an array",ln)}var js=__webpack_require__(8834).lW;function ql(rn){const ln=[1,9,3,11,13,5,15,7,4,12,2,10,16,8,14,6];return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){const Ln=ln[((3&$n)<<2)+En%4];this.bitmap.data[An]=Math.min(this.bitmap.data[An]+Ln,255),this.bitmap.data[An+1]=Math.min(this.bitmap.data[An+1]+Ln,255),this.bitmap.data[An+2]=Math.min(this.bitmap.data[An+2]+Ln,255)}),ve(rn)&&rn.call(this,null,this),this}var Vl=__webpack_require__(8834).lW;function Yl(rn,ln,En){if(typeof rn!="boolean"||typeof ln!="boolean")return xe.call(this,"horizontal and vertical must be Booleans",En);const $n=Vl.alloc(this.bitmap.data.length);return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(An,Ln,qn){const Gn=rn?this.bitmap.width-1-An:An,Vn=ln?this.bitmap.height-1-Ln:Ln,ar=this.bitmap.width*Vn+Gn<<2,lr=this.bitmap.data.readUInt32BE(qn);$n.writeUInt32BE(lr,ar)}),this.bitmap.data=Vl.from($n),ve(En)&&En.call(this,null,this),this}function ec(){const rn={r:new Array(256).fill(0),g:new Array(256).fill(0),b:new Array(256).fill(0)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){rn.r[this.bitmap.data[$n+0]]++,rn.g[this.bitmap.data[$n+1]]++,rn.b[this.bitmap.data[$n+2]]++}),rn}const Aa=function(rn,ln,En){return 255*(rn-ln)/(En-ln)},Us=function(rn){return[rn.findIndex(ln=>ln>0),255-rn.slice().reverse().findIndex(ln=>ln>0)]};var tc=__webpack_require__(8058),nc=__webpack_require__.n(tc);function Ls(rn,ln){let En=0;for(let $n=0;$n{const Vn=[...Ln,Gn].join(" "),ar=Ls(rn,Vn);ar<=En?(ar>qn&&(qn=ar),Ln.push(Gn)):(An.push(Ln),Ln=[Gn])}),An.push(Ln),{lines:An,longestLine:qn}}function ci(rn,ln,En){const{lines:$n}=Xl(rn,ln,En);return $n.length*rn.common.lineHeight}function ui(rn,ln,En,$n,An){if(An.width>0&&An.height>0){const Ln=ln.pages[An.page];rn.blit(Ln,En+An.xoffset,$n+An.yoffset,An.x,An.y,An.width,An.height)}return rn}function rc(rn,ln,En,$n,An){for(let Ln=0;Ln<$n.length;Ln++){let qn;qn=rn.chars[$n[Ln]]?$n[Ln]:/\s/.test($n[Ln])?"":"?";const Gn=rn.chars[qn]||{},Vn=rn.kernings[qn];ui(this,rn,ln,En,Gn||{}),ln+=(Vn&&Vn[$n[Ln+1]]?Vn[$n[Ln+1]]:0)+(Gn.xadvance||An)}}const Uo="//../";function go(rn,ln,En,$n,An,Ln,qn){this.widthOriginal=Math.abs(Math.floor(rn)||0),this.heightOriginal=Math.abs(Math.floor(ln)||0),this.targetWidth=Math.abs(Math.floor(En)||0),this.targetHeight=Math.abs(Math.floor($n)||0),this.colorChannels=An?4:3,this.interpolationPass=!!Ln,this.resizeCallback=typeof qn=="function"?qn:function(){},this.targetWidthMultipliedByChannels=this.targetWidth*this.colorChannels,this.originalWidthMultipliedByChannels=this.widthOriginal*this.colorChannels,this.originalHeightMultipliedByChannels=this.heightOriginal*this.colorChannels,this.widthPassResultSize=this.targetWidthMultipliedByChannels*this.heightOriginal,this.finalResultSize=this.targetWidthMultipliedByChannels*this.targetHeight,this.initialize()}go.prototype.initialize=function(){if(!(this.widthOriginal>0&&this.heightOriginal>0&&this.targetWidth>0&&this.targetHeight>0))throw new Error("Invalid settings specified for the resizer.");this.configurePasses()},go.prototype.configurePasses=function(){this.widthOriginal===this.targetWidth?this.resizeWidth=this.bypassResizer:(this.ratioWeightWidthPass=this.widthOriginal/this.targetWidth,this.ratioWeightWidthPass<1&&this.interpolationPass?(this.initializeFirstPassBuffers(!0),this.resizeWidth=this.colorChannels===4?this.resizeWidthInterpolatedRGBA:this.resizeWidthInterpolatedRGB):(this.initializeFirstPassBuffers(!1),this.resizeWidth=this.colorChannels===4?this.resizeWidthRGBA:this.resizeWidthRGB)),this.heightOriginal===this.targetHeight?this.resizeHeight=this.bypassResizer:(this.ratioWeightHeightPass=this.heightOriginal/this.targetHeight,this.ratioWeightHeightPass<1&&this.interpolationPass?(this.initializeSecondPassBuffers(!0),this.resizeHeight=this.resizeHeightInterpolated):(this.initializeSecondPassBuffers(!1),this.resizeHeight=this.colorChannels===4?this.resizeHeightRGBA:this.resizeHeightRGB))},go.prototype._resizeWidthInterpolatedRGBChannels=function(rn,ln){const En=ln?4:3,$n=this.ratioWeightWidthPass,An=this.widthBuffer;let Ln,qn,Gn=0,Vn=0,ar=0,lr=0,fr=0;for(Ln=0;Gn<1/3;Ln+=En,Gn+=$n)for(Vn=Ln,ar=0;Vn=fr)){wr+=lr;break}Or+=En,wr=Or,lr-=fr}while(lr>0&&Or=Vn)){lr+=Gn;break}ar=wr,lr=ar,Gn-=Vn}while(Gn>0&&ar3&&(this.outputWidthWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.heightOriginal)))},go.prototype.initializeSecondPassBuffers=function(rn){this.heightBuffer=this.generateUint8Buffer(this.finalResultSize),rn||(this.outputHeightWorkBench=this.generateFloatBuffer(this.targetWidthMultipliedByChannels),this.colorChannels>3&&(this.outputHeightWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.targetWidth)))},go.prototype.generateFloatBuffer=function(rn){try{return new Float32Array(rn)}catch{return[]}},go.prototype.generateFloat64Buffer=function(rn){try{return new Float64Array(rn)}catch{return[]}},go.prototype.generateUint8Buffer=function(rn){try{return new Uint8Array(rn)}catch{return[]}};const ic=go;var Kl=__webpack_require__(8834).lW;const oc={nearestNeighbor(rn,ln){const En=rn.width,$n=rn.height,An=ln.width,Ln=ln.height,qn=rn.data,Gn=ln.data;for(let Vn=0;Vn0?An[$i-4]:2*An[$i]-An[$i+4],ha=An[$i],sa=An[$i+4],Ca=_i0?gr[$i-4*fr]:2*gr[$i]-gr[$i+4*fr],ha=gr[$i],sa=gr[$i+4*fr],Ca=_i1)for(let Lr=0;Lr=0&&xr.x=0&&xr.y({blit(rn,ln,En,$n,An,Ln,qn,Gn){if(!(rn instanceof this.constructor))return xe.call(this,"The source must be a Jimp image",Gn);if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",Gn);if(typeof $n=="function")Gn=$n,$n=0,An=0,Ln=rn.bitmap.width,qn=rn.bitmap.height;else{if(typeof $n!=typeof An||typeof An!=typeof Ln||typeof Ln!=typeof qn)return xe.call(this,"srcx, srcy, srcw, srch must be numbers",Gn);$n=$n||0,An=An||0,Ln=Ln||rn.bitmap.width,qn=qn||rn.bitmap.height}ln=Math.round(ln),En=Math.round(En),$n=Math.round($n),An=Math.round(An),Ln=Math.round(Ln),qn=Math.round(qn);const Vn=this.bitmap.width,ar=this.bitmap.height,lr=this;return rn.scanQuiet($n,An,Ln,qn,function(fr,Or,wr){const gr=ln+fr-$n,yr=En+Or-An;if(gr>=0&&yr>=0&&Vn-gr>0&&ar-yr>0){const xr=lr.getPixelIndex(gr,yr),Lr={r:this.bitmap.data[wr],g:this.bitmap.data[wr+1],b:this.bitmap.data[wr+2],a:this.bitmap.data[wr+3]},Hr={r:lr.bitmap.data[xr],g:lr.bitmap.data[xr+1],b:lr.bitmap.data[xr+2],a:lr.bitmap.data[xr+3]};lr.bitmap.data[xr]=(Lr.a*(Lr.r-Hr.r)-Hr.r+255>>8)+Hr.r,lr.bitmap.data[xr+1]=(Lr.a*(Lr.g-Hr.g)-Hr.g+255>>8)+Hr.g,lr.bitmap.data[xr+2]=(Lr.a*(Lr.b-Hr.b)-Hr.b+255>>8)+Hr.b,lr.bitmap.data[xr+3]=this.constructor.limit255(Hr.a+Lr.a)}}),ve(Gn)&&Gn.call(this,null,this),this}}),()=>({blur(rn,ln){if(typeof rn!="number")return xe.call(this,"r must be a number",ln);if(rn<1)return xe.call(this,"r must be greater than 0",ln);let En,$n,An,Ln,qn,Gn,Vn,ar,lr,fr,Or,wr,gr,yr;const xr=this.bitmap.width-1,Lr=this.bitmap.height-1,Hr=rn+1,si=qa[rn],_i=Va[rn],ni=[],wi=[],vi=[],Ri=[],$i=[],yo=[];let ha=2;for(;ha-- >0;){for(wr=0,gr=0,Gn=0;Gnxr?xr:Vn)<<2),En+=this.bitmap.data[ar++],$n+=this.bitmap.data[ar++],An+=this.bitmap.data[ar++],Ln+=this.bitmap.data[ar];for(qn=0;qn0?ar<<2:0),lr=gr+$i[qn],fr=gr+yo[qn],En+=this.bitmap.data[lr++]-this.bitmap.data[fr++],$n+=this.bitmap.data[lr++]-this.bitmap.data[fr++],An+=this.bitmap.data[lr++]-this.bitmap.data[fr++],Ln+=this.bitmap.data[lr]-this.bitmap.data[fr],wr++;gr+=this.bitmap.width<<2}for(qn=0;qnLr?0:this.bitmap.width,En+=ni[Or],$n+=wi[Or],An+=vi[Or],Ln+=Ri[Or];for(wr=qn<<2,Gn=0;Gn>>_i,this.bitmap.data[wr+3]=yr,yr>255&&(this.bitmap.data[wr+3]=255),yr>0?(yr=255/yr,this.bitmap.data[wr]=(En*si>>>_i)*yr,this.bitmap.data[wr+1]=($n*si>>>_i)*yr,this.bitmap.data[wr+2]=(An*si>>>_i)*yr):(this.bitmap.data[wr+2]=0,this.bitmap.data[wr+1]=0,this.bitmap.data[wr]=0),qn===0&&($i[Gn]=((ar=Gn+Hr)0?ar*this.bitmap.width:0),lr=qn+$i[Gn],fr=qn+yo[Gn],En+=ni[lr]-ni[fr],$n+=wi[lr]-wi[fr],An+=vi[lr]-vi[fr],Ln+=Ri[lr]-Ri[fr],wr+=this.bitmap.width<<2}}return ve(ln)&&ln.call(this,null,this),this}}),()=>({circle(){let rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ln=arguments.length>1?arguments[1]:void 0;typeof rn=="function"&&(ln=rn,rn={});const En=rn.radius||(this.bitmap.width>this.bitmap.height?this.bitmap.height:this.bitmap.width)/2,$n=typeof rn.x=="number"?rn.x:this.bitmap.width/2,An=typeof rn.y=="number"?rn.y:this.bitmap.height/2;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(Ln,qn,Gn){const Vn=Math.sqrt(Math.pow(Ln-$n,2)+Math.pow(qn-An,2));En-Vn<=0?this.bitmap.data[Gn+3]=0:En-Vn<1&&(this.bitmap.data[Gn+3]=255*(En-Vn))}),ve(ln)&&ln.call(this,null,this),this}}),()=>({brightness(rn,ln){return typeof rn!="number"?xe.call(this,"val must be numbers",ln):rn<-1||rn>1?xe.call(this,"val must be a number between -1 and +1",ln):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){rn<0?(this.bitmap.data[An]*=1+rn,this.bitmap.data[An+1]*=1+rn,this.bitmap.data[An+2]*=1+rn):(this.bitmap.data[An]+=(255-this.bitmap.data[An])*rn,this.bitmap.data[An+1]+=(255-this.bitmap.data[An+1])*rn,this.bitmap.data[An+2]+=(255-this.bitmap.data[An+2])*rn)}),ve(ln)&&ln.call(this,null,this),this)},contrast(rn,ln){if(typeof rn!="number")return xe.call(this,"val must be numbers",ln);if(rn<-1||rn>1)return xe.call(this,"val must be a number between -1 and +1",ln);const En=(rn+1)/(1-rn);function $n(An){return(An=Math.floor(En*(An-127)+127))<0?0:An>255?255:An}return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(An,Ln,qn){this.bitmap.data[qn]=$n(this.bitmap.data[qn]),this.bitmap.data[qn+1]=$n(this.bitmap.data[qn+1]),this.bitmap.data[qn+2]=$n(this.bitmap.data[qn+2])}),ve(ln)&&ln.call(this,null,this),this},posterize(rn,ln){return typeof rn!="number"?xe.call(this,"n must be numbers",ln):(rn<2&&(rn=2),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){this.bitmap.data[An]=Math.floor(this.bitmap.data[An]/255*(rn-1))/(rn-1)*255,this.bitmap.data[An+1]=Math.floor(this.bitmap.data[An+1]/255*(rn-1))/(rn-1)*255,this.bitmap.data[An+2]=Math.floor(this.bitmap.data[An+2]/255*(rn-1))/(rn-1)*255}),ve(ln)&&ln.call(this,null,this),this)},greyscale:Ra,grayscale:Ra,opacity(rn,ln){return typeof rn!="number"?xe.call(this,"f must be a number",ln):rn<0||rn>1?xe.call(this,"f must be a number from 0 to 1",ln):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(En,$n,An){const Ln=this.bitmap.data[An+3]*rn;this.bitmap.data[An+3]=Ln}),ve(ln)&&ln.call(this,null,this),this)},sepia(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){let An=this.bitmap.data[$n],Ln=this.bitmap.data[$n+1],qn=this.bitmap.data[$n+2];An=.393*An+.769*Ln+.189*qn,Ln=.349*An+.686*Ln+.168*qn,qn=.272*An+.534*Ln+.131*qn,this.bitmap.data[$n]=An<255?An:255,this.bitmap.data[$n+1]=Ln<255?Ln:255,this.bitmap.data[$n+2]=qn<255?qn:255}),ve(rn)&&rn.call(this,null,this),this},fade(rn,ln){return typeof rn!="number"?xe.call(this,"f must be a number",ln):rn<0||rn>1?xe.call(this,"f must be a number from 0 to 1",ln):(this.opacity(1-rn),ve(ln)&&ln.call(this,null,this),this)},convolution(rn,ln,En){typeof ln=="function"&&En===void 0&&(En=ln,ln=null),ln||(ln=this.constructor.EDGE_EXTEND);const $n=da.from(this.bitmap.data),An=rn.length,Ln=rn[0].length,qn=Math.floor(An/2),Gn=Math.floor(Ln/2),Vn=-qn,ar=-Gn;let lr,fr,Or,wr,gr,yr,xr,Lr,Hr,si;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(_i,ni,wi){wr=0,Or=0,fr=0;for(let vi=Vn;vi<=qn;vi++)for(let Ri=ar;Ri<=Gn;Ri++)Lr=_i+Ri,Hr=ni+vi,lr=rn[vi+qn][Ri+Gn],si=this.getPixelIndex(Lr,Hr,ln),si===-1?(xr=0,yr=0,gr=0):(gr=this.bitmap.data[si+0],yr=this.bitmap.data[si+1],xr=this.bitmap.data[si+2]),fr+=lr*gr,Or+=lr*yr,wr+=lr*xr;fr<0&&(fr=0),Or<0&&(Or=0),wr<0&&(wr=0),fr>255&&(fr=255),Or>255&&(Or=255),wr>255&&(wr=255),$n[wi+0]=fr,$n[wi+1]=Or,$n[wi+2]=wr}),this.bitmap.data=$n,ve(En)&&En.call(this,null,this),this},opaque(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){this.bitmap.data[$n+3]=255}),ve(rn)&&rn.call(this,null,this),this},pixelate(rn,ln,En,$n,An,Ln){if(typeof ln=="function")Ln=ln,An=null,$n=null,En=null,ln=null;else{if(typeof rn!="number")return xe.call(this,"size must be a number",Ln);if(mo(ln)&&typeof ln!="number")return xe.call(this,"x must be a number",Ln);if(mo(En)&&typeof En!="number")return xe.call(this,"y must be a number",Ln);if(mo($n)&&typeof $n!="number")return xe.call(this,"w must be a number",Ln);if(mo(An)&&typeof An!="number")return xe.call(this,"h must be a number",Ln)}const qn=[[1/16,2/16,1/16],[2/16,.25,2/16],[1/16,2/16,1/16]];ln=ln||0,En=En||0,$n=mo($n)?$n:this.bitmap.width-ln,An=mo(An)?An:this.bitmap.height-En;const Gn=this.cloneQuiet();return this.scanQuiet(ln,En,$n,An,function(Vn,ar,lr){Vn=rn*Math.floor(Vn/rn),ar=rn*Math.floor(ar/rn);const fr=$a(Gn,qn,Vn,ar);this.bitmap.data[lr]=fr[0],this.bitmap.data[lr+1]=fr[1],this.bitmap.data[lr+2]=fr[2]}),ve(Ln)&&Ln.call(this,null,this),this},convolute(rn,ln,En,$n,An,Ln){if(!Array.isArray(rn))return xe.call(this,"the kernel must be an array",Ln);if(typeof ln=="function")Ln=ln,ln=null,En=null,$n=null,An=null;else{if(mo(ln)&&typeof ln!="number")return xe.call(this,"x must be a number",Ln);if(mo(En)&&typeof En!="number")return xe.call(this,"y must be a number",Ln);if(mo($n)&&typeof $n!="number")return xe.call(this,"w must be a number",Ln);if(mo(An)&&typeof An!="number")return xe.call(this,"h must be a number",Ln)}ln=mo(ln)?ln:0,En=mo(En)?En:0,$n=mo($n)?$n:this.bitmap.width-ln,An=mo(An)?An:this.bitmap.height-En;const qn=this.cloneQuiet();return this.scanQuiet(ln,En,$n,An,function(Gn,Vn,ar){const lr=$a(qn,rn,Gn,Vn);this.bitmap.data[ar]=this.constructor.limit255(lr[0]),this.bitmap.data[ar+1]=this.constructor.limit255(lr[1]),this.bitmap.data[ar+2]=this.constructor.limit255(lr[2])}),ve(Ln)&&Ln.call(this,null,this),this},color:Wl,colour:Wl}),()=>({contain(rn,ln,En,$n,An){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",An);typeof En=="string"&&(typeof $n=="function"&&An===void 0&&(An=$n),$n=En,En=null),typeof En=="function"&&(An===void 0&&(An=En),$n=null,En=null),typeof $n=="function"&&An===void 0&&(An=$n,$n=null);const Ln=7&(En=En||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),qn=En>>3;if((Ln===0||Ln&Ln-1)&&(qn===0||qn&qn-1))return xe.call(this,"only use one flag per alignment direction",An);const Gn=Ln>>1,Vn=qn>>1,ar=rn/ln>this.bitmap.width/this.bitmap.height?ln/this.bitmap.height:rn/this.bitmap.width,lr=this.cloneQuiet().scale(ar,$n);return this.resize(rn,ln,$n),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(fr,Or,wr){this.bitmap.data.writeUInt32BE(this._background,wr)}),this.blit(lr,(this.bitmap.width-lr.bitmap.width)/2*Gn,(this.bitmap.height-lr.bitmap.height)/2*Vn),ve(An)&&An.call(this,null,this),this}}),()=>({cover(rn,ln,En,$n,An){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",An);En&&typeof En=="function"&&An===void 0?(An=En,En=null,$n=null):typeof $n=="function"&&An===void 0&&(An=$n,$n=null);const Ln=7&(En=En||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),qn=En>>3;if((Ln===0||Ln&Ln-1)&&(qn===0||qn&qn-1))return xe.call(this,"only use one flag per alignment direction",An);const Gn=Ln>>1,Vn=qn>>1,ar=rn/ln>this.bitmap.width/this.bitmap.height?rn/this.bitmap.width:ln/this.bitmap.height;return this.scale(ar,$n),this.crop((this.bitmap.width-rn)/2*Gn,(this.bitmap.height-ln)/2*Vn,rn,ln),ve(An)&&An.call(this,null,this),this}}),function(rn){return rn("crop",function(ln,En,$n,An,Ln){if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",Ln);if(typeof $n!="number"||typeof An!="number")return xe.call(this,"w and h must be numbers",Ln);if(ln=Math.round(ln),En=Math.round(En),$n=Math.round($n),An=Math.round(An),ln===0&&$n===this.bitmap.width){const qn=$n*En+ln<<2,Gn=qn+(An*$n<<2);this.bitmap.data=this.bitmap.data.slice(qn,Gn)}else{const qn=js.allocUnsafe($n*An*4);let Gn=0;this.scanQuiet(ln,En,$n,An,function(Vn,ar,lr){const fr=this.bitmap.data.readUInt32BE(lr,!0);qn.writeUInt32BE(fr,Gn,!0),Gn+=4}),this.bitmap.data=qn}return this.bitmap.width=$n,this.bitmap.height=An,ve(Ln)&&Ln.call(this,null,this),this}),{class:{autocrop(){const ln=this.bitmap.width,En=this.bitmap.height;let $n,An=0,Ln=2e-4,qn=!0,Gn=!1,Vn={north:!1,south:!1,east:!1,west:!1};for(var ar=arguments.length,lr=new Array(ar),fr=0;frLn)break e}gr++}if(Or=this.getPixelColor(ln,0),!Vn.west)e:for(let ni=0;niLn)break e}Lr++}if(Or=this.getPixelColor(0,En),!Vn.south)e:for(let ni=En-1;ni>=gr+1;ni--){for(let wi=ln-yr-1;wi>=0;wi--){const vi=this.getPixelColor(wi,ni),Ri=this.constructor.intToRGBA(vi);if(this.constructor.colorDiff(wr,Ri)>Ln)break e}xr++}if(Or=this.getPixelColor(ln,En),!Vn.east)e:for(let ni=ln-1;ni>=0+Lr+1;ni--){for(let wi=En-1;wi>=0+gr;wi--){const vi=this.getPixelColor(ni,wi),Ri=this.constructor.intToRGBA(vi);if(this.constructor.colorDiff(wr,Ri)>Ln)break e}yr++}let Hr=!1;if(Lr-=An,yr-=An,gr-=An,xr-=An,Gn){const ni=Math.min(yr,Lr),wi=Math.min(gr,xr);Lr=ni,yr=ni,gr=wi,xr=wi}Lr=Lr>=0?Lr:0,yr=yr>=0?yr:0,gr=gr>=0?gr:0,xr=xr>=0?xr:0;const si=ln-(Lr+yr),_i=En-(xr+gr);return Hr=qn?yr!==0&&gr!==0&&Lr!==0&&xr!==0:yr!==0||gr!==0||Lr!==0||xr!==0,Hr&&this.crop(Lr,gr,si,_i),ve($n)&&$n.call(this,null,this),this}}}},()=>({displace(rn,ln,En){if(typeof rn!="object"||rn.constructor!==this.constructor)return xe.call(this,"The source must be a Jimp image",En);if(typeof ln!="number")return xe.call(this,"factor must be a number",En);const $n=this.cloneQuiet();return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(An,Ln,qn){let Gn=rn.bitmap.data[qn]/256*ln;Gn=Math.round(Gn);const Vn=this.getPixelIndex(An+Gn,Ln);this.bitmap.data[Vn]=$n.bitmap.data[qn],this.bitmap.data[Vn+1]=$n.bitmap.data[qn+1],this.bitmap.data[Vn+2]=$n.bitmap.data[qn+2]}),ve(En)&&En.call(this,null,this),this}}),()=>({dither565:ql,dither16:ql}),()=>({fisheye(){let rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{r:2.5},ln=arguments.length>1?arguments[1]:void 0;typeof rn=="function"&&(ln=rn,rn={r:2.5});const En=this.cloneQuiet(),{width:$n,height:An}=En.bitmap;return En.scanQuiet(0,0,$n,An,(Ln,qn)=>{const Gn=Ln/$n,Vn=qn/An,ar=Math.sqrt(Math.pow(Gn-.5,2)+Math.pow(Vn-.5,2)),lr=2*Math.pow(ar,rn.r),fr=(Gn-.5)/ar,Or=(Vn-.5)/ar,wr=Math.round((lr*fr+.5)*$n),gr=Math.round((lr*Or+.5)*An),yr=En.getPixelColor(wr,gr);this.setPixelColor(yr,Ln,qn)}),this.setPixelColor(En.getPixelColor($n/2,An/2),$n/2,An/2),ve(ln)&&ln.call(this,null,this),this}}),()=>({flip:Yl,mirror:Yl}),()=>({gaussian(rn,ln){if(typeof rn!="number")return xe.call(this,"r must be a number",ln);if(rn<1)return xe.call(this,"r must be greater than 0",ln);const En=Math.ceil(2.57*rn),$n=2*En+1,An=rn*rn*2,Ln=An*Math.PI,qn=[];for(let Gn=0;Gn<$n;Gn++){qn[Gn]=[];for(let Vn=0;Vn<$n;Vn++){const ar=(Vn-En)**2+(Gn-En)**2;qn[Gn][Vn]=Math.exp(-ar/An)/Ln}}for(let Gn=0;Gn({invert(rn){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(ln,En,$n){this.bitmap.data[$n]=255-this.bitmap.data[$n],this.bitmap.data[$n+1]=255-this.bitmap.data[$n+1],this.bitmap.data[$n+2]=255-this.bitmap.data[$n+2]}),ve(rn)&&rn.call(this,null,this),this}}),()=>({mask(rn){let ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$n=arguments.length>3?arguments[3]:void 0;if(!(rn instanceof this.constructor))return xe.call(this,"The source must be a Jimp image",$n);if(typeof ln!="number"||typeof En!="number")return xe.call(this,"x and y must be numbers",$n);ln=Math.round(ln),En=Math.round(En);const An=this.bitmap.width,Ln=this.bitmap.height,qn=this;return rn.scanQuiet(0,0,rn.bitmap.width,rn.bitmap.height,function(Gn,Vn,ar){const lr=ln+Gn,fr=En+Vn;if(lr>=0&&fr>=0&&lr({normalize(rn){const ln=ec.call(this),En={r:Us(ln.r),g:Us(ln.g),b:Us(ln.b)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function($n,An,Ln){const qn=this.bitmap.data[Ln+0],Gn=this.bitmap.data[Ln+1],Vn=this.bitmap.data[Ln+2];this.bitmap.data[Ln+0]=Aa(qn,En.r[0],En.r[1]),this.bitmap.data[Ln+1]=Aa(Gn,En.g[0],En.g[1]),this.bitmap.data[Ln+2]=Aa(Vn,En.b[0],En.b[1])}),ve(rn)&&rn.call(this,null,this),this}}),()=>({constants:{measureText:Ls,measureTextHeight:ci,FONT_SANS_8_BLACK:me().join(Uo,"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt"),FONT_SANS_10_BLACK:me().join(Uo,"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt"),FONT_SANS_12_BLACK:me().join(Uo,"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt"),FONT_SANS_14_BLACK:me().join(Uo,"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt"),FONT_SANS_16_BLACK:me().join(Uo,"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"),FONT_SANS_32_BLACK:me().join(Uo,"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt"),FONT_SANS_64_BLACK:me().join(Uo,"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt"),FONT_SANS_128_BLACK:me().join(Uo,"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt"),FONT_SANS_8_WHITE:me().join(Uo,"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt"),FONT_SANS_16_WHITE:me().join(Uo,"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt"),FONT_SANS_32_WHITE:me().join(Uo,"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt"),FONT_SANS_64_WHITE:me().join(Uo,"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt"),FONT_SANS_128_WHITE:me().join(Uo,"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt"),loadFont(rn,ln){return typeof rn!="string"?xe.call(this,"file must be a string",ln):new Promise((En,$n)=>{ln=ln||function(An,Ln){An?$n(An):En(Ln)},nc()(rn,(An,Ln)=>{const qn={},Gn={};if(An)return xe.call(this,An,ln);for(let Vn=0;VnVn.read(ar+"/"+Or));return Promise.all(fr)})(this,me().dirname(rn),Ln.pages).then(Vn=>{ln(null,{chars:qn,kernings:Gn,pages:Vn,common:Ln.common,info:Ln.info})})})})}},class:{print(rn,ln,En,$n,An,Ln,qn){if(typeof An=="function"&&qn===void 0&&(qn=An,An=1/0),An===void 0&&(An=1/0),typeof Ln=="function"&&qn===void 0&&(qn=Ln,Ln=1/0),Ln===void 0&&(Ln=1/0),typeof rn!="object")return xe.call(this,"font must be a Jimp loadFont",qn);if(typeof ln!="number"||typeof En!="number"||typeof An!="number")return xe.call(this,"x, y and maxWidth must be numbers",qn);if(typeof An!="number")return xe.call(this,"maxWidth must be a number",qn);if(typeof Ln!="number")return xe.call(this,"maxHeight must be a number",qn);let Gn,Vn;typeof $n=="object"&&$n.text!==null&&$n.text!==void 0?(Gn=$n.alignmentX||this.constructor.HORIZONTAL_ALIGN_LEFT,Vn=$n.alignmentY||this.constructor.VERTICAL_ALIGN_TOP,{text:$n}=$n):(Gn=this.constructor.HORIZONTAL_ALIGN_LEFT,Vn=this.constructor.VERTICAL_ALIGN_TOP,$n=$n.toString()),Ln!==1/0&&Vn===this.constructor.VERTICAL_ALIGN_BOTTOM?En+=Ln-ci(rn,$n,An):Ln!==1/0&&Vn===this.constructor.VERTICAL_ALIGN_MIDDLE&&(En+=Ln/2-ci(rn,$n,An)/2);const ar=Object.entries(rn.chars)[0][1].xadvance,{lines:lr,longestLine:fr}=Xl(rn,$n,An);return lr.forEach(Or=>{const wr=Or.join(" "),gr=function(yr,xr,Lr,Hr,si){return si===yr.HORIZONTAL_ALIGN_LEFT?0:si===yr.HORIZONTAL_ALIGN_CENTER?(Hr-Ls(xr,Lr))/2:Hr-Ls(xr,Lr)}(this.constructor,rn,wr,An,Gn);rc.call(this,rn,ln+gr,En,wr,ar),En+=rn.common.lineHeight}),ve(qn)&&qn.call(this,null,this,{x:ln+fr,y:En}),this}}}),()=>({constants:{RESIZE_NEAREST_NEIGHBOR:"nearestNeighbor",RESIZE_BILINEAR:"bilinearInterpolation",RESIZE_BICUBIC:"bicubicInterpolation",RESIZE_HERMITE:"hermiteInterpolation",RESIZE_BEZIER:"bezierInterpolation"},class:{resize(rn,ln,En,$n){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",$n);if(typeof En=="function"&&$n===void 0&&($n=En,En=null),rn===this.constructor.AUTO&&ln===this.constructor.AUTO)return xe.call(this,"w and h cannot both be set to auto",$n);if(rn===this.constructor.AUTO&&(rn=this.bitmap.width*(ln/this.bitmap.height)),ln===this.constructor.AUTO&&(ln=this.bitmap.height*(rn/this.bitmap.width)),rn<0||ln<0)return xe.call(this,"w and h must be positive numbers",$n);if(rn=Math.round(rn)||1,ln=Math.round(ln)||1,typeof Ds[En]=="function"){const An={data:Zl.alloc(rn*ln*4),width:rn,height:ln};Ds[En](this.bitmap,An),this.bitmap=An}else{const An=this;new ic(this.bitmap.width,this.bitmap.height,rn,ln,!0,!0,Ln=>{An.bitmap.data=Zl.from(Ln),An.bitmap.width=rn,An.bitmap.height=ln}).resize(this.bitmap.data)}return ve($n)&&$n.call(this,null,this),this}}}),()=>({rotate(rn,ln,En){return ln==null&&(ln=!0),typeof ln=="function"&&En===void 0&&(En=ln,ln=!0),typeof rn!="number"?xe.call(this,"deg must be a number",En):typeof ln!="boolean"&&typeof ln!="string"?xe.call(this,"mode must be a boolean or a string",En):(rn%90!=0||!ln&&this.bitmap.width!==this.bitmap.height&&rn%180!=0?zo.call(this,rn,ln,En):Ya.call(this,rn),ve(En)&&En.call(this,null,this),this)}}),()=>({scale(rn,ln,En){if(typeof rn!="number")return xe.call(this,"f must be a number",En);if(rn<0)return xe.call(this,"f must be a positive number",En);typeof ln=="function"&&En===void 0&&(En=ln,ln=null);const $n=this.bitmap.width*rn,An=this.bitmap.height*rn;return this.resize($n,An,ln),ve(En)&&En.call(this,null,this),this},scaleToFit(rn,ln,En,$n){if(typeof rn!="number"||typeof ln!="number")return xe.call(this,"w and h must be numbers",$n);typeof En=="function"&&$n===void 0&&($n=En,En=null);const An=rn/ln>this.bitmap.width/this.bitmap.height?ln/this.bitmap.height:rn/this.bitmap.width;return this.scale(An,En),ve($n)&&$n.call(this,null,this),this}}),()=>({shadow(){let rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ln=arguments.length>1?arguments[1]:void 0;typeof rn=="function"&&(ln=rn,rn={});const{opacity:En=.7,size:$n=1.1,x:An=-25,y:Ln=25,blur:qn=5}=rn,Gn=this.clone(),Vn=this.clone();return Vn.scan(0,0,Vn.bitmap.width,Vn.bitmap.height,(ar,lr,fr)=>{Vn.bitmap.data[fr]=0,Vn.bitmap.data[fr+1]=0,Vn.bitmap.data[fr+2]=0,Vn.bitmap.data[fr+3]=Vn.constructor.limit255(Vn.bitmap.data[fr+3]*En),this.bitmap.data[fr]=0,this.bitmap.data[fr+1]=0,this.bitmap.data[fr+2]=0,this.bitmap.data[fr+3]=0}),Vn.resize(Vn.bitmap.width*$n,Vn.bitmap.height*$n).blur(qn),this.composite(Vn,An,Ln),this.composite(Gn,0,0),ve(ln)&&ln.call(this,null,this),this}}),()=>({threshold(rn,ln){let{max:En,replace:$n=255,autoGreyscale:An=!0}=rn;return typeof En!="number"?xe.call(this,"max must be a number",ln):typeof $n!="number"?xe.call(this,"replace must be a number",ln):typeof An!="boolean"?xe.call(this,"autoGreyscale must be a boolean",ln):(En=this.constructor.limit255(En),$n=this.constructor.limit255($n),An&&this.greyscale(),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(Ln,qn,Gn)=>{const Vn=this.bitmap.data[Gn]1&&arguments[1]!==void 0?arguments[1]:Un;const En={hasAlpha:{},encoders:{},decoders:{},class:{},constants:{}};function $n(An){Object.entries(An).forEach(Ln=>{let[qn,Gn]=Ln;En[qn]={...En[qn],...Gn}})}rn.types&&(rn.types.forEach(function(An){const Ln=An();Array.isArray(Ln.mime)?mi(...Ln.mime):Object.entries(Ln.mime).forEach(qn=>mi(...qn)),delete Ln.mime,$n(Ln)}),ln.decoders={...ln.decoders,...En.decoders},ln.encoders={...ln.encoders,...En.encoders},ln.hasAlpha={...ln.hasAlpha,...En.hasAlpha}),rn.plugins&&rn.plugins.forEach(function(An){const Ln=An(On)||{};Ln.class||Ln.constants?$n(Ln):$n({class:Ln})}),ua(En.class,ln),aa(En.constants,ln)})({types:[()=>(0,Zn.Ee)(Er(),vr(),{mime:{[Jr]:["bmp"]},constants:{MIME_BMP:Jr,MIME_X_MS_BMP:Zr},decoders:{[Jr]:jr,[Zr]:jr},encoders:{[Jr]:Ur,[Zr]:Ur}},{mime:{[Fi]:["tiff","tif"]},constants:{MIME_TIFF:Fi},decoders:{[Fi]:rn=>{const ln=Pi().decode(rn),En=ln[0];ln.forEach(An=>{Pi().decodeImage(rn,An)});const $n=Pi().toRGBA8(En);return{data:qi.from($n),width:En.t256[0],height:En.t257[0]}}},encoders:{[Fi]:rn=>{const ln=Pi().encodeImage(rn.bitmap.data,rn.bitmap.width,rn.bitmap.height);return qi.from(ln)}}},{mime:{[jo]:["gif"]},constants:{MIME_GIF:jo},decoders:{[jo]:rn=>{const ln=new so.N(rn),En=ti.alloc(ln.width*ln.height*4);return ln.decodeAndBlitFrameRGBA(0,En),{data:En,width:ln.width,height:ln.height}}},encoders:{[jo]:rn=>{const ln=new Ui.BitmapImage(rn.bitmap);Ui.GifUtil.quantizeDekker(ln,256);const En=new Ui.GifFrame(ln);return new Ui.GifCodec().encodeGif([En],{}).then($n=>$n.buffer)}}})],plugins:[rn=>{const ln=zs.map(En=>{let $n=En(rn)||{};return $n.class||$n.constants||($n={class:$n}),$n});return(0,Zn.Ee)(...ln)}]})})()})();const _Jimp=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Jimp=typeof self<"u"&&self.Jimp||_Jimp,defaultScreenshotRenderer=ne=>jsxRuntimeExports.jsx("img",{src:ne});function Screenshot({screenshot:ne,renderScreenshot:oe=defaultScreenshotRenderer}){const{result:ce,loading:ue}=useAsync(async()=>await(ne==null?void 0:ne()),[ne]);return oe(ce,ue)}function Gallery({onChange:ne}){const oe=usePaper(),[ce]=useScreenshots(),[ue,{set:pe,remove:me}]=useMap$1();reactExports.useEffect(()=>{ne==null||ne(lodashExports$1.values(ue))},[ue]);function ge(ye,ve,xe){ve&&xe?pe(`${ye}`,xe):me(`${ye}`)}return useAsync(async()=>{const ye=lodashExports$1.head(lodashExports$1.values(ce)),ve=await(ye==null?void 0:ye());ve&&ge(0,!0,ve)},[ce]),jsxRuntimeExports.jsx(Scroll,{x:!0,py:2,children:jsxRuntimeExports.jsx(Stack$1,{direction:"row",children:lodashExports$1.values(ce).map((ye,ve)=>jsxRuntimeExports.jsx(Screenshot,{screenshot:ye,renderScreenshot:(xe,_e)=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Box$1,{sx:{minWidth:"320px",height:"320px",flex:0,p:2,"&:not(:last-child)":{pr:1}},children:jsxRuntimeExports.jsxs(Box$1,{sx:{position:"relative",...oe(1),height:"100%"},children:[!!xe&&jsxRuntimeExports.jsx(Box$1,{sx:{backgroundImage:Se=>`linear-gradient(to bottom, ${alpha$1(Se.palette.background.paper,.5)}, transparent), url("${xe}")`,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center"}}),jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",p:1,top:0,left:0},children:jsxRuntimeExports.jsx(FormControlLabel$1,{control:jsxRuntimeExports.jsx(Checkbox$1,{checked:!!ue[ve],disabled:!xe,color:"primary",sx:{ml:1},onChange:(Se,$e)=>ge(ve,$e,xe)}),label:`Viewport ${ve+1}`})}),_e&&jsxRuntimeExports.jsx(Box$1,{sx:{position:"absolute",m:2,top:0,right:0},children:jsxRuntimeExports.jsx(CircularProgress$1,{})})]})})})},ve))})})}const replacements={"*":"star","/":"slash","+":"plus","@":"at","%":"percent","&":"and"};function getFilename(ne=""){return lodashExports$1.kebabCase(lodashExports$1.reduce(lodashExports$1.entries(replacements),(oe,[ce,ue])=>oe.replace(ce,` ${ue} `),ne))||"untitled"}const imageSize=64;async function resizeImage(ne){const oe=await Jimp.read(Buffer.from(ne.split(",")[1],"base64")),ce=oe.getWidth()set$3(Ae,`workspaceMeta.${$e}`,Re)))}const{save:ge,estimateWorkspaceSize:ye}=useWorkspace(),ve=useLoadingState("general"),xe=useSnackbar(),_e=reactExports.useMemo(ye,[]);async function Se($e){return{...ue,id:nanoid$1(),size:$e,screenshots:await map((ue==null?void 0:ue.screenshots)??[],resizeImage),lastModified:Date.now()}}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(Gallery,{onChange:$e=>me("screenshots",$e)})}),jsxRuntimeExports.jsxs(Stack$1,{p:2,gap:2,children:[jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,defaultValue:ue.name,onChange:$e=>me("name",$e.target.value),label:"Name",fullWidth:!0}),jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,minRows:3,defaultValue:ue.description,size:"small",onChange:$e=>me("description",$e.target.value),label:"Description",fullWidth:!0,multiline:!0}),jsxRuntimeExports.jsx(TextField$1,{...textFieldProps,defaultValue:ue.author,size:"small",onChange:$e=>me("author",$e.target.value),label:"Author",fullWidth:!0,multiline:!0}),jsxRuntimeExports.jsx(Box$1,{sx:{pt:2,width:"100%"},children:jsxRuntimeExports.jsx(Button,{sx:{justifyContent:"flex-start",width:"100%",...ne(1)},onClick:()=>ve(async()=>{const $e=getFilename(ue.name),{size:Re}=await ge(!1,$e);download(JSON.stringify(await Se(Re)),`${$e}.workspace.meta`),xe(`Metadata saved, ${$e}.workspace.meta`)}),startIcon:jsxRuntimeExports.jsx(DownloadOutlined,{}),size:"large",children:jsxRuntimeExports.jsxs(Stack$1,{sx:{ml:1},alignItems:"baseline",children:[ue.name||"Untitled",jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",children:[getFilename(ue.name),".workspace"]}),jsxRuntimeExports.jsxs(Type$2,{component:"div",color:"text.secondary",children:[lodashExports$1.ceil(_e/1024/1024,2)," MB"]})]})})})]})]})}function ExportWorkspaceModal(ne){return jsxRuntimeExports.jsxs(Modal,{...ne,children:[jsxRuntimeExports.jsx(ModalAppBar,{onClose:()=>{var oe;return(oe=ne==null?void 0:ne.onClose)==null?void 0:oe.call(ne,{},"backdropClick")},children:jsxRuntimeExports.jsx(Type$2,{component:"div",variant:"h6",children:"Publish Workspace"})}),jsxRuntimeExports.jsx(A,{})]})}const canOpenWindows=!distExports$1.isMobile,alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";function MenuEntry({startIcon:ne,endIcon:oe,label:ce}){return jsxRuntimeExports.jsxs(Stack$1,{direction:"row",gap:1,children:[!!ne&&reactExports.cloneElement(ne,{fontSize:"small",color:"disabled"}),jsxRuntimeExports.jsx("span",{children:ce}),!!oe&&reactExports.cloneElement(oe,{fontSize:"small",color:"disabled"})]})}function useTitleBarVisible(){const[ne,oe]=reactExports.useState(!1),[ce,ue]=reactExports.useState(new DOMRect);return reactExports.useEffect(()=>{if("windowControlsOverlay"in navigator){const pe=()=>{oe(!!navigator.windowControlsOverlay.visible),ue(navigator.windowControlsOverlay.getTitlebarAreaRect())};return navigator.windowControlsOverlay.addEventListener("geometrychange",pe),pe(),()=>navigator.windowControlsOverlay.removeEventListener("geometrychange",pe)}},[oe]),{visible:ne,rect:ce}}const WorkspaceChip=()=>{const ne=useTheme$1(),{index:oe,isPrimary:ce,participants:ue,peers:pe}=useSyncStatus(),me=shades[(oe+1)*2%shades.length],ge=alphabet[oe],ye=getShade(me,ne.palette.mode);return jsxRuntimeExports.jsx(Tooltip$1,{title:`${ce?"Primary":"Secondary"} window, ${ue.length+1} in group`,children:jsxRuntimeExports.jsx(Collapse$1,{in:!!pe.length,orientation:"horizontal",sx:{ml:"0px !important",overflow:"hidden"},children:jsxRuntimeExports.jsx(Chip$1,{size:"small",icon:jsxRuntimeExports.jsx(WorkspacesOutlined,{sx:{color:`${ye} !important`}}),sx:{ml:1,flex:0,WebkitAppRegion:"no-drag",color:ye,background:alpha$1(ye,.08)},label:`Group ${ge}`})})})},TitleBarPlaceholder=()=>{const ne=useTitleBarVisible(),{palette:oe}=useTheme$1(),ce=oe.background.default;return useTitleBar(ce),jsxRuntimeExports.jsx(Box$1,{sx:{bgcolor:"background.default",minHeight:36,width:"100%",height:ne?"env(titlebar-area-height, 50px)":0}})},TitleBar=()=>{const{palette:ne}=useTheme$1(),oe=ne.background.default;useTitleBar(oe);const{save:ce,load:ue}=useWorkspace(),{visible:pe,rect:me}=useTitleBarVisible(),[,ge]=useView(),[ye,ve]=reactExports.useState(!1);function xe(_e){ge(({view:Se})=>({view:{type:"branch",orientation:_e,key:nanoid$1(),children:[{...Se,size:80},{type:"leaf",key:nanoid$1(),content:{type:""},size:20,acceptDrop:!0}]}}))}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Box$1,{sx:{mx:.5,borderBottom:_e=>`1px solid ${_e.palette.background.default}`,minHeight:36,paddingLeft:"env(titlebar-area-x, 0px)",height:pe?"env(titlebar-area-height, 50px)":0,width:"env(titlebar-area-width, 100%)",WebkitAppRegion:"drag",overflowX:"auto"},children:jsxRuntimeExports.jsx(Scroll,{x:!0,style:{height:"100%"},children:jsxRuntimeExports.jsx(Box$1,{sx:{height:"100%"},children:jsxRuntimeExports.jsxs(Stack$1,{direction:"row",spacing:1,sx:{height:"100%"},alignItems:"center",justifyContent:"flex-start",children:[(!pe||me.x===0)&&jsxRuntimeExports.jsx(Box$1,{sx:{p:1,height:"100%",maxWidth:"min-content",aspectRatio:1},children:jsxRuntimeExports.jsx("img",{src:logo$1,style:{height:"100%"}})}),jsxRuntimeExports.jsx(WorkspaceChip,{}),[{key:"view",items:[{disabled:!canOpenWindows,key:"panel-new-window",type:"action",name:"New window",action:()=>openWindow()},{type:"divider"},{type:"action",key:"panel-new-right",name:"Add view to the right",action:()=>xe("horizontal")},{type:"action",key:"panel-new-bottom",name:"Add view below",action:()=>xe("vertical")},{type:"divider"},{type:"action",name:"Reset layout",key:"panel-reset",action:()=>ge(getDefaultViewTree)},{type:"action",name:"Reload window",key:"panel-reload",action:()=>location.reload()}]},{key:"workspace",items:[{type:"action",name:"Open workspace",key:"workspace-load",action:ue},{type:"action",name:"Save workspace",key:"workspace-save",action:ce},{type:"divider"},{type:"action",name:jsxRuntimeExports.jsx(MenuEntry,{label:"Publish workspace",endIcon:jsxRuntimeExports.jsx(OpenInNewOutlined,{})}),key:"workspace-save-metadata",action:()=>ve(!0)}]},{key:"help",items:[{type:"action",name:"Open repository in GitHub",key:"github",action:()=>open(repository,"_blank")},{type:"action",name:"Changelog",key:"changelog",action:()=>open(`${changelog}/${version}`,"_blank")},{type:"action",name:"Documentation",key:"documentation",action:()=>open(docs,"_blank")}]}].map(({key:_e,items:Se})=>jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:$e=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Menu$1,{...bindMenu($e),children:jsxRuntimeExports.jsx(MenuList$1,{dense:!0,sx:{p:0},children:Se.map((Re,Ae)=>{if(Re.type==="action"){const{name:Ie,key:ke,action:Be}=Re;return jsxRuntimeExports.jsx(MenuItem$1,{disabled:lodashExports$1.get(Re,"disabled"),onClick:()=>{Be==null||Be(),$e.close()},children:Ie},ke)}else return jsxRuntimeExports.jsx(Divider$1,{},Ae)})})}),jsxRuntimeExports.jsx(FeaturePickerButton,{...bindTrigger($e),sx:{WebkitAppRegion:"no-drag",minWidth:"fit-content",p:.5,px:1},children:lodashExports$1.startCase(_e)},_e)]})},_e))]})})})}),jsxRuntimeExports.jsx(ExportWorkspaceModal,{open:ye,onClose:()=>ve(!1)})]})},logo=""+new URL("logo192-5e372a8c.png",import.meta.url).href;function BootstrapService(){const{load:ne}=useWorkspace();return useAsync(async()=>{try{const oe=new URLSearchParams(location.search).get("workspace");if(oe&&isWorkspace(oe)&&isWorkspace(oe)){const ce=oe.split("/").pop()??oe,ue=await fetch(oe);ne(new File([await ue.blob()],ce,{lastModified:lodashExports$1.now()}),new URL(oe).origin)}}catch(oe){console.warn(oe)}},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function ConnectionsService(){const ne=useSnackbar(),[{remote:oe}]=useSettings(),[,ce]=useConnections(),ue=useLoadingState("connections");return reactExports.useEffect(()=>{let pe=!1,me=[];return ue(async()=>{if(oe!=null&&oe.length){for(const{transport:ge,url:ye,disabled:ve}of oe){if(ve!==!0){ne(`Connecting to ${ye}...`);const xe=new(getTransport(ge))({url:ye});await xe.connect();const{result:_e,delta:Se}=await timed(()=>xe.call("about"));_e?(ne(`Connected to ${_e.name}`),me=[...me,{..._e,url:ye,ping:Se,transport:()=>xe}]):await xe.disconnect()}pe||ce(()=>me)}pe||ne(`Connected to ${me.length} of ${oe.length} solvers`)}}),()=>{pe=!0,me.map(ge=>ge.transport().disconnect())}},[JSON.stringify(oe),ce,ne,ue]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function withSource(ne){return oe=>({...oe,source:ne})}const getFeatures=async({transport:ne,url:oe})=>lodashExports$1.chain(await map(["algorithms","formats","maps","traces"],async ce=>{const{result:ue}=await timed(()=>ne().call(`features/${ce}`),1e3);return{prop:ce,result:lodashExports$1.map(ue,withSource(oe))}})).keyBy("prop").mapValues("result").value();function FeaturesService(){const[ne]=useConnections(),[,oe]=useFeatures(),[{connections:ce}]=useLoading(),ue=useLoadingState("features");return useAsyncAbortable(async pe=>{ue(async()=>{if(!ce){const me={default:{algorithms:[],formats:lodashExports$1.keys(mapParsers).map(ye=>({id:ye,source:"internal"})),traces:[],maps:[]}},ge=()=>{if(!pe.aborted){const ye=lodashExports$1.chain(me).values().reduce((ve,xe)=>lodashExports$1.mergeWith({},ve,xe,(_e,Se)=>lodashExports$1.isArray(_e)?lodashExports$1.uniqBy([..._e,...Se],"id"):void 0)).value();oe(()=>ye)}};for(const ye of ne){const ve=async()=>{me[ye.url]=await getFeatures(ye),ge()};ye.transport().on("features/changed",ve),ve()}}})},[ne,getFeatures,oe,ce]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function useLayerServices(){const{isPrimary:ne}=useSyncStatus(),[{layers:oe},ce,,ue]=useLayers();return reactExports.useMemo(()=>ne?lodashExports$1.map(oe,pe=>{const me=getController(pe).service;if(me)return reactExports.createElement(me,{key:pe.key,value:pe,onChange:ge=>ce(({layers:ye})=>({layers:lodashExports$1.map(ye,ve=>ve.key===pe.key?ge(ve):ve)}))})}):[],[ue,ce,ne])}function LayerService(){const ne=useLayerServices();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne})}var dist={},ConsoleCapture$1={},logs={};Object.defineProperty(logs,"__esModule",{value:!0});logs.overridableFunctionNames=void 0;logs.overridableFunctionNames=["log","warn","info","debug","error"];Object.defineProperty(ConsoleCapture$1,"__esModule",{value:!0});ConsoleCapture$1.ConsoleCapture=void 0;var logs_1=logs;console.original={};var ConsoleCapture=function(){function ne(){ne.captures=[]}return ne.saveLog=function(oe,ce){var ue=ce.map(function(pe){return typeof pe=="object"?pe instanceof Error?JSON.stringify(pe,Object.getOwnPropertyNames(pe)):JSON.stringify(pe):pe});ne.captures.push({function:oe,args:ue,ts:Date.now()})},ne.setNewFunctions=function(oe){oe===void 0&&(oe=!1);var ce={apply:function(ue,pe,me){if(ne.saveLog(ue.name,me),ue.bind(pe),oe)return ue.apply(void 0,me)}};logs_1.overridableFunctionNames.forEach(function(ue){ne.consoleOverriden||(console.original[ue]=console[ue]),console[ue]=new Proxy(console[ue],ce)}),ne.consoleOverriden=!0},ne.resetToOriginalFunctions=function(){ne.consoleOverriden&&logs_1.overridableFunctionNames.forEach(function(oe){console[oe]=console.original[oe]}),ne.consoleOverriden=!1},ne.prototype.start=function(oe){oe===void 0&&(oe=!1),ne.captures=[],ne.setNewFunctions(oe)},ne.prototype.stop=function(){ne.resetToOriginalFunctions()},ne.prototype.flush=function(){ne.captures=[]},ne.prototype.getCaptures=function(){return ne.captures},ne.makeOriginalLog=function(oe){if(ne.resetToOriginalFunctions(),logs_1.overridableFunctionNames.includes(oe.function)){var ce=oe.args.map(function(ue){if(typeof ue=="string")try{var pe=JSON.parse(ue);return pe.stack?pe.stack:pe}catch{return ue}return ue});console[oe.function].apply(console,ce)}else throw Error("Invalid Log type")},ne.consoleOverriden=!1,ne}();ConsoleCapture$1.ConsoleCapture=ConsoleCapture;Object.defineProperty(dist,"__esModule",{value:!0});var ConsoleCapture_1=ConsoleCapture$1;dist.default=ConsoleCapture_1.ConsoleCapture;function LogCaptureService(){return useSnackbar(),reactExports.useEffect(()=>{},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function SettingsService(){const[{"behaviour/showOnStart":ne},,oe]=useSettings(),[,ce]=useUIState();return reactExports.useEffect(()=>{const ue=new URLSearchParams(location.search).get("workspace");!minimal&&ne&&oe&&!ue&&ce(()=>({fullscreenModal:ne}))},[oe,minimal]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function SliceProvider({slices:ne,children:oe,services:ce}){return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:lodashExports$1.reduce(lodashExports$1.map(ne,ue=>reactExports.createElement(ue)),(ue,pe)=>reactExports.cloneElement(pe,{},ue),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[oe,lodashExports$1.map(ce,(ue,pe)=>reactExports.createElement(ue,{key:pe}))]}))})}const services=[SyncService,ConnectionsService,FeaturesService,RendererService,LayerService,LogCaptureService,SettingsService,BootstrapService];function App(){const{palette:ne}=useTheme$1(),oe=ne.background.default,{loading:ce}=useSyncStatus();return jsxRuntimeExports.jsx(Flex,{vertical:!0,sx:{bgcolor:oe,color:"text.primary",WebkitAppRegion:"no-drag"},children:ce?minimal?jsxRuntimeExports.jsx(Fade$1,{in:!0,children:jsxRuntimeExports.jsxs(Stack$1,{sx:{WebkitAppRegion:"drag",background:ue=>ue.palette.background.paper,width:"100vw",height:"100dvh"},children:[jsxRuntimeExports.jsx(TitleBarPlaceholder,{}),jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(CircularProgress$1,{})})]})}):jsxRuntimeExports.jsx(Fade$1,{in:!0,children:jsxRuntimeExports.jsxs(Stack$1,{sx:{WebkitAppRegion:"drag",width:"100vw",height:"100dvh",alignItems:"center",justifyContent:"center",gap:6},children:[jsxRuntimeExports.jsx(Image$1,{src:logo,style:{height:64,width:64}}),jsxRuntimeExports.jsx(CircularProgress$1,{})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TitleBar,{}),jsxRuntimeExports.jsx(Flex,{flex:1,children:jsxRuntimeExports.jsx(Inspector,{flex:1})})]})})}function ThemedApp(){const[{"appearance/theme":ne="dark","appearance/accentColor":oe="teal"}]=useSettings(),ce=reactExports.useMemo(()=>makeTheme(ne,oe),[ne,oe]);return jsxRuntimeExports.jsx(ThemeProvider,{theme:ce,children:jsxRuntimeExports.jsx(CssBaseline,{children:jsxRuntimeExports.jsx(SnackbarProvider,{children:jsxRuntimeExports.jsx(SliceProvider,{services,children:jsxRuntimeExports.jsx(App,{})})})})})}const index$1="",overlayscrollbars="";var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};/** * @license React * scheduler.production.js * diff --git a/index.html b/index.html index 0c6f739..0e26f6a 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ Posthoc - +