@mapcomponents/three 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1,441 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DbqgNSpy.js");exports.MlThreeGizmo=e.MlThreeGizmo;exports.MlThreeModelLayer=e.MlThreeModelLayer;exports.MlThreeObjectControls=e.MlThreeObjectControls;exports.MlThreeSplatLayer=e.MlThreeSplatLayer;exports.ThreeContext=e.ThreeContext;exports.ThreeProvider=e.ThreeProvider;exports.useThree=e.useThree;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Rr=require("maplibre-gl"),u=require("three"),W=require("react"),V=require("react/jsx-runtime"),ta=require("@mapcomponents/react-maplibre");function Zs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Ar=Zs(u),N=Zs(W),na=Math.PI/180,ra=180/Math.PI;class Ot{static updateWorldMatrix(e,n=null){if(!e)return new u.Matrix4;const r=n??e.getCenter(),o=Rr.MercatorCoordinate.fromLngLat(r),s=o.meterInMercatorCoordinateUnits();return new u.Matrix4().compose(new u.Vector3(o.x,o.y,o.z),new u.Quaternion,new u.Vector3(s,-s,s))}static toScenePositionMercator(e,n){return new u.Vector3(n.x,n.y,n.z).applyMatrix4(e)}static toMapPositionMercator(e,n){const r=n.clone().applyMatrix4(e);return new Rr.MercatorCoordinate(r.x,r.y,r.z)}static toScenePosition(e,n,r){return this.toScenePositionMercator(e,Rr.MercatorCoordinate.fromLngLat(n,r))}static toMapPosition(e,n){const r=this.toMapPositionMercator(e,n),o=r.toLngLat();return[o.lng,o.lat,r.toAltitude()]}static degToRad(e){return e*na}static radToDeg(e){return e*ra}}class oa extends u.DataTextureLoader{constructor(e){super(e),this.type=u.HalfFloatType}parse(e){const i=function(A,D){switch(A){case 1:throw new Error("THREE.HDRLoader: Read Error: "+(D||""));case 2:throw new Error("THREE.HDRLoader: Write Error: "+(D||""));case 3:throw new Error("THREE.HDRLoader: Bad File Format: "+(D||""));default:case 4:throw new Error("THREE.HDRLoader: Memory Error: "+(D||""))}},d=function(A,D,$){D=D||1024;let y=A.pos,P=-1,C=0,L="",O=String.fromCharCode.apply(null,new Uint16Array(A.subarray(y,y+128)));for(;0>(P=O.indexOf(`
2
+ `))&&C<D&&y<A.byteLength;)L+=O,C+=O.length,y+=128,O+=String.fromCharCode.apply(null,new Uint16Array(A.subarray(y,y+128)));return-1<P?(A.pos+=C+P+1,L+O.slice(0,P)):!1},p=function(A){const D=/^#\?(\S+)/,$=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,z=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,y=/^\s*FORMAT=(\S+)\s*$/,P=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,C={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let L,O;for((A.pos>=A.byteLength||!(L=d(A)))&&i(1,"no header found"),(O=L.match(D))||i(3,"bad initial token"),C.valid|=1,C.programtype=O[1],C.string+=L+`
3
+ `;L=d(A),L!==!1;){if(C.string+=L+`
4
+ `,L.charAt(0)==="#"){C.comments+=L+`
5
+ `;continue}if((O=L.match($))&&(C.gamma=parseFloat(O[1])),(O=L.match(z))&&(C.exposure=parseFloat(O[1])),(O=L.match(y))&&(C.valid|=2,C.format=O[1]),(O=L.match(P))&&(C.valid|=4,C.height=parseInt(O[1],10),C.width=parseInt(O[2],10)),C.valid&2&&C.valid&4)break}return C.valid&2||i(3,"missing format specifier"),C.valid&4||i(3,"missing image size specifier"),C},b=function(A,D,$){const z=D;if(z<8||z>32767||A[0]!==2||A[1]!==2||A[2]&128)return new Uint8Array(A);z!==(A[2]<<8|A[3])&&i(3,"wrong scanline width");const y=new Uint8Array(4*D*$);y.length||i(4,"unable to allocate buffer space");let P=0,C=0;const L=4*z,O=new Uint8Array(4),F=new Uint8Array(L);let G=$;for(;G>0&&C<A.byteLength;){C+4>A.byteLength&&i(1),O[0]=A[C++],O[1]=A[C++],O[2]=A[C++],O[3]=A[C++],(O[0]!=2||O[1]!=2||(O[2]<<8|O[3])!=z)&&i(3,"bad rgbe scanline format");let Y=0,I;for(;Y<L&&C<A.byteLength;){I=A[C++];const U=I>128;if(U&&(I-=128),(I===0||Y+I>L)&&i(3,"bad scanline data"),U){const X=A[C++];for(let K=0;K<I;K++)F[Y++]=X}else F.set(A.subarray(C,C+I),Y),Y+=I,C+=I}const k=z;for(let U=0;U<k;U++){let X=0;y[P]=F[U+X],X+=z,y[P+1]=F[U+X],X+=z,y[P+2]=F[U+X],X+=z,y[P+3]=F[U+X],P+=4}G--}return y},m=function(A,D,$,z){const y=A[D+3],P=Math.pow(2,y-128)/255;$[z+0]=A[D+0]*P,$[z+1]=A[D+1]*P,$[z+2]=A[D+2]*P,$[z+3]=1},h=function(A,D,$,z){const y=A[D+3],P=Math.pow(2,y-128)/255;$[z+0]=u.DataUtils.toHalfFloat(Math.min(A[D+0]*P,65504)),$[z+1]=u.DataUtils.toHalfFloat(Math.min(A[D+1]*P,65504)),$[z+2]=u.DataUtils.toHalfFloat(Math.min(A[D+2]*P,65504)),$[z+3]=u.DataUtils.toHalfFloat(1)},x=new Uint8Array(e);x.pos=0;const v=p(x),E=v.width,_=v.height,T=b(x.subarray(x.pos),E,_);let S,w,M;switch(this.type){case u.FloatType:M=T.length/4;const A=new Float32Array(M*4);for(let $=0;$<M;$++)m(T,$*4,A,$*4);S=A,w=u.FloatType;break;case u.HalfFloatType:M=T.length/4;const D=new Uint16Array(M*4);for(let $=0;$<M;$++)h(T,$*4,D,$*4);S=D,w=u.HalfFloatType;break;default:throw new Error("THREE.HDRLoader: Unsupported type: "+this.type)}return{width:E,height:_,data:S,header:v.string,gamma:v.gamma,exposure:v.exposure,type:w}}setDataType(e){return this.type=e,this}load(e,n,r,o){function s(i,a){switch(i.type){case u.FloatType:case u.HalfFloatType:i.colorSpace=u.LinearSRGBColorSpace,i.minFilter=u.LinearFilter,i.magFilter=u.LinearFilter,i.generateMipmaps=!1,i.flipY=!0;break}n&&n(i,a)}return super.load(e,s,r,o)}}class sa{createScene(e=!0){const n=new u.Scene;if(e){const r=new u.DirectionalLight(16777215,4);r.position.set(1,2,3),n.add(r);const o=new u.AmbientLight(16777215,.2);n.add(o)}return n}createGroup(e,n){const r=new u.Group;return r.name=n,e.add(r),r}createCamera(e,n){const r=new u.PerspectiveCamera;r.name=n;const o=new u.Group;return o.name=`${n}-parent`,o.add(r),e.add(o),r}buildPerspectiveMatrix(e,n,r,o){const s=1/Math.tan(e/2),i=1/(r-o);return new Float64Array([s/n,0,0,0,0,s,0,0,0,0,(o+r)*i,-1,0,0,2*o*r*i,0])}buildOrthographicMatrix(e,n,r,o,s,i){const a=1/(e-n),l=1/(r-o),c=1/(s-i);return new Float64Array([-2*a,0,0,0,0,-2*l,0,0,0,0,2*c,0,(e+n)*a,(o+r)*l,(i+s)*c,1])}calcProjectionMatrix(e,n,r,o){const s=e.centerOffset,i=e.width/e.height,a=this.buildPerspectiveMatrix(n,i,r,o);if(a[8]=-s.x*2/e.width,a[9]=s.y*2/e.height,!e.isOrthographic)return new u.Matrix4().fromArray(a);const c=.5*e.height/Math.tan(n/2)*Math.tan(n*.5),f=c*i,d=this.buildOrthographicMatrix(-f-s.x,f-s.x,-c+s.y,c+s.y,r,o),b=Math.min(e.pitch/15,1),m=b*b*b*b*b,h=new Float64Array(16);for(let x=0;x<16;x++)h[x]=(1-m)*d[x]+m*a[x];return new u.Matrix4().fromArray(h)}updateCameraForRender(e,n,r,o,s){const i=n.transform,{fov:a,nearZ:l,farZ:c,aspect:f}=this.extractCameraParams(r,i);e.fov=Ot.radToDeg(a),e.aspect=f,e.near=l,e.far=c;const d=this.buildPerspectiveMatrix(a,f,l,c);e._cleanProjectionMatrix=d;const p=this.extractMVPMatrix(r,o),b=this.calcProjectionMatrix(i,a,l,c);e.projectionMatrix.copy(b),e.projectionMatrixInverse.copy(b).invert();const m=new u.Matrix4().multiplyMatrices(e.projectionMatrixInverse,p);e.matrixWorld.copy(m).invert(),e.matrixWorldInverse.copy(m),e.matrixAutoUpdate=!1,e.matrixWorldAutoUpdate=!1,this.updateCameraTransform(e)}extractCameraParams(e,n){const r=n.width/n.height;if(e.fov!==void 0)return{fov:e.fov,nearZ:e.nearZ,farZ:e.farZ,aspect:r};const o=n.cameraToCenterDistance;return{fov:o&&n.height?2*Math.atan(n.height/2/o):.6435,nearZ:n.nearZ||.1,farZ:n.farZ||1e4,aspect:r}}extractMVPMatrix(e,n){let r;if(e.defaultProjectionData?.mainMatrix)r=new u.Matrix4().fromArray(Object.values(e.defaultProjectionData.mainMatrix));else if(e.modelViewProjectionMatrix)r=new u.Matrix4().fromArray(e.modelViewProjectionMatrix);else{const o=Array.isArray(e)?e:Array.from(e);r=new u.Matrix4().fromArray(o)}return new u.Matrix4().multiplyMatrices(r,n)}updateCameraTransform(e){const n=new u.Vector3,r=new u.Quaternion,o=new u.Vector3;e.matrixWorld.decompose(n,r,o),e.position.copy(n),e.rotation.copy(new u.Euler().setFromQuaternion(r,"YXZ"))}createEnvTexture(e,n){e?.endsWith(".hdr")&&new oa().load(e,r=>{r.mapping=u.EquirectangularReflectionMapping,n.environment=r,n.environmentRotation.x=Math.PI/2})}}const Vt=new u.Vector3,ko=new u.Matrix4,Oo=new u.Matrix4,Lo=new u.Vector3,No=new u.Vector3;class ia{constructor(e={}){const n=this;let r,o,s,i;const a={objects:new WeakMap},l=e.element!==void 0?e.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.sortObjects=!0,this.getSize=function(){return{width:r,height:o}},this.render=function(m,h){m.matrixWorldAutoUpdate===!0&&m.updateMatrixWorld(),h.parent===null&&h.matrixWorldAutoUpdate===!0&&h.updateMatrixWorld(),ko.copy(h.matrixWorldInverse),Oo.multiplyMatrices(h.projectionMatrix,ko),f(m,m,h),this.sortObjects&&b(m)},this.setSize=function(m,h){r=m,o=h,s=r/2,i=o/2,l.style.width=m+"px",l.style.height=h+"px"};function c(m){m.isCSS2DObject&&(m.element.style.display="none");for(let h=0,x=m.children.length;h<x;h++)c(m.children[h])}function f(m,h,x){if(m.visible===!1){c(m);return}if(m.isCSS2DObject){Vt.setFromMatrixPosition(m.matrixWorld),Vt.applyMatrix4(Oo);const v=Vt.z>=-1&&Vt.z<=1&&m.layers.test(x.layers)===!0,E=m.element;E.style.display=v===!0?"":"none",v===!0&&(m.onBeforeRender(n,h,x),E.style.transform="translate("+-100*m.center.x+"%,"+-100*m.center.y+"%)translate("+(Vt.x*s+s)+"px,"+(-Vt.y*i+i)+"px)",E.parentNode!==l&&l.appendChild(E),m.onAfterRender(n,h,x));const _={distanceToCameraSquared:d(x,m)};a.objects.set(m,_)}for(let v=0,E=m.children.length;v<E;v++)f(m.children[v],h,x)}function d(m,h){return Lo.setFromMatrixPosition(m.matrixWorld),No.setFromMatrixPosition(h.matrixWorld),Lo.distanceToSquared(No)}function p(m){const h=[];return m.traverseVisible(function(x){x.isCSS2DObject&&h.push(x)}),h}function b(m){const h=p(m).sort(function(v,E){if(v.renderOrder!==E.renderOrder)return E.renderOrder-v.renderOrder;const _=a.objects.get(v).distanceToCameraSquared,T=a.objects.get(E).distanceToCameraSquared;return _-T}),x=h.length;for(let v=0,E=h.length;v<E;v++)h[v].element.style.zIndex=x-v}}}class aa{renderer;labelRenderer;constructor(e,n){if(!n||n.isContextLost())throw new Error("WebGL context is lost or invalid");this.renderer=new u.WebGLRenderer({alpha:!0,antialias:!0,canvas:e.getCanvas(),context:n}),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.labelRenderer=this.createLabelRenderer(e)}createLabelRenderer(e){const n=e.getContainer(),r=new ia;return r.setSize(n.clientWidth,n.clientHeight),r.domElement.style.position="absolute",r.domElement.style.top="0px",r.domElement.style.pointerEvents="none",e._container.appendChild(r.domElement),e.on("resize",()=>{const{clientWidth:o,clientHeight:s}=e.getContainer();r.setSize(o,s)}),r}getRenderer(){return this.renderer}render(e,n){this.renderer.resetState(),this.renderer.render(e,n),this.labelRenderer.render(e,n)}dispose(){this.labelRenderer.domElement?.parentNode?.removeChild(this.labelRenderer.domElement),this.renderer?.dispose()}}const lo=W.createContext({scene:void 0,camera:void 0,renderer:void 0,map:void 0,sceneRoot:void 0,worldMatrix:void 0,worldMatrixInv:void 0}),ar=()=>W.useContext(lo),la=({mapId:t,id:e,refCenter:n,envTexture:r,envIntensity:o=1,createLight:s=!0,children:i,beforeId:a})=>{const{map:l}=ta.useMap({mapId:t,waitForLayer:a}),[c,f]=W.useState(),[d,p]=W.useState(),[b,m]=W.useState(),[h,x]=W.useState(),[v,E]=W.useState(),[_,T]=W.useState(),S=W.useRef(new sa),w=W.useRef(new u.Matrix4),M=W.useRef(new u.Matrix4),A=W.useRef(void 0);return W.useEffect(()=>{if(!l)return;const D=S.current,$=D.createScene(s),z=D.createGroup($,"scene-root"),y=D.createCamera(z,"camera-for-render"),P={id:e,type:"custom",renderingMode:"3d",onAdd:(C,L)=>{const O=new aa(C,L);A.current=O,m(O);const F=n||C.getCenter();w.current=Ot.updateWorldMatrix(C,F),M.current=w.current.clone().invert(),E(w.current),T(M.current),r&&D.createEnvTexture(r,$),$.environmentIntensity=o,C.triggerRepaint()},render:(C,L)=>{!A.current||!$||!y||(D.updateCameraForRender(y,l.map,L,w.current,M.current),A.current.render($,y),l.triggerRepaint())},onRemove:()=>{A.current&&(A.current.dispose(),A.current=void 0),m(void 0)}};return l.getLayer(e)||l.addLayer(P,a),f($),p(y),x(z),()=>{l.getLayer(e)&&l.removeLayer(e)}},[l,e]),W.useEffect(()=>{c&&r&&S.current.createEnvTexture(r,c)},[c,r]),W.useEffect(()=>{c&&(c.environmentIntensity=o)},[c,o]),W.useEffect(()=>{l&&n&&(w.current=Ot.updateWorldMatrix(l.map,n),M.current=w.current.clone().invert(),E(w.current),T(M.current),l.triggerRepaint())},[l,n]),V.jsx(lo.Provider,{value:{scene:c,camera:d,renderer:b,map:l?.map,sceneRoot:h,worldMatrix:v,worldMatrixInv:_},children:i})};function Do(t,e){if(e===u.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===u.TriangleFanDrawMode||e===u.TriangleStripDrawMode){let n=t.getIndex();if(n===null){const i=[],a=t.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)i.push(l);t.setIndex(i),n=t.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t}const r=n.count-2,o=[];if(e===u.TriangleFanDrawMode)for(let i=1;i<=r;i++)o.push(n.getX(0)),o.push(n.getX(i)),o.push(n.getX(i+1));else for(let i=0;i<r;i++)i%2===0?(o.push(n.getX(i)),o.push(n.getX(i+1)),o.push(n.getX(i+2))):(o.push(n.getX(i+2)),o.push(n.getX(i+1)),o.push(n.getX(i)));o.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=t.clone();return s.setIndex(o),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t}class $o extends u.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(n){return new pa(n)}),this.register(function(n){return new ha(n)}),this.register(function(n){return new Sa(n)}),this.register(function(n){return new Ea(n)}),this.register(function(n){return new Ca(n)}),this.register(function(n){return new ga(n)}),this.register(function(n){return new ya(n)}),this.register(function(n){return new ba(n)}),this.register(function(n){return new xa(n)}),this.register(function(n){return new fa(n)}),this.register(function(n){return new va(n)}),this.register(function(n){return new ma(n)}),this.register(function(n){return new Ta(n)}),this.register(function(n){return new wa(n)}),this.register(function(n){return new ua(n)}),this.register(function(n){return new Ma(n)}),this.register(function(n){return new _a(n)})}load(e,n,r,o){const s=this;let i;if(this.resourcePath!=="")i=this.resourcePath;else if(this.path!==""){const c=u.LoaderUtils.extractUrlBase(e);i=u.LoaderUtils.resolveURL(c,this.path)}else i=u.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){o?o(c):console.error(c),s.manager.itemError(e),s.manager.itemEnd(e)},l=new u.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{s.parse(c,i,function(f){n(f),s.manager.itemEnd(e)},a)}catch(f){a(f)}},r,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,r,o){let s;const i={},a={},l=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(l.decode(new Uint8Array(e,0,4))===Js){try{i[ie.KHR_BINARY_GLTF]=new Ra(e)}catch(d){o&&o(d);return}s=JSON.parse(i[ie.KHR_BINARY_GLTF].content)}else s=JSON.parse(l.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){o&&o(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Fa(s,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let f=0;f<this.pluginCallbacks.length;f++){const d=this.pluginCallbacks[f](c);d.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[d.name]=d,i[d.name]=!0}if(s.extensionsUsed)for(let f=0;f<s.extensionsUsed.length;++f){const d=s.extensionsUsed[f],p=s.extensionsRequired||[];switch(d){case ie.KHR_MATERIALS_UNLIT:i[d]=new da;break;case ie.KHR_DRACO_MESH_COMPRESSION:i[d]=new Aa(s,this.dracoLoader);break;case ie.KHR_TEXTURE_TRANSFORM:i[d]=new Pa;break;case ie.KHR_MESH_QUANTIZATION:i[d]=new Ia;break;default:p.indexOf(d)>=0&&a[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}c.setExtensions(i),c.setPlugins(a),c.parse(r,o)}parseAsync(e,n){const r=this;return new Promise(function(o,s){r.parse(e,n,o,s)})}}function ca(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const ie={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ua{constructor(e){this.parser=e,this.name=ie.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,o=n.length;r<o;r++){const s=n[r];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const n=this.parser,r="light:"+e;let o=n.cache.get(r);if(o)return o;const s=n.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const f=new u.Color(16777215);l.color!==void 0&&f.setRGB(l.color[0],l.color[1],l.color[2],u.LinearSRGBColorSpace);const d=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new u.DirectionalLight(f),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new u.PointLight(f),c.distance=d;break;case"spot":c=new u.SpotLight(f),c.distance=d,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,c.angle=l.spot.outerConeAngle,c.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return c.position.set(0,0,0),rt(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=n.createUniqueName(l.name||"light_"+e),o=Promise.resolve(c),n.cache.add(r,o),o}getDependency(e,n){if(e==="light")return this._loadLight(n)}createNodeAttachment(e){const n=this,r=this.parser,s=r.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return r._getNodeRef(n.cache,a,l)})}}class da{constructor(){this.name=ie.KHR_MATERIALS_UNLIT}getMaterialType(){return u.MeshBasicMaterial}extendParams(e,n,r){const o=[];e.color=new u.Color(1,1,1),e.opacity=1;const s=n.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const i=s.baseColorFactor;e.color.setRGB(i[0],i[1],i[2],u.LinearSRGBColorSpace),e.opacity=i[3]}s.baseColorTexture!==void 0&&o.push(r.assignTexture(e,"map",s.baseColorTexture,u.SRGBColorSpace))}return Promise.all(o)}}class fa{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,n){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=o.extensions[this.name].emissiveStrength;return s!==void 0&&(n.emissiveIntensity=s),Promise.resolve()}}class pa{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];if(i.clearcoatFactor!==void 0&&(n.clearcoat=i.clearcoatFactor),i.clearcoatTexture!==void 0&&s.push(r.assignTexture(n,"clearcoatMap",i.clearcoatTexture)),i.clearcoatRoughnessFactor!==void 0&&(n.clearcoatRoughness=i.clearcoatRoughnessFactor),i.clearcoatRoughnessTexture!==void 0&&s.push(r.assignTexture(n,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),i.clearcoatNormalTexture!==void 0&&(s.push(r.assignTexture(n,"clearcoatNormalMap",i.clearcoatNormalTexture)),i.clearcoatNormalTexture.scale!==void 0)){const a=i.clearcoatNormalTexture.scale;n.clearcoatNormalScale=new u.Vector2(a,a)}return Promise.all(s)}}class ha{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_DISPERSION}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=o.extensions[this.name];return n.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class ma{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return i.iridescenceFactor!==void 0&&(n.iridescence=i.iridescenceFactor),i.iridescenceTexture!==void 0&&s.push(r.assignTexture(n,"iridescenceMap",i.iridescenceTexture)),i.iridescenceIor!==void 0&&(n.iridescenceIOR=i.iridescenceIor),n.iridescenceThicknessRange===void 0&&(n.iridescenceThicknessRange=[100,400]),i.iridescenceThicknessMinimum!==void 0&&(n.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),i.iridescenceThicknessMaximum!==void 0&&(n.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),i.iridescenceThicknessTexture!==void 0&&s.push(r.assignTexture(n,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(s)}}class ga{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_SHEEN}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[];n.sheenColor=new u.Color(0,0,0),n.sheenRoughness=0,n.sheen=1;const i=o.extensions[this.name];if(i.sheenColorFactor!==void 0){const a=i.sheenColorFactor;n.sheenColor.setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace)}return i.sheenRoughnessFactor!==void 0&&(n.sheenRoughness=i.sheenRoughnessFactor),i.sheenColorTexture!==void 0&&s.push(r.assignTexture(n,"sheenColorMap",i.sheenColorTexture,u.SRGBColorSpace)),i.sheenRoughnessTexture!==void 0&&s.push(r.assignTexture(n,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(s)}}class ya{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return i.transmissionFactor!==void 0&&(n.transmission=i.transmissionFactor),i.transmissionTexture!==void 0&&s.push(r.assignTexture(n,"transmissionMap",i.transmissionTexture)),Promise.all(s)}}class ba{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_VOLUME}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];n.thickness=i.thicknessFactor!==void 0?i.thicknessFactor:0,i.thicknessTexture!==void 0&&s.push(r.assignTexture(n,"thicknessMap",i.thicknessTexture)),n.attenuationDistance=i.attenuationDistance||1/0;const a=i.attenuationColor||[1,1,1];return n.attenuationColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),Promise.all(s)}}class xa{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_IOR}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const o=this.parser.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=o.extensions[this.name];return n.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class va{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_SPECULAR}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];n.specularIntensity=i.specularFactor!==void 0?i.specularFactor:1,i.specularTexture!==void 0&&s.push(r.assignTexture(n,"specularIntensityMap",i.specularTexture));const a=i.specularColorFactor||[1,1,1];return n.specularColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),i.specularColorTexture!==void 0&&s.push(r.assignTexture(n,"specularColorMap",i.specularColorTexture,u.SRGBColorSpace)),Promise.all(s)}}class wa{constructor(e){this.parser=e,this.name=ie.EXT_MATERIALS_BUMP}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return n.bumpScale=i.bumpFactor!==void 0?i.bumpFactor:1,i.bumpTexture!==void 0&&s.push(r.assignTexture(n,"bumpMap",i.bumpTexture)),Promise.all(s)}}class Ta{constructor(e){this.parser=e,this.name=ie.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(e,n){const r=this.parser,o=r.json.materials[e];if(!o.extensions||!o.extensions[this.name])return Promise.resolve();const s=[],i=o.extensions[this.name];return i.anisotropyStrength!==void 0&&(n.anisotropy=i.anisotropyStrength),i.anisotropyRotation!==void 0&&(n.anisotropyRotation=i.anisotropyRotation),i.anisotropyTexture!==void 0&&s.push(r.assignTexture(n,"anisotropyMap",i.anisotropyTexture)),Promise.all(s)}}class Sa{constructor(e){this.parser=e,this.name=ie.KHR_TEXTURE_BASISU}loadTexture(e){const n=this.parser,r=n.json,o=r.textures[e];if(!o.extensions||!o.extensions[this.name])return null;const s=o.extensions[this.name],i=n.options.ktx2Loader;if(!i){if(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,s.source,i)}}class Ea{constructor(e){this.parser=e,this.name=ie.EXT_TEXTURE_WEBP}loadTexture(e){const n=this.name,r=this.parser,o=r.json,s=o.textures[e];if(!s.extensions||!s.extensions[n])return null;const i=s.extensions[n],a=o.images[i.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return r.loadTextureImage(e,i.source,l)}}class Ca{constructor(e){this.parser=e,this.name=ie.EXT_TEXTURE_AVIF}loadTexture(e){const n=this.name,r=this.parser,o=r.json,s=o.textures[e];if(!s.extensions||!s.extensions[n])return null;const i=s.extensions[n],a=o.images[i.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return r.loadTextureImage(e,i.source,l)}}class Ma{constructor(e){this.name=ie.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const o=r.extensions[this.name],s=this.parser.getDependency("buffer",o.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=o.byteOffset||0,c=o.byteLength||0,f=o.count,d=o.byteStride,p=new Uint8Array(a,l,c);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(f,d,p,o.mode,o.filter).then(function(b){return b.buffer}):i.ready.then(function(){const b=new ArrayBuffer(f*d);return i.decodeGltfBuffer(new Uint8Array(b),f,d,p,o.mode,o.filter),b})})}else return null}}class _a{constructor(e){this.name=ie.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const o=n.meshes[r.mesh];for(const c of o.primitives)if(c.mode!==Ge.TRIANGLES&&c.mode!==Ge.TRIANGLE_STRIP&&c.mode!==Ge.TRIANGLE_FAN&&c.mode!==void 0)return null;const i=r.extensions[this.name].attributes,a=[],l={};for(const c in i)a.push(this.parser.getDependency("accessor",i[c]).then(f=>(l[c]=f,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const f=c.pop(),d=f.isGroup?f.children:[f],p=c[0].count,b=[];for(const m of d){const h=new u.Matrix4,x=new u.Vector3,v=new u.Quaternion,E=new u.Vector3(1,1,1),_=new u.InstancedMesh(m.geometry,m.material,p);for(let T=0;T<p;T++)l.TRANSLATION&&x.fromBufferAttribute(l.TRANSLATION,T),l.ROTATION&&v.fromBufferAttribute(l.ROTATION,T),l.SCALE&&E.fromBufferAttribute(l.SCALE,T),_.setMatrixAt(T,h.compose(x,v,E));for(const T in l)if(T==="_COLOR_0"){const S=l[T];_.instanceColor=new u.InstancedBufferAttribute(S.array,S.itemSize,S.normalized)}else T!=="TRANSLATION"&&T!=="ROTATION"&&T!=="SCALE"&&m.geometry.setAttribute(T,l[T]);u.Object3D.prototype.copy.call(_,m),this.parser.assignFinalMaterial(_),b.push(_)}return f.isGroup?(f.clear(),f.add(...b),f):b[0]}))}}const Js="glTF",an=12,Bo={JSON:1313821514,BIN:5130562};class Ra{constructor(e){this.name=ie.KHR_BINARY_GLTF,this.content=null,this.body=null;const n=new DataView(e,0,an),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(e.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==Js)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const o=this.header.length-an,s=new DataView(e,an);let i=0;for(;i<o;){const a=s.getUint32(i,!0);i+=4;const l=s.getUint32(i,!0);if(i+=4,l===Bo.JSON){const c=new Uint8Array(e,an+i,a);this.content=r.decode(c)}else if(l===Bo.BIN){const c=an+i;this.body=e.slice(c,c+a)}i+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Aa{constructor(e,n){if(!n)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=ie.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=n,this.dracoLoader.preload()}decodePrimitive(e,n){const r=this.json,o=this.dracoLoader,s=e.extensions[this.name].bufferView,i=e.extensions[this.name].attributes,a={},l={},c={};for(const f in i){const d=Xr[f]||f.toLowerCase();a[d]=i[f]}for(const f in e.attributes){const d=Xr[f]||f.toLowerCase();if(i[f]!==void 0){const p=r.accessors[e.attributes[f]],b=Zt[p.componentType];c[d]=b.name,l[d]=p.normalized===!0}}return n.getDependency("bufferView",s).then(function(f){return new Promise(function(d,p){o.decodeDracoFile(f,function(b){for(const m in b.attributes){const h=b.attributes[m],x=l[m];x!==void 0&&(h.normalized=x)}d(b)},a,c,u.LinearSRGBColorSpace,p)})})}}class Pa{constructor(){this.name=ie.KHR_TEXTURE_TRANSFORM}extendTexture(e,n){return(n.texCoord===void 0||n.texCoord===e.channel)&&n.offset===void 0&&n.rotation===void 0&&n.scale===void 0||(e=e.clone(),n.texCoord!==void 0&&(e.channel=n.texCoord),n.offset!==void 0&&e.offset.fromArray(n.offset),n.rotation!==void 0&&(e.rotation=n.rotation),n.scale!==void 0&&e.repeat.fromArray(n.scale),e.needsUpdate=!0),e}}class Ia{constructor(){this.name=ie.KHR_MESH_QUANTIZATION}}class ei extends u.Interpolant{constructor(e,n,r,o){super(e,n,r,o)}copySampleValue_(e){const n=this.resultBuffer,r=this.sampleValues,o=this.valueSize,s=e*o*3+o;for(let i=0;i!==o;i++)n[i]=r[s+i];return n}interpolate_(e,n,r,o){const s=this.resultBuffer,i=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,f=o-n,d=(r-n)/f,p=d*d,b=p*d,m=e*c,h=m-c,x=-2*b+3*p,v=b-p,E=1-x,_=v-p+d;for(let T=0;T!==a;T++){const S=i[h+T+a],w=i[h+T+l]*f,M=i[m+T+a],A=i[m+T]*f;s[T]=E*S+_*w+x*M+v*A}return s}}const ka=new u.Quaternion;class Oa extends ei{interpolate_(e,n,r,o){const s=super.interpolate_(e,n,r,o);return ka.fromArray(s).normalize().toArray(s),s}}const Ge={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Zt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},zo={9728:u.NearestFilter,9729:u.LinearFilter,9984:u.NearestMipmapNearestFilter,9985:u.LinearMipmapNearestFilter,9986:u.NearestMipmapLinearFilter,9987:u.LinearMipmapLinearFilter},jo={33071:u.ClampToEdgeWrapping,33648:u.MirroredRepeatWrapping,10497:u.RepeatWrapping},Pr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Xr={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},mt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},La={CUBICSPLINE:void 0,LINEAR:u.InterpolateLinear,STEP:u.InterpolateDiscrete},Ir={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Na(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new u.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:u.FrontSide})),t.DefaultMaterial}function Mt(t,e,n){for(const r in n.extensions)t[r]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[r]=n.extensions[r])}function rt(t,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(t.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Da(t,e,n){let r=!1,o=!1,s=!1;for(let c=0,f=e.length;c<f;c++){const d=e[c];if(d.POSITION!==void 0&&(r=!0),d.NORMAL!==void 0&&(o=!0),d.COLOR_0!==void 0&&(s=!0),r&&o&&s)break}if(!r&&!o&&!s)return Promise.resolve(t);const i=[],a=[],l=[];for(let c=0,f=e.length;c<f;c++){const d=e[c];if(r){const p=d.POSITION!==void 0?n.getDependency("accessor",d.POSITION):t.attributes.position;i.push(p)}if(o){const p=d.NORMAL!==void 0?n.getDependency("accessor",d.NORMAL):t.attributes.normal;a.push(p)}if(s){const p=d.COLOR_0!==void 0?n.getDependency("accessor",d.COLOR_0):t.attributes.color;l.push(p)}}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(l)]).then(function(c){const f=c[0],d=c[1],p=c[2];return r&&(t.morphAttributes.position=f),o&&(t.morphAttributes.normal=d),s&&(t.morphAttributes.color=p),t.morphTargetsRelative=!0,t})}function $a(t,e){if(t.updateMorphTargets(),e.weights!==void 0)for(let n=0,r=e.weights.length;n<r;n++)t.morphTargetInfluences[n]=e.weights[n];if(e.extras&&Array.isArray(e.extras.targetNames)){const n=e.extras.targetNames;if(t.morphTargetInfluences.length===n.length){t.morphTargetDictionary={};for(let r=0,o=n.length;r<o;r++)t.morphTargetDictionary[n[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Ba(t){let e;const n=t.extensions&&t.extensions[ie.KHR_DRACO_MESH_COMPRESSION];if(n?e="draco:"+n.bufferView+":"+n.indices+":"+kr(n.attributes):e=t.indices+":"+kr(t.attributes)+":"+t.mode,t.targets!==void 0)for(let r=0,o=t.targets.length;r<o;r++)e+=":"+kr(t.targets[r]);return e}function kr(t){let e="";const n=Object.keys(t).sort();for(let r=0,o=n.length;r<o;r++)e+=n[r]+":"+t[n[r]]+";";return e}function Kr(t){switch(t){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function za(t){return t.search(/\.jpe?g($|\?)/i)>0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":t.search(/\.ktx2($|\?)/i)>0||t.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const ja=new u.Matrix4;class Fa{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new ca,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,o=-1,s=!1,i=-1;if(typeof navigator<"u"){const a=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(a)===!0;const l=a.match(/Version\/(\d+)/);o=r&&l?parseInt(l[1],10):-1,s=a.indexOf("Firefox")>-1,i=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&o<17||s&&i<98?this.textureLoader=new u.TextureLoader(this.options.manager):this.textureLoader=new u.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new u.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,o=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(i){return i._markDefs&&i._markDefs()}),Promise.all(this._invokeAll(function(i){return i.beforeRoot&&i.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(i){const a={scene:i[0][o.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:o.asset,parser:r,userData:{}};return Mt(s,a,o),rt(a,o),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let o=0,s=n.length;o<s;o++){const i=n[o].joints;for(let a=0,l=i.length;a<l;a++)e[i[a]].isBone=!0}for(let o=0,s=e.length;o<s;o++){const i=e[o];i.mesh!==void 0&&(this._addNodeRef(this.meshCache,i.mesh),i.skin!==void 0&&(r[i.mesh].isSkinnedMesh=!0)),i.camera!==void 0&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(e,n){n!==void 0&&(e.refs[n]===void 0&&(e.refs[n]=e.uses[n]=0),e.refs[n]++)}_getNodeRef(e,n,r){if(e.refs[n]<=1)return r;const o=r.clone(),s=(i,a)=>{const l=this.associations.get(i);l!=null&&this.associations.set(a,l);for(const[c,f]of i.children.entries())s(f,a.children[c])};return s(r,o),o.name+="_instance_"+e.uses[n]++,o}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r<n.length;r++){const o=e(n[r]);if(o)return o}return null}_invokeAll(e){const n=Object.values(this.plugins);n.unshift(this);const r=[];for(let o=0;o<n.length;o++){const s=e(n[o]);s&&r.push(s)}return r}getDependency(e,n){const r=e+":"+n;let o=this.cache.get(r);if(!o){switch(e){case"scene":o=this.loadScene(n);break;case"node":o=this._invokeOne(function(s){return s.loadNode&&s.loadNode(n)});break;case"mesh":o=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(n)});break;case"accessor":o=this.loadAccessor(n);break;case"bufferView":o=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(n)});break;case"buffer":o=this.loadBuffer(n);break;case"material":o=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(n)});break;case"texture":o=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(n)});break;case"skin":o=this.loadSkin(n);break;case"animation":o=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(n)});break;case"camera":o=this.loadCamera(n);break;default:if(o=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,n)}),!o)throw new Error("Unknown type: "+e);break}this.cache.add(r,o)}return o}getDependencies(e){let n=this.cache.get(e);if(!n){const r=this,o=this.json[e+(e==="mesh"?"es":"s")]||[];n=Promise.all(o.map(function(s,i){return r.getDependency(e,i)})),this.cache.add(e,n)}return n}loadBuffer(e){const n=this.json.buffers[e],r=this.fileLoader;if(n.type&&n.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(n.uri===void 0&&e===0)return Promise.resolve(this.extensions[ie.KHR_BINARY_GLTF].body);const o=this.options;return new Promise(function(s,i){r.load(u.LoaderUtils.resolveURL(n.uri,o.path),s,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+n.uri+'".'))})})}loadBufferView(e){const n=this.json.bufferViews[e];return this.getDependency("buffer",n.buffer).then(function(r){const o=n.byteLength||0,s=n.byteOffset||0;return r.slice(s,s+o)})}loadAccessor(e){const n=this,r=this.json,o=this.json.accessors[e];if(o.bufferView===void 0&&o.sparse===void 0){const i=Pr[o.type],a=Zt[o.componentType],l=o.normalized===!0,c=new a(o.count*i);return Promise.resolve(new u.BufferAttribute(c,i,l))}const s=[];return o.bufferView!==void 0?s.push(this.getDependency("bufferView",o.bufferView)):s.push(null),o.sparse!==void 0&&(s.push(this.getDependency("bufferView",o.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",o.sparse.values.bufferView))),Promise.all(s).then(function(i){const a=i[0],l=Pr[o.type],c=Zt[o.componentType],f=c.BYTES_PER_ELEMENT,d=f*l,p=o.byteOffset||0,b=o.bufferView!==void 0?r.bufferViews[o.bufferView].byteStride:void 0,m=o.normalized===!0;let h,x;if(b&&b!==d){const v=Math.floor(p/b),E="InterleavedBuffer:"+o.bufferView+":"+o.componentType+":"+v+":"+o.count;let _=n.cache.get(E);_||(h=new c(a,v*b,o.count*b/f),_=new u.InterleavedBuffer(h,b/f),n.cache.add(E,_)),x=new u.InterleavedBufferAttribute(_,l,p%b/f,m)}else a===null?h=new c(o.count*l):h=new c(a,p,o.count*l),x=new u.BufferAttribute(h,l,m);if(o.sparse!==void 0){const v=Pr.SCALAR,E=Zt[o.sparse.indices.componentType],_=o.sparse.indices.byteOffset||0,T=o.sparse.values.byteOffset||0,S=new E(i[1],_,o.sparse.count*v),w=new c(i[2],T,o.sparse.count*l);a!==null&&(x=new u.BufferAttribute(x.array.slice(),x.itemSize,x.normalized)),x.normalized=!1;for(let M=0,A=S.length;M<A;M++){const D=S[M];if(x.setX(D,w[M*l]),l>=2&&x.setY(D,w[M*l+1]),l>=3&&x.setZ(D,w[M*l+2]),l>=4&&x.setW(D,w[M*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}x.normalized=m}return x})}loadTexture(e){const n=this.json,r=this.options,s=n.textures[e].source,i=n.images[s];let a=this.textureLoader;if(i.uri){const l=r.manager.getHandler(i.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,n,r){const o=this,s=this.json,i=s.textures[e],a=s.images[n],l=(a.uri||a.bufferView)+":"+i.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,r).then(function(f){f.flipY=!1,f.name=i.name||a.name||"",f.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(f.name=a.uri);const p=(s.samplers||{})[i.sampler]||{};return f.magFilter=zo[p.magFilter]||u.LinearFilter,f.minFilter=zo[p.minFilter]||u.LinearMipmapLinearFilter,f.wrapS=jo[p.wrapS]||u.RepeatWrapping,f.wrapT=jo[p.wrapT]||u.RepeatWrapping,f.generateMipmaps=!f.isCompressedTexture&&f.minFilter!==u.NearestFilter&&f.minFilter!==u.LinearFilter,o.associations.set(f,{textures:e}),f}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const r=this,o=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const i=o.images[e],a=self.URL||self.webkitURL;let l=i.uri||"",c=!1;if(i.bufferView!==void 0)l=r.getDependency("bufferView",i.bufferView).then(function(d){c=!0;const p=new Blob([d],{type:i.mimeType});return l=a.createObjectURL(p),l});else if(i.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const f=Promise.resolve(l).then(function(d){return new Promise(function(p,b){let m=p;n.isImageBitmapLoader===!0&&(m=function(h){const x=new u.Texture(h);x.needsUpdate=!0,p(x)}),n.load(u.LoaderUtils.resolveURL(d,s.path),m,void 0,b)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),rt(d,i),d.userData.mimeType=i.mimeType||za(i.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=f,f}assignTexture(e,n,r,o){const s=this;return this.getDependency("texture",r.index).then(function(i){if(!i)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(i=i.clone(),i.channel=r.texCoord),s.extensions[ie.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[ie.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(i);i=s.extensions[ie.KHR_TEXTURE_TRANSFORM].extendTexture(i,a),s.associations.set(i,l)}}return o!==void 0&&(i.colorSpace=o),e[n]=i,i})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const o=n.attributes.tangent===void 0,s=n.attributes.color!==void 0,i=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new u.PointsMaterial,u.Material.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(e.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new u.LineBasicMaterial,u.Material.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(o||s||i){let a="ClonedMaterial:"+r.uuid+":";o&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),i&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),s&&(l.vertexColors=!0),i&&(l.flatShading=!0),o&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return u.MeshStandardMaterial}loadMaterial(e){const n=this,r=this.json,o=this.extensions,s=r.materials[e];let i;const a={},l=s.extensions||{},c=[];if(l[ie.KHR_MATERIALS_UNLIT]){const d=o[ie.KHR_MATERIALS_UNLIT];i=d.getMaterialType(),c.push(d.extendParams(a,s,n))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new u.Color(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],u.LinearSRGBColorSpace),a.opacity=p[3]}d.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",d.baseColorTexture,u.SRGBColorSpace)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),i=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=u.DoubleSide);const f=s.alphaMode||Ir.OPAQUE;if(f===Ir.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,f===Ir.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(n.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new u.Vector2(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}if(s.occlusionTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(n.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&i!==u.MeshBasicMaterial){const d=s.emissiveFactor;a.emissive=new u.Color().setRGB(d[0],d[1],d[2],u.LinearSRGBColorSpace)}return s.emissiveTexture!==void 0&&i!==u.MeshBasicMaterial&&c.push(n.assignTexture(a,"emissiveMap",s.emissiveTexture,u.SRGBColorSpace)),Promise.all(c).then(function(){const d=new i(a);return s.name&&(d.name=s.name),rt(d,s),n.associations.set(d,{materials:e}),s.extensions&&Mt(o,d,s),d})}createUniqueName(e){const n=u.PropertyBinding.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,o=this.primitiveCache;function s(a){return r[ie.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return Fo(l,a,n)})}const i=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],f=Ba(c),d=o[f];if(d)i.push(d.promise);else{let p;c.extensions&&c.extensions[ie.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=Fo(new u.BufferGeometry,c,n),o[f]={primitive:c,promise:p},i.push(p)}}return Promise.all(i)}loadMesh(e){const n=this,r=this.json,o=this.extensions,s=r.meshes[e],i=s.primitives,a=[];for(let l=0,c=i.length;l<c;l++){const f=i[l].material===void 0?Na(this.cache):this.getDependency("material",i[l].material);a.push(f)}return a.push(n.loadGeometries(i)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),f=l[l.length-1],d=[];for(let b=0,m=f.length;b<m;b++){const h=f[b],x=i[b];let v;const E=c[b];if(x.mode===Ge.TRIANGLES||x.mode===Ge.TRIANGLE_STRIP||x.mode===Ge.TRIANGLE_FAN||x.mode===void 0)v=s.isSkinnedMesh===!0?new u.SkinnedMesh(h,E):new u.Mesh(h,E),v.isSkinnedMesh===!0&&v.normalizeSkinWeights(),x.mode===Ge.TRIANGLE_STRIP?v.geometry=Do(v.geometry,u.TriangleStripDrawMode):x.mode===Ge.TRIANGLE_FAN&&(v.geometry=Do(v.geometry,u.TriangleFanDrawMode));else if(x.mode===Ge.LINES)v=new u.LineSegments(h,E);else if(x.mode===Ge.LINE_STRIP)v=new u.Line(h,E);else if(x.mode===Ge.LINE_LOOP)v=new u.LineLoop(h,E);else if(x.mode===Ge.POINTS)v=new u.Points(h,E);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+x.mode);Object.keys(v.geometry.morphAttributes).length>0&&$a(v,s),v.name=n.createUniqueName(s.name||"mesh_"+e),rt(v,s),x.extensions&&Mt(o,v,x),n.assignFinalMaterial(v),d.push(v)}for(let b=0,m=d.length;b<m;b++)n.associations.set(d[b],{meshes:e,primitives:b});if(d.length===1)return s.extensions&&Mt(o,d[0],s),d[0];const p=new u.Group;s.extensions&&Mt(o,p,s),n.associations.set(p,{meshes:e});for(let b=0,m=d.length;b<m;b++)p.add(d[b]);return p})}loadCamera(e){let n;const r=this.json.cameras[e],o=r[r.type];if(!o){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return r.type==="perspective"?n=new u.PerspectiveCamera(u.MathUtils.radToDeg(o.yfov),o.aspectRatio||1,o.znear||1,o.zfar||2e6):r.type==="orthographic"&&(n=new u.OrthographicCamera(-o.xmag,o.xmag,o.ymag,-o.ymag,o.znear,o.zfar)),r.name&&(n.name=this.createUniqueName(r.name)),rt(n,r),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],r=[];for(let o=0,s=n.joints.length;o<s;o++)r.push(this._loadNodeShallow(n.joints[o]));return n.inverseBindMatrices!==void 0?r.push(this.getDependency("accessor",n.inverseBindMatrices)):r.push(null),Promise.all(r).then(function(o){const s=o.pop(),i=o,a=[],l=[];for(let c=0,f=i.length;c<f;c++){const d=i[c];if(d){a.push(d);const p=new u.Matrix4;s!==null&&p.fromArray(s.array,c*16),l.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',n.joints[c])}return new u.Skeleton(a,l)})}loadAnimation(e){const n=this.json,r=this,o=n.animations[e],s=o.name?o.name:"animation_"+e,i=[],a=[],l=[],c=[],f=[];for(let d=0,p=o.channels.length;d<p;d++){const b=o.channels[d],m=o.samplers[b.sampler],h=b.target,x=h.node,v=o.parameters!==void 0?o.parameters[m.input]:m.input,E=o.parameters!==void 0?o.parameters[m.output]:m.output;h.node!==void 0&&(i.push(this.getDependency("node",x)),a.push(this.getDependency("accessor",v)),l.push(this.getDependency("accessor",E)),c.push(m),f.push(h))}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(f)]).then(function(d){const p=d[0],b=d[1],m=d[2],h=d[3],x=d[4],v=[];for(let _=0,T=p.length;_<T;_++){const S=p[_],w=b[_],M=m[_],A=h[_],D=x[_];if(S===void 0)continue;S.updateMatrix&&S.updateMatrix();const $=r._createAnimationTracks(S,w,M,A,D);if($)for(let z=0;z<$.length;z++)v.push($[z])}const E=new u.AnimationClip(s,void 0,v);return rt(E,o),E})}createNodeMesh(e){const n=this.json,r=this,o=n.nodes[e];return o.mesh===void 0?null:r.getDependency("mesh",o.mesh).then(function(s){const i=r._getNodeRef(r.meshCache,o.mesh,s);return o.weights!==void 0&&i.traverse(function(a){if(a.isMesh)for(let l=0,c=o.weights.length;l<c;l++)a.morphTargetInfluences[l]=o.weights[l]}),i})}loadNode(e){const n=this.json,r=this,o=n.nodes[e],s=r._loadNodeShallow(e),i=[],a=o.children||[];for(let c=0,f=a.length;c<f;c++)i.push(r.getDependency("node",a[c]));const l=o.skin===void 0?Promise.resolve(null):r.getDependency("skin",o.skin);return Promise.all([s,Promise.all(i),l]).then(function(c){const f=c[0],d=c[1],p=c[2];p!==null&&f.traverse(function(b){b.isSkinnedMesh&&b.bind(p,ja)});for(let b=0,m=d.length;b<m;b++)f.add(d[b]);return f})}_loadNodeShallow(e){const n=this.json,r=this.extensions,o=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=n.nodes[e],i=s.name?o.createUniqueName(s.name):"",a=[],l=o._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(o.getDependency("camera",s.camera).then(function(c){return o._getNodeRef(o.cameraCache,s.camera,c)})),o._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let f;if(s.isBone===!0?f=new u.Bone:c.length>1?f=new u.Group:c.length===1?f=c[0]:f=new u.Object3D,f!==c[0])for(let d=0,p=c.length;d<p;d++)f.add(c[d]);if(s.name&&(f.userData.name=s.name,f.name=i),rt(f,s),s.extensions&&Mt(r,f,s),s.matrix!==void 0){const d=new u.Matrix4;d.fromArray(s.matrix),f.applyMatrix4(d)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);if(!o.associations.has(f))o.associations.set(f,{});else if(s.mesh!==void 0&&o.meshCache.refs[s.mesh]>1){const d=o.associations.get(f);o.associations.set(f,{...d})}return o.associations.get(f).nodes=e,f}),this.nodeCache[e]}loadScene(e){const n=this.extensions,r=this.json.scenes[e],o=this,s=new u.Group;r.name&&(s.name=o.createUniqueName(r.name)),rt(s,r),r.extensions&&Mt(n,s,r);const i=r.nodes||[],a=[];for(let l=0,c=i.length;l<c;l++)a.push(o.getDependency("node",i[l]));return Promise.all(a).then(function(l){for(let f=0,d=l.length;f<d;f++)s.add(l[f]);const c=f=>{const d=new Map;for(const[p,b]of o.associations)(p instanceof u.Material||p instanceof u.Texture)&&d.set(p,b);return f.traverse(p=>{const b=o.associations.get(p);b!=null&&d.set(p,b)}),d};return o.associations=c(s),s})}_createAnimationTracks(e,n,r,o,s){const i=[],a=e.name?e.name:e.uuid,l=[];mt[s.path]===mt.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let c;switch(mt[s.path]){case mt.weights:c=u.NumberKeyframeTrack;break;case mt.rotation:c=u.QuaternionKeyframeTrack;break;case mt.translation:case mt.scale:c=u.VectorKeyframeTrack;break;default:switch(r.itemSize){case 1:c=u.NumberKeyframeTrack;break;case 2:case 3:default:c=u.VectorKeyframeTrack;break}break}const f=o.interpolation!==void 0?La[o.interpolation]:u.InterpolateLinear,d=this._getArrayFromAccessor(r);for(let p=0,b=l.length;p<b;p++){const m=new c(l[p]+"."+mt[s.path],n.array,d,f);o.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(m),i.push(m)}return i}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const r=Kr(n.constructor),o=new Float32Array(n.length);for(let s=0,i=n.length;s<i;s++)o[s]=n[s]*r;n=o}return n}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(r){const o=this instanceof u.QuaternionKeyframeTrack?Oa:ei;return new o(this.times,this.values,this.getValueSize()/3,r)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Va(t,e,n){const r=e.attributes,o=new u.Box3;if(r.POSITION!==void 0){const a=n.json.accessors[r.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(o.set(new u.Vector3(l[0],l[1],l[2]),new u.Vector3(c[0],c[1],c[2])),a.normalized){const f=Kr(Zt[a.componentType]);o.min.multiplyScalar(f),o.max.multiplyScalar(f)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new u.Vector3,l=new u.Vector3;for(let c=0,f=s.length;c<f;c++){const d=s[c];if(d.POSITION!==void 0){const p=n.json.accessors[d.POSITION],b=p.min,m=p.max;if(b!==void 0&&m!==void 0){if(l.setX(Math.max(Math.abs(b[0]),Math.abs(m[0]))),l.setY(Math.max(Math.abs(b[1]),Math.abs(m[1]))),l.setZ(Math.max(Math.abs(b[2]),Math.abs(m[2]))),p.normalized){const h=Kr(Zt[p.componentType]);l.multiplyScalar(h)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}o.expandByVector(a)}t.boundingBox=o;const i=new u.Sphere;o.getCenter(i.center),i.radius=o.min.distanceTo(o.max)/2,t.boundingSphere=i}function Fo(t,e,n){const r=e.attributes,o=[];function s(i,a){return n.getDependency("accessor",i).then(function(l){t.setAttribute(a,l)})}for(const i in r){const a=Xr[i]||i.toLowerCase();a in t.attributes||o.push(s(r[i],a))}if(e.indices!==void 0&&!t.index){const i=n.getDependency("accessor",e.indices).then(function(a){t.setIndex(a)});o.push(i)}return u.ColorManagement.workingColorSpace!==u.LinearSRGBColorSpace&&"COLOR_0"in r&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${u.ColorManagement.workingColorSpace}" not supported.`),rt(t,e),Va(t,e,n),Promise.all(o).then(function(){return e.targets!==void 0?Da(t,e.targets,n):t})}const Ha=/^[og]\s*(.+)?/,Ua=/^mtllib /,Ga=/^usemtl /,Wa=/^usemap /,Vo=/\s+/,Ho=new u.Vector3,Or=new u.Vector3,Uo=new u.Vector3,Go=new u.Vector3,Ue=new u.Vector3,An=new u.Color;function Ya(){const t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,n){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=n!==!1;return}const r=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:n!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(o,s){const i=this._finalize(!1);i&&(i.inherited||i.groupCount<=0)&&this.materials.splice(i.index,1);const a={index:this.materials.length,name:o||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:i!==void 0?i.smooth:this.smooth,groupStart:i!==void 0?i.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:typeof l=="number"?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(o){const s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),o&&this.materials.length>1)for(let i=this.materials.length-1;i>=0;i--)this.materials[i].groupCount<=0&&this.materials.splice(i,1);return o&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},r&&r.name&&typeof r.clone=="function"){const o=r.clone(0);o.inherited=!0,this.object.materials.push(o)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,n){const r=parseInt(e,10);return(r>=0?r-1:r+n/3)*3},parseNormalIndex:function(e,n){const r=parseInt(e,10);return(r>=0?r-1:r+n/3)*3},parseUVIndex:function(e,n){const r=parseInt(e,10);return(r>=0?r-1:r+n/2)*2},addVertex:function(e,n,r){const o=this.vertices,s=this.object.geometry.vertices;s.push(o[e+0],o[e+1],o[e+2]),s.push(o[n+0],o[n+1],o[n+2]),s.push(o[r+0],o[r+1],o[r+2])},addVertexPoint:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addVertexLine:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addNormal:function(e,n,r){const o=this.normals,s=this.object.geometry.normals;s.push(o[e+0],o[e+1],o[e+2]),s.push(o[n+0],o[n+1],o[n+2]),s.push(o[r+0],o[r+1],o[r+2])},addFaceNormal:function(e,n,r){const o=this.vertices,s=this.object.geometry.normals;Ho.fromArray(o,e),Or.fromArray(o,n),Uo.fromArray(o,r),Ue.subVectors(Uo,Or),Go.subVectors(Ho,Or),Ue.cross(Go),Ue.normalize(),s.push(Ue.x,Ue.y,Ue.z),s.push(Ue.x,Ue.y,Ue.z),s.push(Ue.x,Ue.y,Ue.z)},addColor:function(e,n,r){const o=this.colors,s=this.object.geometry.colors;o[e]!==void 0&&s.push(o[e+0],o[e+1],o[e+2]),o[n]!==void 0&&s.push(o[n+0],o[n+1],o[n+2]),o[r]!==void 0&&s.push(o[r+0],o[r+1],o[r+2])},addUV:function(e,n,r){const o=this.uvs,s=this.object.geometry.uvs;s.push(o[e+0],o[e+1]),s.push(o[n+0],o[n+1]),s.push(o[r+0],o[r+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const n=this.uvs;this.object.geometry.uvs.push(n[e+0],n[e+1])},addFace:function(e,n,r,o,s,i,a,l,c){const f=this.vertices.length;let d=this.parseVertexIndex(e,f),p=this.parseVertexIndex(n,f),b=this.parseVertexIndex(r,f);if(this.addVertex(d,p,b),this.addColor(d,p,b),a!==void 0&&a!==""){const m=this.normals.length;d=this.parseNormalIndex(a,m),p=this.parseNormalIndex(l,m),b=this.parseNormalIndex(c,m),this.addNormal(d,p,b)}else this.addFaceNormal(d,p,b);if(o!==void 0&&o!==""){const m=this.uvs.length;d=this.parseUVIndex(o,m),p=this.parseUVIndex(s,m),b=this.parseUVIndex(i,m),this.addUV(d,p,b),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const n=this.vertices.length;for(let r=0,o=e.length;r<o;r++){const s=this.parseVertexIndex(e[r],n);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(e,n){this.object.geometry.type="Line";const r=this.vertices.length,o=this.uvs.length;for(let s=0,i=e.length;s<i;s++)this.addVertexLine(this.parseVertexIndex(e[s],r));for(let s=0,i=n.length;s<i;s++)this.addUVLine(this.parseUVIndex(n[s],o))}};return t.startObject("",!1),t}class Xa extends u.Loader{constructor(e){super(e),this.materials=null}load(e,n,r,o){const s=this,i=new u.FileLoader(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,function(a){try{n(s.parse(a))}catch(l){o?o(l):console.error(l),s.manager.itemError(e)}},r,o)}setMaterials(e){return this.materials=e,this}parse(e){const n=new Ya;e.indexOf(`\r
6
+ `)!==-1&&(e=e.replace(/\r\n/g,`
7
+ `)),e.indexOf(`\\
8
+ `)!==-1&&(e=e.replace(/\\\n/g,""));const r=e.split(`
9
+ `);let o=[];for(let a=0,l=r.length;a<l;a++){const c=r[a].trimStart();if(c.length===0)continue;const f=c.charAt(0);if(f!=="#")if(f==="v"){const d=c.split(Vo);switch(d[0]){case"v":n.vertices.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),d.length>=7?(An.setRGB(parseFloat(d[4]),parseFloat(d[5]),parseFloat(d[6]),u.SRGBColorSpace),n.colors.push(An.r,An.g,An.b)):n.colors.push(void 0,void 0,void 0);break;case"vn":n.normals.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3]));break;case"vt":n.uvs.push(parseFloat(d[1]),parseFloat(d[2]));break}}else if(f==="f"){const p=c.slice(1).trim().split(Vo),b=[];for(let h=0,x=p.length;h<x;h++){const v=p[h];if(v.length>0){const E=v.split("/");b.push(E)}}const m=b[0];for(let h=1,x=b.length-1;h<x;h++){const v=b[h],E=b[h+1];n.addFace(m[0],v[0],E[0],m[1],v[1],E[1],m[2],v[2],E[2])}}else if(f==="l"){const d=c.substring(1).trim().split(" ");let p=[];const b=[];if(c.indexOf("/")===-1)p=d;else for(let m=0,h=d.length;m<h;m++){const x=d[m].split("/");x[0]!==""&&p.push(x[0]),x[1]!==""&&b.push(x[1])}n.addLineGeometry(p,b)}else if(f==="p"){const p=c.slice(1).trim().split(" ");n.addPointGeometry(p)}else if((o=Ha.exec(c))!==null){const d=(" "+o[0].slice(1).trim()).slice(1);n.startObject(d)}else if(Ga.test(c))n.object.startMaterial(c.substring(7).trim(),n.materialLibraries);else if(Ua.test(c))n.materialLibraries.push(c.substring(7).trim());else if(Wa.test(c))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(f==="s"){if(o=c.split(" "),o.length>1){const p=o[1].trim().toLowerCase();n.object.smooth=p!=="0"&&p!=="off"}else n.object.smooth=!0;const d=n.object.currentMaterial();d&&(d.smooth=n.object.smooth)}else{if(c==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}n.finalize();const s=new u.Group;if(s.materialLibraries=[].concat(n.materialLibraries),!(n.objects.length===1&&n.objects[0].geometry.vertices.length===0)===!0)for(let a=0,l=n.objects.length;a<l;a++){const c=n.objects[a],f=c.geometry,d=c.materials,p=f.type==="Line",b=f.type==="Points";let m=!1;if(f.vertices.length===0)continue;const h=new u.BufferGeometry;h.setAttribute("position",new u.Float32BufferAttribute(f.vertices,3)),f.normals.length>0&&h.setAttribute("normal",new u.Float32BufferAttribute(f.normals,3)),f.colors.length>0&&(m=!0,h.setAttribute("color",new u.Float32BufferAttribute(f.colors,3))),f.hasUVIndices===!0&&h.setAttribute("uv",new u.Float32BufferAttribute(f.uvs,2));const x=[];for(let E=0,_=d.length;E<_;E++){const T=d[E],S=T.name+"_"+T.smooth+"_"+m;let w=n.materials[S];if(this.materials!==null){if(w=this.materials.create(T.name),p&&w&&!(w instanceof u.LineBasicMaterial)){const M=new u.LineBasicMaterial;u.Material.prototype.copy.call(M,w),M.color.copy(w.color),w=M}else if(b&&w&&!(w instanceof u.PointsMaterial)){const M=new u.PointsMaterial({size:10,sizeAttenuation:!1});u.Material.prototype.copy.call(M,w),M.color.copy(w.color),M.map=w.map,w=M}}w===void 0&&(p?w=new u.LineBasicMaterial:b?w=new u.PointsMaterial({size:1,sizeAttenuation:!1}):w=new u.MeshPhongMaterial,w.name=T.name,w.flatShading=!T.smooth,w.vertexColors=m,n.materials[S]=w),x.push(w)}let v;if(x.length>1){for(let E=0,_=d.length;E<_;E++){const T=d[E];h.addGroup(T.groupStart,T.groupCount,E)}p?v=new u.LineSegments(h,x):b?v=new u.Points(h,x):v=new u.Mesh(h,x)}else p?v=new u.LineSegments(h,x[0]):b?v=new u.Points(h,x[0]):v=new u.Mesh(h,x[0]);v.name=c.name,s.add(v)}else if(n.vertices.length>0){const a=new u.PointsMaterial({size:1,sizeAttenuation:!1}),l=new u.BufferGeometry;l.setAttribute("position",new u.Float32BufferAttribute(n.vertices,3)),n.colors.length>0&&n.colors[0]!==void 0&&(l.setAttribute("color",new u.Float32BufferAttribute(n.colors,3)),a.vertexColors=!0);const c=new u.Points(l,a);s.add(c)}return s}}const Pn=t=>{if(t.geometry&&t.geometry.dispose(),t.material){const e=t.material;Array.isArray(e)?e.forEach(n=>n.dispose()):e.dispose()}"dispose"in t&&typeof t.dispose=="function"&&t.dispose()},ti=t=>{const{url:e,position:n,transform:r,init:o,onDone:s,loaders:i,customLoaders:a}=t,{scene:l,worldMatrixInv:c}=ar(),[f,d]=W.useState(void 0),p=W.useRef(void 0),b=W.useRef(o),m=W.useRef(s);b.current=o,m.current=s;const h=W.useRef({position:n,transform:r});h.current={position:n,transform:r};const x=W.useRef(c);x.current=c;const v=W.useMemo(()=>({...i,...a}),[i,a]),E=W.useCallback((T,S)=>{const{position:w,transform:M}=h.current;if(w&&S){const A=Ot.toScenePosition(S,w,0);T.position.set(A.x,A.y,A.z),M?.position&&(T.position.x+=M.position.x,T.position.y+=M.position.y,T.position.z+=M.position.z)}M?.rotation&&T.rotation.set(M.rotation.x,M.rotation.y,M.rotation.z),M?.scale&&(typeof M.scale=="number"?T.scale.set(M.scale,M.scale,M.scale):T.scale.set(M.scale.x,M.scale.y,M.scale.z)),T.updateMatrixWorld(!0)},[]),_=W.useCallback(()=>{p.current&&l&&(l.remove(p.current),p.current.traverse(Pn),Pn(p.current),p.current=void 0,d(void 0))},[l]);return W.useEffect(()=>{if(!l)return;typeof b.current=="function"&&b.current();let T="";try{T=new URL(e,window.location.origin).pathname.split(".").pop()?.toLowerCase()||""}catch{T=e.split(".").pop()?.toLowerCase()||""}const S=v[T];if(!S){console.warn(`useThreeModel: No loader found for file extension "${T}". Supported extensions: ${Object.keys(v).join(", ")}`);return}let w=!1;return S(e,A=>{if(w){A.traverse(Pn),Pn(A);return}p.current&&_(),p.current=A,E(A,x.current),l.add(A),d(A),typeof m.current=="function"&&m.current()}),()=>{w=!0,_()}},[e,l,v,_,E]),W.useEffect(()=>{f&&E(f,c)},[f,n,r,c,E]),f},Ka=t=>{const{url:e,position:n,transform:r,init:o,onDone:s,customLoaders:i}=t,a=W.useMemo(()=>({gltf:(l,c)=>{new $o().load(l,d=>c(d.scene))},glb:(l,c)=>{new $o().load(l,d=>c(d.scene))},obj:(l,c)=>{new Xa().load(l,d=>c(d))}}),[]);return ti({url:e,position:n,transform:r,init:o,onDone:s,loaders:a,customLoaders:i}),null};function qr(t,e,n){try{const r=t.next();r.done||!r.value?e(r):r.value.then(()=>e({done:r.done,value:void 0}),n)}catch(r){n(r)}}function co(t=25){let e;return(n,r,o)=>{const s=performance.now();e===void 0||s-e>t?(e=s,setTimeout(()=>qr(n,r,o),0)):qr(n,r,o)}}function ni(t,e,n,r,o){const s=()=>{let i;const a=l=>{l.done?n(l.value):i===void 0?i=!0:s()};do{if(i=void 0,o?.aborted){r(new DOMException("Aborted","AbortError"));return}e(t,a,r),i===void 0&&(i=!1)}while(i)};s()}function qa(t,e){let n;return ni(t,qr,r=>{n=r},r=>{throw r},e),n}function uo(t,e,n){return new Promise((r,o)=>{ni(t,e,r,o,n)})}const Qa=`
10
+ precision highp float;
11
+ #include <common>
12
+
13
+ attribute float splatIndex;
14
+
15
+ uniform vec2 invViewport;
16
+ uniform vec2 dataTextureSize;
17
+ uniform vec2 focal;
18
+ uniform sampler2D covariancesATexture;
19
+ uniform sampler2D covariancesBTexture;
20
+ uniform sampler2D centersTexture;
21
+ uniform sampler2D colorsTexture;
22
+
23
+ #if SH_DEGREE > 0
24
+ uniform highp usampler2D shTexture0;
25
+ #endif
26
+ #if SH_DEGREE > 1
27
+ uniform highp usampler2D shTexture1;
28
+ #endif
29
+ #if SH_DEGREE > 2
30
+ uniform highp usampler2D shTexture2;
31
+ #endif
32
+
33
+ varying vec4 vColor;
34
+ varying vec2 vPosition;
35
+
36
+ vec2 getDataUV(float index, vec2 textureSize) {
37
+ float y = floor(index / textureSize.x);
38
+ float x = index - y * textureSize.x;
39
+ return vec2((x + 0.5) / textureSize.x, (y + 0.5) / textureSize.y);
40
+ }
41
+
42
+ #if SH_DEGREE > 0
43
+ ivec2 getDataUVint(float index, vec2 textureSize) {
44
+ float y = floor(index / textureSize.x);
45
+ float x = index - y * textureSize.x;
46
+ return ivec2(uint(x + 0.5), uint(y + 0.5));
47
+ }
48
+ #endif
49
+
50
+ struct Splat {
51
+ vec4 center;
52
+ vec4 color;
53
+ vec4 covA;
54
+ vec4 covB;
55
+ #if SH_DEGREE > 0
56
+ uvec4 sh0;
57
+ #endif
58
+ #if SH_DEGREE > 1
59
+ uvec4 sh1;
60
+ #endif
61
+ #if SH_DEGREE > 2
62
+ uvec4 sh2;
63
+ #endif
64
+ };
65
+
66
+ Splat readSplat(float splatIndex) {
67
+ Splat splat;
68
+ vec2 splatUV = getDataUV(splatIndex, dataTextureSize);
69
+ splat.center = texture2D(centersTexture, splatUV);
70
+ splat.color = texture2D(colorsTexture, splatUV);
71
+ splat.covA = texture2D(covariancesATexture, splatUV) * splat.center.w;
72
+ splat.covB = texture2D(covariancesBTexture, splatUV) * splat.center.w;
73
+ #if SH_DEGREE > 0
74
+ ivec2 splatUVint = getDataUVint(splatIndex, dataTextureSize);
75
+ splat.sh0 = texelFetch(shTexture0, splatUVint, 0);
76
+ #endif
77
+ #if SH_DEGREE > 1
78
+ splat.sh1 = texelFetch(shTexture1, splatUVint, 0);
79
+ #endif
80
+ #if SH_DEGREE > 2
81
+ splat.sh2 = texelFetch(shTexture2, splatUVint, 0);
82
+ #endif
83
+ return splat;
84
+ }
85
+
86
+ vec3 computeColorFromSHDegree(vec3 dir, const vec3 sh[16]) {
87
+ const float SH_C0 = 0.28209479;
88
+ const float SH_C1 = 0.48860251;
89
+ float SH_C2[5];
90
+ SH_C2[0] = 1.092548430;
91
+ SH_C2[1] = -1.09254843;
92
+ SH_C2[2] = 0.315391565;
93
+ SH_C2[3] = -1.09254843;
94
+ SH_C2[4] = 0.546274215;
95
+
96
+ float SH_C3[7];
97
+ SH_C3[0] = -0.59004358;
98
+ SH_C3[1] = 2.890611442;
99
+ SH_C3[2] = -0.45704579;
100
+ SH_C3[3] = 0.373176332;
101
+ SH_C3[4] = -0.45704579;
102
+ SH_C3[5] = 1.445305721;
103
+ SH_C3[6] = -0.59004358;
104
+
105
+ vec3 result = sh[0];
106
+
107
+ #if SH_DEGREE > 0
108
+ float x = dir.x;
109
+ float y = dir.y;
110
+ float z = dir.z;
111
+ result += -SH_C1 * y * sh[1] + SH_C1 * z * sh[2] - SH_C1 * x * sh[3];
112
+
113
+ #if SH_DEGREE > 1
114
+ float xx = x * x, yy = y * y, zz = z * z;
115
+ float xy = x * y, yz = y * z, xz = x * z;
116
+ result +=
117
+ SH_C2[0] * xy * sh[4] +
118
+ SH_C2[1] * yz * sh[5] +
119
+ SH_C2[2] * (2.0f * zz - xx - yy) * sh[6] +
120
+ SH_C2[3] * xz * sh[7] +
121
+ SH_C2[4] * (xx - yy) * sh[8];
122
+
123
+ #if SH_DEGREE > 2
124
+ result +=
125
+ SH_C3[0] * y * (3.0f * xx - yy) * sh[9] +
126
+ SH_C3[1] * xy * z * sh[10] +
127
+ SH_C3[2] * y * (4.0f * zz - xx - yy) * sh[11] +
128
+ SH_C3[3] * z * (2.0f * zz - 3.0f * xx - 3.0f * yy) * sh[12] +
129
+ SH_C3[4] * x * (4.0f * zz - xx - yy) * sh[13] +
130
+ SH_C3[5] * z * (xx - yy) * sh[14] +
131
+ SH_C3[6] * x * (xx - 3.0f * yy) * sh[15];
132
+ #endif
133
+ #endif
134
+ #endif
135
+
136
+ return result;
137
+ }
138
+
139
+ vec4 decompose(uint value) {
140
+ vec4 components = vec4(
141
+ float((value) & 255u),
142
+ float((value >> uint(8)) & 255u),
143
+ float((value >> uint(16)) & 255u),
144
+ float((value >> uint(24)) & 255u)
145
+ );
146
+ return components * vec4(2./255.) - vec4(1.);
147
+ }
148
+
149
+ vec3 computeSH(Splat splat, vec3 color, vec3 dir) {
150
+ vec3 sh[16];
151
+ sh[0] = color;
152
+
153
+ #if SH_DEGREE > 0
154
+ vec4 sh00 = decompose(splat.sh0.x);
155
+ vec4 sh01 = decompose(splat.sh0.y);
156
+ vec4 sh02 = decompose(splat.sh0.z);
157
+ sh[1] = vec3(sh00.x, sh00.y, sh00.z);
158
+ sh[2] = vec3(sh00.w, sh01.x, sh01.y);
159
+ sh[3] = vec3(sh01.z, sh01.w, sh02.x);
160
+ #endif
161
+ #if SH_DEGREE > 1
162
+ vec4 sh03 = decompose(splat.sh0.w);
163
+ vec4 sh04 = decompose(splat.sh1.x);
164
+ vec4 sh05 = decompose(splat.sh1.y);
165
+ sh[4] = vec3(sh02.y, sh02.z, sh02.w);
166
+ sh[5] = vec3(sh03.x, sh03.y, sh03.z);
167
+ sh[6] = vec3(sh03.w, sh04.x, sh04.y);
168
+ sh[7] = vec3(sh04.z, sh04.w, sh05.x);
169
+ sh[8] = vec3(sh05.y, sh05.z, sh05.w);
170
+ #endif
171
+ #if SH_DEGREE > 2
172
+ vec4 sh06 = decompose(splat.sh1.z);
173
+ vec4 sh07 = decompose(splat.sh1.w);
174
+ vec4 sh08 = decompose(splat.sh2.x);
175
+ vec4 sh09 = decompose(splat.sh2.y);
176
+ vec4 sh10 = decompose(splat.sh2.z);
177
+ vec4 sh11 = decompose(splat.sh2.w);
178
+ sh[9] = vec3(sh06.x, sh06.y, sh06.z);
179
+ sh[10] = vec3(sh06.w, sh07.x, sh07.y);
180
+ sh[11] = vec3(sh07.z, sh07.w, sh08.x);
181
+ sh[12] = vec3(sh08.y, sh08.z, sh08.w);
182
+ sh[13] = vec3(sh09.x, sh09.y, sh09.z);
183
+ sh[14] = vec3(sh09.w, sh10.x, sh10.y);
184
+ sh[15] = vec3(sh10.z, sh10.w, sh11.x);
185
+ #endif
186
+
187
+ return computeColorFromSHDegree(dir, sh);
188
+ }
189
+
190
+ vec4 gaussianSplatting(vec2 meshPos, vec3 worldPos, vec2 scale, vec3 covA, vec3 covB, mat4 worldMatrix, mat4 viewMatrix, mat4 projectionMatrix) {
191
+ mat4 modelView = viewMatrix * worldMatrix;
192
+ vec4 camspace = viewMatrix * vec4(worldPos, 1.0);
193
+ vec4 pos2d = projectionMatrix * camspace;
194
+
195
+ float bounds = 1.2 * pos2d.w;
196
+ if (pos2d.z < -pos2d.w || pos2d.x < -bounds || pos2d.x > bounds || pos2d.y < -bounds || pos2d.y > bounds) {
197
+ return vec4(0.0, 0.0, 2.0, 1.0);
198
+ }
199
+
200
+ mat3 Vrk = mat3(
201
+ covA.x, covA.y, covA.z,
202
+ covA.y, covB.x, covB.y,
203
+ covA.z, covB.y, covB.z
204
+ );
205
+
206
+ mat3 J = mat3(
207
+ focal.x / camspace.z, 0., -(focal.x * camspace.x) / (camspace.z * camspace.z),
208
+ 0., focal.y / camspace.z, -(focal.y * camspace.y) / (camspace.z * camspace.z),
209
+ 0., 0., 0.
210
+ );
211
+
212
+ mat3 T = transpose(mat3(modelView)) * J;
213
+ mat3 cov2d = transpose(T) * Vrk * T;
214
+
215
+ float mid = (cov2d[0][0] + cov2d[1][1]) / 2.0;
216
+ float radius = length(vec2((cov2d[0][0] - cov2d[1][1]) / 2.0, cov2d[0][1]));
217
+ float lambda1 = mid + radius, lambda2 = mid - radius;
218
+
219
+ if (lambda2 < 0.0) {
220
+ return vec4(0.0, 0.0, 2.0, 1.0);
221
+ }
222
+
223
+ vec2 diagonalVector = normalize(vec2(cov2d[0][1], lambda1 - cov2d[0][0]));
224
+ vec2 majorAxis = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;
225
+ vec2 minorAxis = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);
226
+
227
+ vec2 vCenter = vec2(pos2d);
228
+ return vec4(
229
+ vCenter + ((meshPos.x * majorAxis + meshPos.y * minorAxis) * invViewport * pos2d.w) * scale,
230
+ pos2d.zw
231
+ );
232
+ }
233
+
234
+ void main() {
235
+ Splat splat = readSplat(splatIndex);
236
+ vec3 covA = splat.covA.xyz;
237
+ vec3 covB = vec3(splat.covA.w, splat.covB.xy);
238
+
239
+ vec4 worldPos = modelMatrix * vec4(splat.center.xyz, 1.0);
240
+
241
+ vColor = splat.color;
242
+ vPosition = position.xy;
243
+
244
+ gl_Position = gaussianSplatting(vPosition, worldPos.xyz, vec2(1.0, 1.0), covA, covB, modelMatrix, viewMatrix, projectionMatrix);
245
+ }
246
+ `,Za=`
247
+ precision highp float;
248
+ #include <common>
249
+
250
+ varying vec4 vColor;
251
+ varying vec2 vPosition;
252
+
253
+ vec4 gaussianColor(vec4 inColor) {
254
+ float A = -dot(vPosition, vPosition);
255
+ if (A < -4.0) discard;
256
+ float B = exp(A) * inColor.a;
257
+ return vec4(inColor.rgb, B);
258
+ }
259
+
260
+ void main() {
261
+ gl_FragColor = gaussianColor(vColor);
262
+ }
263
+ `,Ht=t=>u.DataUtils.toHalfFloat(t);class Wo{static build(e=1){const n=new u.BufferGeometry;n.setIndex([0,1,2]);const r=new u.BufferAttribute(new Float32Array([-3,-2,0,3,-2,0,0,4,0]),3);n.setAttribute("position",r);const o=new u.InstancedBufferGeometry;o.setIndex(n.getIndex()),o.setAttribute("position",n.getAttribute("position"));const s=new u.InstancedBufferAttribute(new Float32Array(e),1,!1);return s.setUsage(u.DynamicDrawUsage),o.setAttribute("splatIndex",s),o.instanceCount=0,o}}class ot{static BATCH_SIZE=327680;static workCount=0;vertexCount=0;positions=null;hasInit=!1;splatIndex=null;depthValues=null;tempDepths=null;tempIndices=null;abortController=null;onmessage=null;terminate(){this.abortController?.abort(),this.abortController=null,this.vertexCount=0,this.positions=null,this.splatIndex=null,this.onmessage=null}initSortData(){if(this.hasInit||this.vertexCount<0)return;const e=this.vertexCount;this.depthValues=new Int32Array(e),this.splatIndex=new Uint32Array(e),this.tempDepths=new Int32Array(e),this.tempIndices=new Uint32Array(e),this.hasInit=!0}*sortData(e,n){this.hasInit||this.initSortData();const{positions:r,vertexCount:o,depthValues:s,splatIndex:i,tempDepths:a,tempIndices:l}=this;if(!r||!s||!i||!a||!l)return;let c=1/0;for(let p=0;p<o;p++){i[p]=p;const b=e[2]*r[4*p]+e[6]*r[4*p+1]+e[10]*r[4*p+2],m=Math.floor(b*4096);s[p]=m,c=Math.min(c,m)}n&&(ot.workCount+=o,ot.workCount>ot.BATCH_SIZE&&(ot.workCount=0,yield));const f=-c;for(let p=0;p<o;p++)s[p]+=f;const d=new Uint32Array(256);for(let p=0;p<32;p+=8){d.fill(0);for(let m=0;m<o;m++)d[s[m]>>p&255]++;let b=0;for(let m=0;m<d.length;m++){const h=d[m];d[m]=b,b+=h}for(let m=0;m<o;m++){const h=s[m]>>p&255,x=d[h]++;a[x]=s[m],l[x]=i[m]}s.set(a),i.set(l),n&&(ot.workCount+=o,ot.workCount>ot.BATCH_SIZE&&(ot.workCount=0,yield))}}init(e,n){this.positions=e,this.vertexCount=n,this.initSortData()}async sortDataAsync(e){this.abortController?.abort(),this.abortController=new AbortController;const n=this.abortController.signal;try{await uo(this.sortData(e,!0),co(),n),this.onmessage&&this.splatIndex&&this.onmessage(this.splatIndex)}catch(r){r instanceof Error&&r.name!=="AbortError"&&console.error("Splat sort error:",r)}finally{this.abortController=null}}}class Lr{static build(e=0){return new u.ShaderMaterial({uniforms:{invViewport:{value:new u.Vector2},dataTextureSize:{value:new u.Vector2},focal:{value:new u.Vector2},covariancesATexture:{value:null},covariancesBTexture:{value:null},centersTexture:{value:null},colorsTexture:{value:null},shTexture0:{value:null},shTexture1:{value:null},shTexture2:{value:null}},defines:{SH_DEGREE:e},vertexShader:Qa,fragmentShader:Za,transparent:!0,alphaTest:1,blending:u.NormalBlending,depthTest:!0,depthWrite:!0,side:u.DoubleSide})}static updateUniforms(e,n,r){const o=r.material;if(!o?.uniforms)return;const{uniforms:s}=o,i=e.getSize(new u.Vector2);if(s.invViewport.value.set(1/i.x,1/i.y),n){const a=n._cleanProjectionMatrix,l=a?.elements??a??n.projectionMatrix.elements;s.focal.value.set(l[0]*.5*i.x,l[5]*.5*i.y)}if(r.covariancesATexture){const{width:a,height:l}=r.covariancesATexture.image;s.dataTextureSize.value.set(a,l),s.covariancesATexture.value=r.covariancesATexture,s.covariancesBTexture.value=r.covariancesBTexture,s.centersTexture.value=r.centersTexture,s.colorsTexture.value=r.colorsTexture,r.shTextures?.forEach((c,f)=>{s[`shTexture${f}`].value=c})}o.uniformsNeedUpdate=!0}}class Jt extends u.Mesh{static ROW_OUTPUT_LENGTH=32;static SPLAT_BATCH_SIZE=327680;vertexCount=0;worker=null;frameIdLastUpdate=-1;frameIdThisUpdate=0;cameraMatrix=null;internalModelViewMatrix=null;canPostToWorker=!1;covariancesATextureInternal=null;covariancesBTextureInternal=null;centersTextureInternal=null;colorsTextureInternal=null;splatPositions=null;splatPositions2=null;splatIndex=null;shTexturesInternal=null;splatsDataInternal=null;keepInRam=!1;oldDirection=new u.Vector3;useRGBACovariants=!0;tmpCovariances=[0,0,0,0,0,0];sortIsDirty=!1;lastSortTime=0;sortThrottleMs=200;shDegreeValue=0;tempQuaternion=new u.Quaternion;tempPosition=new u.Vector3;tempScale=new u.Vector3;tempColor=new Uint8Array(4);tempMatrix=new u.Matrix4;isGaussianSplattingMesh=!0;readyToDisplay=!1;type="GaussianSplattingMesh";get shDegree(){return this.shDegreeValue}get splatsData(){return this.splatsDataInternal}get covariancesATexture(){return this.covariancesATextureInternal}get covariancesBTexture(){return this.covariancesBTextureInternal}get centersTexture(){return this.centersTextureInternal}get colorsTexture(){return this.colorsTextureInternal}get shTextures(){return this.shTexturesInternal}constructor(){super(),this.geometry=Wo.build(),this.material=Lr.build(),this.setEnabled(!1)}setEnabled(e){this.visible=e}postToWorker(e=!1){const n=this.frameIdThisUpdate;if((e||n!==this.frameIdLastUpdate)&&this.worker&&this.cameraMatrix&&this.canPostToWorker){this.internalModelViewMatrix=new u.Matrix4().multiplyMatrices(this.cameraMatrix,this.matrixWorld);const r=this.cameraMatrix.clone().invert(),o=new u.Matrix4().multiplyMatrices(r,this.matrixWorld),s=new u.Vector3(0,0,1).transformDirection(o),i=s.dot(this.oldDirection);if(e||Math.abs(i-1)>=.01)return this.oldDirection.copy(s),this.frameIdLastUpdate=n,this.canPostToWorker=!1,this.worker.sortDataAsync(this.internalModelViewMatrix.elements)}}onBeforeRender(e,n,r,o,s,i){this.frameIdThisUpdate=e.info.render.frame;const a=performance.now();a-this.lastSortTime>this.sortThrottleMs&&(this.lastSortTime=a,this.sortDataAsync(r).catch(l=>{l.name!=="AbortError"&&console.warn("Splat sorting error:",l)})),Lr.updateUniforms(e,r,this),super.onBeforeRender(e,n,r,o,s,i)}loadDataAsync(e){return this.updateDataAsync(e)}dispose(){this.covariancesATextureInternal?.dispose(),this.covariancesBTextureInternal?.dispose(),this.centersTextureInternal?.dispose(),this.colorsTextureInternal?.dispose(),this.shTexturesInternal?.forEach(e=>e.dispose()),this.covariancesATextureInternal=null,this.covariancesBTextureInternal=null,this.centersTextureInternal=null,this.colorsTextureInternal=null,this.shTexturesInternal=null,this.worker?.terminate(),this.worker=null}copyTextures(e){this.covariancesATextureInternal=e.covariancesATexture?.clone()??null,this.covariancesBTextureInternal=e.covariancesBTexture?.clone()??null,this.centersTextureInternal=e.centersTexture?.clone()??null,this.colorsTextureInternal=e.colorsTexture?.clone()??null,e.shTexturesInternal&&(this.shTexturesInternal=e.shTexturesInternal.map(n=>n.clone()))}clone(){const e=new Jt;return e.geometry=this.geometry.clone(),e.material=this.material.clone(),e.vertexCount=this.vertexCount,e.copyTextures(this),e.splatPositions=this.splatPositions,e.readyToDisplay=!1,e.instantiateWorker(),e}makeSplatFromComponents(e,n,r,o,s,i,a,l,c,f,d){s.w=-s.w,o=o.multiplyScalar(2);const p=this.tempMatrix.elements,b=this.useRGBACovariants?4:2;this.splatPositions[4*e+0]=r.x,this.splatPositions[4*e+1]=r.y,this.splatPositions[4*e+2]=r.z,this.splatPositions2[4*e+0]=r.x,this.splatPositions2[4*e+1]=r.y,this.splatPositions2[4*e+2]=r.z,f.min(r),d.max(r);const{x:m,y:h,z:x,w:v}=s,E=m+m,_=h+h,T=x+x,S=m*E,w=m*_,M=m*T,A=h*_,D=h*T,$=x*T,z=v*E,y=v*_,P=v*T,{x:C,y:L,z:O}=o;p[0]=(1-(A+$))*C,p[1]=(w+P)*L,p[2]=(M-y)*O,p[4]=(w-P)*C,p[5]=(1-(S+$))*L,p[6]=(D+z)*O,p[8]=(M+y)*C,p[9]=(D-z)*L,p[10]=(1-(S+A))*O;const F=this.tmpCovariances;F[0]=p[0]*p[0]+p[1]*p[1]+p[2]*p[2],F[1]=p[0]*p[4]+p[1]*p[5]+p[2]*p[6],F[2]=p[0]*p[8]+p[1]*p[9]+p[2]*p[10],F[3]=p[4]*p[4]+p[5]*p[5]+p[6]*p[6],F[4]=p[4]*p[8]+p[5]*p[9]+p[6]*p[10],F[5]=p[8]*p[8]+p[9]*p[9]+p[10]*p[10];let G=-1e4;for(let Y=0;Y<6;Y++)G=Math.max(G,Math.abs(F[Y]));this.splatPositions[4*e+3]=G,this.splatPositions2[4*e+3]=G,a[n*4+0]=Ht(F[0]/G),a[n*4+1]=Ht(F[1]/G),a[n*4+2]=Ht(F[2]/G),a[n*4+3]=Ht(F[3]/G),l[n*b+0]=Ht(F[4]/G),l[n*b+1]=Ht(F[5]/G),c[n*4+0]=i[0],c[n*4+1]=i[1],c[n*4+2]=i[2],c[n*4+3]=i[3]}makeSplatFromBuffer(e,n,r,o,s,i,a,l,c){const f=8*e,d=32*e;this.tempPosition.set(r[f],r[f+1],r[f+2]),this.tempScale.set(r[f+3],r[f+4],r[f+5]),this.tempQuaternion.set((o[d+29]-127.5)/127.5,(o[d+30]-127.5)/127.5,(o[d+31]-127.5)/127.5,(o[d+28]-127.5)/127.5).normalize(),this.tempColor[0]=o[d+24],this.tempColor[1]=o[d+25],this.tempColor[2]=o[d+26],this.tempColor[3]=o[d+27],this.makeSplatFromComponents(e,n,this.tempPosition,this.tempScale,this.tempQuaternion,this.tempColor,s,i,a,l,c)}updateTextures(e,n,r,o){const s=this.getTextureSize(this.vertexCount),i=(f,d,p,b)=>{const m=new u.DataTexture(f,d,p,b,u.FloatType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return m.generateMipmaps=!1,m.needsUpdate=!0,m},a=(f,d,p,b)=>{const m=new u.DataTexture(f,d,p,b,u.UnsignedByteType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return m.generateMipmaps=!1,m.needsUpdate=!0,m},l=(f,d,p,b)=>{const m=new u.DataTexture(f,d,p,b,u.UnsignedIntType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return m.generateMipmaps=!1,m.needsUpdate=!0,m},c=(f,d,p,b)=>{const m=new u.DataTexture(f,d,p,b,u.HalfFloatType,u.UVMapping,u.ClampToEdgeWrapping,u.ClampToEdgeWrapping,u.NearestFilter,u.NearestFilter);return m.generateMipmaps=!1,m.needsUpdate=!0,m};this.covariancesATextureInternal=c(e,s.x,s.y,u.RGBAFormat),this.covariancesBTextureInternal=c(n,s.x,s.y,this.useRGBACovariants?u.RGBAFormat:u.RGFormat),this.centersTextureInternal=i(this.splatPositions,s.x,s.y,u.RGBAFormat),this.colorsTextureInternal=a(r,s.x,s.y,u.RGBAFormat),o&&(this.shTexturesInternal=o.map(f=>{const d=new Uint32Array(f.buffer),p=l(d,s.x,s.y,u.RGBAIntegerFormat);return p.wrapS=u.ClampToEdgeWrapping,p.wrapT=u.ClampToEdgeWrapping,p})),this.instantiateWorker()}updateBoundingInfo(e,n){this.boundingBox=new u.Box3(e,n),this.boundingSphere=this.boundingBox.getBoundingSphere(new u.Sphere)}*updateDataCoroutine(e,n,r){this.covariancesATextureInternal||(this.readyToDisplay=!1);const o=new Uint8Array(e),s=new Float32Array(o.buffer);this.keepInRam&&(this.splatsDataInternal=e),this.shDegreeValue=r?r.length:0;const i=o.length/Jt.ROW_OUTPUT_LENGTH;i!==this.vertexCount&&(this.vertexCount=i,this.geometry=Wo.build(this.vertexCount),this.material=Lr.build(this.shDegreeValue),this.updateSplatIndexBuffer(this.vertexCount));const a=this.getTextureSize(i),l=a.x*a.y;this.splatPositions=new Float32Array(4*l),this.splatPositions2=new Float32Array(4*i);const c=new Uint16Array(l*4),f=new Uint16Array((this.useRGBACovariants?4:2)*l),d=new Uint8Array(l*4),p=new u.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),b=new u.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let m=0;m<i;m++)this.makeSplatFromBuffer(m,m,s,o,c,f,d,p,b),n&&m%Jt.SPLAT_BATCH_SIZE===0&&(yield);this.updateTextures(c,f,d,r),this.updateBoundingInfo(p,b),this.setEnabled(!0),this.postToWorker(!0)}async updateDataAsync(e,n){return uo(this.updateDataCoroutine(e,!0,n),co())}updateData(e,n){qa(this.updateDataCoroutine(e,!1,n))}sortDataAsync(e,n=!1){return!this.worker||!e?Promise.resolve():(this.cameraMatrix=e.matrixWorldInverse,this.postToWorker(n)??Promise.resolve())}updateSplatIndexBuffer(e){if(!this.splatIndex||e>this.splatIndex.length){this.splatIndex=new Float32Array(e);for(let n=0;n<e;n++)this.splatIndex[n]=n;this.geometry.attributes.splatIndex.set(this.splatIndex),this.geometry.attributes.splatIndex.needsUpdate=!0}this.geometry.instanceCount=e}instantiateWorker(){this.vertexCount&&(this.updateSplatIndexBuffer(this.vertexCount),this.worker?.terminate(),this.worker=new ot,this.worker.init(this.splatPositions2,this.vertexCount),this.canPostToWorker=!0,this.worker.onmessage=e=>{if(this.splatIndex&&e){for(let n=0;n<this.vertexCount;n++)this.splatIndex[n]=e[n];this.geometry.attributes.splatIndex.set(this.splatIndex)}this.geometry.attributes.splatIndex.needsUpdate=!0,this.canPostToWorker=!0,this.readyToDisplay=!0,this.sortIsDirty&&(this.postToWorker(!0),this.sortIsDirty=!1)})}getTextureSize(e){let o=1;for(;4096*o<e;)o*=2;return o>4096&&(console.error(`GaussianSplatting texture size: (4096, ${o}), maxTextureSize: 4096`),o=4096),new u.Vector2(4096,o)}}class Ja extends u.Loader{load(e,n,r,o){const s=new u.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,i=>this.parse(i,n,o),r,o)}parse(e,n,r){const o=new Jt;o.loadDataAsync(e).then(()=>n(o)).catch(s=>{r?r(s):console.error(s)})}}const lt=(t,e)=>{const n=(1<<e)-1;return(t&n)/n},Yo=(t,e)=>{e.x=lt(t>>>21,11),e.y=lt(t>>>11,10),e.z=lt(t,11)},el=(t,e)=>{e[0]=lt(t>>>24,8)*255,e[1]=lt(t>>>16,8)*255,e[2]=lt(t>>>8,8)*255,e[3]=lt(t,8)*255},tl=(t,e)=>{const n=1/(Math.sqrt(2)*.5),r=(lt(t>>>20,10)-.5)*n,o=(lt(t>>>10,10)-.5)*n,s=(lt(t,10)-.5)*n,i=Math.sqrt(1-(r*r+o*o+s*s));switch(t>>>30){case 0:e.set(i,r,o,s);break;case 1:e.set(r,i,o,s);break;case 2:e.set(r,o,i,s);break;case 3:e.set(r,o,s,i);break}};class De extends u.Loader{static ROW_OUTPUT_LENGTH=32;static SH_C0=.28209479177387814;static PLY_CONVERSION_BATCH_SIZE=32768;load(e,n,r,o){const s=new u.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,i=>this.parse(i,n,o),r,o)}parse(e,n,r){De.ConvertPLYToSplatAsync(e).then(o=>{const s=new Jt;return s.loadDataAsync(o).then(()=>n(s))}).catch(o=>{r?r(o):console.error(o)})}static async ConvertPLYToSplatAsync(e){return uo(De.ConvertPLYToSplat(e,!0),co())}static*ConvertPLYToSplat(e,n=!1){const r=De.ParseHeader(e);if(!r)return e;const o={value:0},s=De.getCompressedChunks(r,o);for(let i=0;i<r.vertexCount;i++)De.getSplat(r,i,s,o),n&&i%De.PLY_CONVERSION_BATCH_SIZE===0&&(yield);return r.buffer}static getCompressedChunks(e,n){if(!e.chunkCount)return null;const{dataView:r,chunkProperties:o,rowChunkLength:s,chunkCount:i}=e,a=[];for(let l=0;l<i;l++){const c={min:new u.Vector3,max:new u.Vector3,minScale:new u.Vector3,maxScale:new u.Vector3};for(const f of o){if(f.type!==0)continue;const d=r.getFloat32(f.offset+n.value,!0);switch(f.value){case 0:c.min.x=d;break;case 1:c.min.y=d;break;case 2:c.min.z=d;break;case 3:c.max.x=d;break;case 4:c.max.y=d;break;case 5:c.max.z=d;break;case 6:c.minScale.x=d;break;case 7:c.minScale.y=d;break;case 8:c.minScale.z=d;break;case 9:c.maxScale.x=d;break;case 10:c.maxScale.y=d;break;case 11:c.maxScale.z=d;break}}a.push(c),n.value+=s}return a}static getSplat(e,n,r,o){const s=new u.Quaternion,i=new u.Vector3,{buffer:a,dataView:l,vertexProperties:c,rowVertexLength:f}=e,d=De.ROW_OUTPUT_LENGTH,p=new Float32Array(a,n*d,3),b=new Float32Array(a,n*d+12,3),m=new Uint8ClampedArray(a,n*d+24,4),h=new Uint8ClampedArray(a,n*d+28,4),x=n>>8;let v=255,E=0,_=0,T=0;for(const S of c){let w;switch(S.type){case 0:w=l.getFloat32(o.value+S.offset,!0);break;case 1:w=l.getInt32(o.value+S.offset,!0);break;case 2:w=l.getUint32(o.value+S.offset,!0);break;case 3:w=l.getFloat64(o.value+S.offset,!0);break;case 4:w=l.getUint8(o.value+S.offset);break;default:continue}const M=r?.[x];switch(S.value){case 12:Yo(w,i),p[0]=u.MathUtils.lerp(M.min.x,M.max.x,i.x),p[1]=-u.MathUtils.lerp(M.min.y,M.max.y,i.y),p[2]=u.MathUtils.lerp(M.min.z,M.max.z,i.z);break;case 13:tl(w,s),v=s.w,E=s.z,_=s.y,T=s.x;break;case 14:Yo(w,i),b[0]=Math.exp(u.MathUtils.lerp(M.minScale.x,M.maxScale.x,i.x)),b[1]=Math.exp(u.MathUtils.lerp(M.minScale.y,M.maxScale.y,i.y)),b[2]=Math.exp(u.MathUtils.lerp(M.minScale.z,M.maxScale.z,i.z));break;case 15:el(w,m);break;case 16:p[0]=w;break;case 17:p[1]=w;break;case 18:p[2]=w;break;case 19:b[0]=Math.exp(w);break;case 20:b[1]=Math.exp(w);break;case 21:b[2]=Math.exp(w);break;case 22:m[0]=w;break;case 23:m[1]=w;break;case 24:m[2]=w;break;case 26:m[0]=(.5+De.SH_C0*w)*255;break;case 27:m[1]=(.5+De.SH_C0*w)*255;break;case 28:m[2]=(.5+De.SH_C0*w)*255;break;case 29:m[3]=(.5+De.SH_C0*w)*255;break;case 25:m[3]=1/(1+Math.exp(-w))*255;break;case 30:v=w;break;case 31:E=w;break;case 32:_=w;break;case 33:T=w;break}}s.set(E,_,T,v).normalize(),h[0]=s.w*128+128,h[1]=s.x*128+128,h[2]=s.y*128+128,h[3]=s.z*128+128,o.value+=f}static typeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4;default:return 5}}static valueNameToEnum(e){return{min_x:0,min_y:1,min_z:2,max_x:3,max_y:4,max_z:5,min_scale_x:6,min_scale_y:7,min_scale_z:8,max_scale_x:9,max_scale_y:10,max_scale_z:11,packed_position:12,packed_rotation:13,packed_scale:14,packed_color:15,x:16,y:17,z:18,scale_0:19,scale_1:20,scale_2:21,diffuse_red:22,red:22,diffuse_green:23,green:23,diffuse_blue:24,blue:24,f_dc_0:26,f_dc_1:27,f_dc_2:28,f_dc_3:29,opacity:25,rot_0:30,rot_1:31,rot_2:32,rot_3:33}[e]??34}static ParseHeader(e){const n=new Uint8Array(e),r=new TextDecoder().decode(n.slice(0,1024*10)),o=`end_header
264
+ `,s=r.indexOf(o);if(s<0)return null;const i=/element vertex (\d+)\n/.exec(r);if(!i)return null;const a=parseInt(i[1]),l=/element chunk (\d+)\n/.exec(r),c=l?parseInt(l[1]):0,f={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let d;(v=>{v[v.Vertex=0]="Vertex",v[v.Chunk=1]="Chunk"})(d||(d={}));let p=1,b=0,m=0;const h=[],x=[];for(const v of r.slice(0,s).split(`
265
+ `))if(v.startsWith("property ")){const[,E,_]=v.split(" "),T={value:De.valueNameToEnum(_),type:De.typeNameToEnum(E),offset:p===1?m:b};p===1?(x.push(T),m+=f[E]??0):(h.push(T),b+=f[E]??0)}else if(v.startsWith("element ")){const[,E]=v.split(" ");p=E==="chunk"?1:0}return{vertexCount:a,chunkCount:c,rowVertexLength:b,rowChunkLength:m,vertexProperties:h,chunkProperties:x,dataView:new DataView(e,s+o.length),buffer:new ArrayBuffer(De.ROW_OUTPUT_LENGTH*a)}}}const nl=t=>{const{url:e,position:n,transform:r,init:o,onDone:s,customLoaders:i}=t,a=W.useMemo(()=>({splat:(l,c)=>{new Ja().load(l,d=>c(d))},ply:(l,c)=>{new De().load(l,d=>c(d))}}),[]);return ti({url:e,position:n,transform:r,init:o,onDone:s,loaders:a,customLoaders:i}),null},_t=new u.Raycaster,$e=new u.Vector3,gt=new u.Vector3,Te=new u.Quaternion,Xo={X:new u.Vector3(1,0,0),Y:new u.Vector3(0,1,0),Z:new u.Vector3(0,0,1)},Nr={type:"change"},Ko={type:"mouseDown",mode:null},qo={type:"mouseUp",mode:null},Qo={type:"objectChange"};class rl extends u.Controls{constructor(e,n=null){super(void 0,n);const r=new cl(this);this._root=r;const o=new ul;this._gizmo=o,r.add(o);const s=new dl;this._plane=s,r.add(s);const i=this;function a(_,T){let S=T;Object.defineProperty(i,_,{get:function(){return S!==void 0?S:T},set:function(w){S!==w&&(S=w,s[_]=w,o[_]=w,i.dispatchEvent({type:_+"-changed",value:w}),i.dispatchEvent(Nr))}}),i[_]=T,s[_]=T,o[_]=T}a("camera",e),a("object",void 0),a("enabled",!0),a("axis",null),a("mode","translate"),a("translationSnap",null),a("rotationSnap",null),a("scaleSnap",null),a("space","world"),a("size",1),a("dragging",!1),a("showX",!0),a("showY",!0),a("showZ",!0),a("minX",-1/0),a("maxX",1/0),a("minY",-1/0),a("maxY",1/0),a("minZ",-1/0),a("maxZ",1/0);const l=new u.Vector3,c=new u.Vector3,f=new u.Quaternion,d=new u.Quaternion,p=new u.Vector3,b=new u.Quaternion,m=new u.Vector3,h=new u.Vector3,x=new u.Vector3,v=0,E=new u.Vector3;a("worldPosition",l),a("worldPositionStart",c),a("worldQuaternion",f),a("worldQuaternionStart",d),a("cameraPosition",p),a("cameraQuaternion",b),a("pointStart",m),a("pointEnd",h),a("rotationAxis",x),a("rotationAngle",v),a("eye",E),this._offset=new u.Vector3,this._startNorm=new u.Vector3,this._endNorm=new u.Vector3,this._cameraScale=new u.Vector3,this._parentPosition=new u.Vector3,this._parentQuaternion=new u.Quaternion,this._parentQuaternionInv=new u.Quaternion,this._parentScale=new u.Vector3,this._worldScaleStart=new u.Vector3,this._worldQuaternionInv=new u.Quaternion,this._worldScale=new u.Vector3,this._positionStart=new u.Vector3,this._quaternionStart=new u.Quaternion,this._scaleStart=new u.Vector3,this._getPointer=ol.bind(this),this._onPointerDown=il.bind(this),this._onPointerHover=sl.bind(this),this._onPointerMove=al.bind(this),this._onPointerUp=ll.bind(this),n!==null&&this.connect(n)}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="auto"}getHelper(){return this._root}pointerHover(e){if(this.object===void 0||this.dragging===!0)return;e!==null&&_t.setFromCamera(e,this.camera);const n=Dr(this._gizmo.picker[this.mode],_t);n?this.axis=n.object.name:this.axis=null}pointerDown(e){if(!(this.object===void 0||this.dragging===!0||e!=null&&e.button!==0)&&this.axis!==null){e!==null&&_t.setFromCamera(e,this.camera);const n=Dr(this._plane,_t,!0);n&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(n.point).sub(this.worldPositionStart)),this.dragging=!0,Ko.mode=this.mode,this.dispatchEvent(Ko)}}pointerMove(e){const n=this.axis,r=this.mode,o=this.object;let s=this.space;if(r==="scale"?s="local":(n==="E"||n==="XYZE"||n==="XYZ")&&(s="world"),o===void 0||n===null||this.dragging===!1||e!==null&&e.button!==-1)return;e!==null&&_t.setFromCamera(e,this.camera);const i=Dr(this._plane,_t,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),r==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),s==="local"&&n!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),n.indexOf("X")===-1&&(this._offset.x=0),n.indexOf("Y")===-1&&(this._offset.y=0),n.indexOf("Z")===-1&&(this._offset.z=0),s==="local"&&n!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),o.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(s==="local"&&(o.position.applyQuaternion(Te.copy(this._quaternionStart).invert()),n.search("X")!==-1&&(o.position.x=Math.round(o.position.x/this.translationSnap)*this.translationSnap),n.search("Y")!==-1&&(o.position.y=Math.round(o.position.y/this.translationSnap)*this.translationSnap),n.search("Z")!==-1&&(o.position.z=Math.round(o.position.z/this.translationSnap)*this.translationSnap),o.position.applyQuaternion(this._quaternionStart)),s==="world"&&(o.parent&&o.position.add($e.setFromMatrixPosition(o.parent.matrixWorld)),n.search("X")!==-1&&(o.position.x=Math.round(o.position.x/this.translationSnap)*this.translationSnap),n.search("Y")!==-1&&(o.position.y=Math.round(o.position.y/this.translationSnap)*this.translationSnap),n.search("Z")!==-1&&(o.position.z=Math.round(o.position.z/this.translationSnap)*this.translationSnap),o.parent&&o.position.sub($e.setFromMatrixPosition(o.parent.matrixWorld)))),o.position.x=Math.max(this.minX,Math.min(this.maxX,o.position.x)),o.position.y=Math.max(this.minY,Math.min(this.maxY,o.position.y)),o.position.z=Math.max(this.minZ,Math.min(this.maxZ,o.position.z));else if(r==="scale"){if(n.search("XYZ")!==-1){let a=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(a*=-1),gt.set(a,a,a)}else $e.copy(this.pointStart),gt.copy(this.pointEnd),$e.applyQuaternion(this._worldQuaternionInv),gt.applyQuaternion(this._worldQuaternionInv),gt.divide($e),n.search("X")===-1&&(gt.x=1),n.search("Y")===-1&&(gt.y=1),n.search("Z")===-1&&(gt.z=1);o.scale.copy(this._scaleStart).multiply(gt),this.scaleSnap&&(n.search("X")!==-1&&(o.scale.x=Math.round(o.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),n.search("Y")!==-1&&(o.scale.y=Math.round(o.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),n.search("Z")!==-1&&(o.scale.z=Math.round(o.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(r==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const a=20/this.worldPosition.distanceTo($e.setFromMatrixPosition(this.camera.matrixWorld));let l=!1;n==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot($e.copy(this.rotationAxis).cross(this.eye))*a):(n==="X"||n==="Y"||n==="Z")&&(this.rotationAxis.copy(Xo[n]),$e.copy(Xo[n]),s==="local"&&$e.applyQuaternion(this.worldQuaternion),$e.cross(this.eye),$e.length()===0?l=!0:this.rotationAngle=this._offset.dot($e.normalize())*a),(n==="E"||l)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),s==="local"&&n!=="E"&&n!=="XYZE"?(o.quaternion.copy(this._quaternionStart),o.quaternion.multiply(Te.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),o.quaternion.copy(Te.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),o.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(Nr),this.dispatchEvent(Qo)}}pointerUp(e){e!==null&&e.button!==0||(this.dragging&&this.axis!==null&&(qo.mode=this.mode,this.dispatchEvent(qo)),this.dragging=!1,this.axis=null)}dispose(){this.disconnect(),this._root.dispose()}attach(e){return this.object=e,this._root.visible=!0,this}detach(){return this.object=void 0,this.axis=null,this._root.visible=!1,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(Nr),this.dispatchEvent(Qo),this.pointStart.copy(this.pointEnd))}getRaycaster(){return _t}getMode(){return this.mode}setMode(e){this.mode=e}setTranslationSnap(e){this.translationSnap=e}setRotationSnap(e){this.rotationSnap=e}setScaleSnap(e){this.scaleSnap=e}setSize(e){this.size=e}setSpace(e){this.space=e}setColors(e,n,r,o){const s=this._gizmo.materialLib;s.xAxis.color.set(e),s.yAxis.color.set(n),s.zAxis.color.set(r),s.active.color.set(o),s.xAxisTransparent.color.set(e),s.yAxisTransparent.color.set(n),s.zAxisTransparent.color.set(r),s.activeTransparent.color.set(o),s.xAxis._color&&s.xAxis._color.set(e),s.yAxis._color&&s.yAxis._color.set(n),s.zAxis._color&&s.zAxis._color.set(r),s.active._color&&s.active._color.set(o),s.xAxisTransparent._color&&s.xAxisTransparent._color.set(e),s.yAxisTransparent._color&&s.yAxisTransparent._color.set(n),s.zAxisTransparent._color&&s.zAxisTransparent._color.set(r),s.activeTransparent._color&&s.activeTransparent._color.set(o)}}function ol(t){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:t.button};{const e=this.domElement.getBoundingClientRect();return{x:(t.clientX-e.left)/e.width*2-1,y:-(t.clientY-e.top)/e.height*2+1,button:t.button}}}function sl(t){if(this.enabled)switch(t.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(t));break}}function il(t){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(t.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(t)),this.pointerDown(this._getPointer(t)))}function al(t){this.enabled&&this.pointerMove(this._getPointer(t))}function ll(t){this.enabled&&(this.domElement.releasePointerCapture(t.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(t)))}function Dr(t,e,n){const r=e.intersectObject(t,!0);for(let o=0;o<r.length;o++)if(r[o].object.visible||n)return r[o];return!1}const In=new u.Euler,xe=new u.Vector3(0,1,0),Zo=new u.Vector3(0,0,0),Jo=new u.Matrix4,kn=new u.Quaternion,Hn=new u.Quaternion,Je=new u.Vector3,es=new u.Matrix4,fn=new u.Vector3(1,0,0),Pt=new u.Vector3(0,1,0),pn=new u.Vector3(0,0,1),On=new u.Vector3,ln=new u.Vector3,cn=new u.Vector3;class cl extends u.Object3D{constructor(e){super(),this.isTransformControlsRoot=!0,this.controls=e,this.visible=!1}updateMatrixWorld(e){const n=this.controls;n.object!==void 0&&(n.object.updateMatrixWorld(),n.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):n.object.parent.matrixWorld.decompose(n._parentPosition,n._parentQuaternion,n._parentScale),n.object.matrixWorld.decompose(n.worldPosition,n.worldQuaternion,n._worldScale),n._parentQuaternionInv.copy(n._parentQuaternion).invert(),n._worldQuaternionInv.copy(n.worldQuaternion).invert()),n.camera.updateMatrixWorld(),n.camera.matrixWorld.decompose(n.cameraPosition,n.cameraQuaternion,n._cameraScale),n.camera.isOrthographicCamera?n.camera.getWorldDirection(n.eye).negate():n.eye.copy(n.cameraPosition).sub(n.worldPosition).normalize(),super.updateMatrixWorld(e)}dispose(){this.traverse(function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()})}}class ul extends u.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const e=new u.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),n=new u.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),r=e.clone();r.opacity=.15;const o=n.clone();o.opacity=.5;const s=e.clone();s.color.setHex(16711680);const i=e.clone();i.color.setHex(65280);const a=e.clone();a.color.setHex(255);const l=e.clone();l.color.setHex(16711680),l.opacity=.5;const c=e.clone();c.color.setHex(65280),c.opacity=.5;const f=e.clone();f.color.setHex(255),f.opacity=.5;const d=e.clone();d.opacity=.25;const p=e.clone();p.color.setHex(16776960),p.opacity=.25;const b=e.clone();b.color.setHex(16776960);const m=e.clone();m.color.setHex(7895160),this.materialLib={xAxis:s,yAxis:i,zAxis:a,active:b,xAxisTransparent:l,yAxisTransparent:c,zAxisTransparent:f,activeTransparent:p};const h=new u.CylinderGeometry(0,.04,.1,12);h.translate(0,.05,0);const x=new u.BoxGeometry(.08,.08,.08);x.translate(0,.04,0);const v=new u.BufferGeometry;v.setAttribute("position",new u.Float32BufferAttribute([0,0,0,1,0,0],3));const E=new u.CylinderGeometry(.0075,.0075,.5,3);E.translate(0,.25,0);function _(L,O){const F=new u.TorusGeometry(L,.0075,3,64,O*Math.PI*2);return F.rotateY(Math.PI/2),F.rotateX(Math.PI/2),F}function T(){const L=new u.BufferGeometry;return L.setAttribute("position",new u.Float32BufferAttribute([0,0,0,1,1,1],3)),L}const S={X:[[new u.Mesh(h,s),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(h,s),[-.5,0,0],[0,0,Math.PI/2]],[new u.Mesh(E,s),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new u.Mesh(h,i),[0,.5,0]],[new u.Mesh(h,i),[0,-.5,0],[Math.PI,0,0]],[new u.Mesh(E,i)]],Z:[[new u.Mesh(h,a),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(h,a),[0,0,-.5],[-Math.PI/2,0,0]],[new u.Mesh(E,a),null,[Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.1,0),d),[0,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),f),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),c),[.15,0,.15],[-Math.PI/2,0,0]]]},w={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.OctahedronGeometry(.2,0),r)]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]]},M={START:[[new u.Mesh(new u.OctahedronGeometry(.01,2),o),null,null,null,"helper"]],END:[[new u.Mesh(new u.OctahedronGeometry(.01,2),o),null,null,null,"helper"]],DELTA:[[new u.Line(T(),o),null,null,null,"helper"]],X:[[new u.Line(v,o),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new u.Line(v,o),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new u.Line(v,o),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},A={XYZE:[[new u.Mesh(_(.5,1),m),null,[0,Math.PI/2,0]]],X:[[new u.Mesh(_(.5,.5),s)]],Y:[[new u.Mesh(_(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new u.Mesh(_(.5,.5),a),null,[0,Math.PI/2,0]]],E:[[new u.Mesh(_(.75,1),p),null,[0,Math.PI/2,0]]]},D={AXIS:[[new u.Line(v,o),[-1e3,0,0],null,[1e6,1,1],"helper"]]},$={XYZE:[[new u.Mesh(new u.SphereGeometry(.25,10,8),r)]],X:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[Math.PI/2,0,0]]],Z:[[new u.Mesh(new u.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,0,-Math.PI/2]]],E:[[new u.Mesh(new u.TorusGeometry(.75,.1,2,24),r)]]},z={X:[[new u.Mesh(x,s),[.5,0,0],[0,0,-Math.PI/2]],[new u.Mesh(E,s),[0,0,0],[0,0,-Math.PI/2]],[new u.Mesh(x,s),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(x,i),[0,.5,0]],[new u.Mesh(E,i)],[new u.Mesh(x,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new u.Mesh(x,a),[0,0,.5],[Math.PI/2,0,0]],[new u.Mesh(E,a),[0,0,0],[Math.PI/2,0,0]],[new u.Mesh(x,a),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),f),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.15,.15,.01),c),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.1,.1,.1),d)]]},y={X:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/2]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new u.Mesh(new u.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new u.Mesh(new u.BoxGeometry(.2,.2,.2),r),[0,0,0]]]},P={X:[[new u.Line(v,o),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new u.Line(v,o),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new u.Line(v,o),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function C(L){const O=new u.Object3D;for(const F in L)for(let G=L[F].length;G--;){const Y=L[F][G][0].clone(),I=L[F][G][1],k=L[F][G][2],U=L[F][G][3],X=L[F][G][4];Y.name=F,Y.tag=X,I&&Y.position.set(I[0],I[1],I[2]),k&&Y.rotation.set(k[0],k[1],k[2]),U&&Y.scale.set(U[0],U[1],U[2]),Y.updateMatrix();const K=Y.geometry.clone();K.applyMatrix4(Y.matrix),Y.geometry=K,Y.renderOrder=1/0,Y.position.set(0,0,0),Y.rotation.set(0,0,0),Y.scale.set(1,1,1),O.add(Y)}return O}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=C(S)),this.add(this.gizmo.rotate=C(A)),this.add(this.gizmo.scale=C(z)),this.add(this.picker.translate=C(w)),this.add(this.picker.rotate=C($)),this.add(this.picker.scale=C(y)),this.add(this.helper.translate=C(M)),this.add(this.helper.rotate=C(D)),this.add(this.helper.scale=C(P)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(e){const r=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Hn;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let o=[];o=o.concat(this.picker[this.mode].children),o=o.concat(this.gizmo[this.mode].children),o=o.concat(this.helper[this.mode].children);for(let s=0;s<o.length;s++){const i=o[s];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let a;if(this.camera.isOrthographicCamera?a=(this.camera.top-this.camera.bottom)/this.camera.zoom:a=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(a*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(Te.setFromEuler(In.set(0,0,0)),i.quaternion.copy(r).multiply(Te),Math.abs(xe.copy(fn).applyQuaternion(r).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(Te.setFromEuler(In.set(0,0,Math.PI/2)),i.quaternion.copy(r).multiply(Te),Math.abs(xe.copy(Pt).applyQuaternion(r).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(Te.setFromEuler(In.set(0,Math.PI/2,0)),i.quaternion.copy(r).multiply(Te),Math.abs(xe.copy(pn).applyQuaternion(r).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(Te.setFromEuler(In.set(0,Math.PI/2,0)),xe.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(Jo.lookAt(Zo,xe,Pt)),i.quaternion.multiply(Te),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),$e.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),$e.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy($e),i.visible=this.dragging):(i.quaternion.copy(r),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(r),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(xe.copy(fn).applyQuaternion(r).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(xe.copy(Pt).applyQuaternion(r).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(xe.copy(pn).applyQuaternion(r).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(xe.copy(pn).applyQuaternion(r).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(xe.copy(fn).applyQuaternion(r).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(xe.copy(Pt).applyQuaternion(r).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(kn.copy(r),xe.copy(this.eye).applyQuaternion(Te.copy(r).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(Jo.lookAt(this.eye,Zo,Pt)),i.name==="X"&&(Te.setFromAxisAngle(fn,Math.atan2(-xe.y,xe.z)),Te.multiplyQuaternions(kn,Te),i.quaternion.copy(Te)),i.name==="Y"&&(Te.setFromAxisAngle(Pt,Math.atan2(xe.x,xe.z)),Te.multiplyQuaternions(kn,Te),i.quaternion.copy(Te)),i.name==="Z"&&(Te.setFromAxisAngle(pn,Math.atan2(xe.y,xe.x)),Te.multiplyQuaternions(kn,Te),i.quaternion.copy(Te))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis?(i.material.color.copy(this.materialLib.active.color),i.material.opacity=1):this.axis.split("").some(function(l){return i.name===l})&&(i.material.color.copy(this.materialLib.active.color),i.material.opacity=1))}super.updateMatrixWorld(e)}}class dl extends u.Mesh{constructor(){super(new u.PlaneGeometry(1e5,1e5,2,2),new u.MeshBasicMaterial({visible:!1,wireframe:!0,side:u.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(e){let n=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(n="local"),On.copy(fn).applyQuaternion(n==="local"?this.worldQuaternion:Hn),ln.copy(Pt).applyQuaternion(n==="local"?this.worldQuaternion:Hn),cn.copy(pn).applyQuaternion(n==="local"?this.worldQuaternion:Hn),xe.copy(ln),this.mode){case"translate":case"scale":switch(this.axis){case"X":xe.copy(this.eye).cross(On),Je.copy(On).cross(xe);break;case"Y":xe.copy(this.eye).cross(ln),Je.copy(ln).cross(xe);break;case"Z":xe.copy(this.eye).cross(cn),Je.copy(cn).cross(xe);break;case"XY":Je.copy(cn);break;case"YZ":Je.copy(On);break;case"XZ":xe.copy(cn),Je.copy(ln);break;case"XYZ":case"E":Je.set(0,0,0);break}break;case"rotate":default:Je.set(0,0,0)}Je.length()===0?this.quaternion.copy(this.cameraQuaternion):(es.lookAt($e.set(0,0,0),Je,xe),this.quaternion.setFromRotationMatrix(es)),super.updateMatrixWorld(e)}}const ri=t=>{const{target:e,mode:n,enabled:r,space:o,size:s,onObjectChange:i}=t,{scene:a,camera:l,renderer:c,map:f,sceneRoot:d}=ar(),p=W.useRef(null);return W.useEffect(()=>{if(!a||!l||!c||!f||!d)return;const b=c.getRenderer().domElement,m=new rl(l,b);p.current=m,m.setMode(n||"translate"),m.setSpace(o||"world"),s&&m.setSize(s),d.add(m._root);const h=x=>{x.value?(f.dragPan.disable(),f.scrollZoom.disable()):(f.dragPan.enable(),f.scrollZoom.enable())};if(m.addEventListener("dragging-changed",h),i){const x=()=>{m.object&&i(m.object)};m.addEventListener("objectChange",x)}return()=>{m.removeEventListener("dragging-changed",h),m.detach(),d.remove(m._root),m.dispose(),p.current=null}},[a,l,c,f,d]),W.useEffect(()=>{p.current&&(e?p.current.attach(e):p.current.detach())},[e]),W.useEffect(()=>{p.current&&(p.current.mode=n||"translate")},[n]),W.useEffect(()=>{p.current&&(p.current.enabled=r!==!1)},[r]),W.useEffect(()=>{p.current&&p.current.setSpace(o||"world")},[o]),W.useEffect(()=>{!p.current||!s||p.current.setSize(s)},[s]),null};function fl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ln={exports:{}},Nn={exports:{}},fe={};/** @license React v16.13.1
266
+ * react-is.production.min.js
267
+ *
268
+ * Copyright (c) Facebook, Inc. and its affiliates.
269
+ *
270
+ * This source code is licensed under the MIT license found in the
271
+ * LICENSE file in the root directory of this source tree.
272
+ */var ts;function pl(){if(ts)return fe;ts=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function _(S){if(typeof S=="object"&&S!==null){var w=S.$$typeof;switch(w){case e:switch(S=S.type,S){case l:case c:case r:case s:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case f:case m:case b:case i:return S;default:return w}}case n:return w}}}function T(S){return _(S)===c}return fe.AsyncMode=l,fe.ConcurrentMode=c,fe.ContextConsumer=a,fe.ContextProvider=i,fe.Element=e,fe.ForwardRef=f,fe.Fragment=r,fe.Lazy=m,fe.Memo=b,fe.Portal=n,fe.Profiler=s,fe.StrictMode=o,fe.Suspense=d,fe.isAsyncMode=function(S){return T(S)||_(S)===l},fe.isConcurrentMode=T,fe.isContextConsumer=function(S){return _(S)===a},fe.isContextProvider=function(S){return _(S)===i},fe.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},fe.isForwardRef=function(S){return _(S)===f},fe.isFragment=function(S){return _(S)===r},fe.isLazy=function(S){return _(S)===m},fe.isMemo=function(S){return _(S)===b},fe.isPortal=function(S){return _(S)===n},fe.isProfiler=function(S){return _(S)===s},fe.isStrictMode=function(S){return _(S)===o},fe.isSuspense=function(S){return _(S)===d},fe.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===s||S===o||S===d||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===b||S.$$typeof===i||S.$$typeof===a||S.$$typeof===f||S.$$typeof===x||S.$$typeof===v||S.$$typeof===E||S.$$typeof===h)},fe.typeOf=_,fe}var pe={};/** @license React v16.13.1
273
+ * react-is.development.js
274
+ *
275
+ * Copyright (c) Facebook, Inc. and its affiliates.
276
+ *
277
+ * This source code is licensed under the MIT license found in the
278
+ * LICENSE file in the root directory of this source tree.
279
+ */var ns;function hl(){return ns||(ns=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function _(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===s||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===b||B.$$typeof===i||B.$$typeof===a||B.$$typeof===f||B.$$typeof===x||B.$$typeof===v||B.$$typeof===E||B.$$typeof===h)}function T(B){if(typeof B=="object"&&B!==null){var ge=B.$$typeof;switch(ge){case e:var Le=B.type;switch(Le){case l:case c:case r:case s:case o:case d:return Le;default:var ht=Le&&Le.$$typeof;switch(ht){case a:case f:case m:case b:case i:return ht;default:return ge}}case n:return ge}}}var S=l,w=c,M=a,A=i,D=e,$=f,z=r,y=m,P=b,C=n,L=s,O=o,F=d,G=!1;function Y(B){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(B)||T(B)===l}function I(B){return T(B)===c}function k(B){return T(B)===a}function U(B){return T(B)===i}function X(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function K(B){return T(B)===f}function re(B){return T(B)===r}function Q(B){return T(B)===m}function Z(B){return T(B)===b}function ee(B){return T(B)===n}function oe(B){return T(B)===s}function te(B){return T(B)===o}function ve(B){return T(B)===d}pe.AsyncMode=S,pe.ConcurrentMode=w,pe.ContextConsumer=M,pe.ContextProvider=A,pe.Element=D,pe.ForwardRef=$,pe.Fragment=z,pe.Lazy=y,pe.Memo=P,pe.Portal=C,pe.Profiler=L,pe.StrictMode=O,pe.Suspense=F,pe.isAsyncMode=Y,pe.isConcurrentMode=I,pe.isContextConsumer=k,pe.isContextProvider=U,pe.isElement=X,pe.isForwardRef=K,pe.isFragment=re,pe.isLazy=Q,pe.isMemo=Z,pe.isPortal=ee,pe.isProfiler=oe,pe.isStrictMode=te,pe.isSuspense=ve,pe.isValidElementType=_,pe.typeOf=T})()),pe}var rs;function fo(){return rs||(rs=1,process.env.NODE_ENV==="production"?Nn.exports=pl():Nn.exports=hl()),Nn.exports}/*
280
+ object-assign
281
+ (c) Sindre Sorhus
282
+ @license MIT
283
+ */var $r,os;function ml(){if(os)return $r;os=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $r=o()?Object.assign:function(s,i){for(var a,l=r(s),c,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)e.call(a,d)&&(l[d]=a[d]);if(t){c=t(a);for(var p=0;p<c.length;p++)n.call(a,c[p])&&(l[c[p]]=a[c[p]])}}return l},$r}var Br,ss;function po(){if(ss)return Br;ss=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Br=t,Br}var zr,is;function oi(){return is||(is=1,zr=Function.call.bind(Object.prototype.hasOwnProperty)),zr}var jr,as;function gl(){if(as)return jr;as=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=po(),n={},r=oi();t=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var f in s)if(r(s,f)){var d;try{if(typeof s[f]!="function"){var p=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=s[f](i,f,l,a,null,e)}catch(m){d=m}if(d&&!(d instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var b=c?c():"";t("Failed "+a+" type: "+d.message+(b??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},jr=o,jr}var Fr,ls;function yl(){if(ls)return Fr;ls=1;var t=fo(),e=ml(),n=po(),r=oi(),o=gl(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return Fr=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(I){var k=I&&(c&&I[c]||I[f]);if(typeof k=="function")return k}var p="<<anonymous>>",b={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:E(),arrayOf:_,element:T(),elementType:S(),instanceOf:w,node:$(),objectOf:A,oneOf:M,oneOfType:D,shape:y,exact:P};function m(I,k){return I===k?I!==0||1/I===1/k:I!==I&&k!==k}function h(I,k){this.message=I,this.data=k&&typeof k=="object"?k:{},this.stack=""}h.prototype=Error.prototype;function x(I){if(process.env.NODE_ENV!=="production")var k={},U=0;function X(re,Q,Z,ee,oe,te,ve){if(ee=ee||p,te=te||Z,ve!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ge=ee+":"+Z;!k[ge]&&U<3&&(s("You are manually calling a React.PropTypes validation function for the `"+te+"` prop on `"+ee+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[ge]=!0,U++)}}return Q[Z]==null?re?Q[Z]===null?new h("The "+oe+" `"+te+"` is marked as required "+("in `"+ee+"`, but its value is `null`.")):new h("The "+oe+" `"+te+"` is marked as required in "+("`"+ee+"`, but its value is `undefined`.")):null:I(Q,Z,ee,oe,te)}var K=X.bind(null,!1);return K.isRequired=X.bind(null,!0),K}function v(I){function k(U,X,K,re,Q,Z){var ee=U[X],oe=O(ee);if(oe!==I){var te=F(ee);return new h("Invalid "+re+" `"+Q+"` of type "+("`"+te+"` supplied to `"+K+"`, expected ")+("`"+I+"`."),{expectedType:I})}return null}return x(k)}function E(){return x(i)}function _(I){function k(U,X,K,re,Q){if(typeof I!="function")return new h("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var Z=U[X];if(!Array.isArray(Z)){var ee=O(Z);return new h("Invalid "+re+" `"+Q+"` of type "+("`"+ee+"` supplied to `"+K+"`, expected an array."))}for(var oe=0;oe<Z.length;oe++){var te=I(Z,oe,K,re,Q+"["+oe+"]",n);if(te instanceof Error)return te}return null}return x(k)}function T(){function I(k,U,X,K,re){var Q=k[U];if(!a(Q)){var Z=O(Q);return new h("Invalid "+K+" `"+re+"` of type "+("`"+Z+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return x(I)}function S(){function I(k,U,X,K,re){var Q=k[U];if(!t.isValidElementType(Q)){var Z=O(Q);return new h("Invalid "+K+" `"+re+"` of type "+("`"+Z+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return x(I)}function w(I){function k(U,X,K,re,Q){if(!(U[X]instanceof I)){var Z=I.name||p,ee=Y(U[X]);return new h("Invalid "+re+" `"+Q+"` of type "+("`"+ee+"` supplied to `"+K+"`, expected ")+("instance of `"+Z+"`."))}return null}return x(k)}function M(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function k(U,X,K,re,Q){for(var Z=U[X],ee=0;ee<I.length;ee++)if(m(Z,I[ee]))return null;var oe=JSON.stringify(I,function(ve,B){var ge=F(B);return ge==="symbol"?String(B):B});return new h("Invalid "+re+" `"+Q+"` of value `"+String(Z)+"` "+("supplied to `"+K+"`, expected one of "+oe+"."))}return x(k)}function A(I){function k(U,X,K,re,Q){if(typeof I!="function")return new h("Property `"+Q+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var Z=U[X],ee=O(Z);if(ee!=="object")return new h("Invalid "+re+" `"+Q+"` of type "+("`"+ee+"` supplied to `"+K+"`, expected an object."));for(var oe in Z)if(r(Z,oe)){var te=I(Z,oe,K,re,Q+"."+oe,n);if(te instanceof Error)return te}return null}return x(k)}function D(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var k=0;k<I.length;k++){var U=I[k];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(U)+" at index "+k+"."),i}function X(K,re,Q,Z,ee){for(var oe=[],te=0;te<I.length;te++){var ve=I[te],B=ve(K,re,Q,Z,ee,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&oe.push(B.data.expectedType)}var ge=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new h("Invalid "+Z+" `"+ee+"` supplied to "+("`"+Q+"`"+ge+"."))}return x(X)}function $(){function I(k,U,X,K,re){return C(k[U])?null:new h("Invalid "+K+" `"+re+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return x(I)}function z(I,k,U,X,K){return new h((I||"React class")+": "+k+" type `"+U+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function y(I){function k(U,X,K,re,Q){var Z=U[X],ee=O(Z);if(ee!=="object")return new h("Invalid "+re+" `"+Q+"` of type `"+ee+"` "+("supplied to `"+K+"`, expected `object`."));for(var oe in I){var te=I[oe];if(typeof te!="function")return z(K,re,Q,oe,F(te));var ve=te(Z,oe,K,re,Q+"."+oe,n);if(ve)return ve}return null}return x(k)}function P(I){function k(U,X,K,re,Q){var Z=U[X],ee=O(Z);if(ee!=="object")return new h("Invalid "+re+" `"+Q+"` of type `"+ee+"` "+("supplied to `"+K+"`, expected `object`."));var oe=e({},U[X],I);for(var te in oe){var ve=I[te];if(r(I,te)&&typeof ve!="function")return z(K,re,Q,te,F(ve));if(!ve)return new h("Invalid "+re+" `"+Q+"` key `"+te+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(U[X],null," ")+`
284
+ Valid keys: `+JSON.stringify(Object.keys(I),null," "));var B=ve(Z,te,K,re,Q+"."+te,n);if(B)return B}return null}return x(k)}function C(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(C);if(I===null||a(I))return!0;var k=d(I);if(k){var U=k.call(I),X;if(k!==I.entries){for(;!(X=U.next()).done;)if(!C(X.value))return!1}else for(;!(X=U.next()).done;){var K=X.value;if(K&&!C(K[1]))return!1}}else return!1;return!0;default:return!1}}function L(I,k){return I==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function O(I){var k=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":L(k,I)?"symbol":k}function F(I){if(typeof I>"u"||I===null)return""+I;var k=O(I);if(k==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return k}function G(I){var k=F(I);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function Y(I){return!I.constructor||!I.constructor.name?p:I.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},Fr}var Vr,cs;function bl(){if(cs)return Vr;cs=1;var t=po();function e(){}function n(){}return n.resetWarningCache=e,Vr=function(){function r(i,a,l,c,f,d){if(d!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},Vr}var us;function xl(){if(us)return Ln.exports;if(us=1,process.env.NODE_ENV!=="production"){var t=fo(),e=!0;Ln.exports=yl()(t.isElement,e)}else Ln.exports=bl()();return Ln.exports}var vl=xl();const g=fl(vl);function si(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=si(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Se(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=si(t))&&(r&&(r+=" "),r+=e);return r}function Qn(t,e,n=!1){const r={...e};for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const s=o;if(s==="components"||s==="slots")r[s]={...t[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const i=t[s],a=e[s];if(!a)r[s]=i||{};else if(!i)r[s]=a;else{r[s]={...a};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const c=l;r[s][c]=Qn(i[c],a[c],n)}}}else s==="className"&&n&&e.className?r.className=Se(t?.className,e?.className):s==="style"&&n&&e.style?r.style={...t?.style,...e?.style}:r[s]===void 0&&(r[s]=t[s])}return r}function rn(t,e,n=void 0){const r={};for(const o in t){const s=t[o];let i="",a=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(i+=(a===!0?"":" ")+e(c),a=!1,n&&n[c]&&(i+=" "+n[c]))}r[o]=i}return r}const ds=t=>t,wl=()=>{let t=ds;return{configure(e){t=e},generate(e){return t(e)},reset(){t=ds}}},ii=wl();function xt(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function J(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":xt(7));return t.charAt(0).toUpperCase()+t.slice(1)}var Dn={exports:{}},ye={};/**
285
+ * @license React
286
+ * react-is.production.js
287
+ *
288
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
289
+ *
290
+ * This source code is licensed under the MIT license found in the
291
+ * LICENSE file in the root directory of this source tree.
292
+ */var fs;function Tl(){if(fs)return ye;fs=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function m(h){if(typeof h=="object"&&h!==null){var x=h.$$typeof;switch(x){case t:switch(h=h.type,h){case n:case o:case r:case l:case c:case p:return h;default:switch(h=h&&h.$$typeof,h){case i:case a:case d:case f:return h;case s:return h;default:return x}}case e:return x}}}return ye.ContextConsumer=s,ye.ContextProvider=i,ye.Element=t,ye.ForwardRef=a,ye.Fragment=n,ye.Lazy=d,ye.Memo=f,ye.Portal=e,ye.Profiler=o,ye.StrictMode=r,ye.Suspense=l,ye.SuspenseList=c,ye.isContextConsumer=function(h){return m(h)===s},ye.isContextProvider=function(h){return m(h)===i},ye.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},ye.isForwardRef=function(h){return m(h)===a},ye.isFragment=function(h){return m(h)===n},ye.isLazy=function(h){return m(h)===d},ye.isMemo=function(h){return m(h)===f},ye.isPortal=function(h){return m(h)===e},ye.isProfiler=function(h){return m(h)===o},ye.isStrictMode=function(h){return m(h)===r},ye.isSuspense=function(h){return m(h)===l},ye.isSuspenseList=function(h){return m(h)===c},ye.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===o||h===r||h===l||h===c||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===f||h.$$typeof===i||h.$$typeof===s||h.$$typeof===a||h.$$typeof===b||h.getModuleId!==void 0)},ye.typeOf=m,ye}var be={};/**
293
+ * @license React
294
+ * react-is.development.js
295
+ *
296
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
297
+ *
298
+ * This source code is licensed under the MIT license found in the
299
+ * LICENSE file in the root directory of this source tree.
300
+ */var ps;function Sl(){return ps||(ps=1,process.env.NODE_ENV!=="production"&&(function(){function t(h){if(typeof h=="object"&&h!==null){var x=h.$$typeof;switch(x){case e:switch(h=h.type,h){case r:case s:case o:case c:case f:case b:return h;default:switch(h=h&&h.$$typeof,h){case a:case l:case p:case d:return h;case i:return h;default:return x}}case n:return x}}}var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");be.ContextConsumer=i,be.ContextProvider=a,be.Element=e,be.ForwardRef=l,be.Fragment=r,be.Lazy=p,be.Memo=d,be.Portal=n,be.Profiler=s,be.StrictMode=o,be.Suspense=c,be.SuspenseList=f,be.isContextConsumer=function(h){return t(h)===i},be.isContextProvider=function(h){return t(h)===a},be.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},be.isForwardRef=function(h){return t(h)===l},be.isFragment=function(h){return t(h)===r},be.isLazy=function(h){return t(h)===p},be.isMemo=function(h){return t(h)===d},be.isPortal=function(h){return t(h)===n},be.isProfiler=function(h){return t(h)===s},be.isStrictMode=function(h){return t(h)===o},be.isSuspense=function(h){return t(h)===c},be.isSuspenseList=function(h){return t(h)===f},be.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===s||h===o||h===c||h===f||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===d||h.$$typeof===a||h.$$typeof===i||h.$$typeof===l||h.$$typeof===m||h.getModuleId!==void 0)},be.typeOf=t})()),be}var hs;function El(){return hs||(hs=1,process.env.NODE_ENV==="production"?Dn.exports=Tl():Dn.exports=Sl()),Dn.exports}var Zn=El();function at(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function ai(t){if(N.isValidElement(t)||Zn.isValidElementType(t)||!at(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=ai(t[n])}),e}function Fe(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return at(t)&&at(e)&&Object.keys(e).forEach(o=>{N.isValidElement(e[o])||Zn.isValidElementType(e[o])?r[o]=e[o]:at(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&at(t[o])?r[o]=Fe(t[o],e[o],n):n.clone?r[o]=at(e[o])?ai(e[o]):e[o]:r[o]=e[o]}),r}function gn(t,e){return e?Fe(t,e,{clone:!1}):t}const Tt=process.env.NODE_ENV!=="production"?g.oneOfType([g.number,g.string,g.object,g.array]):{};function ms(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(r=>r.startsWith("@container")).sort((r,o)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(o.match(s)?.[1]||0)});return n.length?n.reduce((r,o)=>{const s=e[o];return delete r[o],r[o]=s,r},{...e}):e}function Cl(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function Ml(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
301
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:xt(18,`(${e})`));return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(s)}function _l(t){const e=(s,i)=>s.replace("@media",i?`@container ${i}`:"@container");function n(s,i){s.up=(...a)=>e(t.breakpoints.up(...a),i),s.down=(...a)=>e(t.breakpoints.down(...a),i),s.between=(...a)=>e(t.breakpoints.between(...a),i),s.only=(...a)=>e(t.breakpoints.only(...a),i),s.not=(...a)=>{const l=e(t.breakpoints.not(...a),i);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=s=>(n(r,s),r);return n(o),{...t,containerQueries:o}}const lr={xs:0,sm:600,md:900,lg:1200,xl:1536},gs={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${lr[t]}px)`},Rl={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:lr[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function pt(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const s=r.breakpoints||gs;return e.reduce((i,a,l)=>(i[s.up(s.keys[l])]=n(e[l]),i),{})}if(typeof e=="object"){const s=r.breakpoints||gs;return Object.keys(e).reduce((i,a)=>{if(Cl(s.keys,a)){const l=Ml(r.containerQueries?r:Rl,a);l&&(i[l]=n(e[a],a))}else if(Object.keys(s.values||lr).includes(a)){const l=s.up(a);i[l]=n(e[a],a)}else{const l=a;i[l]=e[l]}return i},{})}return n(e)}function Al(t={}){return t.keys?.reduce((n,r)=>{const o=t.up(r);return n[o]={},n},{})||{}}function ys(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function cr(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Jn(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=cr(t,n)||r,e&&(o=e(o,r,t)),o}function Me(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,s=i=>{if(i[e]==null)return null;const a=i[e],l=i.theme,c=cr(l,r)||{};return pt(i,a,d=>{let p=Jn(c,o,d);return d===p&&typeof d=="string"&&(p=Jn(c,o,`${e}${d==="default"?"":J(d)}`,d)),n===!1?p:{[n]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[e]:Tt}:{},s.filterProps=[e],s}function Pl(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const Il={m:"margin",p:"padding"},kl={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},bs={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ol=Pl(t=>{if(t.length>2)if(bs[t])t=bs[t];else return[t];const[e,n]=t.split(""),r=Il[e],o=kl[n]||"";return Array.isArray(o)?o.map(s=>r+s):[r+o]}),ur=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],dr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ll=[...ur,...dr];function Tn(t,e,n,r){const o=cr(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const i=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>o.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${i} > ${o.length-1}, you need to add the missing values.`].join(`
302
+ `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
303
+ `)));const a=o[i];return s>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
304
+ `)),()=>{})}function ho(t){return Tn(t,"spacing",8,"spacing")}function Sn(t,e){return typeof e=="string"||e==null?e:t(e)}function Nl(t,e){return n=>t.reduce((r,o)=>(r[o]=Sn(e,n),r),{})}function Dl(t,e,n,r){if(!e.includes(n))return null;const o=Ol(n),s=Nl(o,r),i=t[n];return pt(t,i,s)}function li(t,e){const n=ho(t.theme);return Object.keys(t).map(r=>Dl(t,e,r,n)).reduce(gn,{})}function Ee(t){return li(t,ur)}Ee.propTypes=process.env.NODE_ENV!=="production"?ur.reduce((t,e)=>(t[e]=Tt,t),{}):{};Ee.filterProps=ur;function Ce(t){return li(t,dr)}Ce.propTypes=process.env.NODE_ENV!=="production"?dr.reduce((t,e)=>(t[e]=Tt,t),{}):{};Ce.filterProps=dr;process.env.NODE_ENV!=="production"&&Ll.reduce((t,e)=>(t[e]=Tt,t),{});function fr(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>e[s]?gn(o,e[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ye(t){return typeof t!="number"?t:`${t}px solid`}function Ke(t,e){return Me({prop:t,themeKey:"borders",transform:e})}const $l=Ke("border",Ye),Bl=Ke("borderTop",Ye),zl=Ke("borderRight",Ye),jl=Ke("borderBottom",Ye),Fl=Ke("borderLeft",Ye),Vl=Ke("borderColor"),Hl=Ke("borderTopColor"),Ul=Ke("borderRightColor"),Gl=Ke("borderBottomColor"),Wl=Ke("borderLeftColor"),Yl=Ke("outline",Ye),Xl=Ke("outlineColor"),pr=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Tn(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Sn(e,r)});return pt(t,t.borderRadius,n)}return null};pr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Tt}:{};pr.filterProps=["borderRadius"];fr($l,Bl,zl,jl,Fl,Vl,Hl,Ul,Gl,Wl,pr,Yl,Xl);const hr=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Tn(t.theme,"spacing",8,"gap"),n=r=>({gap:Sn(e,r)});return pt(t,t.gap,n)}return null};hr.propTypes=process.env.NODE_ENV!=="production"?{gap:Tt}:{};hr.filterProps=["gap"];const mr=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Tn(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Sn(e,r)});return pt(t,t.columnGap,n)}return null};mr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Tt}:{};mr.filterProps=["columnGap"];const gr=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Tn(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Sn(e,r)});return pt(t,t.rowGap,n)}return null};gr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Tt}:{};gr.filterProps=["rowGap"];const Kl=Me({prop:"gridColumn"}),ql=Me({prop:"gridRow"}),Ql=Me({prop:"gridAutoFlow"}),Zl=Me({prop:"gridAutoColumns"}),Jl=Me({prop:"gridAutoRows"}),ec=Me({prop:"gridTemplateColumns"}),tc=Me({prop:"gridTemplateRows"}),nc=Me({prop:"gridTemplateAreas"}),rc=Me({prop:"gridArea"});fr(hr,mr,gr,Kl,ql,Ql,Zl,Jl,ec,tc,nc,rc);function en(t,e){return e==="grey"?e:t}const oc=Me({prop:"color",themeKey:"palette",transform:en}),sc=Me({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:en}),ic=Me({prop:"backgroundColor",themeKey:"palette",transform:en});fr(oc,sc,ic);function je(t){return t<=1&&t!==0?`${t*100}%`:t}const ac=Me({prop:"width",transform:je}),mo=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{const r=t.theme?.breakpoints?.values?.[n]||lr[n];return r?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:je(n)}};return pt(t,t.maxWidth,e)}return null};mo.filterProps=["maxWidth"];const lc=Me({prop:"minWidth",transform:je}),cc=Me({prop:"height",transform:je}),uc=Me({prop:"maxHeight",transform:je}),dc=Me({prop:"minHeight",transform:je});Me({prop:"size",cssProperty:"width",transform:je});Me({prop:"size",cssProperty:"height",transform:je});const fc=Me({prop:"boxSizing"});fr(ac,mo,lc,cc,uc,dc,fc);const En={border:{themeKey:"borders",transform:Ye},borderTop:{themeKey:"borders",transform:Ye},borderRight:{themeKey:"borders",transform:Ye},borderBottom:{themeKey:"borders",transform:Ye},borderLeft:{themeKey:"borders",transform:Ye},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ye},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pr},color:{themeKey:"palette",transform:en},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:en},backgroundColor:{themeKey:"palette",transform:en},p:{style:Ce},pt:{style:Ce},pr:{style:Ce},pb:{style:Ce},pl:{style:Ce},px:{style:Ce},py:{style:Ce},padding:{style:Ce},paddingTop:{style:Ce},paddingRight:{style:Ce},paddingBottom:{style:Ce},paddingLeft:{style:Ce},paddingX:{style:Ce},paddingY:{style:Ce},paddingInline:{style:Ce},paddingInlineStart:{style:Ce},paddingInlineEnd:{style:Ce},paddingBlock:{style:Ce},paddingBlockStart:{style:Ce},paddingBlockEnd:{style:Ce},m:{style:Ee},mt:{style:Ee},mr:{style:Ee},mb:{style:Ee},ml:{style:Ee},mx:{style:Ee},my:{style:Ee},margin:{style:Ee},marginTop:{style:Ee},marginRight:{style:Ee},marginBottom:{style:Ee},marginLeft:{style:Ee},marginX:{style:Ee},marginY:{style:Ee},marginInline:{style:Ee},marginInlineStart:{style:Ee},marginInlineEnd:{style:Ee},marginBlock:{style:Ee},marginBlockStart:{style:Ee},marginBlockEnd:{style:Ee},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:hr},rowGap:{style:gr},columnGap:{style:mr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:je},maxWidth:{style:mo},minWidth:{transform:je},height:{transform:je},maxHeight:{transform:je},minHeight:{transform:je},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function pc(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function hc(t,e){return typeof t=="function"?t(e):t}function mc(){function t(n,r,o,s){const i={[n]:r,theme:o},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:f,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const p=cr(o,c)||{};return d?d(i):pt(i,r,m=>{let h=Jn(p,f,m);return m===h&&typeof m=="string"&&(h=Jn(p,f,`${n}${m==="default"?"":J(m)}`,m)),l===!1?h:{[l]:h}})}function e(n){const{sx:r,theme:o={},nested:s}=n||{};if(!r)return null;const i=o.unstable_sxConfig??En;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const f=Al(o.breakpoints),d=Object.keys(f);let p=f;return Object.keys(c).forEach(b=>{const m=hc(c[b],o);if(m!=null)if(typeof m=="object")if(i[b])p=gn(p,t(b,m,o,i));else{const h=pt({theme:o},m,x=>({[b]:x}));pc(h,m)?p[b]=e({sx:m,theme:o,nested:!0}):p=gn(p,h)}else p=gn(p,t(b,m,o,i))}),!s&&o.modularCssLayers?{"@layer sx":ms(o,ys(d,p))}:ms(o,ys(d,p))}return Array.isArray(r)?r.map(a):a(r)}return e}const Dt=mc();Dt.filterProps=["sx"];const gc=t=>{const e={systemProps:{},otherProps:{}},n=t?.theme?.unstable_sxConfig??En;return Object.keys(t).forEach(r=>{n[r]?e.systemProps[r]=t[r]:e.otherProps[r]=t[r]}),e};function ci(t){const{sx:e,...n}=t,{systemProps:r,otherProps:o}=gc(n);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...i)=>{const a=e(...i);return at(a)?{...r,...a}:r}:s={...r,...e},{...o,sx:s}}function er(){return er=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},er.apply(null,arguments)}function yc(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function bc(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var xc=(function(){function t(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(bc(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=yc(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},t})(),Ne="-ms-",tr="-moz-",ue="-webkit-",ui="comm",go="rule",yo="decl",vc="@import",di="@keyframes",wc="@layer",Tc=Math.abs,yr=String.fromCharCode,Sc=Object.assign;function Ec(t,e){return Oe(t,0)^45?(((e<<2^Oe(t,0))<<2^Oe(t,1))<<2^Oe(t,2))<<2^Oe(t,3):0}function fi(t){return t.trim()}function Cc(t,e){return(t=e.exec(t))?t[0]:t}function de(t,e,n){return t.replace(e,n)}function Qr(t,e){return t.indexOf(e)}function Oe(t,e){return t.charCodeAt(e)|0}function bn(t,e,n){return t.slice(e,n)}function st(t){return t.length}function bo(t){return t.length}function $n(t,e){return e.push(t),t}function Mc(t,e){return t.map(e).join("")}var br=1,nn=1,pi=0,Be=0,Ae=0,on="";function xr(t,e,n,r,o,s,i){return{value:t,root:e,parent:n,type:r,props:o,children:s,line:br,column:nn,length:i,return:""}}function un(t,e){return Sc(xr("",null,null,"",null,null,0),t,{length:-t.length},e)}function _c(){return Ae}function Rc(){return Ae=Be>0?Oe(on,--Be):0,nn--,Ae===10&&(nn=1,br--),Ae}function Ve(){return Ae=Be<pi?Oe(on,Be++):0,nn++,Ae===10&&(nn=1,br++),Ae}function ct(){return Oe(on,Be)}function Un(){return Be}function Cn(t,e){return bn(on,t,e)}function xn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function hi(t){return br=nn=1,pi=st(on=t),Be=0,[]}function mi(t){return on="",t}function Gn(t){return fi(Cn(Be-1,Zr(t===91?t+2:t===40?t+1:t)))}function Ac(t){for(;(Ae=ct())&&Ae<33;)Ve();return xn(t)>2||xn(Ae)>3?"":" "}function Pc(t,e){for(;--e&&Ve()&&!(Ae<48||Ae>102||Ae>57&&Ae<65||Ae>70&&Ae<97););return Cn(t,Un()+(e<6&&ct()==32&&Ve()==32))}function Zr(t){for(;Ve();)switch(Ae){case t:return Be;case 34:case 39:t!==34&&t!==39&&Zr(Ae);break;case 40:t===41&&Zr(t);break;case 92:Ve();break}return Be}function Ic(t,e){for(;Ve()&&t+Ae!==57;)if(t+Ae===84&&ct()===47)break;return"/*"+Cn(e,Be-1)+"*"+yr(t===47?t:Ve())}function kc(t){for(;!xn(ct());)Ve();return Cn(t,Be)}function Oc(t){return mi(Wn("",null,null,null,[""],t=hi(t),0,[0],t))}function Wn(t,e,n,r,o,s,i,a,l){for(var c=0,f=0,d=i,p=0,b=0,m=0,h=1,x=1,v=1,E=0,_="",T=o,S=s,w=r,M=_;x;)switch(m=E,E=Ve()){case 40:if(m!=108&&Oe(M,d-1)==58){Qr(M+=de(Gn(E),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:M+=Gn(E);break;case 9:case 10:case 13:case 32:M+=Ac(m);break;case 92:M+=Pc(Un()-1,7);continue;case 47:switch(ct()){case 42:case 47:$n(Lc(Ic(Ve(),Un()),e,n),l);break;default:M+="/"}break;case 123*h:a[c++]=st(M)*v;case 125*h:case 59:case 0:switch(E){case 0:case 125:x=0;case 59+f:v==-1&&(M=de(M,/\f/g,"")),b>0&&st(M)-d&&$n(b>32?vs(M+";",r,n,d-1):vs(de(M," ","")+";",r,n,d-2),l);break;case 59:M+=";";default:if($n(w=xs(M,e,n,c,f,o,a,_,T=[],S=[],d),s),E===123)if(f===0)Wn(M,e,w,w,T,s,d,a,S);else switch(p===99&&Oe(M,3)===110?100:p){case 100:case 108:case 109:case 115:Wn(t,w,w,r&&$n(xs(t,w,w,0,0,o,a,_,o,T=[],d),S),o,S,d,a,r?T:S);break;default:Wn(M,w,w,w,[""],S,0,a,S)}}c=f=b=0,h=v=1,_=M="",d=i;break;case 58:d=1+st(M),b=m;default:if(h<1){if(E==123)--h;else if(E==125&&h++==0&&Rc()==125)continue}switch(M+=yr(E),E*h){case 38:v=f>0?1:(M+="\f",-1);break;case 44:a[c++]=(st(M)-1)*v,v=1;break;case 64:ct()===45&&(M+=Gn(Ve())),p=ct(),f=d=st(_=M+=kc(Un())),E++;break;case 45:m===45&&st(M)==2&&(h=0)}}return s}function xs(t,e,n,r,o,s,i,a,l,c,f){for(var d=o-1,p=o===0?s:[""],b=bo(p),m=0,h=0,x=0;m<r;++m)for(var v=0,E=bn(t,d+1,d=Tc(h=i[m])),_=t;v<b;++v)(_=fi(h>0?p[v]+" "+E:de(E,/&\f/g,p[v])))&&(l[x++]=_);return xr(t,e,n,o===0?go:a,l,c,f)}function Lc(t,e,n){return xr(t,e,n,ui,yr(_c()),bn(t,2,-2),0)}function vs(t,e,n,r){return xr(t,e,n,yo,bn(t,0,r),bn(t,r+1,-1),r)}function tn(t,e){for(var n="",r=bo(t),o=0;o<r;o++)n+=e(t[o],o,t,e)||"";return n}function Nc(t,e,n,r){switch(t.type){case wc:if(t.children.length)break;case vc:case yo:return t.return=t.return||t.value;case ui:return"";case di:return t.return=t.value+"{"+tn(t.children,r)+"}";case go:t.value=t.props.join(",")}return st(n=tn(t.children,r))?t.return=t.value+"{"+n+"}":""}function Dc(t){var e=bo(t);return function(n,r,o,s){for(var i="",a=0;a<e;a++)i+=t[a](n,r,o,s)||"";return i}}function $c(t){return function(e){e.root||(e=e.return)&&t(e)}}function gi(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Bc=function(e,n,r){for(var o=0,s=0;o=s,s=ct(),o===38&&s===12&&(n[r]=1),!xn(s);)Ve();return Cn(e,Be)},zc=function(e,n){var r=-1,o=44;do switch(xn(o)){case 0:o===38&&ct()===12&&(n[r]=1),e[r]+=Bc(Be-1,n,r);break;case 2:e[r]+=Gn(o);break;case 4:if(o===44){e[++r]=ct()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=yr(o)}while(o=Ve());return e},jc=function(e,n){return mi(zc(hi(e),n))},ws=new WeakMap,Fc=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,o=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!ws.get(r))&&!o){ws.set(e,!0);for(var s=[],i=jc(n,s),a=r.props,l=0,c=0;l<i.length;l++)for(var f=0;f<a.length;f++,c++)e.props[c]=s[l]?i[l].replace(/&\f/g,a[f]):a[f]+" "+i[l]}}},Vc=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function yi(t,e){switch(Ec(t,e)){case 5103:return ue+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ue+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ue+t+tr+t+Ne+t+t;case 6828:case 4268:return ue+t+Ne+t+t;case 6165:return ue+t+Ne+"flex-"+t+t;case 5187:return ue+t+de(t,/(\w+).+(:[^]+)/,ue+"box-$1$2"+Ne+"flex-$1$2")+t;case 5443:return ue+t+Ne+"flex-item-"+de(t,/flex-|-self/,"")+t;case 4675:return ue+t+Ne+"flex-line-pack"+de(t,/align-content|flex-|-self/,"")+t;case 5548:return ue+t+Ne+de(t,"shrink","negative")+t;case 5292:return ue+t+Ne+de(t,"basis","preferred-size")+t;case 6060:return ue+"box-"+de(t,"-grow","")+ue+t+Ne+de(t,"grow","positive")+t;case 4554:return ue+de(t,/([^-])(transform)/g,"$1"+ue+"$2")+t;case 6187:return de(de(de(t,/(zoom-|grab)/,ue+"$1"),/(image-set)/,ue+"$1"),t,"")+t;case 5495:case 3959:return de(t,/(image-set\([^]*)/,ue+"$1$`$1");case 4968:return de(de(t,/(.+:)(flex-)?(.*)/,ue+"box-pack:$3"+Ne+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ue+t+t;case 4095:case 3583:case 4068:case 2532:return de(t,/(.+)-inline(.+)/,ue+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(st(t)-1-e>6)switch(Oe(t,e+1)){case 109:if(Oe(t,e+4)!==45)break;case 102:return de(t,/(.+:)(.+)-([^]+)/,"$1"+ue+"$2-$3$1"+tr+(Oe(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Qr(t,"stretch")?yi(de(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Oe(t,e+1)!==115)break;case 6444:switch(Oe(t,st(t)-3-(~Qr(t,"!important")&&10))){case 107:return de(t,":",":"+ue)+t;case 101:return de(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ue+(Oe(t,14)===45?"inline-":"")+"box$3$1"+ue+"$2$3$1"+Ne+"$2box$3")+t}break;case 5936:switch(Oe(t,e+11)){case 114:return ue+t+Ne+de(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ue+t+Ne+de(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ue+t+Ne+de(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ue+t+Ne+t+t}return t}var Hc=function(e,n,r,o){if(e.length>-1&&!e.return)switch(e.type){case yo:e.return=yi(e.value,e.length);break;case di:return tn([un(e,{value:de(e.value,"@","@"+ue)})],o);case go:if(e.length)return Mc(e.props,function(s){switch(Cc(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return tn([un(e,{props:[de(s,/:(read-\w+)/,":"+tr+"$1")]})],o);case"::placeholder":return tn([un(e,{props:[de(s,/:(plac\w+)/,":"+ue+"input-$1")]}),un(e,{props:[de(s,/:(plac\w+)/,":"+tr+"$1")]}),un(e,{props:[de(s,/:(plac\w+)/,Ne+"input-$1")]})],o)}return""})}},Uc=[Hc],Gc=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var x=h.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=e.stylisPlugins||Uc,s={},i,a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var x=h.getAttribute("data-emotion").split(" "),v=1;v<x.length;v++)s[x[v]]=!0;a.push(h)});var l,c=[Fc,Vc];{var f,d=[Nc,$c(function(h){f.insert(h)})],p=Dc(c.concat(o,d)),b=function(x){return tn(Oc(x),p)};l=function(x,v,E,_){f=E,b(x?x+"{"+v.styles+"}":v.styles),_&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new xc({key:n,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:l};return m.sheet.hydrate(a),m},Hr,Ts;function Wc(){if(Ts)return Hr;Ts=1;var t=fo(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[t.ForwardRef]=r,s[t.Memo]=o;function i(m){return t.isMemo(m)?o:s[m.$$typeof]||e}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;function b(m,h,x){if(typeof h!="string"){if(p){var v=d(h);v&&v!==p&&b(m,v,x)}var E=l(h);c&&(E=E.concat(c(h)));for(var _=i(m),T=i(h),S=0;S<E.length;++S){var w=E[S];if(!n[w]&&!(x&&x[w])&&!(T&&T[w])&&!(_&&_[w])){var M=f(h,w);try{a(m,w,M)}catch{}}}}return m}return Hr=b,Hr}Wc();var Yc=!0;function bi(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):o&&(r+=o+" ")}),r}var xo=function(e,n,r){var o=e.key+"-"+n.name;(r===!1||Yc===!1)&&e.registered[o]===void 0&&(e.registered[o]=n.styles)},xi=function(e,n,r){xo(e,n,r);var o=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+o:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function Xc(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Kc={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qc=/[A-Z]|^ms/g,Qc=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vi=function(e){return e.charCodeAt(1)===45},Ss=function(e){return e!=null&&typeof e!="boolean"},Ur=gi(function(t){return vi(t)?t:t.replace(qc,"-$&").toLowerCase()}),Es=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Qc,function(r,o,s){return it={name:o,styles:s,next:it},o})}return Kc[e]!==1&&!vi(e)&&typeof n=="number"&&n!==0?n+"px":n};function vn(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return it={name:o.name,styles:o.styles,next:it},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)it={name:i.name,styles:i.styles,next:it},i=i.next;var a=s.styles+";";return a}return Zc(t,e,n)}case"function":{if(t!==void 0){var l=it,c=n(t);return it=l,vn(t,e,c)}break}}var f=n;if(e==null)return f;var d=e[f];return d!==void 0?d:f}function Zc(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=vn(t,e,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var a=i;e!=null&&e[a]!==void 0?r+=s+"{"+e[a]+"}":Ss(a)&&(r+=Ur(s)+":"+Es(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(e==null||e[i[0]]===void 0))for(var l=0;l<i.length;l++)Ss(i[l])&&(r+=Ur(s)+":"+Es(s,i[l])+";");else{var c=vn(t,e,i);switch(s){case"animation":case"animationName":{r+=Ur(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Cs=/label:\s*([^\s;{]+)\s*(;|$)/g,it;function vr(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,o="";it=void 0;var s=t[0];if(s==null||s.raw===void 0)r=!1,o+=vn(n,e,s);else{var i=s;o+=i[0]}for(var a=1;a<t.length;a++)if(o+=vn(n,e,t[a]),r){var l=s;o+=l[a]}Cs.lastIndex=0;for(var c="",f;(f=Cs.exec(o))!==null;)c+="-"+f[1];var d=Xc(o)+c;return{name:d,styles:o,next:it}}var Jc=function(e){return e()},eu=N.useInsertionEffect?N.useInsertionEffect:!1,wi=eu||Jc,Ti=N.createContext(typeof HTMLElement<"u"?Gc({key:"css"}):null);Ti.Provider;var Si=function(e){return W.forwardRef(function(n,r){var o=W.useContext(Ti);return e(n,o,r)})},vo=N.createContext({}),wo={}.hasOwnProperty,Jr="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",tu=function(e,n){var r={};for(var o in n)wo.call(n,o)&&(r[o]=n[o]);return r[Jr]=e,r},nu=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return xo(n,r,o),wi(function(){return xi(n,r,o)}),null},ru=Si(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var o=t[Jr],s=[r],i="";typeof t.className=="string"?i=bi(e.registered,s,t.className):t.className!=null&&(i=t.className+" ");var a=vr(s,void 0,N.useContext(vo));i+=e.key+"-"+a.name;var l={};for(var c in t)wo.call(t,c)&&c!=="css"&&c!==Jr&&(l[c]=t[c]);return l.className=i,n&&(l.ref=n),N.createElement(N.Fragment,null,N.createElement(nu,{cache:e,serialized:a,isStringTag:typeof o=="string"}),N.createElement(o,l))}),ou=ru,Ms=function(e,n){var r=arguments;if(n==null||!wo.call(n,"css"))return N.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=ou,s[1]=tu(e,n);for(var i=2;i<o;i++)s[i]=r[i];return N.createElement.apply(null,s)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(Ms||(Ms={}));function To(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return vr(e)}function Mn(){var t=To.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var su=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,iu=gi(function(t){return su.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),au=iu,lu=function(e){return e!=="theme"},_s=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?au:lu},Rs=function(e,n,r){var o;if(n){var s=n.shouldForwardProp;o=e.__emotion_forwardProp&&s?function(i){return e.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&r&&(o=e.__emotion_forwardProp),o},cu=function(e){var n=e.cache,r=e.serialized,o=e.isStringTag;return xo(n,r,o),wi(function(){return xi(n,r,o)}),null},uu=function t(e,n){var r=e.__emotion_real===e,o=r&&e.__emotion_base||e,s,i;n!==void 0&&(s=n.label,i=n.target);var a=Rs(e,n,r),l=a||_s(o),c=!l("as");return function(){var f=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&d.push("label:"+s+";"),f[0]==null||f[0].raw===void 0)d.push.apply(d,f);else{var p=f[0];d.push(p[0]);for(var b=f.length,m=1;m<b;m++)d.push(f[m],p[m])}var h=Si(function(x,v,E){var _=c&&x.as||o,T="",S=[],w=x;if(x.theme==null){w={};for(var M in x)w[M]=x[M];w.theme=N.useContext(vo)}typeof x.className=="string"?T=bi(v.registered,S,x.className):x.className!=null&&(T=x.className+" ");var A=vr(d.concat(S),v.registered,w);T+=v.key+"-"+A.name,i!==void 0&&(T+=" "+i);var D=c&&a===void 0?_s(_):l,$={};for(var z in x)c&&z==="as"||D(z)&&($[z]=x[z]);return $.className=T,E&&($.ref=E),N.createElement(N.Fragment,null,N.createElement(cu,{cache:v,serialized:A,isStringTag:typeof _=="string"}),N.createElement(_,$))});return h.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",h.defaultProps=e.defaultProps,h.__emotion_real=h,h.__emotion_base=o,h.__emotion_styles=d,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+i}}),h.withComponent=function(x,v){var E=t(x,er({},n,v,{shouldForwardProp:Rs(h,v,!0)}));return E.apply(void 0,d)},h}},du=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],eo=uu.bind(null);du.forEach(function(t){eo[t]=eo(t)});/**
305
+ * @mui/styled-engine v7.3.2
306
+ *
307
+ * @license MIT
308
+ * This source code is licensed under the MIT license found in the
309
+ * LICENSE file in the root directory of this source tree.
310
+ */function Ei(t,e){const n=eo(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
311
+ `)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function fu(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const As=[];function Lt(t){return As[0]=t,vr(As)}const pu=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function hu(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,s=pu(e),i=Object.keys(s);function a(p){return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof e[p]=="number"?e[p]:p)-r/100}${n})`}function c(p,b){const m=i.indexOf(b);return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${n}) and (max-width:${(m!==-1&&typeof e[i[m]]=="number"?e[i[m]]:b)-r/100}${n})`}function f(p){return i.indexOf(p)+1<i.length?c(p,i[i.indexOf(p)+1]):a(p)}function d(p){const b=i.indexOf(p);return b===0?a(i[1]):b===i.length-1?l(i[b]):c(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:s,up:a,down:l,between:c,only:f,not:d,unit:n,...o}}const mu={borderRadius:4};function Ci(t=8,e=ho({spacing:t})){if(t.mui)return t;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const i=e(s);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function gu(t,e){const n=this;if(n.vars){if(!n.colorSchemes?.[t]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(t);return r==="&"?e:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:e})}return n.palette.mode===t?e:{}}function So(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=t,a=hu(n),l=Ci(o);let c=Fe({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...mu,...s}},i);return c=_l(c),c.applyStyles=gu,c=e.reduce((f,d)=>Fe(f,d),c),c.unstable_sxConfig={...En,...i?.unstable_sxConfig},c.unstable_sx=function(d){return Dt({sx:d,theme:this})},c}function yu(t){return Object.keys(t).length===0}function bu(t=null){const e=N.useContext(vo);return!e||yu(e)?t:e}const xu=So();function vu(t=xu){return bu(t)}function wu(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=t,s=Ei("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(Dt);return N.forwardRef(function(l,c){const f=vu(n),{className:d,component:p="div",...b}=ci(l);return V.jsx(s,{as:p,ref:c,className:Se(d,o?o(r):r),theme:e&&f[e]||f,...b})})}const Tu={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 St(t,e,n="Mui"){const r=Tu[e];return r?`${n}-${r}`:`${ii.generate(t)}-${e}`}function Et(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=St(t,o,n)}),r}function Mi(t,e=""){return t.displayName||t.name||e}function Ps(t,e,n){const r=Mi(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function Su(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Mi(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Zn.ForwardRef:return Ps(t,t.render,"ForwardRef");case Zn.Memo:return Ps(t,t.type,"memo");default:return}}}function _i(t){const{variants:e,...n}=t,r={variants:e,style:Lt(n),isProcessed:!0};return r.style===n||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=Lt(o.style))}),r}const Eu=So();function Gr(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function It(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function Cu(t){return t?(e,n)=>n[t]:null}function Mu(t,e,n){t.theme=Pu(t.theme)?n:t.theme[e]||t.theme}function Yn(t,e,n){const r=typeof e=="function"?e(t):e;if(Array.isArray(r))return r.flatMap(o=>Yn(t,o,n));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=n?It(r.style,n):r.style;else{const{variants:s,...i}=r;o=n?It(Lt(i),n):i}return Ri(t,r.variants,[o],n)}return r?.isProcessed?n?It(Lt(r.style),n):r.style:n?It(Lt(r),n):r}function Ri(t,e,n=[],r=void 0){let o;e:for(let s=0;s<e.length;s+=1){const i=e[s];if(typeof i.props=="function"){if(o??={...t,...t.ownerState,ownerState:t.ownerState},!i.props(o))continue}else for(const a in i.props)if(t[a]!==i.props[a]&&t.ownerState?.[a]!==i.props[a])continue e;typeof i.style=="function"?(o??={...t,...t.ownerState,ownerState:t.ownerState},n.push(r?It(Lt(i.style(o)),r):i.style(o))):n.push(r?It(Lt(i.style),r):i.style)}return n}function _u(t={}){const{themeId:e,defaultTheme:n=Eu,rootShouldForwardProp:r=Gr,slotShouldForwardProp:o=Gr}=t;function s(a){Mu(a,e,n)}return(a,l={})=>{fu(a,w=>w.filter(M=>M!==Dt));const{name:c,slot:f,skipVariantsResolver:d,skipSx:p,overridesResolver:b=Cu(Ai(f)),...m}=l,h=c&&c.startsWith("Mui")||f?"components":"custom",x=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,v=p||!1;let E=Gr;f==="Root"||f==="root"?E=r:f?E=o:Iu(a)&&(E=void 0);const _=Ei(a,{shouldForwardProp:E,label:Au(c,f),...m}),T=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(A){return Yn(A,w,A.theme.modularCssLayers?h:void 0)};if(at(w)){const M=_i(w);return function(D){return M.variants?Yn(D,M,D.theme.modularCssLayers?h:void 0):D.theme.modularCssLayers?It(M.style,h):M.style}}return w},S=(...w)=>{const M=[],A=w.map(T),D=[];if(M.push(s),c&&b&&D.push(function(P){const L=P.theme.components?.[c]?.styleOverrides;if(!L)return null;const O={};for(const F in L)O[F]=Yn(P,L[F],P.theme.modularCssLayers?"theme":void 0);return b(P,O)}),c&&!x&&D.push(function(P){const L=P.theme?.components?.[c]?.variants;return L?Ri(P,L,[],P.theme.modularCssLayers?"theme":void 0):null}),v||D.push(Dt),Array.isArray(A[0])){const y=A.shift(),P=new Array(M.length).fill(""),C=new Array(D.length).fill("");let L;L=[...P,...y,...C],L.raw=[...P,...y.raw,...C],M.unshift(L)}const $=[...M,...A,...D],z=_(...$);return a.muiName&&(z.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(z.displayName=Ru(c,f,a)),z};return _.withConfig&&(S.withConfig=_.withConfig),S}}function Ru(t,e,n){return t?`${t}${J(e||"")}`:`Styled(${Su(n)})`}function Au(t,e){let n;return process.env.NODE_ENV!=="production"&&t&&(n=`${t}-${Ai(e||"Root")}`),n}function Pu(t){for(const e in t)return!1;return!0}function Iu(t){return typeof t=="string"&&t.charCodeAt(0)>96}function Ai(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const Pi=typeof window<"u"?N.useLayoutEffect:N.useEffect;function qt(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function Eo(t,e=0,n=1){return process.env.NODE_ENV!=="production"&&(t<e||t>n)&&console.error(`MUI: The value provided ${t} is out of range [${e}, ${n}].`),qt(t,e,n)}function ku(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&t.length!==t.trim().length&&console.error(`MUI: The color: "${t}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function vt(t){if(t.type)return t;if(t.charAt(0)==="#")return vt(ku(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
312
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:xt(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
313
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:xt(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}const Ou=t=>{const e=vt(t);return e.values.slice(0,3).map((n,r)=>e.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},hn=(t,e)=>{try{return Ou(t)}catch{return e&&process.env.NODE_ENV!=="production"&&console.warn(e),t}};function wr(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.includes("rgb")?r=r.map((o,s)=>s<3?parseInt(o,10):o):e.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function Ii(t){t=vt(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,s=r*Math.min(o,1-o),i=(c,f=(c+n/30)%12)=>o-s*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),wr({type:a,values:l})}function to(t){t=vt(t);let e=t.type==="hsl"||t.type==="hsla"?vt(Ii(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Is(t,e){const n=to(t),r=to(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ki(t,e){return t=vt(t),e=Eo(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,wr(t)}function Rt(t,e,n){try{return ki(t,e)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),t}}function Tr(t,e){if(t=vt(t),e=Eo(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return wr(t)}function he(t,e,n){try{return Tr(t,e)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),t}}function Sr(t,e){if(t=vt(t),e=Eo(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return wr(t)}function me(t,e,n){try{return Sr(t,e)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),t}}function Lu(t,e=.15){return to(t)>.5?Tr(t,e):Sr(t,e)}function Bn(t,e,n){try{return Lu(t,e)}catch{return t}}const Nu=N.createContext();process.env.NODE_ENV!=="production"&&(g.node,g.bool);const Du=()=>N.useContext(Nu)??!1,$u=N.createContext(void 0);process.env.NODE_ENV!=="production"&&(g.node,g.object);function Bu(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const o=e.components[n];return o.defaultProps?Qn(o.defaultProps,r,e.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?Qn(o,r,e.components.mergeClassNameAndStyle):r}function zu({props:t,name:e}){const n=N.useContext($u);return Bu({props:t,name:e,theme:{components:n}})}let ks=0;function ju(t){const[e,n]=N.useState(t),r=t||e;return N.useEffect(()=>{e==null&&(ks+=1,n(`mui-${ks}`))},[e]),r}const Fu={...N},Os=Fu.useId;function Vu(t){if(Os!==void 0){const e=Os();return t??e}return ju(t)}const Ls={theme:void 0};function Hu(t){let e,n;return function(o){let s=e;return(s===void 0||o.theme!==n)&&(Ls.theme=o.theme,s=_i(t(Ls)),e=s,n=o.theme),s}}function Uu(t=""){function e(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${o}${e(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${t?`${t}-`:""}${r}${e(...o)})`}const Ns=(t,e,n,r=[])=>{let o=t;e.forEach((s,i)=>{i===e.length-1?Array.isArray(o)?o[Number(s)]=n:o&&typeof o=="object"&&(o[s]=n):o&&typeof o=="object"&&(o[s]||(o[s]=r.includes(s)?[]:{}),o=o[s])})},Gu=(t,e,n)=>{function r(o,s=[],i=[]){Object.entries(o).forEach(([a,l])=>{(!n||n&&!n([...s,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...s,a],Array.isArray(l)?[...i,a]:i):e([...s,a],l,i))})}r(t)},Wu=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>t.includes(r))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function Wr(t,e){const{prefix:n,shouldSkipGeneratingVar:r}=e||{},o={},s={},i={};return Gu(t,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const f=`--${n?`${n}-`:""}${a.join("-")}`,d=Wu(a,l);Object.assign(o,{[f]:d}),Ns(s,a,`var(${f})`,c),Ns(i,a,`var(${f}, ${d})`,c)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function Yu(t,e={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:s}=e,{colorSchemes:i={},components:a,defaultColorScheme:l="light",...c}=t,{vars:f,css:d,varsWithDefaults:p}=Wr(c,e);let b=p;const m={},{[l]:h,...x}=i;if(Object.entries(x||{}).forEach(([T,S])=>{const{vars:w,css:M,varsWithDefaults:A}=Wr(S,e);b=Fe(b,A),m[T]={css:M,vars:w}}),h){const{css:T,vars:S,varsWithDefaults:w}=Wr(h,e);b=Fe(b,w),m[l]={css:T,vars:S}}function v(T,S){let w=o;if(o==="class"&&(w=".%s"),o==="data"&&(w="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(w=`[${o}="%s"]`),T){if(w==="media")return t.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${i[T]?.palette?.mode||T})`]:{":root":S}};if(w)return t.defaultColorScheme===T?`:root, ${w.replace("%s",String(T))}`:w.replace("%s",String(T))}return":root"}return{vars:b,generateThemeVars:()=>{let T={...f};return Object.entries(m).forEach(([,{vars:S}])=>{T=Fe(T,S)}),T},generateStyleSheets:()=>{const T=[],S=t.defaultColorScheme||"light";function w(D,$){Object.keys($).length&&T.push(typeof D=="string"?{[D]:{...$}}:D)}w(n(void 0,{...d}),d);const{[S]:M,...A}=m;if(M){const{css:D}=M,$=i[S]?.palette?.mode,z=!r&&$?{colorScheme:$,...D}:{...D};w(n(S,{...z}),z)}return Object.entries(A).forEach(([D,{css:$}])=>{const z=i[D]?.palette?.mode,y=!r&&z?{colorScheme:z,...$}:{...$};w(n(D,{...y}),y)}),s&&T.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),T}}}function Xu(t){return function(n){return t==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}const wn={black:"#000",white:"#fff"},Ku={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ut={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Gt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},dn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Wt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Yt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Xt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Oi(){return{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:wn.white,default:wn.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}}}const Li=Oi();function Ni(){return{text:{primary:wn.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:wn.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}}}const no=Ni();function Ds(t,e,n,r){const o=r.light||r,s=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Sr(t.main,o):e==="dark"&&(t.dark=Tr(t.main,s)))}function $s(t,e,n,r,o){const s=o.light||o,i=o.dark||o*1.5;e[n]||(e.hasOwnProperty(r)?e[n]=e[r]:n==="light"?e.light=`color-mix(in ${t}, ${e.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(e.dark=`color-mix(in ${t}, ${e.main}, #000 ${(i*100).toFixed(0)}%)`))}function qu(t="light"){return t==="dark"?{main:Wt[200],light:Wt[50],dark:Wt[400]}:{main:Wt[700],light:Wt[400],dark:Wt[800]}}function Qu(t="light"){return t==="dark"?{main:Ut[200],light:Ut[50],dark:Ut[400]}:{main:Ut[500],light:Ut[300],dark:Ut[700]}}function Zu(t="light"){return t==="dark"?{main:Gt[500],light:Gt[300],dark:Gt[700]}:{main:Gt[700],light:Gt[400],dark:Gt[800]}}function Ju(t="light"){return t==="dark"?{main:Yt[400],light:Yt[300],dark:Yt[700]}:{main:Yt[700],light:Yt[500],dark:Yt[900]}}function ed(t="light"){return t==="dark"?{main:Xt[400],light:Xt[300],dark:Xt[700]}:{main:Xt[800],light:Xt[500],dark:Xt[900]}}function td(t="light"){return t==="dark"?{main:dn[400],light:dn[300],dark:dn[700]}:{main:"#ed6c02",light:dn[500],dark:dn[900]}}function nd(t){return`oklch(from ${t} var(--__l) 0 h / var(--__a))`}function Co(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...s}=t,i=t.primary||qu(e),a=t.secondary||Qu(e),l=t.error||Zu(e),c=t.info||Ju(e),f=t.success||ed(e),d=t.warning||td(e);function p(x){if(o)return nd(x);const v=Is(x,no.text.primary)>=n?no.text.primary:Li.text.primary;if(process.env.NODE_ENV!=="production"){const E=Is(x,v);E<3&&console.error([`MUI: The contrast ratio of ${E}:1 for ${v} on ${x}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
314
+ `))}return v}const b=({color:x,name:v,mainShade:E=500,lightShade:_=300,darkShade:T=700})=>{if(x={...x},!x.main&&x[E]&&(x.main=x[E]),!x.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
315
+ The color object needs to have a \`main\` property or a \`${E}\` property.`:xt(11,v?` (${v})`:"",E));if(typeof x.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
316
+ \`color.main\` should be a string, but \`${JSON.stringify(x.main)}\` was provided instead.
317
+
318
+ Did you intend to use one of the following approaches?
319
+
320
+ import { green } from "@mui/material/colors";
321
+
322
+ const theme1 = createTheme({ palette: {
323
+ primary: green,
324
+ } });
325
+
326
+ const theme2 = createTheme({ palette: {
327
+ primary: { main: green[500] },
328
+ } });`:xt(12,v?` (${v})`:"",JSON.stringify(x.main)));return o?($s(o,x,"light",_,r),$s(o,x,"dark",T,r)):(Ds(x,"light",_,r),Ds(x,"dark",T,r)),x.contrastText||(x.contrastText=p(x.main)),x};let m;return e==="light"?m=Oi():e==="dark"&&(m=Ni()),process.env.NODE_ENV!=="production"&&(m||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),Fe({common:{...wn},mode:e,primary:b({color:i,name:"primary"}),secondary:b({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:l,name:"error"}),warning:b({color:d,name:"warning"}),info:b({color:c,name:"info"}),success:b({color:f,name:"success"}),grey:Ku,contrastThreshold:n,getContrastText:p,augmentColor:b,tonalOffset:r,...m},s)}function rd(t){const e={};return Object.entries(t).forEach(r=>{const[o,s]=r;typeof s=="object"&&(e[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),e}function od(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function sd(t){return Math.round(t*1e5)/1e5}const Bs={textTransform:"uppercase"},zs='"Roboto", "Helvetica", "Arial", sans-serif';function id(t,e){const{fontFamily:n=zs,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:c,pxToRem:f,...d}=typeof e=="function"?e(t):e;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,b=f||(x=>`${x/l*p}rem`),m=(x,v,E,_,T)=>({fontFamily:n,fontWeight:x,fontSize:b(v),lineHeight:E,...n===zs?{letterSpacing:`${sd(_/v)}em`}:{},...T,...c}),h={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(i,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(i,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(i,14,1.75,.4,Bs),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,Bs),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Fe({htmlFontSize:l,pxToRem:b,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...h},d,{clone:!1})}const ad=.2,ld=.14,cd=.12;function we(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${ad})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${ld})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${cd})`].join(",")}const ud=["none",we(0,2,1,-1,0,1,1,0,0,1,3,0),we(0,3,1,-2,0,2,2,0,0,1,5,0),we(0,3,3,-2,0,3,4,0,0,1,8,0),we(0,2,4,-1,0,4,5,0,0,1,10,0),we(0,3,5,-1,0,5,8,0,0,1,14,0),we(0,3,5,-1,0,6,10,0,0,1,18,0),we(0,4,5,-2,0,7,10,1,0,2,16,1),we(0,5,5,-3,0,8,10,1,0,3,14,2),we(0,5,6,-3,0,9,12,1,0,3,16,2),we(0,6,6,-3,0,10,14,1,0,4,18,3),we(0,6,7,-4,0,11,15,1,0,4,20,3),we(0,7,8,-4,0,12,17,2,0,5,22,4),we(0,7,8,-4,0,13,19,2,0,5,24,4),we(0,7,9,-4,0,14,21,2,0,5,26,4),we(0,8,9,-5,0,15,22,2,0,6,28,5),we(0,8,10,-5,0,16,24,2,0,6,30,5),we(0,8,11,-5,0,17,26,2,0,6,32,5),we(0,9,11,-5,0,18,28,2,0,7,34,6),we(0,9,12,-6,0,19,29,2,0,7,36,6),we(0,10,13,-6,0,20,31,3,0,8,38,7),we(0,10,13,-6,0,21,33,3,0,8,40,7),we(0,10,14,-6,0,22,35,3,0,8,42,7),we(0,11,14,-7,0,23,36,3,0,9,44,8),we(0,11,15,-7,0,24,38,3,0,9,46,8)],dd={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)"},fd={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function js(t){return`${Math.round(t)}ms`}function pd(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function hd(t){const e={...dd,...t.easing},n={...fd,...t.duration};return{getAutoHeightDuration:pd,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:a=e.easeInOut,delay:l=0,...c}=s;if(process.env.NODE_ENV!=="production"){const f=p=>typeof p=="string",d=p=>!Number.isNaN(parseFloat(p));!f(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(i)&&!f(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),f(a)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!f(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
329
+ `)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(f=>`${f} ${typeof i=="string"?i:js(i)} ${a} ${typeof l=="string"?l:js(l)}`).join(",")},...t,easing:e,duration:n}}const md={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function gd(t){return at(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function Di(t={}){const e={...t};function n(r){const o=Object.entries(r);for(let s=0;s<o.length;s++){const[i,a]=o[s];!gd(a)||i.startsWith("unstable_")?delete r[i]:at(a)&&(r[i]={...a},n(r[i]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
330
+
331
+ const theme = ${JSON.stringify(e,null,2)};
332
+
333
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
334
+ theme.transitions = createTransitions(theme.transitions || {});
335
+
336
+ export default theme;`}function Fs(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const yd=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let n=0;for(let r=0;r<e.length;r+=1)n+=+e[r];return n};function bd(t){Object.assign(t,{alpha(e,n){const r=this||t;return r.colorSpace?`oklch(from ${e} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:ki(e,yd(n))},lighten(e,n){const r=this||t;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${e}, #fff ${Fs(n)})`:Sr(e,n)},darken(e,n){const r=this||t;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${e}, #000 ${Fs(n)})`:Tr(e,n)}})}function ro(t={},...e){const{breakpoints:n,mixins:r={},spacing:o,palette:s={},transitions:i={},typography:a={},shape:l,colorSpace:c,...f}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":xt(20));const d=Co({...s,colorSpace:c}),p=So(t);let b=Fe(p,{mixins:od(p.breakpoints,r),palette:d,shadows:ud.slice(),typography:id(d,a),transitions:hd(i),zIndex:{...md}});if(b=Fe(b,f),b=e.reduce((m,h)=>Fe(m,h),b),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(x,v)=>{let E;for(E in x){const _=x[E];if(m.includes(E)&&Object.keys(_).length>0){if(process.env.NODE_ENV!=="production"){const T=St("",E);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${E}\` internal state.`,"You can not override it like this: ",JSON.stringify(x,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:_}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
337
+ `))}x[E]={}}}};Object.keys(b.components).forEach(x=>{const v=b.components[x].styleOverrides;v&&x.startsWith("Mui")&&h(v,x)})}return b.unstable_sxConfig={...En,...f?.unstable_sxConfig},b.unstable_sx=function(h){return Dt({sx:h,theme:this})},b.toRuntimeSource=Di,bd(b),b}function xd(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const vd=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=xd(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function $i(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function Bi(t){return t==="dark"?vd:[]}function wd(t){const{palette:e={mode:"light"},opacity:n,overlays:r,colorSpace:o,...s}=t,i=Co({...e,colorSpace:o});return{palette:i,opacity:{...$i(i.mode),...n},overlays:r||Bi(i.mode),...s}}function Td(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Sd=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],Ed=t=>(e,n)=>{const r=t.rootSelector||":root",o=t.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const i={};return Sd(t.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:s?{[s.replace("%s",e)]:i,[`${r}, ${s.replace("%s",e)}`]:n}:{[r]:{...n,...i}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(e))}`}else if(e){if(s==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[r]:n}};if(s)return s.replace("%s",String(e))}return r};function Cd(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function R(t,e,n){!t[e]&&n&&(t[e]=n)}function mn(t){return typeof t!="string"||!t.startsWith("hsl")?t:Ii(t)}function dt(t,e){`${e}Channel`in t||(t[`${e}Channel`]=hn(mn(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
338
+ To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Md(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const et=t=>{try{return t()}catch{}},_d=(t="mui")=>Uu(t);function Yr(t,e,n,r,o){if(!n)return;n=n===!0?{}:n;const s=o==="dark"?"dark":"light";if(!r){e[o]=wd({...n,palette:{mode:s,...n?.palette},colorSpace:t});return}const{palette:i,...a}=ro({...r,palette:{mode:s,...n?.palette},colorSpace:t});return e[o]={...n,palette:i,opacity:{...$i(s),...n?.opacity},overlays:n?.overlays||Bi(s)},a}function Rd(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",nativeColor:i=!1,shouldSkipGeneratingVar:a=Td,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...f}=t,d=Object.keys(n)[0],p=r||(n.light&&d!=="light"?"light":d),b=_d(s),{[p]:m,light:h,dark:x,...v}=n,E={...v};let _=m;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(_=!0),!_)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:xt(21,p));let T;i&&(T="oklch");const S=Yr(T,E,_,f,p);h&&!E.light&&Yr(T,E,h,void 0,"light"),x&&!E.dark&&Yr(T,E,x,void 0,"dark");let w={defaultColorScheme:p,...S,cssVarPrefix:s,colorSchemeSelector:l,rootSelector:c,getCssVar:b,colorSchemes:E,font:{...rd(S.typography),...S.font},spacing:Md(f.spacing)};Object.keys(w.colorSchemes).forEach(z=>{const y=w.colorSchemes[z].palette,P=L=>{const O=L.split("-"),F=O[1],G=O[2];return b(L,y[F][G])};y.mode==="light"&&(R(y.common,"background","#fff"),R(y.common,"onBackground","#000")),y.mode==="dark"&&(R(y.common,"background","#000"),R(y.common,"onBackground","#fff"));function C(L,O,F){if(T){let G;return L===Rt&&(G=`transparent ${((1-F)*100).toFixed(0)}%`),L===he&&(G=`#000 ${(F*100).toFixed(0)}%`),L===me&&(G=`#fff ${(F*100).toFixed(0)}%`),`color-mix(in ${T}, ${O}, ${G})`}return L(O,F)}if(Cd(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){R(y.Alert,"errorColor",C(he,y.error.light,.6)),R(y.Alert,"infoColor",C(he,y.info.light,.6)),R(y.Alert,"successColor",C(he,y.success.light,.6)),R(y.Alert,"warningColor",C(he,y.warning.light,.6)),R(y.Alert,"errorFilledBg",P("palette-error-main")),R(y.Alert,"infoFilledBg",P("palette-info-main")),R(y.Alert,"successFilledBg",P("palette-success-main")),R(y.Alert,"warningFilledBg",P("palette-warning-main")),R(y.Alert,"errorFilledColor",et(()=>y.getContrastText(y.error.main))),R(y.Alert,"infoFilledColor",et(()=>y.getContrastText(y.info.main))),R(y.Alert,"successFilledColor",et(()=>y.getContrastText(y.success.main))),R(y.Alert,"warningFilledColor",et(()=>y.getContrastText(y.warning.main))),R(y.Alert,"errorStandardBg",C(me,y.error.light,.9)),R(y.Alert,"infoStandardBg",C(me,y.info.light,.9)),R(y.Alert,"successStandardBg",C(me,y.success.light,.9)),R(y.Alert,"warningStandardBg",C(me,y.warning.light,.9)),R(y.Alert,"errorIconColor",P("palette-error-main")),R(y.Alert,"infoIconColor",P("palette-info-main")),R(y.Alert,"successIconColor",P("palette-success-main")),R(y.Alert,"warningIconColor",P("palette-warning-main")),R(y.AppBar,"defaultBg",P("palette-grey-100")),R(y.Avatar,"defaultBg",P("palette-grey-400")),R(y.Button,"inheritContainedBg",P("palette-grey-300")),R(y.Button,"inheritContainedHoverBg",P("palette-grey-A100")),R(y.Chip,"defaultBorder",P("palette-grey-400")),R(y.Chip,"defaultAvatarColor",P("palette-grey-700")),R(y.Chip,"defaultIconColor",P("palette-grey-700")),R(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),R(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),R(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),R(y.LinearProgress,"primaryBg",C(me,y.primary.main,.62)),R(y.LinearProgress,"secondaryBg",C(me,y.secondary.main,.62)),R(y.LinearProgress,"errorBg",C(me,y.error.main,.62)),R(y.LinearProgress,"infoBg",C(me,y.info.main,.62)),R(y.LinearProgress,"successBg",C(me,y.success.main,.62)),R(y.LinearProgress,"warningBg",C(me,y.warning.main,.62)),R(y.Skeleton,"bg",T?C(Rt,y.text.primary,.11):`rgba(${P("palette-text-primaryChannel")} / 0.11)`),R(y.Slider,"primaryTrack",C(me,y.primary.main,.62)),R(y.Slider,"secondaryTrack",C(me,y.secondary.main,.62)),R(y.Slider,"errorTrack",C(me,y.error.main,.62)),R(y.Slider,"infoTrack",C(me,y.info.main,.62)),R(y.Slider,"successTrack",C(me,y.success.main,.62)),R(y.Slider,"warningTrack",C(me,y.warning.main,.62));const L=T?C(he,y.background.default,.6825):Bn(y.background.default,.8);R(y.SnackbarContent,"bg",L),R(y.SnackbarContent,"color",et(()=>T?no.text.primary:y.getContrastText(L))),R(y.SpeedDialAction,"fabHoverBg",Bn(y.background.paper,.15)),R(y.StepConnector,"border",P("palette-grey-400")),R(y.StepContent,"border",P("palette-grey-400")),R(y.Switch,"defaultColor",P("palette-common-white")),R(y.Switch,"defaultDisabledColor",P("palette-grey-100")),R(y.Switch,"primaryDisabledColor",C(me,y.primary.main,.62)),R(y.Switch,"secondaryDisabledColor",C(me,y.secondary.main,.62)),R(y.Switch,"errorDisabledColor",C(me,y.error.main,.62)),R(y.Switch,"infoDisabledColor",C(me,y.info.main,.62)),R(y.Switch,"successDisabledColor",C(me,y.success.main,.62)),R(y.Switch,"warningDisabledColor",C(me,y.warning.main,.62)),R(y.TableCell,"border",C(me,C(Rt,y.divider,1),.88)),R(y.Tooltip,"bg",C(Rt,y.grey[700],.92))}if(y.mode==="dark"){R(y.Alert,"errorColor",C(me,y.error.light,.6)),R(y.Alert,"infoColor",C(me,y.info.light,.6)),R(y.Alert,"successColor",C(me,y.success.light,.6)),R(y.Alert,"warningColor",C(me,y.warning.light,.6)),R(y.Alert,"errorFilledBg",P("palette-error-dark")),R(y.Alert,"infoFilledBg",P("palette-info-dark")),R(y.Alert,"successFilledBg",P("palette-success-dark")),R(y.Alert,"warningFilledBg",P("palette-warning-dark")),R(y.Alert,"errorFilledColor",et(()=>y.getContrastText(y.error.dark))),R(y.Alert,"infoFilledColor",et(()=>y.getContrastText(y.info.dark))),R(y.Alert,"successFilledColor",et(()=>y.getContrastText(y.success.dark))),R(y.Alert,"warningFilledColor",et(()=>y.getContrastText(y.warning.dark))),R(y.Alert,"errorStandardBg",C(he,y.error.light,.9)),R(y.Alert,"infoStandardBg",C(he,y.info.light,.9)),R(y.Alert,"successStandardBg",C(he,y.success.light,.9)),R(y.Alert,"warningStandardBg",C(he,y.warning.light,.9)),R(y.Alert,"errorIconColor",P("palette-error-main")),R(y.Alert,"infoIconColor",P("palette-info-main")),R(y.Alert,"successIconColor",P("palette-success-main")),R(y.Alert,"warningIconColor",P("palette-warning-main")),R(y.AppBar,"defaultBg",P("palette-grey-900")),R(y.AppBar,"darkBg",P("palette-background-paper")),R(y.AppBar,"darkColor",P("palette-text-primary")),R(y.Avatar,"defaultBg",P("palette-grey-600")),R(y.Button,"inheritContainedBg",P("palette-grey-800")),R(y.Button,"inheritContainedHoverBg",P("palette-grey-700")),R(y.Chip,"defaultBorder",P("palette-grey-700")),R(y.Chip,"defaultAvatarColor",P("palette-grey-300")),R(y.Chip,"defaultIconColor",P("palette-grey-300")),R(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),R(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),R(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),R(y.LinearProgress,"primaryBg",C(he,y.primary.main,.5)),R(y.LinearProgress,"secondaryBg",C(he,y.secondary.main,.5)),R(y.LinearProgress,"errorBg",C(he,y.error.main,.5)),R(y.LinearProgress,"infoBg",C(he,y.info.main,.5)),R(y.LinearProgress,"successBg",C(he,y.success.main,.5)),R(y.LinearProgress,"warningBg",C(he,y.warning.main,.5)),R(y.Skeleton,"bg",T?C(Rt,y.text.primary,.13):`rgba(${P("palette-text-primaryChannel")} / 0.13)`),R(y.Slider,"primaryTrack",C(he,y.primary.main,.5)),R(y.Slider,"secondaryTrack",C(he,y.secondary.main,.5)),R(y.Slider,"errorTrack",C(he,y.error.main,.5)),R(y.Slider,"infoTrack",C(he,y.info.main,.5)),R(y.Slider,"successTrack",C(he,y.success.main,.5)),R(y.Slider,"warningTrack",C(he,y.warning.main,.5));const L=T?C(me,y.background.default,.985):Bn(y.background.default,.98);R(y.SnackbarContent,"bg",L),R(y.SnackbarContent,"color",et(()=>T?Li.text.primary:y.getContrastText(L))),R(y.SpeedDialAction,"fabHoverBg",Bn(y.background.paper,.15)),R(y.StepConnector,"border",P("palette-grey-600")),R(y.StepContent,"border",P("palette-grey-600")),R(y.Switch,"defaultColor",P("palette-grey-300")),R(y.Switch,"defaultDisabledColor",P("palette-grey-600")),R(y.Switch,"primaryDisabledColor",C(he,y.primary.main,.55)),R(y.Switch,"secondaryDisabledColor",C(he,y.secondary.main,.55)),R(y.Switch,"errorDisabledColor",C(he,y.error.main,.55)),R(y.Switch,"infoDisabledColor",C(he,y.info.main,.55)),R(y.Switch,"successDisabledColor",C(he,y.success.main,.55)),R(y.Switch,"warningDisabledColor",C(he,y.warning.main,.55)),R(y.TableCell,"border",C(he,C(Rt,y.divider,1),.68)),R(y.Tooltip,"bg",C(Rt,y.grey[700],.92))}dt(y.background,"default"),dt(y.background,"paper"),dt(y.common,"background"),dt(y.common,"onBackground"),dt(y,"divider"),Object.keys(y).forEach(L=>{const O=y[L];L!=="tonalOffset"&&O&&typeof O=="object"&&(O.main&&R(y[L],"mainChannel",hn(mn(O.main))),O.light&&R(y[L],"lightChannel",hn(mn(O.light))),O.dark&&R(y[L],"darkChannel",hn(mn(O.dark))),O.contrastText&&R(y[L],"contrastTextChannel",hn(mn(O.contrastText))),L==="text"&&(dt(y[L],"primary"),dt(y[L],"secondary")),L==="action"&&(O.active&&dt(y[L],"active"),O.selected&&dt(y[L],"selected")))})}),w=e.reduce((z,y)=>Fe(z,y),w);const M={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:Ed(w),enableContrastVars:i},{vars:A,generateThemeVars:D,generateStyleSheets:$}=Yu(w,M);return w.vars=A,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([z,y])=>{w[z]=y}),w.generateThemeVars=D,w.generateStyleSheets=$,w.generateSpacing=function(){return Ci(f.spacing,ho(this))},w.getColorSchemeSelector=Xu(l),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...En,...f?.unstable_sxConfig},w.unstable_sx=function(y){return Dt({sx:y,theme:this})},w.toRuntimeSource=Di,w}function Vs(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:Co({...n===!0?{}:n.palette,mode:e})})}function zi(t={},...e){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...i}=t,a=s||"light",l=o?.[a],c={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in t))return ro(t,...e);let f=n;"palette"in t||c[a]&&(c[a]!==!0?f=c[a].palette:a==="dark"&&(f={mode:"dark"}));const d=ro({...t,palette:f},...e);return d.defaultColorScheme=a,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},Vs(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Vs(d,"light",c.light)),d}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),Rd({...i,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...e)}const Ad=zi(),ji="$$material";function Mo(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Fi=t=>Mo(t)&&t!=="classes",Pe=_u({themeId:ji,defaultTheme:Ad,rootShouldForwardProp:Fi});function Pd(){return ci}const Qe=Hu;process.env.NODE_ENV!=="production"&&(g.node,g.object.isRequired);function $t(t){return zu(t)}function Xn(t){return t&&t.ownerDocument||document}function Id(t){const{controlled:e,default:n,name:r,state:o="value"}=t,{current:s}=N.useRef(e!==void 0),[i,a]=N.useState(n),l=s?e:i;if(process.env.NODE_ENV!=="production"){N.useEffect(()=>{s!==(e!==void 0)&&console.error([`MUI: A component is changing the ${s?"":"un"}controlled ${o} state of ${r} to be ${s?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
339
+ `))},[o,r,e]);const{current:f}=N.useRef(n);N.useEffect(()=>{!s&&JSON.stringify(n)!==JSON.stringify(f)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
340
+ `))},[JSON.stringify(n)])}const c=N.useCallback(f=>{s||a(f)},[]);return[l,c]}function Nt(t){const e=N.useRef(t);return Pi(()=>{e.current=t}),N.useRef((...n)=>(0,e.current)(...n)).current}function nr(...t){const e=N.useRef(void 0),n=N.useCallback(r=>{const o=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},t);return N.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const kd=g.oneOfType([g.func,g.object]);function rr(t,e){return process.env.NODE_ENV==="production"?()=>null:function(...r){return t(...r)||e(...r)}}function Od(t){const{prototype:e={}}=t;return!!e.isReactComponent}function Ld(t,e,n,r,o){const s=t[e],i=o||e;if(s==null||typeof window>"u")return null;let a;return typeof s=="function"&&!Od(s)&&(a="Did you accidentally provide a plain function component instead?"),a!==void 0?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Nd=rr(g.elementType,Ld);function or(t){try{return t.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
341
+ `))}return!1}const Hs={};function Vi(t,e){const n=N.useRef(Hs);return n.current===Hs&&(n.current=t(e)),n}class sr{static create(){return new sr}static use(){const e=Vi(sr.create).current,[n,r]=N.useState(!1);return e.shouldMount=n,e.setShouldMount=r,N.useEffect(e.mountEffect,[n]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=$d(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function Dd(){return sr.use()}function $d(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function Bd(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function oo(t,e){return oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},oo(t,e)}function zd(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,oo(t,e)}const Us=W.createContext(null);function jd(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _o(t,e){var n=function(s){return e&&W.isValidElement(s)?e(s):s},r=Object.create(null);return t&&W.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function Fd(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var r=Object.create(null),o=[];for(var s in t)s in e?o.length&&(r[s]=o,o=[]):o.push(s);var i,a={};for(var l in e){if(r[l])for(i=0;i<r[l].length;i++){var c=r[l][i];a[r[l][i]]=n(c)}a[l]=n(l)}for(i=0;i<o.length;i++)a[o[i]]=n(o[i]);return a}function kt(t,e,n){return n[e]!=null?n[e]:t.props[e]}function Vd(t,e){return _o(t.children,function(n){return W.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:kt(n,"appear",t),enter:kt(n,"enter",t),exit:kt(n,"exit",t)})})}function Hd(t,e,n){var r=_o(t.children),o=Fd(e,r);return Object.keys(o).forEach(function(s){var i=o[s];if(W.isValidElement(i)){var a=s in e,l=s in r,c=e[s],f=W.isValidElement(c)&&!c.props.in;l&&(!a||f)?o[s]=W.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:kt(i,"exit",t),enter:kt(i,"enter",t)}):!l&&a&&!f?o[s]=W.cloneElement(i,{in:!1}):l&&a&&W.isValidElement(c)&&(o[s]=W.cloneElement(i,{onExited:n.bind(null,i),in:c.props.in,exit:kt(i,"exit",t),enter:kt(i,"enter",t)}))}}),o}var Ud=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},Gd={component:"div",childFactory:function(e){return e}},Ro=(function(t){zd(e,t);function e(r,o){var s;s=t.call(this,r,o)||this;var i=s.handleExited.bind(jd(s));return s.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,s){var i=s.children,a=s.handleExited,l=s.firstRender;return{children:l?Vd(o,a):Hd(o,i,a),firstRender:!1}},n.handleExited=function(o,s){var i=_o(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(s),this.mounted&&this.setState(function(a){var l=er({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,s=o.component,i=o.childFactory,a=Bd(o,["component","childFactory"]),l=this.state.contextValue,c=Ud(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,s===null?W.createElement(Us.Provider,{value:l},c):W.createElement(Us.Provider,{value:l},W.createElement(s,a,c))},e})(W.Component);Ro.propTypes=process.env.NODE_ENV!=="production"?{component:g.any,children:g.node,appear:g.bool,enter:g.bool,exit:g.bool,childFactory:g.func}:{};Ro.defaultProps=Gd;const Wd=[];function Yd(t){N.useEffect(t,Wd)}class Ao{static create(){return new Ao}currentId=null;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Xd(){const t=Vi(Ao.create).current;return Yd(t.disposeEffect),t}function Hi(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:i,in:a,onExited:l,timeout:c}=t,[f,d]=N.useState(!1),p=Se(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),b={width:i,height:i,top:-(i/2)+s,left:-(i/2)+o},m=Se(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&d(!0),N.useEffect(()=>{if(!a&&l!=null){const h=setTimeout(l,c);return()=>{clearTimeout(h)}}},[l,a,c]),V.jsx("span",{className:p,style:b,children:V.jsx("span",{className:m})})}process.env.NODE_ENV!=="production"&&(Hi.propTypes={classes:g.object.isRequired,className:g.string,in:g.bool,onExited:g.func,pulsate:g.bool,rippleSize:g.number,rippleX:g.number,rippleY:g.number,timeout:g.number.isRequired});const We=Et("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),so=550,Kd=80,qd=Mn`
342
+ 0% {
343
+ transform: scale(0);
344
+ opacity: 0.1;
345
+ }
346
+
347
+ 100% {
348
+ transform: scale(1);
349
+ opacity: 0.3;
350
+ }
351
+ `,Qd=Mn`
352
+ 0% {
353
+ opacity: 1;
354
+ }
355
+
356
+ 100% {
357
+ opacity: 0;
358
+ }
359
+ `,Zd=Mn`
360
+ 0% {
361
+ transform: scale(1);
362
+ }
363
+
364
+ 50% {
365
+ transform: scale(0.92);
366
+ }
367
+
368
+ 100% {
369
+ transform: scale(1);
370
+ }
371
+ `,Jd=Pe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),ef=Pe(Hi,{name:"MuiTouchRipple",slot:"Ripple"})`
372
+ opacity: 0;
373
+ position: absolute;
374
+
375
+ &.${We.rippleVisible} {
376
+ opacity: 0.3;
377
+ transform: scale(1);
378
+ animation-name: ${qd};
379
+ animation-duration: ${so}ms;
380
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
381
+ }
382
+
383
+ &.${We.ripplePulsate} {
384
+ animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
385
+ }
386
+
387
+ & .${We.child} {
388
+ opacity: 1;
389
+ display: block;
390
+ width: 100%;
391
+ height: 100%;
392
+ border-radius: 50%;
393
+ background-color: currentColor;
394
+ }
395
+
396
+ & .${We.childLeaving} {
397
+ opacity: 0;
398
+ animation-name: ${Qd};
399
+ animation-duration: ${so}ms;
400
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
401
+ }
402
+
403
+ & .${We.childPulsate} {
404
+ position: absolute;
405
+ /* @noflip */
406
+ left: 0px;
407
+ top: 0;
408
+ animation-name: ${Zd};
409
+ animation-duration: 2500ms;
410
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
411
+ animation-iteration-count: infinite;
412
+ animation-delay: 200ms;
413
+ }
414
+ `,Ui=N.forwardRef(function(e,n){const r=$t({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:s={},className:i,...a}=r,[l,c]=N.useState([]),f=N.useRef(0),d=N.useRef(null);N.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=N.useRef(!1),b=Xd(),m=N.useRef(null),h=N.useRef(null),x=N.useCallback(T=>{const{pulsate:S,rippleX:w,rippleY:M,rippleSize:A,cb:D}=T;c($=>[...$,V.jsx(ef,{classes:{ripple:Se(s.ripple,We.ripple),rippleVisible:Se(s.rippleVisible,We.rippleVisible),ripplePulsate:Se(s.ripplePulsate,We.ripplePulsate),child:Se(s.child,We.child),childLeaving:Se(s.childLeaving,We.childLeaving),childPulsate:Se(s.childPulsate,We.childPulsate)},timeout:so,pulsate:S,rippleX:w,rippleY:M,rippleSize:A},f.current)]),f.current+=1,d.current=D},[s]),v=N.useCallback((T={},S={},w=()=>{})=>{const{pulsate:M=!1,center:A=o||S.pulsate,fakeElement:D=!1}=S;if(T?.type==="mousedown"&&p.current){p.current=!1;return}T?.type==="touchstart"&&(p.current=!0);const $=D?null:h.current,z=$?$.getBoundingClientRect():{width:0,height:0,left:0,top:0};let y,P,C;if(A||T===void 0||T.clientX===0&&T.clientY===0||!T.clientX&&!T.touches)y=Math.round(z.width/2),P=Math.round(z.height/2);else{const{clientX:L,clientY:O}=T.touches&&T.touches.length>0?T.touches[0]:T;y=Math.round(L-z.left),P=Math.round(O-z.top)}if(A)C=Math.sqrt((2*z.width**2+z.height**2)/3),C%2===0&&(C+=1);else{const L=Math.max(Math.abs(($?$.clientWidth:0)-y),y)*2+2,O=Math.max(Math.abs(($?$.clientHeight:0)-P),P)*2+2;C=Math.sqrt(L**2+O**2)}T?.touches?m.current===null&&(m.current=()=>{x({pulsate:M,rippleX:y,rippleY:P,rippleSize:C,cb:w})},b.start(Kd,()=>{m.current&&(m.current(),m.current=null)})):x({pulsate:M,rippleX:y,rippleY:P,rippleSize:C,cb:w})},[o,x,b]),E=N.useCallback(()=>{v({},{pulsate:!0})},[v]),_=N.useCallback((T,S)=>{if(b.clear(),T?.type==="touchend"&&m.current){m.current(),m.current=null,b.start(0,()=>{_(T,S)});return}m.current=null,c(w=>w.length>0?w.slice(1):w),d.current=S},[b]);return N.useImperativeHandle(n,()=>({pulsate:E,start:v,stop:_}),[E,v,_]),V.jsx(Jd,{className:Se(We.root,s.root,i),ref:h,...a,children:V.jsx(Ro,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(Ui.propTypes={center:g.bool,classes:g.object,className:g.string});function tf(t){return St("MuiButtonBase",t)}const nf=Et("MuiButtonBase",["root","disabled","focusVisible"]),rf=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,i=rn({root:["root",e&&"disabled",n&&"focusVisible"]},tf,o);return n&&r&&(i.root+=` ${r}`),i},of=Pe("button",{name:"MuiButtonBase",slot:"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"},[`&.${nf.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Gi=N.forwardRef(function(e,n){const r=$t({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:s=!1,children:i,className:a,component:l="button",disabled:c=!1,disableRipple:f=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:b,LinkComponent:m="a",onBlur:h,onClick:x,onContextMenu:v,onDragLeave:E,onFocus:_,onFocusVisible:T,onKeyDown:S,onKeyUp:w,onMouseDown:M,onMouseLeave:A,onMouseUp:D,onTouchEnd:$,onTouchMove:z,onTouchStart:y,tabIndex:P=0,TouchRippleProps:C,touchRippleRef:L,type:O,...F}=r,G=N.useRef(null),Y=Dd(),I=nr(Y.ref,L),[k,U]=N.useState(!1);c&&k&&U(!1),N.useImperativeHandle(o,()=>({focusVisible:()=>{U(!0),G.current.focus()}}),[]);const X=Y.shouldMount&&!f&&!c;N.useEffect(()=>{k&&p&&!f&&Y.pulsate()},[f,p,k,Y]);const K=ft(Y,"start",M,d),re=ft(Y,"stop",v,d),Q=ft(Y,"stop",E,d),Z=ft(Y,"stop",D,d),ee=ft(Y,"stop",q=>{k&&q.preventDefault(),A&&A(q)},d),oe=ft(Y,"start",y,d),te=ft(Y,"stop",$,d),ve=ft(Y,"stop",z,d),B=ft(Y,"stop",q=>{or(q.target)||U(!1),h&&h(q)},!1),ge=Nt(q=>{G.current||(G.current=q.currentTarget),or(q.target)&&(U(!0),T&&T(q)),_&&_(q)}),Le=()=>{const q=G.current;return l&&l!=="button"&&!(q.tagName==="A"&&q.href)},ht=Nt(q=>{p&&!q.repeat&&k&&q.key===" "&&Y.stop(q,()=>{Y.start(q)}),q.target===q.currentTarget&&Le()&&q.key===" "&&q.preventDefault(),S&&S(q),q.target===q.currentTarget&&Le()&&q.key==="Enter"&&!c&&(q.preventDefault(),x&&x(q))}),Bt=Nt(q=>{p&&q.key===" "&&k&&!q.defaultPrevented&&Y.stop(q,()=>{Y.pulsate(q)}),w&&w(q),x&&q.target===q.currentTarget&&Le()&&q.key===" "&&!q.defaultPrevented&&x(q)});let _e=l;_e==="button"&&(F.href||F.to)&&(_e=m);const qe={};_e==="button"?(qe.type=O===void 0?"button":O,qe.disabled=c):(!F.href&&!F.to&&(qe.role="button"),c&&(qe["aria-disabled"]=c));const zt=nr(n,G),Ct={...r,centerRipple:s,component:l,disabled:c,disableRipple:f,disableTouchRipple:d,focusRipple:p,tabIndex:P,focusVisible:k},jt=rf(Ct);return V.jsxs(of,{as:_e,className:Se(jt.root,a),ownerState:Ct,onBlur:B,onClick:x,onContextMenu:re,onFocus:ge,onKeyDown:ht,onKeyUp:Bt,onMouseDown:K,onMouseLeave:ee,onMouseUp:Z,onDragLeave:Q,onTouchEnd:te,onTouchMove:ve,onTouchStart:oe,ref:zt,tabIndex:c?-1:P,type:O,...qe,...F,children:[i,X?V.jsx(Ui,{ref:I,center:s,...C}):null]})});function ft(t,e,n,r=!1){return Nt(o=>(n&&n(o),r||t[e](o),!0))}process.env.NODE_ENV!=="production"&&(Gi.propTypes={action:kd,centerRipple:g.bool,children:g.node,classes:g.object,className:g.string,component:Nd,disabled:g.bool,disableRipple:g.bool,disableTouchRipple:g.bool,focusRipple:g.bool,focusVisibleClassName:g.string,href:g.any,LinkComponent:g.elementType,onBlur:g.func,onClick:g.func,onContextMenu:g.func,onDragLeave:g.func,onFocus:g.func,onFocusVisible:g.func,onKeyDown:g.func,onKeyUp:g.func,onMouseDown:g.func,onMouseLeave:g.func,onMouseUp:g.func,onTouchEnd:g.func,onTouchMove:g.func,onTouchStart:g.func,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),tabIndex:g.number,TouchRippleProps:g.object,touchRippleRef:g.oneOfType([g.func,g.shape({current:g.shape({pulsate:g.func.isRequired,start:g.func.isRequired,stop:g.func.isRequired})})]),type:g.oneOfType([g.oneOf(["button","reset","submit"]),g.string])});function sf(t){return typeof t.main=="string"}function af(t,e=[]){if(!sf(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function wt(t=[]){return([,e])=>e&&af(e,t)}function lf(t){return St("MuiCircularProgress",t)}Et("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const yt=44,io=Mn`
415
+ 0% {
416
+ transform: rotate(0deg);
417
+ }
418
+
419
+ 100% {
420
+ transform: rotate(360deg);
421
+ }
422
+ `,ao=Mn`
423
+ 0% {
424
+ stroke-dasharray: 1px, 200px;
425
+ stroke-dashoffset: 0;
426
+ }
427
+
428
+ 50% {
429
+ stroke-dasharray: 100px, 200px;
430
+ stroke-dashoffset: -15px;
431
+ }
432
+
433
+ 100% {
434
+ stroke-dasharray: 1px, 200px;
435
+ stroke-dashoffset: -126px;
436
+ }
437
+ `,cf=typeof io!="string"?To`
438
+ animation: ${io} 1.4s linear infinite;
439
+ `:null,uf=typeof ao!="string"?To`
440
+ animation: ${ao} 1.4s ease-in-out infinite;
441
+ `:null,df=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,s={root:["root",n,`color${J(r)}`],svg:["svg"],circle:["circle",`circle${J(n)}`,o&&"circleDisableShrink"]};return rn(s,lf,e)},ff=Pe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${J(n.color)}`]]}})(Qe(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:cf||{animation:`${io} 1.4s linear infinite`}},...Object.entries(t.palette).filter(wt()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),pf=Pe("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),hf=Pe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${J(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(Qe(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:uf||{animation:`${ao} 1.4s ease-in-out infinite`}}]}))),Wi=N.forwardRef(function(e,n){const r=$t({props:e,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:i=!1,size:a=40,style:l,thickness:c=3.6,value:f=0,variant:d="indeterminate",...p}=r,b={...r,color:s,disableShrink:i,size:a,thickness:c,value:f,variant:d},m=df(b),h={},x={},v={};if(d==="determinate"){const E=2*Math.PI*((yt-c)/2);h.strokeDasharray=E.toFixed(3),v["aria-valuenow"]=Math.round(f),h.strokeDashoffset=`${((100-f)/100*E).toFixed(3)}px`,x.transform="rotate(-90deg)"}return V.jsx(ff,{className:Se(m.root,o),style:{width:a,height:a,...x,...l},ownerState:b,ref:n,role:"progressbar",...v,...p,children:V.jsx(pf,{className:m.svg,ownerState:b,viewBox:`${yt/2} ${yt/2} ${yt} ${yt}`,children:V.jsx(hf,{className:m.circle,style:h,ownerState:b,cx:yt,cy:yt,r:(yt-c)/2,fill:"none",strokeWidth:c})})})});process.env.NODE_ENV!=="production"&&(Wi.propTypes={classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["inherit","primary","secondary","error","info","success","warning"]),g.string]),disableShrink:rr(g.bool,t=>t.disableShrink&&t.variant&&t.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:g.oneOfType([g.number,g.string]),style:g.object,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),thickness:g.number,value:g.number,variant:g.oneOf(["determinate","indeterminate"])});function mf(t){return St("MuiButton",t)}const At=Et("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","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Po=N.createContext({});process.env.NODE_ENV!=="production"&&(Po.displayName="ButtonGroupContext");const Io=N.createContext(void 0);process.env.NODE_ENV!=="production"&&(Io.displayName="ButtonGroupButtonContext");const gf=t=>{const{color:e,disableElevation:n,fullWidth:r,size:o,variant:s,loading:i,loadingPosition:a,classes:l}=t,c={root:["root",i&&"loading",s,`${s}${J(e)}`,`size${J(o)}`,`${s}Size${J(o)}`,`color${J(e)}`,n&&"disableElevation",r&&"fullWidth",i&&`loadingPosition${J(a)}`],startIcon:["icon","startIcon",`iconSize${J(o)}`],endIcon:["icon","endIcon",`iconSize${J(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=rn(c,mf,l);return{...l,...f}},Yi=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],yf=Pe(Gi,{shouldForwardProp:t=>Fi(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${J(n.color)}`],e[`size${J(n.size)}`],e[`${n.variant}Size${J(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(Qe(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${At.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${At.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${At.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${At.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(wt()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(t.vars||t).palette[r].main,"--variant-outlinedColor":(t.vars||t).palette[r].main,"--variant-outlinedBorder":t.alpha((t.vars||t).palette[r].main,.5),"--variant-containedColor":(t.vars||t).palette[r].contrastText,"--variant-containedBg":(t.vars||t).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[r].dark,"--variant-textBg":t.alpha((t.vars||t).palette[r].main,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[r].main,"--variant-outlinedBg":t.alpha((t.vars||t).palette[r].main,(t.vars||t).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${At.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${At.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${At.loading}`]:{color:"transparent"}}}]}})),bf=Pe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${J(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Yi]})),xf=Pe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${J(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Yi]})),vf=Pe("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Gs=Pe("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Qt=N.forwardRef(function(e,n){const r=N.useContext(Po),o=N.useContext(Io),s=Qn(r,e),i=$t({props:s,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:f,disabled:d=!1,disableElevation:p=!1,disableFocusRipple:b=!1,endIcon:m,focusVisibleClassName:h,fullWidth:x=!1,id:v,loading:E=null,loadingIndicator:_,loadingPosition:T="center",size:S="medium",startIcon:w,type:M,variant:A="text",...D}=i,$=Vu(v),z=_??V.jsx(Wi,{"aria-labelledby":$,color:"inherit",size:16}),y={...i,color:l,component:c,disabled:d,disableElevation:p,disableFocusRipple:b,fullWidth:x,loading:E,loadingIndicator:z,loadingPosition:T,size:S,type:M,variant:A},P=gf(y),C=(w||E&&T==="start")&&V.jsx(bf,{className:P.startIcon,ownerState:y,children:w||V.jsx(Gs,{className:P.loadingIconPlaceholder,ownerState:y})}),L=(m||E&&T==="end")&&V.jsx(xf,{className:P.endIcon,ownerState:y,children:m||V.jsx(Gs,{className:P.loadingIconPlaceholder,ownerState:y})}),O=o||"",F=typeof E=="boolean"?V.jsx("span",{className:P.loadingWrapper,style:{display:"contents"},children:E&&V.jsx(vf,{className:P.loadingIndicator,ownerState:y,children:z})}):null;return V.jsxs(yf,{ownerState:y,className:Se(r.className,P.root,f,O),component:c,disabled:d||E,focusRipple:!b,focusVisibleClassName:Se(P.focusVisible,h),ref:n,type:M,id:E?$:v,...D,classes:P,children:[C,T!=="end"&&F,a,T==="end"&&F,L]})});process.env.NODE_ENV!=="production"&&(Qt.propTypes={children:g.node,classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["inherit","primary","secondary","success","error","info","warning"]),g.string]),component:g.elementType,disabled:g.bool,disableElevation:g.bool,disableFocusRipple:g.bool,disableRipple:g.bool,endIcon:g.node,focusVisibleClassName:g.string,fullWidth:g.bool,href:g.string,id:g.string,loading:g.bool,loadingIndicator:g.node,loadingPosition:g.oneOf(["center","end","start"]),size:g.oneOfType([g.oneOf(["small","medium","large"]),g.string]),startIcon:g.node,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),type:g.oneOfType([g.oneOf(["button","reset","submit"]),g.string]),variant:g.oneOfType([g.oneOf(["contained","outlined","text"]),g.string])});function wf(t){return N.Children.toArray(t).filter(e=>N.isValidElement(e))}function Tf(t){return St("MuiButtonGroup",t)}const ne=Et("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),Sf=(t,e)=>{const{ownerState:n}=t;return[{[`& .${ne.grouped}`]:e.grouped},{[`& .${ne.grouped}`]:e[`grouped${J(n.orientation)}`]},{[`& .${ne.grouped}`]:e[`grouped${J(n.variant)}`]},{[`& .${ne.grouped}`]:e[`grouped${J(n.variant)}${J(n.orientation)}`]},{[`& .${ne.grouped}`]:e[`grouped${J(n.variant)}${J(n.color)}`]},{[`& .${ne.firstButton}`]:e.firstButton},{[`& .${ne.lastButton}`]:e.lastButton},{[`& .${ne.middleButton}`]:e.middleButton},e.root,e[n.variant],n.disableElevation===!0&&e.disableElevation,n.fullWidth&&e.fullWidth,n.orientation==="vertical"&&e.vertical]},Ef=t=>{const{classes:e,color:n,disabled:r,disableElevation:o,fullWidth:s,orientation:i,variant:a}=t,l={root:["root",a,i,s&&"fullWidth",o&&"disableElevation",`color${J(n)}`],grouped:["grouped",`grouped${J(i)}`,`grouped${J(a)}`,`grouped${J(a)}${J(i)}`,`grouped${J(a)}${J(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rn(l,Tf,e)},Cf=Pe("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:Sf})(Qe(({theme:t})=>({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(t.vars||t).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${ne.lastButton},& .${ne.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${ne.lastButton},& .${ne.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderRight:t.vars?`1px solid ${t.alpha(t.vars.palette.common.onBackground,.23)}`:`1px solid ${t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ne.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderBottom:t.vars?`1px solid ${t.alpha(t.vars.palette.common.onBackground,.23)}`:`1px solid ${t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ne.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},...Object.entries(t.palette).filter(wt()).flatMap(([e])=>[{props:{variant:"text",color:e},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderColor:t.alpha((t.vars||t).palette[e].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${ne.lastButton},& .${ne.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${ne.lastButton},& .${ne.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderRight:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${ne.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderBottom:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${ne.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},...Object.entries(t.palette).filter(wt(["dark"])).map(([e])=>({props:{variant:"contained",color:e},style:{[`& .${ne.firstButton},& .${ne.middleButton}`]:{borderColor:(t.vars||t).palette[e].dark}}}))],[`& .${ne.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),Xi=N.forwardRef(function(e,n){const r=$t({props:e,name:"MuiButtonGroup"}),{children:o,className:s,color:i="primary",component:a="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:f=!1,disableRipple:d=!1,fullWidth:p=!1,orientation:b="horizontal",size:m="medium",variant:h="outlined",...x}=r,v={...r,color:i,component:a,disabled:l,disableElevation:c,disableFocusRipple:f,disableRipple:d,fullWidth:p,orientation:b,size:m,variant:h},E=Ef(v),_=N.useMemo(()=>({className:E.grouped,color:i,disabled:l,disableElevation:c,disableFocusRipple:f,disableRipple:d,fullWidth:p,size:m,variant:h}),[i,l,c,f,d,p,m,h,E.grouped]),T=wf(o),S=T.length,w=M=>{const A=M===0,D=M===S-1;return A&&D?"":A?E.firstButton:D?E.lastButton:E.middleButton};return V.jsx(Cf,{as:a,role:"group",className:Se(E.root,s),ref:n,ownerState:v,...x,children:V.jsx(Po.Provider,{value:_,children:T.map((M,A)=>V.jsx(Io.Provider,{value:w(A),children:M},A))})})});process.env.NODE_ENV!=="production"&&(Xi.propTypes={children:g.node,classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["inherit","primary","secondary","error","info","success","warning"]),g.string]),component:g.elementType,disabled:g.bool,disableElevation:g.bool,disableFocusRipple:g.bool,disableRipple:g.bool,fullWidth:g.bool,orientation:g.oneOf(["horizontal","vertical"]),size:g.oneOfType([g.oneOf(["small","medium","large"]),g.string]),sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),variant:g.oneOfType([g.oneOf(["contained","outlined","text"]),g.string])});function yn(t){return typeof t=="string"}function Mf(t,e,n){return t===void 0||yn(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function Kn(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function Ws(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function _f(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=t;if(!e){const b=Se(n?.className,s,o?.className,r?.className),m={...n?.style,...o?.style,...r?.style},h={...n,...o,...r};return b.length>0&&(h.className=b),Object.keys(m).length>0&&(h.style=m),{props:h,internalRef:void 0}}const i=Kn({...o,...r}),a=Ws(r),l=Ws(o),c=e(i),f=Se(c?.className,n?.className,s,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},p={...c,...n,...l,...a};return f.length>0&&(p.className=f),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}function Rf(t,e,n){return typeof t=="function"?t(e,n):t}function bt(t){const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...s}=t,i=o?{}:Rf(n,r),{props:a,internalRef:l}=_f({...s,externalSlotProps:i}),c=nr(l,i?.ref,t.additionalProps?.ref);return Mf(e,{...a,ref:c},r)}const Af={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Pf(t,e,n=(r,o)=>r===o){return t.length===e.length&&t.every((r,o)=>n(r,e[o]))}const If=2;function Kt(t,e,n,r,o){return n===1?Math.min(t+e,o):Math.max(t-e,r)}function Ki(t,e){return t-e}function Ys(t,e){const{index:n}=t.reduce((r,o,s)=>{const i=Math.abs(e-o);return r===null||i<r.distance||i===r.distance?{distance:i,index:s}:r},null)??{};return n}function zn(t,e){if(e.current!==void 0&&t.changedTouches){const n=t;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===e.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function ir(t,e,n){return(t-e)*100/(n-e)}function kf(t,e,n){return(n-e)*t+e}function Of(t){if(Math.abs(t)<1){const n=t.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function Lf(t,e,n){const r=Math.round((t-n)/e)*e+n;return Number(r.toFixed(Of(e)))}function Xs({values:t,newValue:e,index:n}){const r=t.slice();return r[n]=e,r.sort(Ki)}function jn({sliderRef:t,activeIndex:e,setActive:n}){const r=Xn(t.current);(!t.current?.contains(r.activeElement)||Number(r?.activeElement?.getAttribute("data-index"))!==e)&&t.current?.querySelector(`[type="range"][data-index="${e}"]`).focus(),n&&n(e)}function Fn(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?Pf(t,e):!1}const Nf={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Df=t=>t;let Vn;function Ks(){return Vn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Vn=CSS.supports("touch-action","none"):Vn=!0),Vn}function $f(t){const{"aria-labelledby":e,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:s=!1,marks:i=!1,max:a=100,min:l=0,name:c,onChange:f,onChangeCommitted:d,orientation:p="horizontal",rootRef:b,scale:m=Df,step:h=1,shiftStep:x=10,tabIndex:v,value:E}=t,_=N.useRef(void 0),[T,S]=N.useState(-1),[w,M]=N.useState(-1),[A,D]=N.useState(!1),$=N.useRef(0),z=N.useRef(null),[y,P]=Id({controlled:E,default:n??l,name:"Slider"}),C=f&&((H,j,se)=>{const ce=H.nativeEvent||H,le=new ce.constructor(ce.type,ce);Object.defineProperty(le,"target",{writable:!0,value:{value:j,name:c}}),z.current=j,f(le,j,se)}),L=Array.isArray(y);let O=L?y.slice().sort(Ki):[y];O=O.map(H=>H==null?l:qt(H,l,a));const F=i===!0&&h!==null?[...Array(Math.floor((a-l)/h)+1)].map((H,j)=>({value:l+h*j})):i||[],G=F.map(H=>H.value),[Y,I]=N.useState(-1),k=N.useRef(null),U=nr(b,k),X=H=>j=>{const se=Number(j.currentTarget.getAttribute("data-index"));or(j.target)&&I(se),M(se),H?.onFocus?.(j)},K=H=>j=>{or(j.target)||I(-1),M(-1),H?.onBlur?.(j)},re=(H,j)=>{const se=Number(H.currentTarget.getAttribute("data-index")),ce=O[se],le=G.indexOf(ce);let ae=j;if(F&&h==null){const ze=G[G.length-1];ae>=ze?ae=ze:ae<=G[0]?ae=G[0]:ae=ae<ce?G[le-1]:G[le+1]}if(ae=qt(ae,l,a),L){o&&(ae=qt(ae,O[se-1]||-1/0,O[se+1]||1/0));const ze=ae;ae=Xs({values:O,newValue:ae,index:se});let He=se;o||(He=ae.indexOf(ze)),jn({sliderRef:k,activeIndex:He})}P(ae),I(se),C&&!Fn(ae,y)&&C(H,ae,se),d&&d(H,z.current??ae)},Q=H=>j=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(j.key)){j.preventDefault();const se=Number(j.currentTarget.getAttribute("data-index")),ce=O[se];let le=null;if(h!=null){const ae=j.shiftKey?x:h;switch(j.key){case"ArrowUp":le=Kt(ce,ae,1,l,a);break;case"ArrowRight":le=Kt(ce,ae,s?-1:1,l,a);break;case"ArrowDown":le=Kt(ce,ae,-1,l,a);break;case"ArrowLeft":le=Kt(ce,ae,s?1:-1,l,a);break;case"PageUp":le=Kt(ce,x,1,l,a);break;case"PageDown":le=Kt(ce,x,-1,l,a);break;case"Home":le=l;break;case"End":le=a;break}}else if(F){const ae=G[G.length-1],ze=G.indexOf(ce),He=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Ie=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];He.includes(j.key)?ze===0?le=G[0]:le=G[ze-1]:Ie.includes(j.key)&&(ze===G.length-1?le=ae:le=G[ze+1])}le!=null&&re(j,le)}H?.onKeyDown?.(j)};Pi(()=>{r&&k.current.contains(document.activeElement)&&document.activeElement?.blur()},[r]),r&&T!==-1&&S(-1),r&&Y!==-1&&I(-1);const Z=H=>j=>{H.onChange?.(j),re(j,j.target.valueAsNumber)},ee=N.useRef(void 0);let oe=p;s&&p==="horizontal"&&(oe+="-reverse");const te=({finger:H,move:j=!1})=>{const{current:se}=k,{width:ce,height:le,bottom:ae,left:ze}=se.getBoundingClientRect();let He;oe.startsWith("vertical")?He=(ae-H.y)/le:He=(H.x-ze)/ce,oe.includes("-reverse")&&(He=1-He);let Ie;if(Ie=kf(He,l,a),h)Ie=Lf(Ie,h,l);else{const sn=Ys(G,Ie);Ie=G[sn]}Ie=qt(Ie,l,a);let Ze=0;if(L){j?Ze=ee.current:Ze=Ys(O,Ie),o&&(Ie=qt(Ie,O[Ze-1]||-1/0,O[Ze+1]||1/0));const sn=Ie;Ie=Xs({values:O,newValue:Ie,index:Ze}),o&&j||(Ze=Ie.indexOf(sn),ee.current=Ze)}return{newValue:Ie,activeIndex:Ze}},ve=Nt(H=>{const j=zn(H,_);if(!j)return;if($.current+=1,H.type==="mousemove"&&H.buttons===0){B(H);return}const{newValue:se,activeIndex:ce}=te({finger:j,move:!0});jn({sliderRef:k,activeIndex:ce,setActive:S}),P(se),!A&&$.current>If&&D(!0),C&&!Fn(se,y)&&C(H,se,ce)}),B=Nt(H=>{const j=zn(H,_);if(D(!1),!j)return;const{newValue:se}=te({finger:j,move:!0});S(-1),H.type==="touchend"&&M(-1),d&&d(H,z.current??se),_.current=void 0,Le()}),ge=Nt(H=>{if(r)return;Ks()||H.preventDefault();const j=H.changedTouches[0];j!=null&&(_.current=j.identifier);const se=zn(H,_);if(se!==!1){const{newValue:le,activeIndex:ae}=te({finger:se});jn({sliderRef:k,activeIndex:ae,setActive:S}),P(le),C&&!Fn(le,y)&&C(H,le,ae)}$.current=0;const ce=Xn(k.current);ce.addEventListener("touchmove",ve,{passive:!0}),ce.addEventListener("touchend",B,{passive:!0})}),Le=N.useCallback(()=>{const H=Xn(k.current);H.removeEventListener("mousemove",ve),H.removeEventListener("mouseup",B),H.removeEventListener("touchmove",ve),H.removeEventListener("touchend",B)},[B,ve]);N.useEffect(()=>{const{current:H}=k;return H.addEventListener("touchstart",ge,{passive:Ks()}),()=>{H.removeEventListener("touchstart",ge),Le()}},[Le,ge]),N.useEffect(()=>{r&&Le()},[r,Le]);const ht=H=>j=>{if(H.onMouseDown?.(j),r||j.defaultPrevented||j.button!==0)return;j.preventDefault();const se=zn(j,_);if(se!==!1){const{newValue:le,activeIndex:ae}=te({finger:se});jn({sliderRef:k,activeIndex:ae,setActive:S}),P(le),C&&!Fn(le,y)&&C(j,le,ae)}$.current=0;const ce=Xn(k.current);ce.addEventListener("mousemove",ve,{passive:!0}),ce.addEventListener("mouseup",B)},Bt=ir(L?O[0]:l,l,a),_e=ir(O[O.length-1],l,a)-Bt,qe=(H={})=>{const j=Kn(H),se={onMouseDown:ht(j||{})},ce={...j,...se};return{...H,ref:U,...ce}},zt=H=>j=>{H.onMouseOver?.(j);const se=Number(j.currentTarget.getAttribute("data-index"));M(se)},Ct=H=>j=>{H.onMouseLeave?.(j),M(-1)},jt=(H={})=>{const j=Kn(H),se={onMouseOver:zt(j||{}),onMouseLeave:Ct(j||{})};return{...H,...j,...se}},q=H=>({pointerEvents:T!==-1&&T!==H?"none":void 0});let Ft;return p==="vertical"&&(Ft=s?"vertical-rl":"vertical-lr"),{active:T,axis:oe,axisProps:Nf,dragging:A,focusedThumbIndex:Y,getHiddenInputProps:(H={})=>{const j=Kn(H),se={onChange:Z(j||{}),onFocus:X(j||{}),onBlur:K(j||{}),onKeyDown:Q(j||{})},ce={...j,...se};return{tabIndex:v,"aria-labelledby":e,"aria-orientation":p,"aria-valuemax":m(a),"aria-valuemin":m(l),name:c,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":t.step??void 0,disabled:r,...H,...ce,style:{...Af,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Ft}}},getRootProps:qe,getThumbProps:jt,marks:F,open:w,range:L,rootRef:U,trackLeap:_e,trackOffset:Bt,values:O,getThumbStyle:q}}const Bf=t=>!t||!yn(t);function zf(t){return St("MuiSlider",t)}const Xe=Et("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"]),jf=t=>{const{open:e}=t;return{offset:Se(e&&Xe.valueLabelOpen),circle:Xe.valueLabelCircle,label:Xe.valueLabelLabel}};function qi(t){const{children:e,className:n,value:r}=t,o=jf(t);return e?N.cloneElement(e,{className:e.props.className},V.jsxs(N.Fragment,{children:[e.props.children,V.jsx("span",{className:Se(o.offset,n),"aria-hidden":!0,children:V.jsx("span",{className:o.circle,children:V.jsx("span",{className:o.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(qi.propTypes={children:g.element.isRequired,className:g.string,value:g.node});function qs(t){return t}const Ff=Pe("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${J(n.color)}`],n.size!=="medium"&&e[`size${J(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(Qe(({theme:t})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Xe.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${Xe.dragging}`]:{[`& .${Xe.thumb}, & .${Xe.track}`]:{transition:"none"}},variants:[...Object.entries(t.palette).filter(wt()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].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}}]}))),Vf=Pe("span",{name:"MuiSlider",slot:"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}}]}),Hf=Pe("span",{name:"MuiSlider",slot:"Track"})(Qe(({theme:t})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.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.entries(t.palette).filter(wt()).map(([e])=>({props:{color:e,track:"inverted"},style:{...t.vars?{backgroundColor:t.vars.palette.Slider[`${e}Track`],borderColor:t.vars.palette.Slider[`${e}Track`]}:{backgroundColor:t.lighten(t.palette[e].main,.62),borderColor:t.lighten(t.palette[e].main,.62),...t.applyStyles("dark",{backgroundColor:t.darken(t.palette[e].main,.5)}),...t.applyStyles("dark",{borderColor:t.darken(t.palette[e].main,.5)})}}}))]}))),Uf=Pe("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.thumb,e[`thumbColor${J(n.color)}`],n.size!=="medium"&&e[`thumbSize${J(n.size)}`]]}})(Qe(({theme:t})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Xe.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.entries(t.palette).filter(wt()).map(([e])=>({props:{color:e},style:{[`&:hover, &.${Xe.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${t.alpha((t.vars||t).palette[e].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Xe.active}`]:{boxShadow:`0px 0px 0px 14px ${t.alpha((t.vars||t).palette[e].main,.16)}`}}}))]}))),Qi=Pe(qi,{name:"MuiSlider",slot:"ValueLabel"})(Qe(({theme:t})=>({zIndex:1,whiteSpace:"nowrap",...t.typography.body2,fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).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%"},[`&.${Xe.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%"},[`&.${Xe.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Qi.propTypes={children:g.element.isRequired,index:g.number.isRequired,open:g.bool.isRequired,value:g.node});const Gf=Pe("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>Mo(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(Qe(({theme:t})=>({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:(t.vars||t).palette.background.paper,opacity:.8}}]}))),Wf=Pe("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>Mo(t)&&t!=="markLabelActive"})(Qe(({theme:t})=>({...t.typography.body2,color:(t.vars||t).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:(t.vars||t).palette.text.primary}}]}))),Yf=t=>{const{disabled:e,dragging:n,marked:r,orientation:o,track:s,classes:i,color:a,size:l}=t,c={root:["root",e&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",a&&`color${J(a)}`,l&&`size${J(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${J(l)}`,a&&`thumbColor${J(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return rn(c,zf,i)},Xf=({children:t})=>t,tt=N.forwardRef(function(e,n){const r=$t({props:e,name:"MuiSlider"}),o=Du(),{"aria-label":s,"aria-valuetext":i,"aria-labelledby":a,component:l="span",components:c={},componentsProps:f={},color:d="primary",classes:p,className:b,disableSwap:m=!1,disabled:h=!1,getAriaLabel:x,getAriaValueText:v,marks:E=!1,max:_=100,min:T=0,name:S,onChange:w,onChangeCommitted:M,orientation:A="horizontal",shiftStep:D=10,size:$="medium",step:z=1,scale:y=qs,slotProps:P,slots:C,tabIndex:L,track:O="normal",value:F,valueLabelDisplay:G="off",valueLabelFormat:Y=qs,...I}=r,k={...r,isRtl:o,max:_,min:T,classes:p,disabled:h,disableSwap:m,orientation:A,marks:E,color:d,size:$,step:z,shiftStep:D,scale:y,track:O,valueLabelDisplay:G,valueLabelFormat:Y},{axisProps:U,getRootProps:X,getHiddenInputProps:K,getThumbProps:re,open:Q,active:Z,axis:ee,focusedThumbIndex:oe,range:te,dragging:ve,marks:B,values:ge,trackOffset:Le,trackLeap:ht,getThumbStyle:Bt}=$f({...k,rootRef:n});k.marked=B.length>0&&B.some(Re=>Re.label),k.dragging=ve,k.focusedThumbIndex=oe;const _e=Yf(k),qe=C?.root??c.Root??Ff,zt=C?.rail??c.Rail??Vf,Ct=C?.track??c.Track??Hf,jt=C?.thumb??c.Thumb??Uf,q=C?.valueLabel??c.ValueLabel??Qi,Ft=C?.mark??c.Mark??Gf,_n=C?.markLabel??c.MarkLabel??Wf,H=C?.input??c.Input??"input",j=P?.root??f.root,se=P?.rail??f.rail,ce=P?.track??f.track,le=P?.thumb??f.thumb,ae=P?.valueLabel??f.valueLabel,ze=P?.mark??f.mark,He=P?.markLabel??f.markLabel,Ie=P?.input??f.input,Ze=bt({elementType:qe,getSlotProps:X,externalSlotProps:j,externalForwardedProps:I,additionalProps:{...Bf(qe)&&{as:l}},ownerState:{...k,...j?.ownerState},className:[_e.root,b]}),sn=bt({elementType:zt,externalSlotProps:se,ownerState:k,className:_e.rail}),Zi=bt({elementType:Ct,externalSlotProps:ce,additionalProps:{style:{...U[ee].offset(Le),...U[ee].leap(ht)}},ownerState:{...k,...ce?.ownerState},className:_e.track}),Er=bt({elementType:jt,getSlotProps:re,externalSlotProps:le,ownerState:{...k,...le?.ownerState},className:_e.thumb}),Ji=bt({elementType:q,externalSlotProps:ae,ownerState:{...k,...ae?.ownerState},className:_e.valueLabel}),Cr=bt({elementType:Ft,externalSlotProps:ze,ownerState:k,className:_e.mark}),Mr=bt({elementType:_n,externalSlotProps:He,ownerState:k,className:_e.markLabel}),ea=bt({elementType:H,getSlotProps:K,externalSlotProps:Ie,ownerState:k});return V.jsxs(qe,{...Ze,children:[V.jsx(zt,{...sn}),V.jsx(Ct,{...Zi}),B.filter(Re=>Re.value>=T&&Re.value<=_).map((Re,ke)=>{const _r=ir(Re.value,T,_),Rn=U[ee].offset(_r);let ut;return O===!1?ut=ge.includes(Re.value):ut=O==="normal"&&(te?Re.value>=ge[0]&&Re.value<=ge[ge.length-1]:Re.value<=ge[0])||O==="inverted"&&(te?Re.value<=ge[0]||Re.value>=ge[ge.length-1]:Re.value>=ge[0]),V.jsxs(N.Fragment,{children:[V.jsx(Ft,{"data-index":ke,...Cr,...!yn(Ft)&&{markActive:ut},style:{...Rn,...Cr.style},className:Se(Cr.className,ut&&_e.markActive)}),Re.label!=null?V.jsx(_n,{"aria-hidden":!0,"data-index":ke,...Mr,...!yn(_n)&&{markLabelActive:ut},style:{...Rn,...Mr.style},className:Se(_e.markLabel,Mr.className,ut&&_e.markLabelActive),children:Re.label}):null]},ke)}),ge.map((Re,ke)=>{const _r=ir(Re,T,_),Rn=U[ee].offset(_r),ut=G==="off"?Xf:q;return V.jsx(ut,{...!yn(ut)&&{valueLabelFormat:Y,valueLabelDisplay:G,value:typeof Y=="function"?Y(y(Re),ke):Y,index:ke,open:Q===ke||Z===ke||G==="on",disabled:h},...Ji,children:V.jsx(jt,{"data-index":ke,...Er,className:Se(_e.thumb,Er.className,Z===ke&&_e.active,oe===ke&&_e.focusVisible),style:{...Rn,...Bt(ke),...Er.style},children:V.jsx(H,{"data-index":ke,"aria-label":x?x(ke):s,"aria-valuenow":y(Re),"aria-labelledby":a,"aria-valuetext":v?v(y(Re),ke):i,value:ge[ke],...ea})})},ke)})]})});process.env.NODE_ENV!=="production"&&(tt.propTypes={"aria-label":rr(g.string,t=>Array.isArray(t.value||t.defaultValue)&&t["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":g.string,"aria-valuetext":rr(g.string,t=>Array.isArray(t.value||t.defaultValue)&&t["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:g.node,classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["primary","secondary","error","info","success","warning"]),g.string]),components:g.shape({Input:g.elementType,Mark:g.elementType,MarkLabel:g.elementType,Rail:g.elementType,Root:g.elementType,Thumb:g.elementType,Track:g.elementType,ValueLabel:g.elementType}),componentsProps:g.shape({input:g.oneOfType([g.func,g.object]),mark:g.oneOfType([g.func,g.object]),markLabel:g.oneOfType([g.func,g.object]),rail:g.oneOfType([g.func,g.object]),root:g.oneOfType([g.func,g.object]),thumb:g.oneOfType([g.func,g.object]),track:g.oneOfType([g.func,g.object]),valueLabel:g.oneOfType([g.func,g.shape({children:g.element,className:g.string,open:g.bool,style:g.object,value:g.node,valueLabelDisplay:g.oneOf(["auto","off","on"])})])}),defaultValue:g.oneOfType([g.arrayOf(g.number),g.number]),disabled:g.bool,disableSwap:g.bool,getAriaLabel:g.func,getAriaValueText:g.func,marks:g.oneOfType([g.arrayOf(g.shape({label:g.node,value:g.number.isRequired})),g.bool]),max:g.number,min:g.number,name:g.string,onChange:g.func,onChangeCommitted:g.func,orientation:g.oneOf(["horizontal","vertical"]),scale:g.func,shiftStep:g.number,size:g.oneOfType([g.oneOf(["small","medium"]),g.string]),slotProps:g.shape({input:g.oneOfType([g.func,g.object]),mark:g.oneOfType([g.func,g.object]),markLabel:g.oneOfType([g.func,g.object]),rail:g.oneOfType([g.func,g.object]),root:g.oneOfType([g.func,g.object]),thumb:g.oneOfType([g.func,g.object]),track:g.oneOfType([g.func,g.object]),valueLabel:g.oneOfType([g.func,g.shape({children:g.element,className:g.string,open:g.bool,style:g.object,value:g.node,valueLabelDisplay:g.oneOf(["auto","off","on"])})])}),slots:g.shape({input:g.elementType,mark:g.elementType,markLabel:g.elementType,rail:g.elementType,root:g.elementType,thumb:g.elementType,track:g.elementType,valueLabel:g.elementType}),step:g.number,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),tabIndex:g.number,track:g.oneOf(["inverted","normal",!1]),value:g.oneOfType([g.arrayOf(g.number),g.number]),valueLabelDisplay:g.oneOf(["auto","off","on"]),valueLabelFormat:g.oneOfType([g.func,g.string])});function Kf(t){return St("MuiTypography",t)}Et("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const qf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Qf=Pd(),Zf=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:s,classes:i}=t,a={root:["root",s,t.align!=="inherit"&&`align${J(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return rn(a,Kf,i)},Jf=Pe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${J(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(Qe(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,n])=>e!=="inherit"&&n&&typeof n=="object").map(([e,n])=>({props:{variant:e},style:n})),...Object.entries(t.palette).filter(wt()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${J(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),Qs={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},nt=N.forwardRef(function(e,n){const{color:r,...o}=$t({props:e,name:"MuiTypography"}),s=!qf[r],i=Qf({...o,...s&&{color:r}}),{align:a="inherit",className:l,component:c,gutterBottom:f=!1,noWrap:d=!1,paragraph:p=!1,variant:b="body1",variantMapping:m=Qs,...h}=i,x={...i,align:a,color:r,className:l,component:c,gutterBottom:f,noWrap:d,paragraph:p,variant:b,variantMapping:m},v=c||(p?"p":m[b]||Qs[b])||"span",E=Zf(x);return V.jsx(Jf,{as:v,ref:n,className:Se(E.root,l),...h,ownerState:x,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...h.style}})});process.env.NODE_ENV!=="production"&&(nt.propTypes={align:g.oneOf(["center","inherit","justify","left","right"]),children:g.node,classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),g.string]),component:g.elementType,gutterBottom:g.bool,noWrap:g.bool,paragraph:g.bool,style:g.object,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),variant:g.oneOfType([g.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),g.string]),variantMapping:g.object});const ep=Et("MuiBox",["root"]),tp=zi(),qn=wu({themeId:ji,defaultTheme:tp,defaultClassName:ep.root,generateClassName:ii.generate});process.env.NODE_ENV!=="production"&&(qn.propTypes={children:g.node,component:g.elementType,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object])});const np=({showLayer:t,setShowLayer:e,scale:n,setScale:r,rotation:o,setRotation:s,mapPosition:i,setMapPosition:a,position:l,setPosition:c,enableTransformControls:f,setEnableTransformControls:d,transformMode:p,setTransformMode:b,layerName:m="Layer"})=>{const{scene:h,worldMatrixInv:x}=ar(),v=W.useRef(void 0),[E,_]=W.useState(!1);W.useLayoutEffect(()=>{if(!h||!x||!f){v.current&&(h?.remove(v.current),v.current.geometry.dispose(),v.current.material.dispose(),v.current=void 0,_(!1));return}const S=new Ar.BoxGeometry(1,1,1),w=new Ar.MeshBasicMaterial({visible:!1}),M=new Ar.Mesh(S,w),A=Ot.toScenePosition(x,[i.lng,i.lat],0);return M.position.set(A.x+l.x,A.y+l.y,A.z+l.z),M.rotation.set(o.x*Math.PI/180,o.y*Math.PI/180,o.z*Math.PI/180),M.scale.set(n,n,n),h.add(M),v.current=M,_(!0),()=>{v.current&&(h.remove(v.current),v.current.geometry.dispose(),v.current.material.dispose(),v.current=void 0,_(!1))}},[h,x,f]),W.useLayoutEffect(()=>{if(!v.current||!x)return;const S=Ot.toScenePosition(x,[i.lng,i.lat],0);v.current.position.set(S.x+l.x,S.y+l.y,S.z+l.z),v.current.rotation.set(o.x*Math.PI/180,o.y*Math.PI/180,o.z*Math.PI/180),v.current.scale.set(n,n,n),v.current.updateMatrixWorld(!0)},[l,o,n,i,x]);const T=S=>{if(!x)return;const w=Ot.toScenePosition(x,[i.lng,i.lat],0);c({x:S.position.x-w.x,y:S.position.y-w.y,z:S.position.z-w.z}),s({x:S.rotation.x*180/Math.PI,y:S.rotation.y*180/Math.PI,z:S.rotation.z*180/Math.PI}),r(S.scale.x)};return V.jsxs(V.Fragment,{children:[E&&v.current&&f&&V.jsx(ri,{target:v.current,mode:p||"translate",enabled:f,onObjectChange:T}),V.jsxs(qn,{sx:{padding:"10px"},children:[V.jsxs(qn,{sx:{display:"flex",gap:1,flexWrap:"wrap",marginBottom:2},children:[V.jsxs(Qt,{color:"primary",variant:t?"contained":"outlined",onClick:()=>e(!t),size:"small",children:[t?"Hide":"Show"," ",m]}),d&&V.jsx(Qt,{color:"info",variant:f?"contained":"outlined",onClick:()=>d(!f),size:"small",children:"3D Gizmo"})]}),b&&f&&V.jsx(qn,{sx:{marginBottom:2},children:V.jsxs(Xi,{variant:"outlined",size:"small",fullWidth:!0,"aria-label":"transform mode",children:[V.jsx(Qt,{variant:p==="translate"?"contained":"outlined",onClick:()=>b("translate"),children:"Move"}),V.jsx(Qt,{variant:p==="rotate"?"contained":"outlined",onClick:()=>b("rotate"),children:"Rotate"}),V.jsx(Qt,{variant:p==="scale"?"contained":"outlined",onClick:()=>b("scale"),children:"Scale"})]})}),V.jsxs(nt,{gutterBottom:!0,children:["Scale: ",n.toFixed(2)]}),V.jsx(tt,{value:n,onChange:(S,w)=>r(w),min:.01,max:150,step:.01,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Rotation X: ",o.x,"°"]}),V.jsx(tt,{value:o.x,onChange:(S,w)=>s({...o,x:w}),min:0,max:360,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Rotation Y: ",o.y,"°"]}),V.jsx(tt,{value:o.y,onChange:(S,w)=>s({...o,y:w}),min:0,max:360,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Rotation Z: ",o.z,"°"]}),V.jsx(tt,{value:o.z,onChange:(S,w)=>s({...o,z:w}),min:0,max:360,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Longitude: ",i.lng.toFixed(6)]}),V.jsx(tt,{value:i.lng,onChange:(S,w)=>a({...i,lng:w}),min:7.09,max:7.11,step:1e-4,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Latitude: ",i.lat.toFixed(6)]}),V.jsx(tt,{value:i.lat,onChange:(S,w)=>a({...i,lat:w}),min:50.73,max:50.74,step:1e-4,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Position X: ",l.x]}),V.jsx(tt,{value:l.x,onChange:(S,w)=>c({...l,x:w}),min:-100,max:100,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Position Y: ",l.y]}),V.jsx(tt,{value:l.y,onChange:(S,w)=>c({...l,y:w}),min:-100,max:100,valueLabelDisplay:"auto"}),V.jsxs(nt,{gutterBottom:!0,children:["Position Z: ",l.z]}),V.jsx(tt,{value:l.z,onChange:(S,w)=>c({...l,z:w}),min:-500,max:100,valueLabelDisplay:"auto"})]})]})};exports.MlThreeGizmo=ri;exports.MlThreeModelLayer=Ka;exports.MlThreeObjectControls=np;exports.MlThreeSplatLayer=nl;exports.ThreeContext=lo;exports.ThreeProvider=la;exports.useThree=ar;