@splinetool/loader
Version:
Spline is a collaborative design platform for creating production-ready interactive experiences in multiple dimensions. © 2024 Spline, Inc.
2 lines • 867 kB
JavaScript
"use strict";var ES=Object.create;var Js=Object.defineProperty;var NS=Object.getOwnPropertyDescriptor;var DS=Object.getOwnPropertyNames;var _S=Object.getPrototypeOf,RS=Object.prototype.hasOwnProperty;var LS=(i,t,e)=>t in i?Js(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var el=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),sm=(i,t)=>{for(var e in t)Js(i,e,{get:t[e],enumerable:!0})},lm=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of DS(t))!RS.call(i,o)&&o!==e&&Js(i,o,{get:()=>t[o],enumerable:!(r=NS(t,o))||r.enumerable});return i};var tl=(i,t,e)=>(e=i!=null?ES(_S(i)):{},lm(t||!i||!i.__esModule?Js(e,"default",{value:i,enumerable:!0}):e,i)),BS=i=>lm(Js({},"__esModule",{value:!0}),i);var yn=(i,t,e)=>(LS(i,typeof t!="symbol"?t+"":t,e),e);var K0=el((cf,Y0)=>{(function(i,t){typeof cf=="object"?Y0.exports=t():typeof define=="function"&&define.amd?define(t):i.Alea=t()})(cf,function(){"use strict";return i.importState=function(e){var r=new i;return r.importState(e),r},i;function i(){return function(e){var r=0,o=0,n=0,a=1;e.length==0&&(e=[+new Date]);var s=t();r=s(" "),o=s(" "),n=s(" ");for(var l=0;l<e.length;l++)r-=s(e[l]),r<0&&(r+=1),o-=s(e[l]),o<0&&(o+=1),n-=s(e[l]),n<0&&(n+=1);s=null;var c=function(){var u=2091639*r+a*23283064365386963e-26;return r=o,o=n,n=u-(a=u|0)};return c.next=c,c.uint32=function(){return c()*4294967296},c.fract53=function(){return c()+(c()*2097152|0)*11102230246251565e-32},c.version="Alea 0.9",c.args=e,c.exportState=function(){return[r,o,n,a]},c.importState=function(u){r=+u[0]||0,o=+u[1]||0,n=+u[2]||0,a=+u[3]||0},c}(Array.prototype.slice.call(arguments))}function t(){var e=4022871197,r=function(o){o=o.toString();for(var n=0;n<o.length;n++){e+=o.charCodeAt(n);var a=.02519603282416938*e;e=a>>>0,a-=e,a*=e,e=a>>>0,a-=e,e+=a*4294967296}return(e>>>0)*23283064365386963e-26};return r.version="Mash 0.9",r}})});var ox=el((Bu,rx)=>{(function(i,t){typeof Bu=="object"&&typeof rx<"u"?t(Bu):typeof define=="function"&&define.amd?define(["exports"],t):t((i=typeof globalThis<"u"?globalThis:i||self).SVDJS={})})(Bu,function(i){"use strict";i.SVD=function(t,e,r,o,n){if(e=e===void 0||e,r=r===void 0||r,n=1e-64/(o=o||Math.pow(2,-52)),!t)throw new TypeError("Matrix a is not defined");var a,s,l,c,u,p,d,f,h,m,y,b,v=t[0].length,w=t.length;if(w<v)throw new TypeError("Invalid matrix: m < n");for(var O=[],S=[],T=[],M=e==="f"?w:v,g=m=d=0;g<w;g++)S[g]=new Array(M).fill(0);for(g=0;g<v;g++)T[g]=new Array(v).fill(0);var D,E=new Array(v).fill(0);for(g=0;g<w;g++)for(a=0;a<v;a++)S[g][a]=t[g][a];for(g=0;g<v;g++){for(O[g]=d,h=0,l=g+1,a=g;a<w;a++)h+=Math.pow(S[a][g],2);if(h<n)d=0;else for(f=(p=S[g][g])*(d=p<0?Math.sqrt(h):-Math.sqrt(h))-h,S[g][g]=p-d,a=l;a<v;a++){for(h=0,s=g;s<w;s++)h+=S[s][g]*S[s][a];for(p=h/f,s=g;s<w;s++)S[s][a]=S[s][a]+p*S[s][g]}for(E[g]=d,h=0,a=l;a<v;a++)h+=Math.pow(S[g][a],2);if(h<n)d=0;else{for(f=(p=S[g][g+1])*(d=p<0?Math.sqrt(h):-Math.sqrt(h))-h,S[g][g+1]=p-d,a=l;a<v;a++)O[a]=S[g][a]/f;for(a=l;a<w;a++){for(h=0,s=l;s<v;s++)h+=S[a][s]*S[g][s];for(s=l;s<v;s++)S[a][s]=S[a][s]+h*O[s]}}m<(y=Math.abs(E[g])+Math.abs(O[g]))&&(m=y)}if(r)for(g=v-1;0<=g;g--){if(d!==0){for(f=S[g][g+1]*d,a=l;a<v;a++)T[a][g]=S[g][a]/f;for(a=l;a<v;a++){for(h=0,s=l;s<v;s++)h+=S[g][s]*T[s][a];for(s=l;s<v;s++)T[s][a]=T[s][a]+h*T[s][g]}}for(a=l;a<v;a++)T[g][a]=0,T[a][g]=0;T[g][g]=1,d=O[g],l=g}if(e){if(e==="f")for(g=v;g<w;g++){for(a=v;a<w;a++)S[g][a]=0;S[g][g]=1}for(g=v-1;0<=g;g--){for(l=g+1,d=E[g],a=l;a<M;a++)S[g][a]=0;if(d!==0){for(f=S[g][g]*d,a=l;a<M;a++){for(h=0,s=l;s<w;s++)h+=S[s][g]*S[s][a];for(p=h/f,s=g;s<w;s++)S[s][a]=S[s][a]+p*S[s][g]}for(a=g;a<w;a++)S[a][g]=S[a][g]/d}else for(a=g;a<w;a++)S[a][g]=0;S[g][g]=S[g][g]+1}}for(o*=m,s=v-1;0<=s;s--)for(var I=0;I<50;I++){for(D=!1,l=s;0<=l;l--){if(Math.abs(O[l])<=o){D=!0;break}if(Math.abs(E[l-1])<=o)break}if(!D){for(u=0,c=l-(h=1),g=l;g<s+1&&(p=h*O[g],O[g]=u*O[g],!(Math.abs(p)<=o));g++)if(d=E[g],E[g]=Math.sqrt(p*p+d*d),u=d/(f=E[g]),h=-p/f,e)for(a=0;a<w;a++)y=S[a][c],b=S[a][g],S[a][c]=y*u+b*h,S[a][g]=-y*h+b*u}if(b=E[s],l===s){if(b<0&&(E[s]=-b,r))for(a=0;a<v;a++)T[a][s]=-T[a][s];break}for(m=E[l],p=(((y=E[s-1])-b)*(y+b)+((d=O[s-1])-(f=O[s]))*(d+f))/(2*f*y),d=Math.sqrt(p*p+1),p=((m-b)*(m+b)+f*(y/(p<0?p-d:p+d)-f))/m,g=l+(h=u=1);g<s+1;g++){if(d=O[g],y=E[g],f=h*d,d*=u,b=Math.sqrt(p*p+f*f),p=m*(u=p/(O[g-1]=b))+d*(h=f/b),d=-m*h+d*u,f=y*h,y*=u,r)for(a=0;a<v;a++)m=T[a][g-1],b=T[a][g],T[a][g-1]=m*u+b*h,T[a][g]=-m*h+b*u;if(b=Math.sqrt(p*p+f*f),p=(u=p/(E[g-1]=b))*d+(h=f/b)*y,m=-h*d+u*y,e)for(a=0;a<w;a++)y=S[a][g-1],b=S[a][g],S[a][g-1]=y*u+b*h,S[a][g]=-y*h+b*u}O[l]=0,O[s]=p,E[s]=m}for(g=0;g<v;g++)E[g]<o&&(E[g]=0);return{u:S,q:E,v:T}},i.VERSION="1.1.1",Object.defineProperty(i,"__esModule",{value:!0})})});var Jv=el((Dre,Zv)=>{"use strict";function X3(i,t){function e(){this.constructor=i}e.prototype=t.prototype,i.prototype=new e}function Un(i,t,e,r){this.message=i,this.expected=t,this.found=e,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Un)}X3(Un,Error);Un.buildMessage=function(i,t){var e={literal:function(c){return'"'+o(c.text)+'"'},class:function(c){var u="",p;for(p=0;p<c.parts.length;p++)u+=c.parts[p]instanceof Array?n(c.parts[p][0])+"-"+n(c.parts[p][1]):n(c.parts[p]);return"["+(c.inverted?"^":"")+u+"]"},any:function(c){return"any character"},end:function(c){return"end of input"},other:function(c){return c.description}};function r(c){return c.charCodeAt(0).toString(16).toUpperCase()}function o(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function n(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(c){return e[c.type](c)}function s(c){var u=new Array(c.length),p,d;for(p=0;p<c.length;p++)u[p]=a(c[p]);if(u.sort(),u.length>0){for(p=1,d=1;p<u.length;p++)u[p-1]!==u[p]&&(u[d]=u[p],d++);u.length=d}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+o(c)+'"':"end of input"}return"Expected "+s(i)+" but "+l(t)+" found."};function Y3(i,t){t=t!==void 0?t:{};var e={},r={svg_path:Zs},o=Zs,n=function(x){if(!x)return[];for(var P=[],L=0;L<x.length;L++)P=P.concat.apply(P,x[L]);var A=P[0];return A&&A.code=="m"&&(delete A.relative,A.code="M"),P},a=function(x,P){return IS(x,P)},s=/^[Mm]/,l=at(["M","m"],!1,!1),c=function(x,P,L){var A=Xn(x,[P]);return L&&(A=A.concat(Xn(x=="M"?"L":"l",L[1]))),A},u=/^[Zz]/,p=at(["Z","z"],!1,!1),d=function(){return Xn("Z")},f=/^[Ll]/,h=at(["L","l"],!1,!1),m=function(x,P){return Xn(x,P)},y=/^[Hh]/,b=at(["H","h"],!1,!1),v=function(x,P){return Xn(x,P.map(function(L){return{x:L}}))},w=/^[Vv]/,O=at(["V","v"],!1,!1),S=function(x,P){return Xn(x,P.map(function(L){return{y:L}}))},T=/^[Cc]/,M=at(["C","c"],!1,!1),g=function(x,P,L){return{x1:x.x,y1:x.y,x2:P.x,y2:P.y,x:L.x,y:L.y}},D=/^[Ss]/,E=at(["S","s"],!1,!1),I=function(x,P){return{x2:x.x,y2:x.y,x:P.x,y:P.y}},N=/^[Qq]/,_=at(["Q","q"],!1,!1),R=function(x,P){return{x1:x.x,y1:x.y,x:P.x,y:P.y}},V=/^[Tt]/,U=at(["T","t"],!1,!1),B=/^[Aa]/,q=at(["A","a"],!1,!1),j=function(x,P,L,A,z,oe){return{rx:x,ry:P,xAxisRotation:L,largeArc:A,sweep:z,x:oe.x,y:oe.y}},F=function(x,P){return{x,y:P}},H=function(x){return x*1},W=function(x){return x.join("")*1},ee=/^[01]/,te=at(["0","1"],!1,!1),Y=function(x){return x=="1"},re=function(){return""},K=",",Z=xt(",",!1),Q=function(x){return x.join("")},$=".",pe=xt(".",!1),le=/^[eE]/,ie=at(["e","E"],!1,!1),ue=/^[+\-]/,ae=at(["+","-"],!1,!1),ge=/^[0-9]/,me=at([["0","9"]],!1,!1),ye=function(x){return x.join("")},ve=/^[ \t\n\r]/,xe=at([" "," ",`
`,"\r"],!1,!1),C=0,ne=0,Ve=[{line:1,column:1}],ke=0,Ge=[],Ce=0,zt;if("startRule"in t){if(!(t.startRule in r))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');o=r[t.startRule]}function _e(){return i.substring(ne,C)}function Bt(){return fn(ne,C)}function Gt(x,P){throw P=P!==void 0?P:fn(ne,C),zr([cp(x)],i.substring(ne,C),P)}function pn(x,P){throw P=P!==void 0?P:fn(ne,C),up(x,P)}function xt(x,P){return{type:"literal",text:x,ignoreCase:P}}function at(x,P,L){return{type:"class",parts:x,inverted:P,ignoreCase:L}}function to(){return{type:"any"}}function lp(){return{type:"end"}}function cp(x){return{type:"other",description:x}}function hc(x){var P=Ve[x],L;if(P)return P;for(L=x-1;!Ve[L];)L--;for(P=Ve[L],P={line:P.line,column:P.column};L<x;)i.charCodeAt(L)===10?(P.line++,P.column=1):P.column++,L++;return Ve[x]=P,P}function fn(x,P){var L=hc(x),A=hc(P);return{start:{offset:x,line:L.line,column:L.column},end:{offset:P,line:A.line,column:A.column}}}function Pt(x){C<ke||(C>ke&&(ke=C,Ge=[]),Ge.push(x))}function up(x,P){return new Un(x,null,null,P)}function zr(x,P,L){return new Un(Un.buildMessage(x,P),x,P,L)}function Zs(){var x,P,L,A,z;for(x=C,P=[],L=He();L!==e;)P.push(L),L=He();if(P!==e)if(L=cr(),L===e&&(L=null),L!==e){for(A=[],z=He();z!==e;)A.push(z),z=He();A!==e?(ne=x,P=n(L),x=P):(C=x,x=e)}else C=x,x=e;else C=x,x=e;return x}function cr(){var x,P,L,A,z,oe;if(x=C,P=hn(),P!==e){for(L=[],A=C,z=[],oe=He();oe!==e;)z.push(oe),oe=He();for(z!==e?(oe=hn(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;){for(L.push(A),A=C,z=[],oe=He();oe!==e;)z.push(oe),oe=He();z!==e?(oe=hn(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e)}L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function hn(){var x,P,L,A,z,oe;if(x=C,P=qn(),P!==e){for(L=[],A=C,z=[],oe=He();oe!==e;)z.push(oe),oe=He();for(z!==e?(oe=mc(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;){for(L.push(A),A=C,z=[],oe=He();oe!==e;)z.push(oe),oe=He();z!==e?(oe=mc(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e)}L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function mc(){var x;return x=hS(),x===e&&(x=mS(),x===e&&(x=yS(),x===e&&(x=gS(),x===e&&(x=xS(),x===e&&(x=vS(),x===e&&(x=wS(),x===e&&(x=OS(),x===e&&(x=CS())))))))),x}function qn(){var x,P,L,A,z,oe,Yn;if(x=C,s.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(l)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=pr(),A!==e?(z=C,oe=ht(),oe===e&&(oe=null),oe!==e?(Yn=Jh(),Yn!==e?(oe=[oe,Yn],z=oe):(C=z,z=e)):(C=z,z=e),z===e&&(z=null),z!==e?(ne=x,P=c(P,A,z),x=P):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function hS(){var x,P;return x=C,u.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(p)),P!==e&&(ne=x,P=d()),x=P,x}function mS(){var x,P,L,A;if(x=C,f.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(h)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=Jh(),A!==e?(ne=x,P=m(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function Jh(){var x,P,L,A,z,oe;if(x=C,P=pr(),P!==e){for(L=[],A=C,z=ht(),z===e&&(z=null),z!==e?(oe=pr(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;)L.push(A),A=C,z=ht(),z===e&&(z=null),z!==e?(oe=pr(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function yS(){var x,P,L,A;if(x=C,y.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(b)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=em(),A!==e?(ne=x,P=v(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function em(){var x,P,L,A,z,oe;if(x=C,P=$n(),P!==e){for(L=[],A=C,z=ht(),z===e&&(z=null),z!==e?(oe=$n(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;)L.push(A),A=C,z=ht(),z===e&&(z=null),z!==e?(oe=$n(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function gS(){var x,P,L,A;if(x=C,w.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(O)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=em(),A!==e?(ne=x,P=S(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function xS(){var x,P,L,A;if(x=C,T.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(M)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=bS(),A!==e?(ne=x,P=m(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function bS(){var x,P,L,A,z,oe;if(x=C,P=dp(),P!==e){for(L=[],A=C,z=ht(),z===e&&(z=null),z!==e?(oe=dp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;)L.push(A),A=C,z=ht(),z===e&&(z=null),z!==e?(oe=dp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function dp(){var x,P,L,A,z,oe;return x=C,P=pr(),P!==e?(L=ht(),L===e&&(L=null),L!==e?(A=pr(),A!==e?(z=ht(),z===e&&(z=null),z!==e?(oe=pr(),oe!==e?(ne=x,P=g(P,A,oe),x=P):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e),x}function vS(){var x,P,L,A;if(x=C,D.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(E)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=SS(),A!==e?(ne=x,P=m(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function SS(){var x,P,L,A,z,oe;if(x=C,P=pp(),P!==e){for(L=[],A=C,z=ht(),z===e&&(z=null),z!==e?(oe=pp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;)L.push(A),A=C,z=ht(),z===e&&(z=null),z!==e?(oe=pp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function pp(){var x,P,L,A;return x=C,P=pr(),P!==e?(L=ht(),L===e&&(L=null),L!==e?(A=pr(),A!==e?(ne=x,P=I(P,A),x=P):(C=x,x=e)):(C=x,x=e)):(C=x,x=e),x}function wS(){var x,P,L,A;if(x=C,N.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(_)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=PS(),A!==e?(ne=x,P=m(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function PS(){var x,P,L,A,z,oe;if(x=C,P=fp(),P!==e){for(L=[],A=C,z=ht(),z===e&&(z=null),z!==e?(oe=fp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;)L.push(A),A=C,z=ht(),z===e&&(z=null),z!==e?(oe=fp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function fp(){var x,P,L,A;return x=C,P=pr(),P!==e?(L=ht(),L===e&&(L=null),L!==e?(A=pr(),A!==e?(ne=x,P=R(P,A),x=P):(C=x,x=e)):(C=x,x=e)):(C=x,x=e),x}function OS(){var x,P,L,A;if(x=C,V.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(U)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=TS(),A!==e?(ne=x,P=m(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function TS(){var x,P,L,A,z,oe;if(x=C,P=pr(),P!==e){for(L=[],A=C,z=ht(),z===e&&(z=null),z!==e?(oe=pr(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;)L.push(A),A=C,z=ht(),z===e&&(z=null),z!==e?(oe=pr(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function CS(){var x,P,L,A;if(x=C,B.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(q)),P!==e){for(L=[],A=He();A!==e;)L.push(A),A=He();L!==e?(A=AS(),A!==e?(ne=x,P=m(P,A),x=P):(C=x,x=e)):(C=x,x=e)}else C=x,x=e;return x}function AS(){var x,P,L,A,z,oe;if(x=C,P=hp(),P!==e){for(L=[],A=C,z=ht(),z===e&&(z=null),z!==e?(oe=hp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);A!==e;)L.push(A),A=C,z=ht(),z===e&&(z=null),z!==e?(oe=hp(),oe!==e?(z=[z,oe],A=z):(C=A,A=e)):(C=A,A=e);L!==e?(ne=x,P=a(P,L),x=P):(C=x,x=e)}else C=x,x=e;return x}function hp(){var x,P,L,A,z,oe,Yn,yp,gc,gp,xc,xp;return x=C,P=tm(),P!==e?(L=ht(),L===e&&(L=null),L!==e?(A=tm(),A!==e?(z=ht(),z===e&&(z=null),z!==e?(oe=$n(),oe!==e?(Yn=ht(),Yn!==e?(yp=rm(),yp!==e?(gc=ht(),gc===e&&(gc=null),gc!==e?(gp=rm(),gp!==e?(xc=ht(),xc===e&&(xc=null),xc!==e?(xp=pr(),xp!==e?(ne=x,P=j(P,A,oe,yp,gp,xp),x=P):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e)):(C=x,x=e),x}function pr(){var x,P,L,A;return x=C,P=$n(),P!==e?(L=ht(),L===e&&(L=null),L!==e?(A=$n(),A!==e?(ne=x,P=F(P,A),x=P):(C=x,x=e)):(C=x,x=e)):(C=x,x=e),x}function tm(){var x,P;return x=C,P=im(),P===e&&(P=mn()),P!==e&&(ne=x,P=H(P)),x=P,x}function $n(){var x,P,L,A;return x=C,P=C,L=mp(),L===e&&(L=null),L!==e?(A=im(),A!==e?(L=[L,A],P=L):(C=P,P=e)):(C=P,P=e),P===e&&(P=C,L=mp(),L===e&&(L=null),L!==e?(A=mn(),A!==e?(L=[L,A],P=L):(C=P,P=e)):(C=P,P=e)),P!==e&&(ne=x,P=W(P)),x=P,x}function rm(){var x,P;return x=C,ee.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(te)),P!==e&&(ne=x,P=Y(P)),x=P,x}function ht(){var x,P,L,A,z;if(x=C,P=[],L=He(),L!==e)for(;L!==e;)P.push(L),L=He();else P=e;if(P!==e)if(L=om(),L===e&&(L=null),L!==e){for(A=[],z=He();z!==e;)A.push(z),z=He();A!==e?(P=[P,L,A],x=P):(C=x,x=e)}else C=x,x=e;else C=x,x=e;if(x===e){if(x=C,P=C,L=om(),L!==e){for(A=[],z=He();z!==e;)A.push(z),z=He();A!==e?(L=[L,A],P=L):(C=P,P=e)}else C=P,P=e;P!==e&&(ne=x,P=re()),x=P}return x}function om(){var x;return i.charCodeAt(C)===44?(x=K,C++):(x=e,Ce===0&&Pt(Z)),x}function im(){var x,P,L,A;return x=C,P=C,L=MS(),L!==e?(A=nm(),A===e&&(A=null),A!==e?(L=[L,A],P=L):(C=P,P=e)):(C=P,P=e),P===e&&(P=C,L=mn(),L!==e?(A=nm(),A!==e?(L=[L,A],P=L):(C=P,P=e)):(C=P,P=e)),P!==e&&(ne=x,P=Q(P)),x=P,x}function MS(){var x,P,L,A,z;return x=C,P=C,L=mn(),L===e&&(L=null),L!==e?(i.charCodeAt(C)===46?(A=$,C++):(A=e,Ce===0&&Pt(pe)),A!==e?(z=mn(),z!==e?(L=[L,A,z],P=L):(C=P,P=e)):(C=P,P=e)):(C=P,P=e),P===e&&(P=C,L=mn(),L!==e?(i.charCodeAt(C)===46?(A=$,C++):(A=e,Ce===0&&Pt(pe)),A!==e?(L=[L,A],P=L):(C=P,P=e)):(C=P,P=e)),P!==e&&(ne=x,P=Q(P)),x=P,x}function nm(){var x,P,L,A,z;return x=C,P=C,le.test(i.charAt(C))?(L=i.charAt(C),C++):(L=e,Ce===0&&Pt(ie)),L!==e?(A=mp(),A===e&&(A=null),A!==e?(z=mn(),z!==e?(L=[L,A,z],P=L):(C=P,P=e)):(C=P,P=e)):(C=P,P=e),P!==e&&(ne=x,P=Q(P)),x=P,x}function mp(){var x;return ue.test(i.charAt(C))?(x=i.charAt(C),C++):(x=e,Ce===0&&Pt(ae)),x}function mn(){var x,P,L;if(x=C,P=[],ge.test(i.charAt(C))?(L=i.charAt(C),C++):(L=e,Ce===0&&Pt(me)),L!==e)for(;L!==e;)P.push(L),ge.test(i.charAt(C))?(L=i.charAt(C),C++):(L=e,Ce===0&&Pt(me));else P=e;return P!==e&&(ne=x,P=ye(P)),x=P,x}function He(){var x,P;return x=C,ve.test(i.charAt(C))?(P=i.charAt(C),C++):(P=e,Ce===0&&Pt(xe)),P!==e&&(ne=x,P=re()),x=P,x}function IS(x,P){if(!P)return[x];for(var L=[x],A=0,z=P.length;A<z;A++)L[A+1]=P[A][1];return L}var yc={m:"moveto",l:"lineto",h:"horizontal lineto",v:"vertical lineto",c:"curveto",s:"smooth curveto",q:"quadratic curveto",t:"smooth quadratic curveto",a:"elliptical arc",z:"closepath"};for(var am in yc)yc[am.toUpperCase()]=yc[am];function Xn(x,P){P||(P=[{}]);for(var L=P.length;L--;){var A={code:x,command:yc[x]};x==x.toLowerCase()&&(A.relative=!0);for(var z in P[L])A[z]=P[L][z];P[L]=A}return P}if(zt=o(),zt!==e&&C===i.length)return zt;throw zt!==e&&C<i.length&&Pt(lp()),zr(Ge,ke<i.length?i.charAt(ke):null,ke<i.length?fn(ke,ke+1):fn(ke,ke))}Zv.exports={SyntaxError:Un,parse:Y3}});var Vh=el((_re,e1)=>{var kd=Jv().parse;kd.parseSVG=kd;kd.makeAbsolute=K3;e1.exports=kd;function K3(i){var t,e={x:0,y:0},r={x:"x0",y:"y0",x1:"x0",y1:"y0",x2:"x0",y2:"y0"};return i.forEach(function(o){o.command==="moveto"&&(t=o),o.x0=e.x,o.y0=e.y;for(var n in r)n in o&&(o[n]+=o.relative?o[r[n]]:0);"x"in o||(o.x=e.x),"y"in o||(o.y=e.y),o.relative=!1,o.code=o.code.toUpperCase(),o.command=="closepath"&&(o.x=t.x,o.y=t.y),e=o}),i}});var dS=el((Pce,uS)=>{uS.exports=function(t,e){for(var r=t.split("."),o=e.split("."),n=0;n<3;n++){var a=Number(r[n]),s=Number(o[n]);if(a>s)return 1;if(s>a)return-1;if(!isNaN(a)&&isNaN(s))return 1;if(isNaN(a)&&!isNaN(s))return-1}return 0}});var IE={};sm(IE,{default:()=>ap});module.exports=BS(IE);var sp=require("three");function bc(i){for(let t of Object.keys(i))i[t]===void 0&&delete i[t];return i}function Ft(i,t){return Object.setPrototypeOf(i,t),i}function vc(i){return Array.isArray(i)?i:[i]}function Sc(i,t){let e=0;for(;e<i.length&&e<t.length;){if(i[e]<t[e])return-1;if(i[e]>t[e])return 1;e+=1}return e!==t.length?-1:e!==i.length?1:0}var VS=typeof global=="object"&&global&&global.Object===Object&&global,wc=VS;var zS=typeof self=="object"&&self&&self.Object===Object&&self,GS=wc||zS||Function("return this")(),Ot=GS;var FS=Ot.Symbol,Yt=FS;var cm=Object.prototype,jS=cm.hasOwnProperty,US=cm.toString,rl=Yt?Yt.toStringTag:void 0;function kS(i){var t=jS.call(i,rl),e=i[rl];try{i[rl]=void 0;var r=!0}catch{}var o=US.call(i);return r&&(t?i[rl]=e:delete i[rl]),o}var um=kS;var HS=Object.prototype,WS=HS.toString;function qS(i){return WS.call(i)}var dm=qS;var $S="[object Null]",XS="[object Undefined]",pm=Yt?Yt.toStringTag:void 0;function YS(i){return i==null?i===void 0?XS:$S:pm&&pm in Object(i)?um(i):dm(i)}var Nr=YS;function KS(i){return i!=null&&typeof i=="object"}var rr=KS;var QS="[object Symbol]";function ZS(i){return typeof i=="symbol"||rr(i)&&Nr(i)==QS}var Si=ZS;function JS(i,t){for(var e=-1,r=i==null?0:i.length,o=Array(r);++e<r;)o[e]=t(i[e],e,i);return o}var Pc=JS;var ew=Array.isArray,Tt=ew;var tw=1/0,fm=Yt?Yt.prototype:void 0,hm=fm?fm.toString:void 0;function mm(i){if(typeof i=="string")return i;if(Tt(i))return Pc(i,mm)+"";if(Si(i))return hm?hm.call(i):"";var t=i+"";return t=="0"&&1/i==-tw?"-0":t}var ym=mm;var rw=/\s/;function ow(i){for(var t=i.length;t--&&rw.test(i.charAt(t)););return t}var gm=ow;var iw=/^\s+/;function nw(i){return i&&i.slice(0,gm(i)+1).replace(iw,"")}var xm=nw;function aw(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}var Ct=aw;var bm=0/0,sw=/^[-+]0x[0-9a-f]+$/i,lw=/^0b[01]+$/i,cw=/^0o[0-7]+$/i,uw=parseInt;function dw(i){if(typeof i=="number")return i;if(Si(i))return bm;if(Ct(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=Ct(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=xm(i);var e=lw.test(i);return e||cw.test(i)?uw(i.slice(2),e?2:8):sw.test(i)?bm:+i}var bp=dw;function pw(i){return i}var vm=pw;var fw="[object AsyncFunction]",hw="[object Function]",mw="[object GeneratorFunction]",yw="[object Proxy]";function gw(i){if(!Ct(i))return!1;var t=Nr(i);return t==hw||t==mw||t==fw||t==yw}var Oc=gw;var xw=Ot["__core-js_shared__"],Tc=xw;var Sm=function(){var i=/[^.]+$/.exec(Tc&&Tc.keys&&Tc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function bw(i){return!!Sm&&Sm in i}var wm=bw;var vw=Function.prototype,Sw=vw.toString;function ww(i){if(i!=null){try{return Sw.call(i)}catch{}try{return i+""}catch{}}return""}var $o=ww;var Pw=/[\\^$.*+?()[\]{}|]/g,Ow=/^\[object .+?Constructor\]$/,Tw=Function.prototype,Cw=Object.prototype,Aw=Tw.toString,Mw=Cw.hasOwnProperty,Iw=RegExp("^"+Aw.call(Mw).replace(Pw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ew(i){if(!Ct(i)||wm(i))return!1;var t=Oc(i)?Iw:Ow;return t.test($o(i))}var Pm=Ew;function Nw(i,t){return i?.[t]}var Om=Nw;function Dw(i,t){var e=Om(i,t);return Pm(e)?e:void 0}var br=Dw;var _w=br(Ot,"WeakMap"),Cc=_w;var Tm=Object.create,Rw=function(){function i(){}return function(t){if(!Ct(t))return{};if(Tm)return Tm(t);i.prototype=t;var e=new i;return i.prototype=void 0,e}}(),Cm=Rw;function Lw(i,t,e){switch(e.length){case 0:return i.call(t);case 1:return i.call(t,e[0]);case 2:return i.call(t,e[0],e[1]);case 3:return i.call(t,e[0],e[1],e[2])}return i.apply(t,e)}var Am=Lw;function Bw(i,t){var e=-1,r=i.length;for(t||(t=Array(r));++e<r;)t[e]=i[e];return t}var Mm=Bw;var Vw=800,zw=16,Gw=Date.now;function Fw(i){var t=0,e=0;return function(){var r=Gw(),o=zw-(r-e);if(e=r,o>0){if(++t>=Vw)return arguments[0]}else t=0;return i.apply(void 0,arguments)}}var Im=Fw;function jw(i){return function(){return i}}var Em=jw;var Uw=function(){try{var i=br(Object,"defineProperty");return i({},"",{}),i}catch{}}(),Kn=Uw;var kw=Kn?function(i,t){return Kn(i,"toString",{configurable:!0,enumerable:!1,value:Em(t),writable:!0})}:vm,Nm=kw;var Hw=Im(Nm),Dm=Hw;function Ww(i,t){for(var e=-1,r=i==null?0:i.length;++e<r&&t(i[e],e,i)!==!1;);return i}var _m=Ww;var qw=9007199254740991,$w=/^(?:0|[1-9]\d*)$/;function Xw(i,t){var e=typeof i;return t=t??qw,!!t&&(e=="number"||e!="symbol"&&$w.test(i))&&i>-1&&i%1==0&&i<t}var Qn=Xw;function Yw(i,t,e){t=="__proto__"&&Kn?Kn(i,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):i[t]=e}var Ac=Yw;function Kw(i,t){return i===t||i!==i&&t!==t}var Zn=Kw;var Qw=Object.prototype,Zw=Qw.hasOwnProperty;function Jw(i,t,e){var r=i[t];(!(Zw.call(i,t)&&Zn(r,e))||e===void 0&&!(t in i))&&Ac(i,t,e)}var Jn=Jw;function e2(i,t,e,r){var o=!e;e||(e={});for(var n=-1,a=t.length;++n<a;){var s=t[n],l=r?r(e[s],i[s],s,e,i):void 0;l===void 0&&(l=i[s]),o?Ac(e,s,l):Jn(e,s,l)}return e}var So=e2;var Rm=Math.max;function t2(i,t,e){return t=Rm(t===void 0?i.length-1:t,0),function(){for(var r=arguments,o=-1,n=Rm(r.length-t,0),a=Array(n);++o<n;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=e(a),Am(i,this,s)}}var Lm=t2;var r2=9007199254740991;function o2(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=r2}var ea=o2;function i2(i){return i!=null&&ea(i.length)&&!Oc(i)}var Mc=i2;var n2=Object.prototype;function a2(i){var t=i&&i.constructor,e=typeof t=="function"&&t.prototype||n2;return i===e}var ta=a2;function s2(i,t){for(var e=-1,r=Array(i);++e<i;)r[e]=t(e);return r}var Bm=s2;var l2="[object Arguments]";function c2(i){return rr(i)&&Nr(i)==l2}var vp=c2;var Vm=Object.prototype,u2=Vm.hasOwnProperty,d2=Vm.propertyIsEnumerable,p2=vp(function(){return arguments}())?vp:function(i){return rr(i)&&u2.call(i,"callee")&&!d2.call(i,"callee")},ra=p2;function f2(){return!1}var zm=f2;var jm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gm=jm&&typeof module=="object"&&module&&!module.nodeType&&module,h2=Gm&&Gm.exports===jm,Fm=h2?Ot.Buffer:void 0,m2=Fm?Fm.isBuffer:void 0,y2=m2||zm,gn=y2;var g2="[object Arguments]",x2="[object Array]",b2="[object Boolean]",v2="[object Date]",S2="[object Error]",w2="[object Function]",P2="[object Map]",O2="[object Number]",T2="[object Object]",C2="[object RegExp]",A2="[object Set]",M2="[object String]",I2="[object WeakMap]",E2="[object ArrayBuffer]",N2="[object DataView]",D2="[object Float32Array]",_2="[object Float64Array]",R2="[object Int8Array]",L2="[object Int16Array]",B2="[object Int32Array]",V2="[object Uint8Array]",z2="[object Uint8ClampedArray]",G2="[object Uint16Array]",F2="[object Uint32Array]",mt={};mt[D2]=mt[_2]=mt[R2]=mt[L2]=mt[B2]=mt[V2]=mt[z2]=mt[G2]=mt[F2]=!0;mt[g2]=mt[x2]=mt[E2]=mt[b2]=mt[N2]=mt[v2]=mt[S2]=mt[w2]=mt[P2]=mt[O2]=mt[T2]=mt[C2]=mt[A2]=mt[M2]=mt[I2]=!1;function j2(i){return rr(i)&&ea(i.length)&&!!mt[Nr(i)]}var Um=j2;function U2(i){return function(t){return i(t)}}var oa=U2;var km=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ol=km&&typeof module=="object"&&module&&!module.nodeType&&module,k2=ol&&ol.exports===km,Sp=k2&&wc.process,H2=function(){try{var i=ol&&ol.require&&ol.require("util").types;return i||Sp&&Sp.binding&&Sp.binding("util")}catch{}}(),Xo=H2;var Hm=Xo&&Xo.isTypedArray,W2=Hm?oa(Hm):Um,Ic=W2;var q2=Object.prototype,$2=q2.hasOwnProperty;function X2(i,t){var e=Tt(i),r=!e&&ra(i),o=!e&&!r&&gn(i),n=!e&&!r&&!o&&Ic(i),a=e||r||o||n,s=a?Bm(i.length,String):[],l=s.length;for(var c in i)(t||$2.call(i,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Qn(c,l)))&&s.push(c);return s}var Ec=X2;function Y2(i,t){return function(e){return i(t(e))}}var Nc=Y2;var K2=Nc(Object.keys,Object),Wm=K2;var Q2=Object.prototype,Z2=Q2.hasOwnProperty;function J2(i){if(!ta(i))return Wm(i);var t=[];for(var e in Object(i))Z2.call(i,e)&&e!="constructor"&&t.push(e);return t}var qm=J2;function eP(i){return Mc(i)?Ec(i):qm(i)}var ia=eP;function tP(i){var t=[];if(i!=null)for(var e in Object(i))t.push(e);return t}var $m=tP;var rP=Object.prototype,oP=rP.hasOwnProperty;function iP(i){if(!Ct(i))return $m(i);var t=ta(i),e=[];for(var r in i)r=="constructor"&&(t||!oP.call(i,r))||e.push(r);return e}var Xm=iP;function nP(i){return Mc(i)?Ec(i,!0):Xm(i)}var na=nP;var aP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sP=/^\w*$/;function lP(i,t){if(Tt(i))return!1;var e=typeof i;return e=="number"||e=="symbol"||e=="boolean"||i==null||Si(i)?!0:sP.test(i)||!aP.test(i)||t!=null&&i in Object(t)}var Ym=lP;var cP=br(Object,"create"),Yo=cP;function uP(){this.__data__=Yo?Yo(null):{},this.size=0}var Km=uP;function dP(i){var t=this.has(i)&&delete this.__data__[i];return this.size-=t?1:0,t}var Qm=dP;var pP="__lodash_hash_undefined__",fP=Object.prototype,hP=fP.hasOwnProperty;function mP(i){var t=this.__data__;if(Yo){var e=t[i];return e===pP?void 0:e}return hP.call(t,i)?t[i]:void 0}var Zm=mP;var yP=Object.prototype,gP=yP.hasOwnProperty;function xP(i){var t=this.__data__;return Yo?t[i]!==void 0:gP.call(t,i)}var Jm=xP;var bP="__lodash_hash_undefined__";function vP(i,t){var e=this.__data__;return this.size+=this.has(i)?0:1,e[i]=Yo&&t===void 0?bP:t,this}var ey=vP;function aa(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var r=i[t];this.set(r[0],r[1])}}aa.prototype.clear=Km;aa.prototype.delete=Qm;aa.prototype.get=Zm;aa.prototype.has=Jm;aa.prototype.set=ey;var wp=aa;function SP(){this.__data__=[],this.size=0}var ty=SP;function wP(i,t){for(var e=i.length;e--;)if(Zn(i[e][0],t))return e;return-1}var wi=wP;var PP=Array.prototype,OP=PP.splice;function TP(i){var t=this.__data__,e=wi(t,i);if(e<0)return!1;var r=t.length-1;return e==r?t.pop():OP.call(t,e,1),--this.size,!0}var ry=TP;function CP(i){var t=this.__data__,e=wi(t,i);return e<0?void 0:t[e][1]}var oy=CP;function AP(i){return wi(this.__data__,i)>-1}var iy=AP;function MP(i,t){var e=this.__data__,r=wi(e,i);return r<0?(++this.size,e.push([i,t])):e[r][1]=t,this}var ny=MP;function sa(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var r=i[t];this.set(r[0],r[1])}}sa.prototype.clear=ty;sa.prototype.delete=ry;sa.prototype.get=oy;sa.prototype.has=iy;sa.prototype.set=ny;var Pi=sa;var IP=br(Ot,"Map"),Oi=IP;function EP(){this.size=0,this.__data__={hash:new wp,map:new(Oi||Pi),string:new wp}}var ay=EP;function NP(i){var t=typeof i;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?i!=="__proto__":i===null}var sy=NP;function DP(i,t){var e=i.__data__;return sy(t)?e[typeof t=="string"?"string":"hash"]:e.map}var Ti=DP;function _P(i){var t=Ti(this,i).delete(i);return this.size-=t?1:0,t}var ly=_P;function RP(i){return Ti(this,i).get(i)}var cy=RP;function LP(i){return Ti(this,i).has(i)}var uy=LP;function BP(i,t){var e=Ti(this,i),r=e.size;return e.set(i,t),this.size+=e.size==r?0:1,this}var dy=BP;function la(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var r=i[t];this.set(r[0],r[1])}}la.prototype.clear=ay;la.prototype.delete=ly;la.prototype.get=cy;la.prototype.has=uy;la.prototype.set=dy;var xn=la;var VP="Expected a function";function Pp(i,t){if(typeof i!="function"||t!=null&&typeof t!="function")throw new TypeError(VP);var e=function(){var r=arguments,o=t?t.apply(this,r):r[0],n=e.cache;if(n.has(o))return n.get(o);var a=i.apply(this,r);return e.cache=n.set(o,a)||n,a};return e.cache=new(Pp.Cache||xn),e}Pp.Cache=xn;var py=Pp;var zP=500;function GP(i){var t=py(i,function(r){return e.size===zP&&e.clear(),r}),e=t.cache;return t}var fy=GP;var FP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jP=/\\(\\)?/g,UP=fy(function(i){var t=[];return i.charCodeAt(0)===46&&t.push(""),i.replace(FP,function(e,r,o,n){t.push(o?n.replace(jP,"$1"):r||e)}),t}),hy=UP;function kP(i){return i==null?"":ym(i)}var my=kP;function HP(i,t){return Tt(i)?i:Ym(i,t)?[i]:hy(my(i))}var Gr=HP;var WP=1/0;function qP(i){if(typeof i=="string"||Si(i))return i;var t=i+"";return t=="0"&&1/i==-WP?"-0":t}var Ci=qP;function $P(i,t){t=Gr(t,i);for(var e=0,r=t.length;i!=null&&e<r;)i=i[Ci(t[e++])];return e&&e==r?i:void 0}var Dc=$P;function XP(i,t){for(var e=-1,r=t.length,o=i.length;++e<r;)i[o+e]=t[e];return i}var ca=XP;var yy=Yt?Yt.isConcatSpreadable:void 0;function YP(i){return Tt(i)||ra(i)||!!(yy&&i&&i[yy])}var gy=YP;function xy(i,t,e,r,o){var n=-1,a=i.length;for(e||(e=gy),o||(o=[]);++n<a;){var s=i[n];t>0&&e(s)?t>1?xy(s,t-1,e,r,o):ca(o,s):r||(o[o.length]=s)}return o}var by=xy;function KP(i){var t=i==null?0:i.length;return t?by(i,1):[]}var vy=KP;function QP(i){return Dm(Lm(i,void 0,vy),i+"")}var _c=QP;var ZP=Nc(Object.getPrototypeOf,Object),ua=ZP;var JP="[object Object]",eO=Function.prototype,tO=Object.prototype,Sy=eO.toString,rO=tO.hasOwnProperty,oO=Sy.call(Object);function iO(i){if(!rr(i)||Nr(i)!=JP)return!1;var t=ua(i);if(t===null)return!0;var e=rO.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Sy.call(e)==oO}var wy=iO;function nO(i,t,e){var r=-1,o=i.length;t<0&&(t=-t>o?0:o+t),e=e>o?o:e,e<0&&(e+=o),o=t>e?0:e-t>>>0,t>>>=0;for(var n=Array(o);++r<o;)n[r]=i[r+t];return n}var Py=nO;function aO(){this.__data__=new Pi,this.size=0}var Oy=aO;function sO(i){var t=this.__data__,e=t.delete(i);return this.size=t.size,e}var Ty=sO;function lO(i){return this.__data__.get(i)}var Cy=lO;function cO(i){return this.__data__.has(i)}var Ay=cO;var uO=200;function dO(i,t){var e=this.__data__;if(e instanceof Pi){var r=e.__data__;if(!Oi||r.length<uO-1)return r.push([i,t]),this.size=++e.size,this;e=this.__data__=new xn(r)}return e.set(i,t),this.size=e.size,this}var My=dO;function da(i){var t=this.__data__=new Pi(i);this.size=t.size}da.prototype.clear=Oy;da.prototype.delete=Ty;da.prototype.get=Cy;da.prototype.has=Ay;da.prototype.set=My;var pa=da;function pO(i,t){return i&&So(t,ia(t),i)}var Iy=pO;function fO(i,t){return i&&So(t,na(t),i)}var Ey=fO;var Ry=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ny=Ry&&typeof module=="object"&&module&&!module.nodeType&&module,hO=Ny&&Ny.exports===Ry,Dy=hO?Ot.Buffer:void 0,_y=Dy?Dy.allocUnsafe:void 0;function mO(i,t){if(t)return i.slice();var e=i.length,r=_y?_y(e):new i.constructor(e);return i.copy(r),r}var Ly=mO;function yO(i,t){for(var e=-1,r=i==null?0:i.length,o=0,n=[];++e<r;){var a=i[e];t(a,e,i)&&(n[o++]=a)}return n}var By=yO;function gO(){return[]}var Rc=gO;var xO=Object.prototype,bO=xO.propertyIsEnumerable,Vy=Object.getOwnPropertySymbols,vO=Vy?function(i){return i==null?[]:(i=Object(i),By(Vy(i),function(t){return bO.call(i,t)}))}:Rc,fa=vO;function SO(i,t){return So(i,fa(i),t)}var zy=SO;var wO=Object.getOwnPropertySymbols,PO=wO?function(i){for(var t=[];i;)ca(t,fa(i)),i=ua(i);return t}:Rc,Lc=PO;function OO(i,t){return So(i,Lc(i),t)}var Gy=OO;function TO(i,t,e){var r=t(i);return Tt(i)?r:ca(r,e(i))}var Bc=TO;function CO(i){return Bc(i,ia,fa)}var il=CO;function AO(i){return Bc(i,na,Lc)}var Vc=AO;var MO=br(Ot,"DataView"),zc=MO;var IO=br(Ot,"Promise"),Gc=IO;var EO=br(Ot,"Set"),Fc=EO;var Fy="[object Map]",NO="[object Object]",jy="[object Promise]",Uy="[object Set]",ky="[object WeakMap]",Hy="[object DataView]",DO=$o(zc),_O=$o(Oi),RO=$o(Gc),LO=$o(Fc),BO=$o(Cc),bn=Nr;(zc&&bn(new zc(new ArrayBuffer(1)))!=Hy||Oi&&bn(new Oi)!=Fy||Gc&&bn(Gc.resolve())!=jy||Fc&&bn(new Fc)!=Uy||Cc&&bn(new Cc)!=ky)&&(bn=function(i){var t=Nr(i),e=t==NO?i.constructor:void 0,r=e?$o(e):"";if(r)switch(r){case DO:return Hy;case _O:return Fy;case RO:return jy;case LO:return Uy;case BO:return ky}return t});var Ko=bn;var VO=Object.prototype,zO=VO.hasOwnProperty;function GO(i){var t=i.length,e=new i.constructor(t);return t&&typeof i[0]=="string"&&zO.call(i,"index")&&(e.index=i.index,e.input=i.input),e}var Wy=GO;var FO=Ot.Uint8Array,ha=FO;function jO(i){var t=new i.constructor(i.byteLength);return new ha(t).set(new ha(i)),t}var ma=jO;function UO(i,t){var e=t?ma(i.buffer):i.buffer;return new i.constructor(e,i.byteOffset,i.byteLength)}var qy=UO;var kO=/\w*$/;function HO(i){var t=new i.constructor(i.source,kO.exec(i));return t.lastIndex=i.lastIndex,t}var $y=HO;var Xy=Yt?Yt.prototype:void 0,Yy=Xy?Xy.valueOf:void 0;function WO(i){return Yy?Object(Yy.call(i)):{}}var Ky=WO;function qO(i,t){var e=t?ma(i.buffer):i.buffer;return new i.constructor(e,i.byteOffset,i.length)}var Qy=qO;var $O="[object Boolean]",XO="[object Date]",YO="[object Map]",KO="[object Number]",QO="[object RegExp]",ZO="[object Set]",JO="[object String]",eT="[object Symbol]",tT="[object ArrayBuffer]",rT="[object DataView]",oT="[object Float32Array]",iT="[object Float64Array]",nT="[object Int8Array]",aT="[object Int16Array]",sT="[object Int32Array]",lT="[object Uint8Array]",cT="[object Uint8ClampedArray]",uT="[object Uint16Array]",dT="[object Uint32Array]";function pT(i,t,e){var r=i.constructor;switch(t){case tT:return ma(i);case $O:case XO:return new r(+i);case rT:return qy(i,e);case oT:case iT:case nT:case aT:case sT:case lT:case cT:case uT:case dT:return Qy(i,e);case YO:return new r;case KO:case JO:return new r(i);case QO:return $y(i);case ZO:return new r;case eT:return Ky(i)}}var Zy=pT;function fT(i){return typeof i.constructor=="function"&&!ta(i)?Cm(ua(i)):{}}var Jy=fT;var hT="[object Map]";function mT(i){return rr(i)&&Ko(i)==hT}var eg=mT;var tg=Xo&&Xo.isMap,yT=tg?oa(tg):eg,rg=yT;var gT="[object Set]";function xT(i){return rr(i)&&Ko(i)==gT}var og=xT;var ig=Xo&&Xo.isSet,bT=ig?oa(ig):og,ng=bT;var vT=1,ST=2,wT=4,ag="[object Arguments]",PT="[object Array]",OT="[object Boolean]",TT="[object Date]",CT="[object Error]",sg="[object Function]",AT="[object GeneratorFunction]",MT="[object Map]",IT="[object Number]",lg="[object Object]",ET="[object RegExp]",NT="[object Set]",DT="[object String]",_T="[object Symbol]",RT="[object WeakMap]",LT="[object ArrayBuffer]",BT="[object DataView]",VT="[object Float32Array]",zT="[object Float64Array]",GT="[object Int8Array]",FT="[object Int16Array]",jT="[object Int32Array]",UT="[object Uint8Array]",kT="[object Uint8ClampedArray]",HT="[object Uint16Array]",WT="[object Uint32Array]",dt={};dt[ag]=dt[PT]=dt[LT]=dt[BT]=dt[OT]=dt[TT]=dt[VT]=dt[zT]=dt[GT]=dt[FT]=dt[jT]=dt[MT]=dt[IT]=dt[lg]=dt[ET]=dt[NT]=dt[DT]=dt[_T]=dt[UT]=dt[kT]=dt[HT]=dt[WT]=!0;dt[CT]=dt[sg]=dt[RT]=!1;function jc(i,t,e,r,o,n){var a,s=t&vT,l=t&ST,c=t&wT;if(e&&(a=o?e(i,r,o,n):e(i)),a!==void 0)return a;if(!Ct(i))return i;var u=Tt(i);if(u){if(a=Wy(i),!s)return Mm(i,a)}else{var p=Ko(i),d=p==sg||p==AT;if(gn(i))return Ly(i,s);if(p==lg||p==ag||d&&!o){if(a=l||d?{}:Jy(i),!s)return l?Gy(i,Ey(a,i)):zy(i,Iy(a,i))}else{if(!dt[p])return o?i:{};a=Zy(i,p,s)}}n||(n=new pa);var f=n.get(i);if(f)return f;n.set(i,a),ng(i)?i.forEach(function(y){a.add(jc(y,t,e,y,i,n))}):rg(i)&&i.forEach(function(y,b){a.set(b,jc(y,t,e,b,i,n))});var h=c?l?Vc:il:l?na:ia,m=u?void 0:h(i);return _m(m||i,function(y,b){m&&(b=y,y=i[b]),Jn(a,b,jc(y,t,e,b,i,n))}),a}var Uc=jc;var qT=1,$T=4;function XT(i){return Uc(i,qT|$T)}var Qo=XT;var YT="__lodash_hash_undefined__";function KT(i){return this.__data__.set(i,YT),this}var cg=KT;function QT(i){return this.__data__.has(i)}var ug=QT;function kc(i){var t=-1,e=i==null?0:i.length;for(this.__data__=new xn;++t<e;)this.add(i[t])}kc.prototype.add=kc.prototype.push=cg;kc.prototype.has=ug;var dg=kc;function ZT(i,t){for(var e=-1,r=i==null?0:i.length;++e<r;)if(t(i[e],e,i))return!0;return!1}var pg=ZT;function JT(i,t){return i.has(t)}var fg=JT;var eC=1,tC=2;function rC(i,t,e,r,o,n){var a=e&eC,s=i.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=n.get(i),u=n.get(t);if(c&&u)return c==t&&u==i;var p=-1,d=!0,f=e&tC?new dg:void 0;for(n.set(i,t),n.set(t,i);++p<s;){var h=i[p],m=t[p];if(r)var y=a?r(m,h,p,t,i,n):r(h,m,p,i,t,n);if(y!==void 0){if(y)continue;d=!1;break}if(f){if(!pg(t,function(b,v){if(!fg(f,v)&&(h===b||o(h,b,e,r,n)))return f.push(v)})){d=!1;break}}else if(!(h===m||o(h,m,e,r,n))){d=!1;break}}return n.delete(i),n.delete(t),d}var Hc=rC;function oC(i){var t=-1,e=Array(i.size);return i.forEach(function(r,o){e[++t]=[o,r]}),e}var hg=oC;function iC(i){var t=-1,e=Array(i.size);return i.forEach(function(r){e[++t]=r}),e}var mg=iC;var nC=1,aC=2,sC="[object Boolean]",lC="[object Date]",cC="[object Error]",uC="[object Map]",dC="[object Number]",pC="[object RegExp]",fC="[object Set]",hC="[object String]",mC="[object Symbol]",yC="[object ArrayBuffer]",gC="[object DataView]",yg=Yt?Yt.prototype:void 0,Op=yg?yg.valueOf:void 0;function xC(i,t,e,r,o,n,a){switch(e){case gC:if(i.byteLength!=t.byteLength||i.byteOffset!=t.byteOffset)return!1;i=i.buffer,t=t.buffer;case yC:return!(i.byteLength!=t.byteLength||!n(new ha(i),new ha(t)));case sC:case lC:case dC:return Zn(+i,+t);case cC:return i.name==t.name&&i.message==t.message;case pC:case hC:return i==t+"";case uC:var s=hg;case fC:var l=r&nC;if(s||(s=mg),i.size!=t.size&&!l)return!1;var c=a.get(i);if(c)return c==t;r|=aC,a.set(i,t);var u=Hc(s(i),s(t),r,o,n,a);return a.delete(i),u;case mC:if(Op)return Op.call(i)==Op.call(t)}return!1}var gg=xC;var bC=1,vC=Object.prototype,SC=vC.hasOwnProperty;function wC(i,t,e,r,o,n){var a=e&bC,s=il(i),l=s.length,c=il(t),u=c.length;if(l!=u&&!a)return!1;for(var p=l;p--;){var d=s[p];if(!(a?d in t:SC.call(t,d)))return!1}var f=n.get(i),h=n.get(t);if(f&&h)return f==t&&h==i;var m=!0;n.set(i,t),n.set(t,i);for(var y=a;++p<l;){d=s[p];var b=i[d],v=t[d];if(r)var w=a?r(v,b,d,t,i,n):r(b,v,d,i,t,n);if(!(w===void 0?b===v||o(b,v,e,r,n):w)){m=!1;break}y||(y=d=="constructor")}if(m&&!y){var O=i.constructor,S=t.constructor;O!=S&&"constructor"in i&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof S=="function"&&S instanceof S)&&(m=!1)}return n.delete(i),n.delete(t),m}var xg=wC;var PC=1,bg="[object Arguments]",vg="[object Array]",Wc="[object Object]",OC=Object.prototype,Sg=OC.hasOwnProperty;function TC(i,t,e,r,o,n){var a=Tt(i),s=Tt(t),l=a?vg:Ko(i),c=s?vg:Ko(t);l=l==bg?Wc:l,c=c==bg?Wc:c;var u=l==Wc,p=c==Wc,d=l==c;if(d&&gn(i)){if(!gn(t))return!1;a=!0,u=!1}if(d&&!u)return n||(n=new pa),a||Ic(i)?Hc(i,t,e,r,o,n):gg(i,t,l,e,r,o,n);if(!(e&PC)){var f=u&&Sg.call(i,"__wrapped__"),h=p&&Sg.call(t,"__wrapped__");if(f||h){var m=f?i.value():i,y=h?t.value():t;return n||(n=new pa),o(m,y,e,r,n)}}return d?(n||(n=new pa),xg(i,t,e,r,o,n)):!1}var wg=TC;function Pg(i,t,e,r,o){return i===t?!0:i==null||t==null||!rr(i)&&!rr(t)?i!==i&&t!==t:wg(i,t,e,r,Pg,o)}var Og=Pg;function CC(i,t){return i!=null&&t in Object(i)}var Tg=CC;function AC(i,t,e){t=Gr(t,i);for(var r=-1,o=t.length,n=!1;++r<o;){var a=Ci(t[r]);if(!(n=i!=null&&e(i,a)))break;i=i[a]}return n||++r!=o?n:(o=i==null?0:i.length,!!o&&ea(o)&&Qn(a,o)&&(Tt(i)||ra(i)))}var Cg=AC;function MC(i,t){return i!=null&&Cg(i,t,Tg)}var Ag=MC;var IC=function(){return Ot.Date.now()},qc=IC;var EC="Expected a function",NC=Math.max,DC=Math.min;function _C(i,t,e){var r,o,n,a,s,l,c=0,u=!1,p=!1,d=!0;if(typeof i!="function")throw new TypeError(EC);t=bp(t)||0,Ct(e)&&(u=!!e.leading,p="maxWait"in e,n=p?NC(bp(e.maxWait)||0,t):n,d="trailing"in e?!!e.trailing:d);function f(T){var M=r,g=o;return r=o=void 0,c=T,a=i.apply(g,M),a}function h(T){return c=T,s=setTimeout(b,t),u?f(T):a}function m(T){var M=T-l,g=T-c,D=t-M;return p?DC(D,n-g):D}function y(T){var M=T-l,g=T-c;return l===void 0||M>=t||M<0||p&&g>=n}function b(){var T=qc();if(y(T))return v(T);s=setTimeout(b,m(T))}function v(T){return s=void 0,d&&r?f(T):(r=o=void 0,a)}function w(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function O(){return s===void 0?a:v(qc())}function S(){var T=qc(),M=y(T);if(r=arguments,o=this,l=T,M){if(s===void 0)return h(l);if(p)return clearTimeout(s),s=setTimeout(b,t),f(l)}return s===void 0&&(s=setTimeout(b,t)),a}return S.cancel=w,S.flush=O,S}var $c=_C;function RC(i){var t=i==null?0:i.length;return t?i[t-1]:void 0}var Mg=RC;function LC(i,t){return t.length<2?i:Dc(i,Py(t,0,-1))}var Ig=LC;function BC(i,t){return Og(i,t)}var Tp=BC;function VC(i,t){return t=Gr(t,i),i=Ig(i,t),i==null||delete i[Ci(Mg(t))]}var Eg=VC;function zC(i){return wy(i)?void 0:i}var Ng=zC;var GC=1,FC=2,jC=4,UC=_c(function(i,t){var e={};if(i==null)return e;var r=!1;t=Pc(t,function(n){return n=Gr(n,i),r||(r=n.length>1),n}),So(i,Vc(i),e),r&&(e=Uc(e,GC|FC|jC,Ng));for(var o=t.length;o--;)Eg(e,t[o]);return e}),ya=UC;function kC(i,t,e,r){if(!Ct(i))return i;t=Gr(t,i);for(var o=-1,n=t.length,a=n-1,s=i;s!=null&&++o<n;){var l=Ci(t[o]),c=e;if(l==="__proto__"||l==="constructor"||l==="prototype")return i;if(o!=a){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=Ct(u)?u:Qn(t[o+1])?[]:{})}Jn(s,l,c),s=s[l]}return i}var Dg=kC;function HC(i,t,e){for(var r=-1,o=t.length,n={};++r<o;){var a=t[r],s=Dc(i,a);e(s,a)&&Dg(n,Gr(a,i),s)}return n}var _g=HC;function WC(i,t){return _g(i,t,function(e,r){return Ag(i,r)})}var Rg=WC;var qC=_c(function(i,t){return i==null?{}:Rg(i,t)}),ro=qC;var de=class{modifyById(t,e){let r=this;if(r[t]===void 0)throw new Error("not expected");{let n={...r,[t]:e};return Object.setPrototypeOf(n,de.prototype),n}}add(t,e){return this.runOp({type:1,id:t,data:e})?.data??this}runOp(t){let e=this;if(t.type===1){let r=e[t.id],o;r===void 0?o={type:2,id:t.id}:o={type:1,id:t.id,data:r};let{id:n,data:a}=t,s={...e,[n]:a};return Object.setPrototypeOf(s,de.prototype),{data:s,actual:t,reverse:o}}else if(t.type===2){let{id:r}=t,o=e[r];if(o===void 0)return null;{let n={...e};return Object.setPrototypeOf(n,de.prototype),delete n[r],{data:n,actual:t,reverse:{type:1,id:r,data:o}}}}return null}};function nl(i){if(i.deepFreeze!==void 0){i.deepFreeze(i);return}let t=Object.getOwnPropertyNames(i);for(let e of t){let r=i[e];r&&typeof r=="object"&&nl(r)}return Object.freeze(i)}function Lg(i,t){let e=0;for(;e<i.length&&e<t.length;){if(i[e]<t[e])return-1;if(i[e]>t[e])return 1;e+=1}return e!==t.length?-1:e!==i.length?1:0}var ga=class extends Error{};function Xc(i){let t={...i};return Object.setPrototypeOf(t,Object.getPrototypeOf(i)),t}function wo(i,t,e){if(i===void 0?t===void 0?(i=0,t=10):i=t-10:t===void 0&&(t=i+10),i>t){let n=i;i=t,t=n}let r=[],o=1/(e+1);for(let n=0;n<e;n++){let a=i+(t-i)*(n+.75+Math.random()*.5)*o;r.push(a)}return r}function xa(i){return i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Uint32Array||i instanceof Int8Array||i instanceof Int16Array||i instanceof Int32Array||i instanceof Float32Array||i instanceof Float64Array}function Bg(){return typeof process<"u"}function Vg(i,t){for(let e of i)t(e.id,e.data)!==!0&&Vg(e.children,t)}function zg(i,t){if(t(i.id,i.data)!==!0)for(let e of i.children)zg(e,t)}var ct=class extends Array{constructor(...e){super(...e);Object.setPrototypeOf(this,ct.prototype)}deepFreeze(){let e=0;for(;e<this.length;)nl(this[e]),e++}fillCaches0(e,r){this.objCaches.set(e.id,e),this.parentCaches.set(e.id,r);for(let o of e.children)this.fillCaches0(o,e.id)}fillCaches(){if(this.objCaches===void 0){this.objCaches=new Map,this.parentCaches=new Map;for(let e of this)this.fillCaches0(e,null)}}randomId(){this.fillCaches();let e=Array.from(this.objCaches.keys());if(e.length!==0)return e[Math.max(0,Math.floor(Math.random()*e.length)-1)]}nonExistOrDescendantOf(e,r){if(!this.has(e))return!0;for(;e;){let o=this.parent(e);if(o===r)return!0;e=o}return!1}rootAcestor(e){for(;e;){let r=this.parent(e);if(r)e=r;else return e}return e}isDescendantOf(e,r){for(;e;){let o=this.parent(e);if(o===r)return!0;e=o}return!1}data(e){return this.get(e)?.data}has(e){return this.childrenOf(e)!==void 0}get(e){return this.fillCaches(),this.objCaches.get(e)}childrenOf(e){return e===null?this:this.get(e)?.children}traverseFrom(e,r){if(e===null)this.traverse(r);else{let o=this.get(e);o&&zg(o,r)}}traverse(e){Vg(this,e)}totalSize(){return this.fillCaches(),this.objCaches.size}parent(e){return this.fillCaches(),this.parentCaches.get(e)}childrenArray(e){return e===null?this:this.get(e).children}modifyById(e,r){if(this.get(e)===void 0)throw new Error("not expected");{let n=this.parent(e),a=this.childrenArray(n),s=a.findIndex(u=>u.id===e);if(s<0)throw new Error("not expected");let l=a[s];return a=[...a],a[s]={...l,data:r},this.modifyArrayBy(n,a)}}modifyArrayBy(e,r){let o=e,n=r;for(;o!==null;){let s=n,l=o;if(o=this.parent(o),o===void 0)throw new Error;n=this.childrenArray(o);let c=n.findIndex(u=>u.id===l);if(c<0)throw new Error;n=[...n],n[c]={...n[c],children:s}}Object.setPrototypeOf(n,ct.prototype);let a=n;return a.fillCaches(),a}runOp(e){switch(e.type){case 7:return this.addOp(e);case 8:return this.deleteOp(e);case 9:return this.moveOp(e)}return null}checkDuplicatedIdRec({id:e,children:r}){if(this.get(e)!==void 0)return!0;for(let o of r)if(this.checkDuplicatedIdRec(o))return!0;return!1}addOp(e){let{parent:r,fi:o,id:n,data:a,children:s}=e;if(r!==null&&this.get(r)===void 0)return null;if(this.checkDuplicatedIdRec(e))return null;{let l=r,c=this.childrenArray(l),u={fi:o,id:n,data:a,children:s};return c=[...c,u],c.sort((d,f)=>d.fi-f.fi),e.localIndex=c.indexOf(u),{data:this.modifyArrayBy(l,c),actual:e,reverse:{type:8,id:n}}}}deleteOp(e){let{id:r}=e;if(this.get(r)===null)return null;{let o=this.parent(r);if(o===void 0)return null;let n=this.childrenArray(o),a=n.findIndex(c=>c.id===r);e.localIndex=a,n=[...n];let s=n.splice(a,1)[0];return{data:this.modifyArrayBy(o,n),actual:e,reverse:{type:7,...s,parent:o}}}}moveOp(e){let{parent:r,fi:o,id:n}=e;if(r!==null&&this.get(r)===void 0)return this.deleteOp({type:8,id:n});if(r!==null){let f=r;for(;f!==null;){if(f===void 0)throw new Error;if(f===n)throw new ga("cyclic tree");f=this.parent(f)}}let a=this.parent(n);if(a===void 0)return null;let s=a,l=this.childrenArray(a),c=l.findIndex(f=>f.id===n);l=[...l];let u=l.splice(c,1)[0],p=this.modifyArrayBy(a,l);a=r,l=p.childrenArray(a);let d=u.fi;return u={...u,fi:o},l=[...l,u],l.sort((f,h)=>f.fi-h.fi),e.localIndex=l.indexOf(u),p=p.modifyArrayBy(a,l),{data:p,actual:e,reverse:{type:9,parent:s,fi:d,id:n}}}previous(e,r){if(r===null){let n=this.childrenArray(e);return n.length===0?null:n[n.length-1].id}let o=null;for(let n of this.childrenArray(e)){if(n.id===r)return o;o=n.id}return null}traverseSortNext(e){let r=this.parent(e);if(r!==void 0){let o=this.childrenArray(r),n=o.findIndex(a=>a.id===e)+1;if(n<o.length)return o[n].id;if(r)return this.traverseSortNext(r)}}sortNext(e){let r=this.childrenArray(e);return r.length>0?r[0].id:this.traverseSortNext(e)}traverseSortPrevious(e){let r=this.childrenArray(e);return r.length>0?this.traverseSortPrevious(r[r.length-1].id):e}sortPrevious(e){let r=this.parent(e);if(r!==void 0){let o=this.childrenArray(r),n=o.findIndex(a=>a.id===e)-1;return n>=0?this.traverseSortPrevious(o[n].id):r}}getAllSorted(e){let r=[];for(let o of e){let n=this.getWithSortKey(o.id);n!==void 0&&r.push({...o,...n})}r.sort((o,n)=>Lg(o.sortKey,n.sortKey));for(let o of r)delete o.sortKey;return r}getWithSortKey(e){var r=e;let o=[],n=this.get(r),a=n;if(n!==void 0){for(;r;)o.splice(0,0,n.fi),r=this.parent(r),r!==null&&(n=this.get(r));return{...a,sortKey:o}}}insertBeforeHelper(e,r,o){return this.insertAfterHelper(e,this.previous(e,r),o)}insertAfterHelper(e,r,o){let n=th