cuelo 0.8.1 → 0.8.2
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +7 -7
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +3 -3
- package/.next/required-server-files.js +2 -2
- package/.next/required-server-files.json +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/updates/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -6
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/office-preview/page.js +1 -1
- package/.next/server/app/office-preview/page.js.nft.json +1 -1
- package/.next/server/app/office-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/office-preview.html +1 -1
- package/.next/server/app/office-preview.rsc +3 -3
- package/.next/server/app/office-preview.segments/_full.segment.rsc +3 -3
- package/.next/server/app/office-preview.segments/_head.segment.rsc +1 -1
- package/.next/server/app/office-preview.segments/_index.segment.rsc +2 -2
- package/.next/server/app/office-preview.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/office-preview.segments/office-preview.segment.rsc +1 -1
- package/.next/server/app/page.js +16 -16
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover.html +1 -1
- package/.next/server/app/recover.rsc +2 -2
- package/.next/server/app/recover.segments/_full.segment.rsc +2 -2
- package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
- package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
- package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +7 -7
- package/.next/server/chunks/1933.js +353 -0
- package/.next/server/chunks/2607.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/8637.5c189b15878e878b.js +1 -0
- package/.next/static/chunks/9703.36cc00cc10e10f45.js +1 -0
- package/.next/static/chunks/9889-4e472951b0a45120.js +1 -0
- package/.next/static/chunks/app/{layout-27cec017946e8765.js → layout-78440a2c8d3cd1c7.js} +1 -1
- package/.next/static/chunks/app/office-preview/page-68828399eb58177b.js +1 -0
- package/.next/static/chunks/app/page-a4c4acecc034872f.js +22 -0
- package/.next/static/chunks/webpack-aba44445f0ef2ed9.js +1 -0
- package/.next/static/css/aab5fc8ab1b53780.css +1 -0
- package/.next/static/css/d6462eb5a4d2cb8c.css +1 -0
- package/.next/trace +107 -106
- package/.next/trace-build +1 -1
- package/README.md +2 -2
- package/Tools/CUELO_Setup/files/native-runtime-patch.js +3 -3
- package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +253 -18
- package/package.json +7 -7
- package/public/office3d/ASSETS.md +51 -4
- package/public/office3d/office-kit.glb +0 -0
- package/.next/server/chunks/3602.js +0 -353
- package/.next/static/chunks/1937.70e7ce89f87f1119.js +0 -1
- package/.next/static/chunks/2992.16b931bb2dfe8845.js +0 -1
- package/.next/static/chunks/9889-481b318dcf48ee30.js +0 -1
- package/.next/static/chunks/app/office-preview/page-5874dc1ab28d3b1d.js +0 -1
- package/.next/static/chunks/app/page-95261aed574d5860.js +0 -22
- package/.next/static/chunks/webpack-d2da69f7c8164141.js +0 -1
- package/.next/static/css/001d6e9d9d06b017.css +0 -1
- package/.next/static/css/abd3d00cca9457f7.css +0 -1
- /package/.next/static/{_VEUT2T9aZcGJdOeXmxhm → 3xAqEONTnox8I-4Te8HCx}/_buildManifest.js +0 -0
- /package/.next/static/{_VEUT2T9aZcGJdOeXmxhm → 3xAqEONTnox8I-4Te8HCx}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-aba44445f0ef2ed9.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-1b03b52e3112452e.js" async=""></script><script src="/_next/static/chunks/main-app-fbc4aa3c15d48613.js" async=""></script><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-aba44445f0ef2ed9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[90484,[],\"ViewportBoundary\"]\na:I[90484,[],\"MetadataBoundary\"]\nc:I[27123,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"3xAqEONTnox8I-4Te8HCx\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"3UhvwGzC+w8WiFnhMxrMhaoejXplInJyWzM/q9S7+b8="}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8637],{58637:(e,t,a)=>{a.r(t),a.d(t,{default:()=>H});var o=a(95155),s=a(12115),n=a(15692),r=a(86275),i=a(42412),l=a(16377),c=a(3270),h=a(56369);let d=[{hair:"#1d1719",length:"long",bangs:"curtain",eyes:"#c97828",eyeShape:"sharp",skin:"#f6d5c3",outfit:"#1c1a1f",inner:"#2e282d",accent:"#d4a853",skirt:"#151417",legs:"#1a171b",accessories:[{kind:"bow",color:"#a82e37",x:-.16,y:.1,z:-.12,size:1.35,tails:!0},{kind:"pendant",color:"#d6a84c"}]},{hair:"#b08261",length:"bob",bangs:"wispy",eyes:"#3b9b52",eyeShape:"round",skin:"#ffe8d6",outfit:"#2d292b",inner:"#e6e1dc",accent:"#c0b8b2",hood:!0,skirt:"#3b3a40",legs:"#2c2b30",accessories:[{kind:"pendant",color:"#cba052"}]},{hair:"#c8d3e6",length:"short",bangs:"swept",ahoge:!0,eyes:"#2d76c9",eyeShape:"round",skin:"#fce6d6",outfit:"#222b38",inner:"#15171b",accent:"#29c4d8",stripe:"#d97026",skirt:"#2a3545",legs:"#262b34",accessories:[{kind:"goggles",frame:"#b88636",lens:"#d98a2c"},{kind:"pendant",color:"#b88b46"}]},{hair:"#f48cb6",length:"bob",bangs:"choppy",ahoge:!0,ponytail:{x:1,high:!0},eyes:"#7638b5",eyeShape:"sharp",skin:"#fde8e1",outfit:"#1b1822",inner:"#2e2a36",accent:"#8a5cf6",skirt:"#15131c",legs:"#1b1820",accessories:[{kind:"bow",color:"#18151d",x:.215,y:.17,z:-.02,size:1.1},{kind:"choker",color:"#18151d"}]},{hair:"#162650",streak:"#3d9be9",length:"long",bangs:"choppy",ahoge:!0,ponytail:{x:-1,high:!0},eyes:"#2c8ef8",eyeShape:"round",skin:"#fde8de",outfit:"#141720",inner:"#1f2433",accent:"#68b2f8",hood:!0,skirt:"#1f2433",legs:"#14161f",accessories:[{kind:"clip",color:"#b8dcff",x:-1,shape:"whale"},{kind:"choker",color:"#4ee2ec"}]},{hair:"#11161b",streak:"#00c9b4",length:"bob",bangs:"swept",ahoge:!0,braid:{x:1,color:"#00a896"},eyes:"#00d6bc",eyeShape:"sharp",skin:"#fcece5",outfit:"#1d1f24",inner:"#141416",accent:"#e0e5eb",skirt:"#151517",legs:"#18191c",accessories:[{kind:"clip",color:"#00f0ff",x:1,shape:"x"},{kind:"glasses",color:"#d8dfe5"}]},{hair:"#9c5430",length:"bob",bangs:"curtain",braid:{x:1},eyes:"#c88225",eyeShape:"round",skin:"#f6d3b6",outfit:"#d8bc94",inner:"#efeae0",accent:"#2e2a27",skirt:"#5a4636",legs:"#3f3732",accessories:[{kind:"clip",color:"#a8a49d",x:1,shape:"camera"},{kind:"pendant",color:"#2e2a27"}]}],p={hair:"#9aa0a8",length:"short",bangs:"choppy",eyes:"#4b5058",eyeShape:"round",skin:"#c9ccd2",outfit:"#7d838d",inner:"#9aa0a8",accent:"#b6bbc3",legs:"#5d626b",accessories:[]},f=.36+.31+.19+.2+.02,m=.36+.31+.19+.2+.02+.12;function g(e,t,a,o,s,n,r=[0,0,0],l="XYZ"){let c=new i.eaF(a,"string"==typeof o?e.material(o):o);return c.position.set(...s),c.scale.set(...n),c.rotation.set(r[0],r[1],r[2],l),t.add(c),c}function u(e,t){let a=new i.YJl;return a.position.set(...t),e.add(a),a}function x(e,t,a,{angle:o,rootY:s,length:n,width:r,tilt:i=.32,roll:l=0,depth:c=.035,lift:h=.012}){g(e,t,e.geometry.cone,a,function(e,t,a=0){let o=.2*Math.sqrt(Math.max(0,1-(e/.194)**2))+a;return[Math.sin(t)*o,.19+e,Math.cos(t)*o*.95]}(s-.45*n,o,h),[r,n,c],[Math.PI-i,o,l],"YXZ")}let w={choppy:[{angle:-.95,length:.15,width:.055},{angle:-.55,length:.125,width:.06},{angle:-.18,length:.11,width:.06},{angle:.2,length:.13,width:.06},{angle:.58,length:.115,width:.06},{angle:.95,length:.15,width:.055}],curtain:[{angle:-1,length:.19,width:.055,roll:.12},{angle:-.62,length:.15,width:.06,roll:.22},{angle:-.26,length:.1,width:.055,roll:.35},{angle:.26,length:.1,width:.055,roll:-.35},{angle:.62,length:.15,width:.06,roll:-.22},{angle:1,length:.19,width:.055,roll:-.12}],swept:[{angle:-.95,length:.16,width:.06,roll:-.25},{angle:-.55,length:.14,width:.065,roll:-.4},{angle:-.15,length:.125,width:.065,roll:-.45},{angle:.25,length:.11,width:.065,roll:-.45},{angle:.62,length:.1,width:.06,roll:-.35},{angle:.98,length:.13,width:.055,roll:-.2}],wispy:[{angle:-.95,length:.16,width:.05},{angle:-.5,length:.12,width:.042,roll:.15},{angle:-.12,length:.105,width:.04},{angle:.3,length:.12,width:.042,roll:-.15},{angle:.95,length:.16,width:.05}]},y={short:.22,bob:.27,long:.44};function b(e,t,a){let o=e.getObjectByName(a.name);if(!o)return null;let s=o.clone(!0);return s.position.set(...a.at),s.rotation.y=(a.yaw??0)*Math.PI/180,"number"==typeof a.scale?s.scale.setScalar(a.scale):a.scale&&s.scale.set(...a.scale),t.add(s),s}let k=[{name:"wall",at:[-3.15,0,-3],scale:[.875,1,1]},{name:"wallWindow",at:[-1.05,0,-3],scale:[.875,1,1]},{name:"wallWindow",at:[1.05,0,-3],scale:[.875,1,1]},{name:"wall",at:[3.15,0,-3],scale:[.875,1,1]},{name:"wall",at:[-4.4,0,-2.4],yaw:90,scale:[.375,1,1]},{name:"wallDoor",at:[-4.4,0,-.75],yaw:90},{name:"wall",at:[-4.4,0,1.75],yaw:90,scale:[1.083,1,1]},{name:"shelf",at:[-3.15,1.25,-2.85]},{name:"frame",at:[3.15,1.35,-2.85]},{name:"frameSmall",at:[2.6,1.15,-2.85]},{name:"frameSmall",at:[-4.25,1.35,1.2],yaw:90},{name:"bookcase",at:[3.75,0,-2.85]},{name:"bookcase",at:[-3.75,0,-2.85]},{name:"plantTall",at:[4,0,-.9]},{name:"plantTall",at:[-.05,0,-2.45]},{name:"trashcan",at:[3.85,0,.4]},{name:"lamp",at:[-4,0,.45]},{name:"rugOval",at:[.3,.004,2.05],scale:[1.7,1,1.75]},{name:"rugRect",at:[-2.75,.004,1.35],scale:[2.1,1,1.6]},{name:"couch",at:[c._E.couch.x,0,c._E.couch.z]},{name:"armchair",at:[c._E.armchair.x,0,c._E.armchair.z],yaw:-18},{name:"tableLow",at:[c._E.couch.x+.1,0,c._E.couch.z+.8]},{name:"cactusSmall",at:[c._E.couch.x-.1,.19,c._E.couch.z+.8]},{name:"floorTile",at:[-3.65,.006,2.55],scale:.5},{name:"floorTile",at:[-2.45,.006,2.55],scale:.5},{name:"counter",at:[-3.86,0,c._E.counter.z-.38],yaw:90},{name:"counter",at:[-3.86,0,c._E.counter.z+.38],yaw:90},{name:"coffeeMachine",at:[-3.95,.456,c._E.counter.z+.4],yaw:90},{name:"cactusSmall",at:[-3.95,.456,c._E.counter.z-.45]},{name:"roundTable",at:[c._E.table.x,0,c._E.table.z]},{name:"stool",at:[c._E.table.x-c._E.stool,0,c._E.table.z],scale:[1.15,1.3,1.15]},{name:"stool",at:[c._E.table.x+c._E.stool,0,c._E.table.z],scale:[1.15,1.3,1.15]},{name:"cactus",at:[-1.3,0,.95]},{name:"plantTall",at:[3.95,0,2.75]}],M=new i.Pq0(-.15,.35,.2),j=new i.Pq0(1.2,4.9,8.2),z=[-3.95,3.4].flatMap(e=>[0,1.15].flatMap(t=>[-2,3].map(a=>new i.Pq0(e,t,a))));function v(e,t){return Math.atan2(Math.sin(t-e),Math.cos(t-e))}function S(){let e=(0,n.D)(e=>e.camera),t=(0,n.D)(e=>e.size.width/Math.max(e.size.height,1)),a=(0,n.D)(e=>e.invalidate);return(0,s.useEffect)(()=>{e instanceof i.ubm&&(e.aspect=t,e.updateProjectionMatrix());let o=new i.Pq0,s=t=>(e.position.copy(j).multiplyScalar(t).add(M),e.lookAt(M),e.updateMatrixWorld(),z.every(t=>(o.copy(t).project(e),.94>=Math.abs(o.x)&&.94>=Math.abs(o.y)))),n=1,r=2.6;if(!s(1)){for(let e=0;e<14;e+=1){let e=(n+r)/2;s(e)?r=e:n=e}s(r)}a()},[t,e,a]),null}function E(e,t,a){return a<t?(t+a)/2:Math.min(a,Math.max(t,e))}function P(e,t,a,o,s,n,r){let i=a;for(let a=0;a<=t.length;a+=1){e.top=i-s,e.bottom=i;let a=t.find(t=>e.left<t.right&&t.left<e.right&&e.top<t.bottom&&t.top<e.bottom);if(!a)return i;if((i=o?a.top-4:a.bottom+4+s)<n||i>r)break}return null}function _({shared:e,bubbles:t,reserved:a,onReady:o}){let r=(0,n.D)(e=>e.camera),l=(0,n.D)(e=>e.size),c=(0,n.D)(e=>e.invalidate),h=(0,s.useMemo)(()=>({point:new i.Pq0,written:new Map,sizes:new Map,observer:null,items:[],placed:[],blocked:[],ready:!1}),[]);return(0,s.useEffect)(()=>{let e="u"<typeof ResizeObserver?null:new ResizeObserver(e=>{for(let t of e){let e=t.borderBoxSize?.[0],a=t.target;h.sizes.set(a,e?{width:e.inlineSize,height:e.blockSize}:{width:a.offsetWidth,height:a.offsetHeight})}c()});return h.observer=e,()=>{e?.disconnect(),h.observer=null,h.sizes.clear(),h.written.clear()}},[c,h]),(0,n.F)(()=>{let s=h.blocked;for(let e of(s.length=0,a.values())){let t=e.offsetLeft,a=e.offsetTop;s.push({left:t,top:a,right:t+e.offsetWidth,bottom:a+e.offsetHeight})}let n=h.items;for(let[a,o]of(n.length=0,e.heads)){let e=t.get(a);if(!e)continue;let s=h.sizes.get(e);s||(s={width:e.offsetWidth,height:e.offsetHeight},h.sizes.set(e,s),h.observer?.observe(e)),o.head.getWorldPosition(h.point),h.point.y+=m-f+.22+.42*o.lift,h.point.project(r),n.push({key:a,element:e,x:(h.point.x+1)/2*l.width,y:(1-h.point.y)/2*l.height,depth:h.point.z,width:s.width,height:s.height,rest:o.rest})}n.sort((e,t)=>e.rest===t.rest?e.rest?t.y-e.y:0:e.rest?1:-1);let i=h.placed;for(let e of(i.length=0,n)){let t,a=6*!e.rest,o=e.width/2,n=E(e.x,o+4,l.width-o-4);if(e.rest)({x:n,y:t}=function(e,t,a,o,s){let n=o.width/2,r=s.height-4,i={left:0,right:0,top:0,bottom:0},l=null,c=E(a.x,n+4,s.width-n-4);for(let h=0;h<=6;h+=1){let d=E(c+(0===h?0:(h%2==1?-1:1)*Math.ceil(h/2)*(o.width+4)),n+4,s.width-n-4);if(h>0&&1>Math.abs(d-c))continue;let p=o.height+4;for(let e of t)d-n<e.right&&e.left<d+n&&(p=Math.max(p,e.bottom+4+o.height));let f=E(a.y,p,r);i.left=d-n,i.right=d+n;let m=P(i,e,f,!0,o.height,p,r)??P(i,e,f,!1,o.height,p,r);if(null!==m){let e=Math.abs(d-a.x)+Math.abs(m-a.y);(!l||e<l.cost)&&(l={x:d,y:m,cost:e})}}return l??{x:c,y:E(a.y,o.height+4,r)}}(i,s,e,e,l));else{let r=e.height+4;for(let t of s)n-o<t.right&&t.left<n+o&&(r=Math.max(r,t.bottom+4+e.height));t=E(e.y,r,l.height-4-a)}i.push({left:n-o,right:n+o,top:t-e.height,bottom:t+a});let r=`translate(${Math.round(n)}px, ${Math.round(t)}px) translate(-50%, -100%)`;h.written.get(e.key)!==r&&(h.written.set(e.key,r),e.element.style.transform=r,e.element.style.zIndex=String(Math.round((1-e.depth)*1e4)),e.element.dataset.placed="true")}h.ready||(h.ready=!0,o())}),null}function I({x:e,z:t,width:a,cushion:s,chairs:n,lit:r}){let i=a/2-.05,l=n.length>0?n:[{x:e,z:t-.3,key:""}];return(0,o.jsxs)("group",{children:[(0,o.jsxs)("mesh",{position:[e,.42,t],children:[(0,o.jsx)("boxGeometry",{args:[a,.04,.5]}),(0,o.jsx)("meshStandardMaterial",{color:"#b48a62",roughness:.7})]}),[[-i,-.2],[i,-.2],[-i,.2],[i,.2]].map(([a,s])=>(0,o.jsxs)("mesh",{position:[e+a,.21,t+s],children:[(0,o.jsx)("boxGeometry",{args:[.04,.42,.04]}),(0,o.jsx)("meshStandardMaterial",{color:"#5b4a3b"})]},`${a}:${s}`)),l.map(e=>{let t=!!e.key&&!0===r.get(e.key),a=""!==e.key;return(0,o.jsxs)("group",{children:[(0,o.jsxs)("group",{position:[e.x,.445,e.z+.3],children:[(0,o.jsxs)("mesh",{children:[(0,o.jsx)("boxGeometry",{args:[.3,.012,.2]}),(0,o.jsx)("meshStandardMaterial",{color:"#3a3e45"})]}),a?(0,o.jsxs)("group",{position:[0,.005,.1],"rotation-x":-.25,children:[(0,o.jsxs)("mesh",{position:[0,.1,0],children:[(0,o.jsx)("boxGeometry",{args:[.3,.2,.012]}),(0,o.jsx)("meshStandardMaterial",{color:"#3a3e45"})]}),(0,o.jsxs)("mesh",{position:[0,.1,-.007],"rotation-y":Math.PI,children:[(0,o.jsx)("planeGeometry",{args:[.27,.17]}),(0,o.jsx)("meshStandardMaterial",{color:t?"#a8d8ff":"#1f2329",emissive:t?"#5fb2ff":"#000000",emissiveIntensity:.9*!!t})]}),(0,o.jsxs)("mesh",{position:[0,.11,.007],children:[(0,o.jsx)("circleGeometry",{args:[.025,16]}),(0,o.jsx)("meshStandardMaterial",{color:t?"#cfe9ff":"#565b63",emissive:t?"#7cc4ff":"#000000",emissiveIntensity:1.2*!!t})]})]}):(0,o.jsxs)("mesh",{position:[0,.012,0],children:[(0,o.jsx)("boxGeometry",{args:[.3,.012,.2]}),(0,o.jsx)("meshStandardMaterial",{color:"#4a4f57"})]})]}),(0,o.jsxs)("group",{position:[e.x,0,e.z-.06*!!a],children:[(0,o.jsxs)("mesh",{position:[0,.2,0],children:[(0,o.jsx)("boxGeometry",{args:[.36,.05,.34]}),(0,o.jsx)("meshStandardMaterial",{color:s,roughness:.85})]}),(0,o.jsxs)("mesh",{position:[0,.25+.17,-.18],children:[(0,o.jsx)("boxGeometry",{args:[.36,.38,.04]}),(0,o.jsx)("meshStandardMaterial",{color:s,roughness:.85})]}),(0,o.jsxs)("mesh",{position:[0,.1,0],children:[(0,o.jsx)("cylinderGeometry",{args:[.025,.025,.2,8]}),(0,o.jsx)("meshStandardMaterial",{color:"#2f3236"})]})]})]},e.key||"tucked")})]})}function G({layout:e,lit:t}){let a=(0,s.useMemo)(()=>e.desks.map((t,a)=>e.stations.filter(e=>e.deskIndex===a).map(e=>({x:e.desk.point.x,z:e.desk.point.z,key:e.key}))),[e]);return(0,o.jsxs)("group",{children:[(0,o.jsxs)("mesh",{"rotation-x":-Math.PI/2,position:[0,0,.15],children:[(0,o.jsx)("planeGeometry",{args:[8.4,5.9]}),(0,o.jsx)("meshStandardMaterial",{color:"#ddd6ca",roughness:.95})]}),(0,o.jsxs)("mesh",{position:[0,1.2,-2.85],children:[(0,o.jsx)("boxGeometry",{args:[8.4,2.4,.1]}),(0,o.jsx)("meshStandardMaterial",{color:"#ece7dd",roughness:1})]}),(0,o.jsxs)("mesh",{position:[-4.25,1.2,.15],children:[(0,o.jsx)("boxGeometry",{args:[.1,2.4,6]}),(0,o.jsx)("meshStandardMaterial",{color:"#e3ddd1",roughness:1})]}),(0,o.jsxs)("mesh",{position:[-4.195,.95,c.kn.z],"rotation-y":Math.PI/2,children:[(0,o.jsx)("planeGeometry",{args:[.9,1.9]}),(0,o.jsx)("meshStandardMaterial",{color:"#8a7a66",roughness:.8})]}),(0,o.jsxs)("mesh",{"rotation-x":-Math.PI/2,position:[.3,.004,1.85],children:[(0,o.jsx)("circleGeometry",{args:[1.25,48]}),(0,o.jsx)("meshStandardMaterial",{color:"#c3ccbd",roughness:1})]}),(0,o.jsxs)("mesh",{"rotation-x":-Math.PI/2,position:[-2.95,.004,1.9],children:[(0,o.jsx)("planeGeometry",{args:[2.4,2.3]}),(0,o.jsx)("meshStandardMaterial",{color:"#e8d9c2",roughness:1})]}),[{x:c._E.couch.x,z:c._E.couch.z,width:c._E.couchWidth},{x:c._E.armchair.x,z:c._E.armchair.z,width:.75}].map(e=>(0,o.jsxs)("group",{position:[e.x,0,e.z],children:[(0,o.jsxs)("mesh",{position:[0,.18,.12],children:[(0,o.jsx)("boxGeometry",{args:[e.width-.2,.14,.42]}),(0,o.jsx)("meshStandardMaterial",{color:"#8c9a8a",roughness:.9})]}),(0,o.jsxs)("mesh",{position:[0,.37,-.12],children:[(0,o.jsx)("boxGeometry",{args:[e.width-.2,.42,.12]}),(0,o.jsx)("meshStandardMaterial",{color:"#7d8b7b",roughness:.9})]}),[-1,1].map(t=>(0,o.jsxs)("mesh",{position:[t*(e.width/2-.05),.25,.06],children:[(0,o.jsx)("boxGeometry",{args:[.1,.3,.5]}),(0,o.jsx)("meshStandardMaterial",{color:"#7d8b7b",roughness:.9})]},t))]},e.x)),(0,o.jsxs)("group",{position:[c._E.table.x,0,c._E.table.z],children:[(0,o.jsxs)("mesh",{position:[0,.36,0],children:[(0,o.jsx)("cylinderGeometry",{args:[.28,.28,.04,20]}),(0,o.jsx)("meshStandardMaterial",{color:"#b48a62",roughness:.7})]}),(0,o.jsxs)("mesh",{position:[0,.17,0],children:[(0,o.jsx)("cylinderGeometry",{args:[.04,.06,.34,10]}),(0,o.jsx)("meshStandardMaterial",{color:"#5b4a3b"})]}),[-1,1].map(e=>(0,o.jsxs)("mesh",{position:[e*c._E.stool,.1,0],children:[(0,o.jsx)("cylinderGeometry",{args:[.13,.11,.2,14]}),(0,o.jsx)("meshStandardMaterial",{color:"#8c9a8a",roughness:.9})]},e))]}),(0,o.jsxs)("mesh",{position:[-3.86,.23,c._E.counter.z],children:[(0,o.jsx)("boxGeometry",{args:[.7,.46,1.5]}),(0,o.jsx)("meshStandardMaterial",{color:"#d9cfc0",roughness:.8})]}),e.desks.map((e,s)=>(0,o.jsx)(I,{x:e.center.x,z:e.center.z,width:e.width,cushion:null===e.seat?"#9aa0a8":d[e.seat%d.length].hair,chairs:a[s],lit:t},`${e.seat??"guest"}:${s}`))]})}function D(e){e.traverse(e=>{if(e instanceof i.eaF)for(let t of(e.geometry.dispose(),Array.isArray(e.material)?e.material:[e.material]))t instanceof i._4j&&t.map?.dispose(),t.dispose()})}function L({layout:e,lit:t}){let a=(0,n.D)(e=>e.invalidate),[r,c]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!0,t=null;return new l.B().loadAsync("/office3d/office-kit.glb").then(o=>{(t=o.scene,e)?(c(o.scene),a()):D(o.scene)},e=>console.warn("[office] office kit failed; keeping the drawn room",e)),()=>{e=!1,t&&D(t)}},[a]);let p=(0,s.useMemo)(()=>r?function(e,t,a){let o=new i.YJl,s=new i.bdM(8.5,6),n=new i._4j({color:"#e9dfcf",roughness:.95}),r=new i.eaF(s,n);r.rotation.x=-Math.PI/2,r.position.set(0,0,.1),o.add(r);let l=new i.YJl;for(let t of(o.add(l),k))b(e,l,t);let c=t=>{let a=e.getObjectByName(t);return a?new i.NRn().setFromObject(a).getSize(new i.Pq0):new i.Pq0(1,1,1)},d=c("desk"),p=.22/(.44*c("chairDesk").y),f=new i.V9B({color:"#2a3036"}),m=new i.V9B({color:"#a8d8ff"}),g=new i.V9B({color:"#565b63"}),u=new i.V9B({color:"#7cc4ff"}),x=new i.bdM(1,1),w=new i.tcD(.018,12),y=new Map,M=new Map;t.desks.forEach((s,n)=>{b(e,l,{name:"desk",at:[s.center.x,0,s.center.z],yaw:180,scale:[s.width/d.x,.42/d.y,.5/d.z]});let r=t.stations.filter(e=>e.deskIndex===n);for(let t of r.length>0?r.map(e=>({x:e.desk.point.x,z:e.desk.point.z,key:e.key})):[{x:s.center.x,z:s.center.z-.34,key:""}]){let n=b(e,l,{name:"chairDesk",at:[t.x,0,t.z-.04*!!t.key],scale:p});if(n&&null!==s.seat){let e=a(s.seat);n.traverse(t=>{if(!(t instanceof i.eaF)||!(t.material instanceof i._4j)||"carpet"!==t.material.name)return;let a=M.get(e);a||((a=t.material.clone()).color.set(e),M.set(e,a)),t.material=a})}let r=b(e,l,{name:"screen",at:[t.x,.42,t.z+.33],yaw:180});if(b(e,l,{name:"keyboard",at:[t.x,.42,t.z+.2],yaw:180}),r&&t.key){let e=new i.NRn().setFromObject(r),a=e.getSize(new i.Pq0),s=new i.eaF(x,f);s.scale.set(.86*a.x,.62*a.y,1),s.position.set(t.x,e.min.y+.62*a.y,e.min.z-.003),s.rotation.y=Math.PI;let n=new i.eaF(w,g);n.position.set(t.x,e.min.y+.62*a.y,e.max.z+.003),o.add(s,n),y.set(t.key,{face:s,dot:n})}}});let j=function(e){e.updateMatrixWorld(!0);let t=e.matrixWorld.clone().invert(),a=new Map,o=new i.kn4;e.traverse(e=>{if(!(e instanceof i.eaF)||Array.isArray(e.material))return;let s=(function(e){let t=new i.LoY;for(let a of["position","normal","uv"]){let o=e.getAttribute(a);if(!o)continue;let s=new Float32Array(o.count*o.itemSize);for(let e=0;e<o.count;e+=1)for(let t=0;t<o.itemSize;t+=1)s[e*o.itemSize+t]=o.getComponent(e,t);t.setAttribute(a,new i.THS(s,o.itemSize))}let a=e.getIndex();return a&&t.setIndex(Array.from(a.array)),t})(e.geometry).applyMatrix4(o.multiplyMatrices(t,e.matrixWorld)),n=a.get(e.material)??[];n.push(s),a.set(e.material,n)}),e.clear();let s=[];for(let[t,o]of a){let a=o.length>1?(0,h.pP)(o,!1):o[0];if(a&&a!==o[0])for(let e of o)e.dispose();for(let n of a?[a]:o)s.push(n),e.add(new i.eaF(n,t))}return s}(l);return{group:o,setLit:e=>{for(let[t,a]of y){let o=!0===e.get(t);a.face.material=o?m:f,a.dot.material=o?u:g}},dispose:()=>{for(let e of j)e.dispose();for(let e of[n,f,m,g,u,...M.values()])e.dispose();for(let e of[s,x,w])e.dispose()}}}(r,e,e=>d[e%d.length].hair):null,[r,e]);return(0,s.useEffect)(()=>()=>p?.dispose(),[p]),(0,s.useEffect)(()=>{p?.setLit(t),a()},[a,t,p]),p?(0,o.jsx)("primitive",{object:p.group}):(0,o.jsx)(G,{layout:e,lit:t})}function W({actorKey:e,seat:t,shared:a,target:r,selected:l,onSelect:m,onHover:b,onMotionChange:k}){let M=(0,n.D)(e=>e.gl),j=(0,n.D)(e=>e.invalidate),z=(0,s.useMemo)(()=>{let e=null===t?p:d[t%d.length];return function(e,t,a=!1){let{sphere:o,cylinder:s,torso:n,box:r}=e.geometry,l=new i.YJl,c=u(l,[0,0,0]),d=u(c,[.062,.36,0]),p=u(c,[-.062,.36,0]);for(let a of[d,p])g(e,a,s,t.legs,[0,-.15,0],[.048,.3,.048]),g(e,a,r,"#2b2a2e",[0,-.322,.022],[.08,.045,.13]);let f=u(c,[0,.36,0]);g(e,f,n,t.outfit,[0,.15,0],[.15,.3,.122]),g(e,f,r,t.inner,[0,.17,.106],[.075,.2,.02],[-.13,0,0]),g(e,f,e.geometry.ring,t.accent,[0,.3,0],[.08,.08,.065],[Math.PI/2,0,0]),g(e,f,s,t.skin,[0,.31,0],[.04,.06,.04]),t.hood&&g(e,f,o,t.outfit,[0,.29,-.1],[.13,.065,.07],[.3,0,0]),t.skirt&&g(e,f,n,t.skirt,[0,-.045,0],[.19,.13,.17]);let m=u(f,[.14,.27,0]),b=u(f,[-.14,.27,0]);for(let a of[m,b])g(e,a,s,t.outfit,[0,-.12,0],[.042,.24,.042]),t.stripe&&g(e,a,s,t.stripe,[0,-.108,0],[.045,.03,.045]),g(e,a,s,t.accent,[0,-.24+.015,0],[.046,.03,.046]),g(e,a,o,t.skin,[0,-.266,0],[.04,.042,.04]);let k=u(f,[0,.33,0]);if(g(e,k,o,t.skin,[0,.19,0],[.2,.194,.19]),a)for(let a of[-1,1])g(e,k,o,t.eyes,[.072*a,.17,.178],[.034,.046,.02]);else{let a=`#${new i.Q1f(t.eyes).multiplyScalar(.32).getHexString()}`;for(let s of[-1,1])!function(e,t,a,o,s){let{sphere:n}=e.geometry,r="sharp"===a.eyeShape,i=r?.05:.058,l=.078*o,c=.38*o;g(e,t,n,e.flat(a.eyes),[l,.155,.168],[.043,i,.02],[0,c,0]),g(e,t,n,e.flat(s),[l-.003*o,.149,.184],[.023,.55*i,.008],[0,c,0]),g(e,t,n,e.flat("#2a1d22"),[l,.155+.1*i,.167],[.049,1.1*i,.016],[0,c,0]),r&&g(e,t,n,e.flat("#2a1d22"),[l+.046*o,.155+.92*i,.17],[.018,.007,.008],[0,c,.5*o]),g(e,t,n,e.flat("#ffffff"),[l+.013*o,.155+.3*i,.19],[.014,.017,.006],[0,c,0]),g(e,t,n,e.flat("#ffffff"),[l-.014*o,.155-.5*i,.188],[.007,.007,.004],[0,c,0])}(e,k,t,s,a),g(e,k,o,"#f6aaa6",[.105*s,.085,.122],[.03,.012,.01],[0,.6*s,0])}g(e,k,o,"#b85a5c",[0,.065,.143],[.018,.007,.006]),a||function(e,t,a){let{sphere:o,dome:s,box:n,cone:r}=e.geometry,i=a.hair;for(let o of(g(e,t,s,i,[0,.19+.014,-.01],[.22400000000000003,.22400000000000003,.22799999999999998],[-.36,0,0]),w[a.bangs]))x(e,t,i,{angle:o.angle,rootY:.145,length:o.length,width:o.width,roll:o.roll??0});a.streak&&x(e,t,a.streak,{angle:.4,rootY:.13,length:.1,width:.026,roll:-.3,lift:.022});let l=y[a.length];for(let o of[-1,1])g(e,t,r,i,[.19*o,.22-.5*l,.055],[.05,l,.045],[Math.PI,0,.1*o]),a.streak&&g(e,t,r,a.streak,[.168*o,.2-.42*l,.075],[.022,.7*l,.02],[Math.PI,0,.06*o]);if("short"===a.length)for(let a of(g(e,t,o,i,[0,.2,-.065],[.212,.205,.175]),[-.1,0,.1]))g(e,t,r,i,[a,.19-.14,-.1],[.05,.11,.045],[Math.PI+.45,0,2.5*a]);else if(g(e,t,o,i,[0,.155,-.085],[.232,.24,.188]),"bob"===a.length)for(let a of[-1,1])g(e,t,o,i,[.175*a,.19-.2,-.05],[.075,.055,.09],[0,0,-.5*a]);else for(let a of(g(e,t,o,i,[0,.19-.3,-.13],[.215,.33,.09],[-.16,0,0]),[-.12,0,.12]))g(e,t,r,i,[a,-.44,-.17],[.075,.13,.055],[Math.PI-.1,0,1.5*a]);if(a.ahoge&&g(e,t,r,i,[.02,.45,.03],[.02,.13,.015],[.45,0,-.55]),a.ponytail){let s=a.ponytail.x,n=a.ponytail.high?.32:.21;g(e,t,o,i,[.18*s,n,-.07],[.055,.055,.055]),g(e,t,o,i,[.25*s,n-.06,-.09],[.075,.08,.075],[0,0,.3*s]),g(e,t,o,i,[.29*s,n-.18,-.1],[.062,.11,.064],[0,0,.2*s]),g(e,t,r,i,[.3*s,n-.33,-.1],[.05,.13,.05],[Math.PI,0,-.15*s])}if(a.braid){let s=a.braid.x,r=a.braid.color??i;for(let a=0;a<5;a+=1){let n=.048-.004*a;g(e,t,o,r,[s*(.17-.008*a),.09-.068*a,.06+.022*a],[n,1.15*n,n])}g(e,t,n,"#2b2b2b",[.135*s,-.26,.16],[.045,.02,.045])}}(e,k,t),function(e,t,a,o){let{sphere:s,box:n,ring:r,cone:i}=e.geometry;for(let l of o.accessories)switch(l.kind){case"bow":{let a=l.size,o=[l.x,.19+l.y,l.z];for(let n of[-1,1])g(e,t,s,l.color,[o[0]+.058*n*a,o[1],o[2]],[.064*a,.042*a,.026*a],[0,0,.35*n]),l.tails&&g(e,t,i,l.color,[o[0]+.03*n*a,o[1]-.09*a,o[2]-.01],[.024*a,.13*a,.01],[Math.PI,0,-.25*n]);g(e,t,s,l.color,o,[.026*a,.026*a,.026*a]);break}case"goggles":for(let a of[-1,1])g(e,t,r,l.frame,[.066*a,.36,.12],[.047,.047,.047],[-.95,0,0]),g(e,t,s,l.lens,[.066*a,.363,.122],[.04,.012,.04],[-.95+Math.PI/2,0,0]);break;case"clip":{let a=l.x,o=[.15*a,.19+.1,.125];switch(l.shape??"bar"){case"x":for(let s of[.78,-.78])g(e,t,n,l.color,o,[.06,.016,.016],[0,.5*a,s]);break;case"whale":g(e,t,s,l.color,o,[.04,.027,.02],[0,.5*a,0]),g(e,t,i,l.color,[o[0]+.045*a,o[1]+.012,o[2]-.012],[.018,.035,.008],[0,.5*a,.9*a]);break;case"camera":g(e,t,n,l.color,o,[.055,.036,.022],[0,.5*a,0]),g(e,t,s,"#2b2b2b",[o[0]-.005*a,o[1],o[2]+.012],[.012,.012,.008]);break;default:g(e,t,n,l.color,o,[.055,.022,.02],[0,0,-.5*a])}break}case"glasses":for(let a of[-1,1])g(e,t,r,l.color,[.078*a,.155,.198],[.056,.056,.03],[0,.3*a,0]);g(e,t,n,l.color,[0,.165,.205],[.04,.007,.007]);break;case"pendant":g(e,a,s,l.color,[0,.235,.1],[.022,.022,.012]);break;case"choker":g(e,a,r,l.color,[0,.305,0],[.05,.05,.07],[Math.PI/2,0,0]),g(e,a,s,l.color,[0,.28,.052],[.014,.016,.01])}}(e,k,f,t);let M=[];for(let e of[d,p,f,m,b,k])!function(e,t){let a=new Map;for(let t of e.children.filter(e=>e instanceof i.eaF)){t.updateMatrix();let o=t.geometry.clone().applyMatrix4(t.matrix),s=t.material,n=a.get(s)??[];n.push(o),a.set(s,n),e.remove(t)}for(let[o,s]of a){let a=1===s.length?s[0]:(0,h.pP)(s,!1);if(s.length>1)for(let e of s)e.dispose();a&&(t.push(a),e.add(new i.eaF(a,o)))}}(e,M);return{root:l,body:c,torso:f,head:k,armLeft:m,armRight:b,legLeft:d,legRight:p,baked:M}}(a.kit,e,null===t)},[t,a.kit]),S=(0,s.useRef)(null),E=(0,s.useRef)(r),P="rest"===r.kind?r.place.point:c.kn,_=(0,s.useRef)({point:{...P},heading:0,phase:"rest"===r.kind?"pose":"walk",sit:0,walkPhase:0,blend:{walk:0,type:0,wave:0,slump:0},paceLeg:0,paceWait:(t??0)%3*2.6/3,motion:null,time:(t??7)*1.37});(0,s.useEffect)(()=>{E.current=r,j()},[r,j]);let I="participant"===r.kind?r.station.bubbleLift:0,G="rest"===r.kind;return(0,s.useLayoutEffect)(()=>{let o=_.current;if(null!==t){let e=a.departed.get(t);e&&(a.departed.delete(t),o.point={...e.point},o.heading=e.heading,o.phase="walk")}return a.heads.set(e,{head:z.head,lift:I,rest:G}),()=>{a.heads.delete(e),null!==t&&a.departed.set(t,{point:{...o.point},heading:o.heading})}},[e,I,G,z,t,a]),(0,s.useEffect)(()=>()=>(function(e){for(let t of e.baked)t.dispose()})(z),[z]),(0,s.useEffect)(()=>()=>{M.domElement.style.cursor=""},[M]),(0,n.F)((e,t)=>{var o,s,n,r,i,l,h,d;let p,f,m,g,u,x,w,y,b,M,j=Math.min(t,.1),P=a.reducedMotion.current,I=_.current;I.time+=j;let G=E.current;if("participant"===G.kind)b="desk"===G.plan.spot?G.station.desk:G.station.lounge,M=G.plan.pose;else{let e=G.place;M=e.pose,b={point:e.to&&1===I.paceLeg&&!P?e.to:e.point,facing:e.facing}}let D="work"===M||"sofa"===M,L=P?1:j/.45,W=!1;if("sitDown"===I.phase||"seated"===I.phase)D?"sitDown"===I.phase?(I.sit=Math.min(1,I.sit+L),I.sit>=1&&(I.phase="seated")):W=!0:I.phase="standUp";else if("standUp"===I.phase)I.sit=Math.max(0,I.sit-L),I.sit<=0&&(I.phase="walk");else{let e=(0,c.yA)(I.point,b.point,P?1/0:1.15*j);if(e.arrived){I.point=e.point;let t=v(I.heading,b.facing);Math.abs(t)>.12&&!P?(I.heading+=t*Math.min(1,7*j),I.phase="turn"):(I.heading=b.facing,D?I.phase="sitDown":(I.phase="pose","pace"!==M||P?W=!0:(I.paceWait-=j,I.paceWait<=0&&(I.paceWait=2.6,I.paceLeg=+(1!==I.paceLeg)))))}else{let t=Math.atan2(e.point.x-I.point.x,e.point.z-I.point.z);I.heading+=v(I.heading,t)*Math.min(1,7*j),I.point=e.point,I.phase="walk",I.walkPhase+=9*j}}let F=P?1:Math.min(1,8*j),R=I.blend;if(R.walk+=(("walk"===I.phase)-R.walk)*F,R.type+=(("seated"===I.phase&&"work"===M)-R.type)*F,R.wave+=(("pose"===I.phase&&"wave"===M)-R.wave)*F,R.slump+=(("pose"===I.phase&&"slump"===M)-R.slump)*F,o=z,s={walkPhase:I.walkPhase,walk:R.walk,sit:I.sit,type:R.type,wave:R.wave,slump:R.slump,breathe:+!P},n=I.time,p=.6*Math.sin(s.walkPhase)*s.walk,f=-Math.PI/2*s.sit,o.legLeft.rotation.x=f+p,o.legRight.rotation.x=f-p,m=Math.sin(2.1*n)*s.breathe,g=.025*Math.abs(Math.sin(s.walkPhase))*s.walk,o.body.position.y=-(.36-.25)*s.sit+g+.004*m,o.torso.scale.y=1+.012*m,u=e=>.07*Math.sin(9*n+1.7*e)*s.breathe,x=(r=-(.8*p))+(-1.15+u(1)-r)*s.type,w=(i=.8*p)+(-1.15+u(-1)-i)*s.type,y=.12*s.slump,o.armLeft.rotation.set(x+y,0,.1+-.08*s.slump),o.armRight.rotation.set(w+y,0,-.1+.08*s.slump),s.wave>0&&(o.armRight.rotation.z=-.1+(-2.55+.35*Math.sin(7*n)*s.breathe- -.1)*s.wave,o.armRight.rotation.x=(l=o.armRight.rotation.x)+(0-l)*s.wave),o.head.rotation.x=.05*s.type+.3*s.slump+.02*m,o.head.rotation.y=.06*Math.sin(.6*n)*s.breathe*(1-s.type),o.torso.rotation.x=.1*s.slump,S.current&&(S.current.position.set(I.point.x,0,I.point.z),S.current.rotation.y=I.heading),"participant"===G.kind&&k){let e=(h=I.phase,d=G.plan,"walk"===h?"desk"===d.spot?"toDesk":"toLounge":"sitDown"===h||"seated"===h?"work":"standUp"===h?"desk"===d.spot?"atDesk":"toLounge":"desk"===d.spot?"slump"===d.pose?"slump":"atDesk":"wave"===d.pose?"wave":"idle");e!==I.motion&&(I.motion=e,k(e))}P&&!W&&e.invalidate()}),(0,o.jsxs)("group",{ref:S,children:[(0,o.jsx)("primitive",{object:z.root}),(0,o.jsxs)("mesh",{"rotation-x":-Math.PI/2,position:[0,.01,0],children:[(0,o.jsx)("circleGeometry",{args:[.26,28]}),(0,o.jsx)("meshBasicMaterial",{color:"#000000",transparent:!0,opacity:"rest"===r.kind?.1:.16,depthWrite:!1})]}),l&&(0,o.jsxs)("mesh",{"rotation-x":-Math.PI/2,position:[0,.015,0],children:[(0,o.jsx)("ringGeometry",{args:[.3,.37,48]}),(0,o.jsx)("meshBasicMaterial",{color:"#ff6f0f",depthWrite:!1})]}),(0,o.jsxs)("mesh",{position:[0,f/2,0],onClick:e=>{e.stopPropagation(),m?.()},onPointerOver:t=>{t.stopPropagation(),M.domElement.style.cursor=m?"pointer":"help",b(e)},onPointerOut:()=>{M.domElement.style.cursor="",b(null)},children:[(0,o.jsx)("boxGeometry",{args:[.5,f,.45]}),(0,o.jsx)("meshBasicMaterial",{transparent:!0,opacity:0,depthWrite:!1})]})]})}function F({onContextLost:e}){let t=(0,n.D)(e=>e.gl.domElement);return(0,s.useEffect)(()=>(t.addEventListener("webglcontextlost",e),()=>t.removeEventListener("webglcontextlost",e)),[t,e]),null}function R({layout:e,participants:t,bubbles:a,reserved:r,onSelect:l,onHover:h,onReady:d,onMotionChange:p}){let f=(0,s.useMemo)(()=>{let e,t,a;return{kit:(e={sphere:new i.Gu$(1,20,14),dome:new i.Gu$(1,22,12,0,2*Math.PI,0,.56*Math.PI),cylinder:new i.Ho_(1,1,1,12),torso:new i.Ho_(.76,1,1,16),box:new i.iNn(1,1,1),ring:new i.O3Y(1,.16,8,24),cone:new i.qFE(1,1,10)},t=new Map,a=new Map,{geometry:e,material:e=>{let a=t.get(e);return a||(a=new i._4j({color:e,roughness:.78,metalness:0}),t.set(e,a)),a},flat:e=>{let t=a.get(e);return t||(t=new i.V9B({color:e}),a.set(e,t)),t},dispose:()=>{for(let t of Object.values(e))t.dispose();for(let e of t.values())e.dispose();for(let e of a.values())e.dispose();t.clear(),a.clear()}}),heads:new Map,departed:new Map,reducedMotion:{current:window.matchMedia("(prefers-reduced-motion: reduce)").matches}}},[]);(0,s.useEffect)(()=>()=>f.kit.dispose(),[f]);let m=(0,n.D)(e=>e.invalidate);(0,s.useEffect)(()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=e=>{f.reducedMotion.current=e.matches,m()};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[m,f]);let g=(0,s.useMemo)(()=>new Map(e.stations.map(e=>[e.key,e])),[e]),u=(0,s.useMemo)(()=>new Map(t.map(e=>[e.key,"desk"===e.plan.spot&&"work"===e.plan.pose])),[t]),x=(0,s.useRef)(new Map),w=(0,s.useRef)({onSelect:l,onMotionChange:p});return w.current={onSelect:l,onMotionChange:p},(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(S,{}),(0,o.jsx)("hemisphereLight",{args:["#ffffff","#b5a993",1.7]}),(0,o.jsx)("directionalLight",{position:[3,6,5],intensity:1.5}),(0,o.jsx)(L,{layout:e,lit:u}),t.map(e=>{var t;let a,s=g.get(e.key);if(!s)return null;let n=(t=e.key,(a=x.current.get(t))||(a={select:()=>w.current.onSelect(t),motion:e=>w.current.onMotionChange(t,e)},x.current.set(t,a)),a);return(0,o.jsx)(A,{participant:e,station:s,shared:f,onSelect:n.select,onHover:h,onMotionChange:n.motion},e.key)}),e.rest.map(e=>(0,o.jsx)(B,{place:e,shared:f,onHover:h},(0,c.wC)(e.seat))),(0,o.jsx)(_,{shared:f,bubbles:a,reserved:r,onReady:d})]})}function A({participant:e,station:t,shared:a,onSelect:n,onHover:r,onMotionChange:i}){let{plan:l}=e,c=(0,s.useMemo)(()=>({kind:"participant",station:t,plan:l}),[t,l.spot,l.pose]);return(0,o.jsx)(W,{actorKey:e.key,seat:e.seat,shared:a,target:c,selected:e.selected,onSelect:n,onHover:r,onMotionChange:i})}function B({place:e,shared:t,onHover:a}){let n=(0,s.useMemo)(()=>({kind:"rest",place:e}),[e]);return(0,o.jsx)(W,{actorKey:(0,c.wC)(e.seat),seat:e.seat,shared:t,target:n,selected:!1,onHover:a})}function H({onContextLost:e,...t}){let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return(0,o.jsxs)(r.Hl,{dpr:[1,1.75],frameloop:a?"demand":"always",camera:{fov:36,near:.1,far:60,position:j.clone().add(M).toArray()},gl:{antialias:!0,alpha:!0,powerPreference:"low-power"},children:[(0,o.jsx)(F,{onContextLost:e}),(0,o.jsx)(R,{...t})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9703],{8039:(e,t,r)=>{e.exports=r(65538)},16377:(e,t,r)=>{r.d(t,{B:()=>i});var n=r(42412),s=r(56369);class i extends n.aHM{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new d(e)}),this.register(function(e){return new f(e)}),this.register(function(e){return new R(e)}),this.register(function(e){return new E(e)}),this.register(function(e){return new w(e)}),this.register(function(e){return new p(e)}),this.register(function(e){return new g(e)}),this.register(function(e){return new T(e)}),this.register(function(e){return new v(e)}),this.register(function(e){return new h(e)}),this.register(function(e){return new x(e)}),this.register(function(e){return new m(e)}),this.register(function(e){return new y(e)}),this.register(function(e){return new b(e)}),this.register(function(e){return new u(e)}),this.register(function(e){return new _(e,l.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new _(e,l.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new A(e)})}load(e,t,r,s){let i,o=this;if(""!==this.resourcePath)i=this.resourcePath;else if(""!==this.path){let t=n.r6x.extractUrlBase(e);i=n.r6x.resolveURL(t,this.path)}else i=n.r6x.extractUrlBase(e);this.manager.itemStart(e);let a=function(t){s?s(t):console.error(t),o.manager.itemError(e),o.manager.itemEnd(e)},l=new n.Y9S(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(r){try{o.parse(r,i,function(r){t(r),o.manager.itemEnd(e)},a)}catch(e){a(e)}},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 -1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return -1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,r,n){let s,i={},o={},a=new TextDecoder;if("string"==typeof e)s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(a.decode(new Uint8Array(e,0,4))===S){try{i[l.KHR_BINARY_GLTF]=new I(e)}catch(e){n&&n(e);return}s=JSON.parse(i[l.KHR_BINARY_GLTF].content)}else s=JSON.parse(a.decode(e));else s=e;if(void 0===s.asset||s.asset.version[0]<2){n&&n(Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}let u=new Y(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){let t=this.pluginCallbacks[e](u);t.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),o[t.name]=t,i[t.name]=!0}if(s.extensionsUsed)for(let e=0;e<s.extensionsUsed.length;++e){let t=s.extensionsUsed[e],r=s.extensionsRequired||[];switch(t){case l.KHR_MATERIALS_UNLIT:i[t]=new c;break;case l.KHR_DRACO_MESH_COMPRESSION:i[t]=new M(s,this.dracoLoader);break;case l.KHR_TEXTURE_TRANSFORM:i[t]=new L;break;case l.KHR_MESH_QUANTIZATION:i[t]=new O;break;default:r.indexOf(t)>=0&&void 0===o[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}u.setExtensions(i),u.setPlugins(o),u.parse(r,n)}parseAsync(e,t){let r=this;return new Promise(function(n,s){r.parse(e,t,n,s)})}}function o(){let e={};return{get:function(t){return e[t]},add:function(t,r){e[t]=r},remove:function(t){delete e[t]},removeAll:function(){e={}}}}function a(e,t,r){let n=e.json.materials[t];return n.extensions&&n.extensions[r]?n.extensions[r]:null}let l={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",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class u{constructor(e){this.parser=e,this.name=l.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let r=0,n=t.length;r<n;r++){let n=t[r];n.extensions&&n.extensions[this.name]&&void 0!==n.extensions[this.name].light&&e._addNodeRef(this.cache,n.extensions[this.name].light)}}_loadLight(e){let t,r=this.parser,s="light:"+e,i=r.cache.get(s);if(i)return i;let o=r.json,a=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e],l=new n.Q1f(0xffffff);void 0!==a.color&&l.setRGB(a.color[0],a.color[1],a.color[2],n.Zr2);let u=void 0!==a.range?a.range:0;switch(a.type){case"directional":(t=new n.ZyN(l)).target.position.set(0,0,-1),t.add(t.target);break;case"point":(t=new n.HiM(l)).distance=u;break;case"spot":(t=new n.nCl(l)).distance=u,a.spot=a.spot||{},a.spot.innerConeAngle=void 0!==a.spot.innerConeAngle?a.spot.innerConeAngle:0,a.spot.outerConeAngle=void 0!==a.spot.outerConeAngle?a.spot.outerConeAngle:Math.PI/4,t.angle=a.spot.outerConeAngle,t.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,t.target.position.set(0,0,-1),t.add(t.target);break;default:throw Error("THREE.GLTFLoader: Unexpected light type: "+a.type)}return t.position.set(0,0,0),z(t,a),void 0!==a.intensity&&(t.intensity=a.intensity),t.name=r.createUniqueName(a.name||"light_"+e),i=Promise.resolve(t),r.cache.add(s,i),i}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){let t=this,r=this.parser,n=r.json.nodes[e],s=(n.extensions&&n.extensions[this.name]||{}).light;return void 0===s?null:this._loadLight(s).then(function(e){return r._getNodeRef(t.cache,s,e)})}}class c{constructor(){this.name=l.KHR_MATERIALS_UNLIT}getMaterialType(){return n.V9B}extendParams(e,t,r){let s=[];e.color=new n.Q1f(1,1,1),e.opacity=1;let i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){let t=i.baseColorFactor;e.color.setRGB(t[0],t[1],t[2],n.Zr2),e.opacity=t[3]}void 0!==i.baseColorTexture&&s.push(r.assignTexture(e,"map",i.baseColorTexture,n.er$))}return Promise.all(s)}}class h{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);return null===r||void 0!==r.emissiveStrength&&(t.emissiveIntensity=r.emissiveStrength),Promise.resolve()}}class d{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let s=[];if(void 0!==r.clearcoatFactor&&(t.clearcoat=r.clearcoatFactor),void 0!==r.clearcoatTexture&&s.push(this.parser.assignTexture(t,"clearcoatMap",r.clearcoatTexture)),void 0!==r.clearcoatRoughnessFactor&&(t.clearcoatRoughness=r.clearcoatRoughnessFactor),void 0!==r.clearcoatRoughnessTexture&&s.push(this.parser.assignTexture(t,"clearcoatRoughnessMap",r.clearcoatRoughnessTexture)),void 0!==r.clearcoatNormalTexture&&(s.push(this.parser.assignTexture(t,"clearcoatNormalMap",r.clearcoatNormalTexture)),void 0!==r.clearcoatNormalTexture.scale)){let e=r.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new n.I9Y(e,e)}return Promise.all(s)}}class f{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_DISPERSION}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);return null===r||(t.dispersion=void 0!==r.dispersion?r.dispersion:0),Promise.resolve()}}class m{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let n=[];return void 0!==r.iridescenceFactor&&(t.iridescence=r.iridescenceFactor),void 0!==r.iridescenceTexture&&n.push(this.parser.assignTexture(t,"iridescenceMap",r.iridescenceTexture)),void 0!==r.iridescenceIor&&(t.iridescenceIOR=r.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==r.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=r.iridescenceThicknessMinimum),void 0!==r.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=r.iridescenceThicknessMaximum),void 0!==r.iridescenceThicknessTexture&&n.push(this.parser.assignTexture(t,"iridescenceThicknessMap",r.iridescenceThicknessTexture)),Promise.all(n)}}class p{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_SHEEN}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let s=[];if(t.sheenColor=new n.Q1f(0,0,0),t.sheenRoughness=0,t.sheen=1,void 0!==r.sheenColorFactor){let e=r.sheenColorFactor;t.sheenColor.setRGB(e[0],e[1],e[2],n.Zr2)}return void 0!==r.sheenRoughnessFactor&&(t.sheenRoughness=r.sheenRoughnessFactor),void 0!==r.sheenColorTexture&&s.push(this.parser.assignTexture(t,"sheenColorMap",r.sheenColorTexture,n.er$)),void 0!==r.sheenRoughnessTexture&&s.push(this.parser.assignTexture(t,"sheenRoughnessMap",r.sheenRoughnessTexture)),Promise.all(s)}}class g{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let n=[];return void 0!==r.transmissionFactor&&(t.transmission=r.transmissionFactor),void 0!==r.transmissionTexture&&n.push(this.parser.assignTexture(t,"transmissionMap",r.transmissionTexture)),Promise.all(n)}}class T{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_VOLUME}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let s=[];t.thickness=void 0!==r.thicknessFactor?r.thicknessFactor:0,void 0!==r.thicknessTexture&&s.push(this.parser.assignTexture(t,"thicknessMap",r.thicknessTexture)),t.attenuationDistance=r.attenuationDistance||1/0;let i=r.attenuationColor||[1,1,1];return t.attenuationColor=new n.Q1f().setRGB(i[0],i[1],i[2],n.Zr2),Promise.all(s)}}class v{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_IOR}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);return null===r||(t.ior=void 0!==r.ior?r.ior:1.5,0===t.ior&&(t.ior=1e3)),Promise.resolve()}}class x{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_SPECULAR}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let s=[];t.specularIntensity=void 0!==r.specularFactor?r.specularFactor:1,void 0!==r.specularTexture&&s.push(this.parser.assignTexture(t,"specularIntensityMap",r.specularTexture));let i=r.specularColorFactor||[1,1,1];return t.specularColor=new n.Q1f().setRGB(i[0],i[1],i[2],n.Zr2),void 0!==r.specularColorTexture&&s.push(this.parser.assignTexture(t,"specularColorMap",r.specularColorTexture,n.er$)),Promise.all(s)}}class b{constructor(e){this.parser=e,this.name=l.EXT_MATERIALS_BUMP}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let n=[];return t.bumpScale=void 0!==r.bumpFactor?r.bumpFactor:1,void 0!==r.bumpTexture&&n.push(this.parser.assignTexture(t,"bumpMap",r.bumpTexture)),Promise.all(n)}}class y{constructor(e){this.parser=e,this.name=l.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){return null!==a(this.parser,e,this.name)?n.uSd:null}extendMaterialParams(e,t){let r=a(this.parser,e,this.name);if(null===r)return Promise.resolve();let n=[];return void 0!==r.anisotropyStrength&&(t.anisotropy=r.anisotropyStrength),void 0!==r.anisotropyRotation&&(t.anisotropyRotation=r.anisotropyRotation),void 0!==r.anisotropyTexture&&n.push(this.parser.assignTexture(t,"anisotropyMap",r.anisotropyTexture)),Promise.all(n)}}class R{constructor(e){this.parser=e,this.name=l.KHR_TEXTURE_BASISU}loadTexture(e){let t=this.parser,r=t.json,n=r.textures[e];if(!n.extensions||!n.extensions[this.name])return null;let s=n.extensions[this.name],i=t.options.ktx2Loader;if(!i)if(!(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0))return null;else throw Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return t.loadTextureImage(e,s.source,i)}}class E{constructor(e){this.parser=e,this.name=l.EXT_TEXTURE_WEBP}loadTexture(e){let t=this.name,r=this.parser,n=r.json,s=n.textures[e];if(!s.extensions||!s.extensions[t])return null;let i=s.extensions[t],o=n.images[i.source],a=r.textureLoader;if(o.uri){let e=r.options.manager.getHandler(o.uri);null!==e&&(a=e)}return r.loadTextureImage(e,i.source,a)}}class w{constructor(e){this.parser=e,this.name=l.EXT_TEXTURE_AVIF}loadTexture(e){let t=this.name,r=this.parser,n=r.json,s=n.textures[e];if(!s.extensions||!s.extensions[t])return null;let i=s.extensions[t],o=n.images[i.source],a=r.textureLoader;if(o.uri){let e=r.options.manager.getHandler(o.uri);null!==e&&(a=e)}return r.loadTextureImage(e,i.source,a)}}class _{constructor(e,t){this.name=t,this.parser=e}loadBufferView(e){let t=this.parser.json,r=t.bufferViews[e];if(!r.extensions||!r.extensions[this.name])return null;{let e=r.extensions[this.name],n=this.parser.getDependency("buffer",e.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported)if(!(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0))return null;else throw Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return n.then(function(t){let r=e.byteOffset||0,n=e.byteLength||0,i=e.count,o=e.byteStride,a=new Uint8Array(t,r,n);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(i,o,a,e.mode,e.filter).then(function(e){return e.buffer}):s.ready.then(function(){let t=new ArrayBuffer(i*o);return s.decodeGltfBuffer(new Uint8Array(t),i,o,a,e.mode,e.filter),t})})}}}class A{constructor(e){this.name=l.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,r=t.nodes[e];if(!r.extensions||!r.extensions[this.name]||void 0===r.mesh)return null;for(let e of t.meshes[r.mesh].primitives)if(e.mode!==H.TRIANGLES&&e.mode!==H.TRIANGLE_STRIP&&e.mode!==H.TRIANGLE_FAN&&void 0!==e.mode)return null;let s=r.extensions[this.name].attributes,i=[],o={};for(let e in s)i.push(this.parser.getDependency("accessor",s[e]).then(t=>(o[e]=t,o[e])));return i.length<1?null:(i.push(this.parser.createNodeMesh(e)),Promise.all(i).then(e=>{let t=e.pop(),r=t.isGroup?t.children:[t],s=e[0].count,i=[];for(let e of r){let t=new n.kn4,r=new n.Pq0,a=new n.PTz,l=new n.Pq0(1,1,1),u=new n.ZLX(e.geometry,e.material,s);for(let e=0;e<s;e++)o.TRANSLATION&&r.fromBufferAttribute(o.TRANSLATION,e),o.ROTATION&&a.fromBufferAttribute(o.ROTATION,e),o.SCALE&&l.fromBufferAttribute(o.SCALE,e),u.setMatrixAt(e,t.compose(r,a,l));let c=null;for(let e in o)if("_COLOR_0"===e){let t=o[e];u.instanceColor=new n.uWO(t.array,t.itemSize,t.normalized)}else if("TRANSLATION"!==e&&"ROTATION"!==e&&"SCALE"!==e){if(null===c){let e=u.geometry;for(let t in(c=new n.LoY).name=e.name,e.attributes)c.setAttribute(t,e.attributes[t]);for(let t in e.morphAttributes)c.morphAttributes[t]=e.morphAttributes[t];for(let t of(null!==e.index&&c.setIndex(e.index),c.morphTargetsRelative=e.morphTargetsRelative,e.groups))c.addGroup(t.start,t.count,t.materialIndex);null!==e.boundingBox&&(c.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(c.boundingSphere=e.boundingSphere.clone()),c.drawRange.start=e.drawRange.start,c.drawRange.count=e.drawRange.count,c.userData=Object.assign({},e.userData),u.geometry=c}let t=o[e];c.setAttribute(e,new n.uWO(t.array,t.itemSize,t.normalized))}n.B69.prototype.copy.call(u,e),this.parser.assignFinalMaterial(u),i.push(u)}return t.isGroup?(t.clear(),t.add(...i),t):i[0]}))}}let S="glTF";class I{constructor(e){this.name=l.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==S)throw Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-12,s=new DataView(e,12);let i=0;for(;i<n;){const t=s.getUint32(i,!0);i+=4;const n=s.getUint32(i,!0);if(i+=4,0x4e4f534a===n){const n=new Uint8Array(e,12+i,t);this.content=r.decode(n)}else if(5130562===n){const r=12+i;this.body=e.slice(r,r+t)}i+=t}if(null===this.content)throw Error("THREE.GLTFLoader: JSON content not found.")}}class M{constructor(e,t){if(!t)throw Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=l.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){let r=this.json,s=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},u={};for(let e in o)a[G[e]||e.toLowerCase()]=o[e];for(let t in e.attributes){let n=G[t]||t.toLowerCase();if(void 0!==o[t]){let s=r.accessors[e.attributes[t]],i=k[s.componentType];u[n]=i.name,l[n]=!0===s.normalized}}return t.getDependency("bufferView",i).then(function(e){return new Promise(function(t,r){s.decodeDracoFile(e,function(e){for(let t in e.attributes){let r=e.attributes[t],n=l[t];void 0!==n&&(r.normalized=n)}t(e)},a,u,n.Zr2,r)})})}}class L{constructor(){this.name=l.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){if((void 0===t.texCoord||t.texCoord===e.channel)&&void 0===t.offset&&void 0===t.rotation&&void 0===t.scale)return e;if(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),void 0!==t.rotation){let t=Math.cos(e.rotation),r=Math.sin(e.rotation);e.matrix.set(e.repeat.x*t,e.repeat.y*r,e.offset.x,-e.repeat.x*r,e.repeat.y*t,e.offset.y,0,0,1),e.matrixAutoUpdate=!1}return e.needsUpdate=!0,e}}class O{constructor(){this.name=l.KHR_MESH_QUANTIZATION}}class C extends n.lGw{constructor(e,t,r,n){super(e,t,r,n)}copySampleValue_(e){let t=this.resultBuffer,r=this.sampleValues,n=this.valueSize,s=e*n*3+n;for(let e=0;e!==n;e++)t[e]=r[s+e];return t}interpolate_(e,t,r,n){let s=this.resultBuffer,i=this.sampleValues,o=this.valueSize,a=2*o,l=3*o,u=n-t,c=(r-t)/u,h=c*c,d=h*c,f=e*l,m=f-l,p=-2*d+3*h,g=d-h,T=1-p,v=g-h+c;for(let e=0;e!==o;e++){let t=i[m+e+o],r=i[m+e+a]*u,n=i[f+e+o],l=i[f+e]*u;s[e]=T*t+v*r+p*n+g*l}return s}}let N=new n.PTz;class P extends C{interpolate_(e,t,r,n){let s=super.interpolate_(e,t,r,n);return N.fromArray(s).normalize().toArray(s),s}}let H={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},k={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},U={9728:n.hxR,9729:n.k6q,9984:n.pHI,9985:n.kRr,9986:n.Cfg,9987:n.$_I},F={33071:n.ghU,33648:n.kTW,10497:n.GJx},B={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},G={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"},D={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},j={CUBICSPLINE:void 0,LINEAR:n.PJ3,STEP:n.ljd};function K(e,t,r){for(let n in r.extensions)void 0===e[n]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[n]=r.extensions[n])}function z(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function V(e){let t="",r=Object.keys(e).sort();for(let n=0,s=r.length;n<s;n++)t+=r[n]+":"+e[r[n]]+";";return t}function X(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}let q=new n.kn4;class Y{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new o,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,s=-1,i=!1,a=-1;if("u">typeof navigator&&void 0!==navigator.userAgent){const e=navigator.userAgent;r=!0===/^((?!chrome|android).)*safari/i.test(e);const t=e.match(/Version\/(\d+)/);s=r&&t?parseInt(t[1],10):-1,a=(i=e.indexOf("Firefox")>-1)?e.match(/Firefox\/([0-9]+)\./)[1]:-1}"u"<typeof createImageBitmap||r&&s<17||i&&a<98?this.textureLoader=new n.Tap(this.options.manager):this.textureLoader=new n.Kzg(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new n.Y9S(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){let r=this,n=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(e){return e._markDefs&&e._markDefs()}),Promise.all(this._invokeAll(function(e){return e.beforeRoot&&e.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(t){let i={scene:t[0][n.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:n.asset,parser:r,userData:{}};return K(s,i,n),z(i,n),Promise.all(r._invokeAll(function(e){return e.afterRoot&&e.afterRoot(i)})).then(function(){for(let e of i.scenes)e.updateMatrixWorld();e(i)})}).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],r=this.json.meshes||[];for(let r=0,n=t.length;r<n;r++){let n=t[r].joints;for(let t=0,r=n.length;t<r;t++)e[n[t]].isBone=!0}for(let t=0,n=e.length;t<n;t++){let n=e[t];void 0!==n.mesh&&(this._addNodeRef(this.meshCache,n.mesh),void 0!==n.skin&&(r[n.mesh].isSkinnedMesh=!0)),void 0!==n.camera&&this._addNodeRef(this.cameraCache,n.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,r){if(e.refs[t]<=1)return r;let n=r.clone(),s=(e,t)=>{let r=this.associations.get(e);for(let[n,i]of(null!=r&&this.associations.set(t,r),e.children.entries()))s(i,t.children[n])};return s(r,n),n.name+="_instance_"+e.uses[t]++,n}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let r=0;r<t.length;r++){let n=e(t[r]);if(n)return n}return null}_invokeAll(e){let t=Object.values(this.plugins);t.unshift(this);let r=[];for(let n=0;n<t.length;n++){let s=e(t[n]);s&&r.push(s)}return r}getDependency(e,t){let r=e+":"+t,n=this.cache.get(r);if(!n){switch(e){case"scene":n=this.loadScene(t);break;case"node":n=this._invokeOne(function(e){return e.loadNode&&e.loadNode(t)});break;case"mesh":n=this._invokeOne(function(e){return e.loadMesh&&e.loadMesh(t)});break;case"accessor":n=this.loadAccessor(t);break;case"bufferView":n=this._invokeOne(function(e){return e.loadBufferView&&e.loadBufferView(t)});break;case"buffer":n=this.loadBuffer(t);break;case"material":n=this._invokeOne(function(e){return e.loadMaterial&&e.loadMaterial(t)});break;case"texture":n=this._invokeOne(function(e){return e.loadTexture&&e.loadTexture(t)});break;case"skin":n=this.loadSkin(t);break;case"animation":n=this._invokeOne(function(e){return e.loadAnimation&&e.loadAnimation(t)});break;case"camera":n=this.loadCamera(t);break;default:if(!(n=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(e,t)})))throw Error("Unknown type: "+e)}this.cache.add(r,n)}return n}getDependencies(e){let t=this.cache.get(e);if(!t){let r=this;t=Promise.all((this.json[e+("mesh"===e?"es":"s")]||[]).map(function(t,n){return r.getDependency(e,n)})),this.cache.add(e,t)}return t}loadBuffer(e){let t=this.json.buffers[e],r=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[l.KHR_BINARY_GLTF].body);let s=this.options;return new Promise(function(e,i){r.load(n.r6x.resolveURL(t.uri,s.path),e,void 0,function(){i(Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){let t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(e){let r=t.byteLength||0,n=t.byteOffset||0;return e.slice(n,n+r)})}loadAccessor(e){let t=this,r=this.json,s=this.json.accessors[e];if(void 0===s.bufferView&&void 0===s.sparse){let e=B[s.type],t=k[s.componentType],r=!0===s.normalized,i=new t(s.count*e);return Promise.resolve(new n.THS(i,e,r))}let i=[];return void 0!==s.bufferView?i.push(this.getDependency("bufferView",s.bufferView)):i.push(null),void 0!==s.sparse&&(i.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(i).then(function(e){let i,o,a=e[0],l=B[s.type],u=k[s.componentType],c=u.BYTES_PER_ELEMENT,h=c*l,d=s.byteOffset||0,f=void 0!==s.bufferView?r.bufferViews[s.bufferView].byteStride:void 0,m=!0===s.normalized;if(f&&f!==h){let e=Math.floor(d/f),r="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+e+":"+s.count,h=t.cache.get(r);h||(i=new u(a,e*f,s.count*f/c),h=new n.eB$(i,f/c),t.cache.add(r,h)),o=new n.eHs(h,l,d%f/c,m)}else i=null===a?new u(s.count*l):new u(a,d,s.count*l),o=new n.THS(i,l,m);if(void 0!==s.sparse){let t=B.SCALAR,r=k[s.sparse.indices.componentType],i=s.sparse.indices.byteOffset||0,c=s.sparse.values.byteOffset||0,h=new r(e[1],i,s.sparse.count*t),d=new u(e[2],c,s.sparse.count*l);null!==a&&(o=new n.THS(o.array.slice(),o.itemSize,o.normalized)),o.normalized=!1;for(let e=0,t=h.length;e<t;e++){let t=h[e];if(o.setX(t,d[e*l]),l>=2&&o.setY(t,d[e*l+1]),l>=3&&o.setZ(t,d[e*l+2]),l>=4&&o.setW(t,d[e*l+3]),l>=5)throw Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}o.normalized=m}return o})}loadTexture(e){let t=this.json,r=this.options,n=t.textures[e].source,s=t.images[n],i=this.textureLoader;if(s.uri){let e=r.manager.getHandler(s.uri);null!==e&&(i=e)}return this.loadTextureImage(e,n,i)}loadTextureImage(e,t,r){let s=this,i=this.json,o=i.textures[e],a=i.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];let u=this.loadImageSource(t,r).then(function(t){t.flipY=!1,t.name=o.name||a.name||"",""===t.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(t.name=a.uri);let r=(i.samplers||{})[o.sampler]||{};return t.magFilter=U[r.magFilter]||n.k6q,t.minFilter=U[r.minFilter]||n.$_I,t.wrapS=F[r.wrapS]||n.GJx,t.wrapT=F[r.wrapT]||n.GJx,t.generateMipmaps=!t.isCompressedTexture&&t.minFilter!==n.hxR&&t.minFilter!==n.k6q,s.associations.set(t,{textures:e}),t}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){let r=this.json,s=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(e=>e.clone());let i=r.images[e],o=self.URL||self.webkitURL,a=i.uri||"",l=!1;if(void 0!==i.bufferView)a=this.getDependency("bufferView",i.bufferView).then(function(e){l=!0;let t=new Blob([e],{type:i.mimeType});return a=o.createObjectURL(t)});else if(void 0===i.uri)throw Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let u=Promise.resolve(a).then(function(e){return new Promise(function(r,i){let o=r;!0===t.isImageBitmapLoader&&(o=function(e){let t=new n.gPd(e);t.needsUpdate=!0,r(t)}),t.load(n.r6x.resolveURL(e,s.path),o,void 0,i)})}).then(function(e){var t;return!0===l&&o.revokeObjectURL(a),z(e,i),e.userData.mimeType=i.mimeType||((t=i.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":t.search(/\.ktx2($|\?)/i)>0||0===t.search(/^data\:image\/ktx2/)?"image/ktx2":"image/png"),e}).catch(function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",a),e});return this.sourceCache[e]=u,u}assignTexture(e,t,r,n){let s=this;return this.getDependency("texture",r.index).then(function(i){if(!i)return null;if(void 0!==r.texCoord&&r.texCoord>0&&((i=i.clone()).channel=r.texCoord),s.extensions[l.KHR_TEXTURE_TRANSFORM]){let e=void 0!==r.extensions?r.extensions[l.KHR_TEXTURE_TRANSFORM]:void 0;if(e){let t=s.associations.get(i);i=s.extensions[l.KHR_TEXTURE_TRANSFORM].extendTexture(i,e),s.associations.set(i,t)}}return void 0!==n&&(i.colorSpace=n),e[t]=i,i})}assignFinalMaterial(e){let t=e.geometry,r=e.material,s=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){let e="PointsMaterial:"+r.uuid,t=this.cache.get(e);t||(t=new n.BH$,n.imn.prototype.copy.call(t,r),t.color.copy(r.color),t.map=r.map,t.sizeAttenuation=!1,this.cache.add(e,t)),r=t}else if(e.isLine){let e="LineBasicMaterial:"+r.uuid,t=this.cache.get(e);t||(t=new n.mrM,n.imn.prototype.copy.call(t,r),t.color.copy(r.color),t.map=r.map,this.cache.add(e,t)),r=t}if(s||i||o){let e="ClonedMaterial:"+r.uuid+":";s&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=r.clone(),i&&(t.vertexColors=!0),o&&(t.flatShading=!0),s&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(r))),r=t}e.material=r}getMaterialType(){return n._4j}loadMaterial(e){let t,r=this,s=this.json,i=this.extensions,o=s.materials[e],a={},u=o.extensions||{},c=[];if(u[l.KHR_MATERIALS_UNLIT]){let e=i[l.KHR_MATERIALS_UNLIT];t=e.getMaterialType(),c.push(e.extendParams(a,o,r))}else{let s=o.pbrMetallicRoughness||{};if(a.color=new n.Q1f(1,1,1),a.opacity=1,Array.isArray(s.baseColorFactor)){let e=s.baseColorFactor;a.color.setRGB(e[0],e[1],e[2],n.Zr2),a.opacity=e[3]}void 0!==s.baseColorTexture&&c.push(r.assignTexture(a,"map",s.baseColorTexture,n.er$)),a.metalness=void 0!==s.metallicFactor?s.metallicFactor:1,a.roughness=void 0!==s.roughnessFactor?s.roughnessFactor:1,void 0!==s.metallicRoughnessTexture&&(c.push(r.assignTexture(a,"metalnessMap",s.metallicRoughnessTexture)),c.push(r.assignTexture(a,"roughnessMap",s.metallicRoughnessTexture))),t=this._invokeOne(function(t){return t.getMaterialType&&t.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,a)})))}!0===o.doubleSided&&(a.side=n.$EB);let h=o.alphaMode||"OPAQUE";if("BLEND"===h?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===h&&(a.alphaTest=void 0!==o.alphaCutoff?o.alphaCutoff:.5)),void 0!==o.normalTexture&&t!==n.V9B&&(c.push(r.assignTexture(a,"normalMap",o.normalTexture)),a.normalScale=new n.I9Y(1,1),void 0!==o.normalTexture.scale)){let e=o.normalTexture.scale;a.normalScale.set(e,e)}if(void 0!==o.occlusionTexture&&t!==n.V9B&&(c.push(r.assignTexture(a,"aoMap",o.occlusionTexture)),void 0!==o.occlusionTexture.strength&&(a.aoMapIntensity=o.occlusionTexture.strength)),void 0!==o.emissiveFactor&&t!==n.V9B){let e=o.emissiveFactor;a.emissive=new n.Q1f().setRGB(e[0],e[1],e[2],n.Zr2)}return void 0!==o.emissiveTexture&&t!==n.V9B&&c.push(r.assignTexture(a,"emissiveMap",o.emissiveTexture,n.er$)),Promise.all(c).then(function(){let n=new t(a);return o.name&&(n.name=o.name),z(n,o),r.associations.set(n,{materials:e}),o.extensions&&K(i,n,o),n})}createUniqueName(e){let t=n.Nwf.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,r=this.extensions,i=this.primitiveCache,o=[];for(let a=0,u=e.length;a<u;a++){let u=e[a],c=function(e){let t,r=e.extensions&&e.extensions[l.KHR_DRACO_MESH_COMPRESSION];if(t=r?"draco:"+r.bufferView+":"+r.indices+":"+V(r.attributes):e.indices+":"+V(e.attributes)+":"+e.mode,void 0!==e.targets)for(let r=0,n=e.targets.length;r<n;r++)t+=":"+V(e.targets[r]);return t}(u),h=i[c];if(h)o.push(h.promise);else{let e;e=u.extensions&&u.extensions[l.KHR_DRACO_MESH_COMPRESSION]?function(e){return r[l.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then(function(r){return W(r,e,t)})}(u):W(new n.LoY,u,t),u.mode===H.TRIANGLE_STRIP?e=e.then(e=>(0,s._c)(e,n.O49)):u.mode===H.TRIANGLE_FAN&&(e=e.then(e=>(0,s._c)(e,n.rYR))),i[c]={primitive:u,promise:e},o.push(e)}}return Promise.all(o)}loadMesh(e){let t=this,r=this.json,s=this.extensions,i=r.meshes[e],o=i.primitives,a=[];for(let e=0,t=o.length;e<t;e++){var l;let t=void 0===o[e].material?(void 0===(l=this.cache).DefaultMaterial&&(l.DefaultMaterial=new n._4j({color:0xffffff,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:n.hB5})),l.DefaultMaterial):this.getDependency("material",o[e].material);a.push(t)}return a.push(t.loadGeometries(o)),Promise.all(a).then(async function(r){let a=r.slice(0,r.length-1),l=r[r.length-1],u=[];for(let r=0,c=l.length;r<c;r++){let c,h=l[r],d=o[r],f=a[r];if(d.mode===H.TRIANGLES||d.mode===H.TRIANGLE_STRIP||d.mode===H.TRIANGLE_FAN||void 0===d.mode){let e=!0===i.isSkinnedMesh,t=h.hasAttribute("skinIndex")&&h.hasAttribute("skinWeight");e&&!1===t&&console.warn("THREE.GLTFLoader: Missing skinIndex or skinWeight attributes. Skinning disabled."),!0===(c=e&&t?new n.I46(h,f):new n.eaF(h,f)).isSkinnedMesh&&c.normalizeSkinWeights()}else if(d.mode===H.LINES)c=new n.DXC(h,f);else if(d.mode===H.LINE_STRIP)c=new n.N1A(h,f);else if(d.mode===H.LINE_LOOP)c=new n.FCc(h,f);else if(d.mode===H.POINTS)c=new n.ONl(h,f);else throw Error("THREE.GLTFLoader: Primitive mode unsupported: "+d.mode);Object.keys(c.geometry.morphAttributes).length>0&&function(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let r=0,n=t.weights.length;r<n;r++)e.morphTargetInfluences[r]=t.weights[r];if(t.extras&&Array.isArray(t.extras.targetNames)){let r=t.extras.targetNames;if(e.morphTargetInfluences.length===r.length){e.morphTargetDictionary={};for(let t=0,n=r.length;t<n;t++)e.morphTargetDictionary[r[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}(c,i),c.name=t.createUniqueName(i.name||"mesh_"+e),z(c,i),d.extensions&&K(s,c,d),t.assignFinalMaterial(c),u.push(c)}for(let r=0,n=u.length;r<n;r++)t.associations.set(u[r],{meshes:e,primitives:r});if(1===u.length)return i.extensions&&K(s,u[0],i),u[0];let c=new n.YJl;i.extensions&&K(s,c,i),t.associations.set(c,{meshes:e});for(let e=0,t=u.length;e<t;e++)c.add(u[e]);return c})}loadCamera(e){let t,r=this.json.cameras[e],s=r[r.type];return s?("perspective"===r.type?t=new n.ubm(n.cj9.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):"orthographic"===r.type&&(t=new n.qUd(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),r.name&&(t.name=this.createUniqueName(r.name)),z(t,r),Promise.resolve(t)):void console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){let t=this.json.skins[e],r=[];for(let e=0,n=t.joints.length;e<n;e++)r.push(this._loadNodeShallow(t.joints[e]));return void 0!==t.inverseBindMatrices?r.push(this.getDependency("accessor",t.inverseBindMatrices)):r.push(null),Promise.all(r).then(function(e){let r=e.pop(),s=[],i=[];for(let o=0,a=e.length;o<a;o++){let a=e[o];if(a){s.push(a);let e=new n.kn4;null!==r&&e.fromArray(r.array,16*o),i.push(e)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[o])}return new n.EAD(s,i)})}loadAnimation(e){let t=this.json,r=this,s=t.animations[e],i=s.name?s.name:"animation_"+e,o=[],a=[],l=[],u=[],c=[];for(let e=0,t=s.channels.length;e<t;e++){let t=s.channels[e],r=s.samplers[t.sampler],n=t.target,i=n.node,h=void 0!==s.parameters?s.parameters[r.input]:r.input,d=void 0!==s.parameters?s.parameters[r.output]:r.output;void 0!==n.node&&(o.push(this.getDependency("node",i)),a.push(this.getDependency("accessor",h)),l.push(this.getDependency("accessor",d)),u.push(r),c.push(n))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(u),Promise.all(c)]).then(function(e){let t=e[0],o=e[1],a=e[2],l=e[3],u=e[4],c=[];for(let e=0,n=t.length;e<n;e++){let n=t[e],s=o[e],i=a[e],h=l[e],d=u[e];if(void 0===n)continue;n.updateMatrix&&n.updateMatrix();let f=r._createAnimationTracks(n,s,i,h,d);if(f)for(let e=0;e<f.length;e++)c.push(f[e])}let h=new n.tz3(i,void 0,c);return z(h,s),h})}createNodeMesh(e){let t=this.json,r=this,n=t.nodes[e];return void 0===n.mesh?null:r.getDependency("mesh",n.mesh).then(function(e){let t=r._getNodeRef(r.meshCache,n.mesh,e);return void 0!==n.weights&&t.traverse(function(e){if(e.isMesh)for(let t=0,r=n.weights.length;t<r;t++)e.morphTargetInfluences[t]=n.weights[t]}),t})}loadNode(e){let t=this.json.nodes[e],r=this._loadNodeShallow(e),s=[],i=t.children||[];for(let e=0,t=i.length;e<t;e++)s.push(this.getDependency("node",i[e]));let o=void 0===t.skin?Promise.resolve(null):this.getDependency("skin",t.skin);return Promise.all([r,Promise.all(s),o]).then(function(e){let t=e[0],r=e[1],s=e[2];null!==s&&t.traverse(function(e){e.isSkinnedMesh&&e.bind(s,q)});for(let e=0,n=r.length;e<n;e++)t.add(r[e]);if(void 0!==t.userData.pivot&&r.length>0){let e=t.userData.pivot,s=r[0];t.pivot=new n.Pq0().fromArray(e),t.position.x-=e[0],t.position.y-=e[1],t.position.z-=e[2],s.position.set(0,0,0),delete t.userData.pivot}return t})}_loadNodeShallow(e){let t=this.json,r=this.extensions,s=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];let i=t.nodes[e],o=i.name?s.createUniqueName(i.name):"",a=[],l=s._invokeOne(function(t){return t.createNodeMesh&&t.createNodeMesh(e)});return l&&a.push(l),void 0!==i.camera&&a.push(s.getDependency("camera",i.camera).then(function(e){return s._getNodeRef(s.cameraCache,i.camera,e)})),s._invokeAll(function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)}).forEach(function(e){a.push(e)}),this.nodeCache[e]=Promise.all(a).then(function(t){let a;if((a=!0===i.isBone?new n.$Kf:t.length>1?new n.YJl:1===t.length?t[0]:new n.B69)!==t[0])for(let e=0,r=t.length;e<r;e++)a.add(t[e]);if(i.name&&(a.userData.name=i.name,a.name=o),z(a,i),i.extensions&&K(r,a,i),void 0!==i.matrix){let e=new n.kn4;e.fromArray(i.matrix),a.applyMatrix4(e)}else void 0!==i.translation&&a.position.fromArray(i.translation),void 0!==i.rotation&&a.quaternion.fromArray(i.rotation),void 0!==i.scale&&a.scale.fromArray(i.scale);if(s.associations.has(a)){if(void 0!==i.mesh&&s.meshCache.refs[i.mesh]>1){let e=s.associations.get(a);s.associations.set(a,{...e})}}else s.associations.set(a,{});return s.associations.get(a).nodes=e,a}),this.nodeCache[e]}loadScene(e){let t=this.extensions,r=this.json.scenes[e],s=this,i=new n.YJl;r.name&&(i.name=s.createUniqueName(r.name)),z(i,r),r.extensions&&K(t,i,r);let o=r.nodes||[],a=[];for(let e=0,t=o.length;e<t;e++)a.push(s.getDependency("node",o[e]));return Promise.all(a).then(function(e){for(let t=0,r=e.length;t<r;t++){let r=e[t];null!==r.parent?i.add(function(e){let t=new Map,r=new Map,n=e.clone();return function e(t,r,n){n(t,r);for(let s=0;s<t.children.length;s++)e(t.children[s],r.children[s],n)}(e,n,function(e,n){t.set(n,e),r.set(e,n)}),n.traverse(function(e){if(!e.isSkinnedMesh)return;let n=t.get(e),s=n.skeleton.bones;e.skeleton=n.skeleton.clone(),e.bindMatrix.copy(n.bindMatrix),e.skeleton.bones=s.map(function(e){return r.get(e)}),e.bind(e.skeleton,e.bindMatrix)}),n}(r)):i.add(r)}return s.associations=(e=>{let t=new Map;for(let[e,r]of s.associations)(e instanceof n.imn||e instanceof n.gPd)&&t.set(e,r);return e.traverse(e=>{let r=s.associations.get(e);null!=r&&t.set(e,r)}),t})(i),i})}_createAnimationTracks(e,t,r,s,i){let o,a=[],l=e.name?e.name:e.uuid,u=[];function c(e){e.morphTargetInfluences&&u.push(e.name?e.name:e.uuid)}switch(D[i.path]===D.weights?(c(e),e.isGroup&&e.children.forEach(c)):u.push(l),D[i.path]){case D.weights:o=n.Hit;break;case D.rotation:o=n.MBL;break;case D.translation:case D.scale:o=n.RiT;break;default:o=1===r.itemSize?n.Hit:n.RiT}let h=void 0!==s.interpolation?j[s.interpolation]:n.PJ3,d=this._getArrayFromAccessor(r);for(let e=0,r=u.length;e<r;e++){let r=new o(u[e]+"."+D[i.path],t.array,d,h);"CUBICSPLINE"===s.interpolation&&this._createCubicSplineTrackInterpolant(r),a.push(r)}return a}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){let e=X(t.constructor),r=new Float32Array(t.length);for(let n=0,s=t.length;n<s;n++)r[n]=t[n]*e;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(e){return new(this instanceof n.MBL?P:C)(this.times,this.values,this.getValueSize()/3,e)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function W(e,t,r){let s=t.attributes,i=[];for(let t in s){let n=G[t]||t.toLowerCase();n in e.attributes||i.push(function(t,n){return r.getDependency("accessor",t).then(function(t){e.setAttribute(n,t)})}(s[t],n))}if(void 0!==t.indices&&!e.index){let n=r.getDependency("accessor",t.indices).then(function(t){e.setIndex(t)});i.push(n)}return n.ppV.workingColorSpace!==n.Zr2&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${n.ppV.workingColorSpace}" not supported.`),z(e,t),!function(e,t,r){let s=t.attributes,i=new n.NRn;if(void 0===s.POSITION)return;{let e=r.json.accessors[s.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new n.Pq0(t[0],t[1],t[2]),new n.Pq0(o[0],o[1],o[2])),e.normalized){let t=X(k[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}let o=t.targets;if(void 0!==o){let e=new n.Pq0,t=new n.Pq0;for(let n=0,s=o.length;n<s;n++){let s=o[n];if(void 0!==s.POSITION){let n=r.json.accessors[s.POSITION],i=n.min,o=n.max;if(void 0!==i&&void 0!==o){if(t.setX(Math.max(Math.abs(i[0]),Math.abs(o[0]))),t.setY(Math.max(Math.abs(i[1]),Math.abs(o[1]))),t.setZ(Math.max(Math.abs(i[2]),Math.abs(o[2]))),n.normalized){let e=X(k[n.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(e)}e.boundingBox=i;let a=new n.iyt;i.getCenter(a.center),a.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=a}(e,t,r),Promise.all(i).then(function(){return void 0!==t.targets?function(e,t,r){let n=!1,s=!1,i=!1;for(let e=0,r=t.length;e<r;e++){let r=t[e];if(void 0!==r.POSITION&&(n=!0),void 0!==r.NORMAL&&(s=!0),void 0!==r.COLOR_0&&(i=!0),n&&s&&i)break}if(!n&&!s&&!i)return Promise.resolve(e);let o=[],a=[],l=[];for(let u=0,c=t.length;u<c;u++){let c=t[u];if(n){let t=void 0!==c.POSITION?r.getDependency("accessor",c.POSITION):e.attributes.position;o.push(t)}if(s){let t=void 0!==c.NORMAL?r.getDependency("accessor",c.NORMAL):e.attributes.normal;a.push(t)}if(i){let t=void 0!==c.COLOR_0?r.getDependency("accessor",c.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(t){let r=t[0],o=t[1],a=t[2];return n&&(e.morphAttributes.position=r),s&&(e.morphAttributes.normal=o),i&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e})}(e,t.targets,r):e})}},50916:(e,t,r)=>{r.d(t,{h:()=>l});var n=r(12115),s=r(94577);let i=e=>{let t,r=new Set,n=(e,n)=>{let s="function"==typeof e?e(t):e;if(!Object.is(s,t)){let e=t;t=(null!=n?n:"object"!=typeof s||null===s)?s:Object.assign({},t,s),r.forEach(r=>r(t,e))}},s=()=>t,i={setState:n,getState:s,getInitialState:()=>o,subscribe:e=>(r.add(e),()=>r.delete(e))},o=t=e(n,s,i);return i},{useSyncExternalStoreWithSelector:o}=s,a=(e,t)=>{let r=e?i(e):i,s=(e,s=t)=>(function(e,t=e=>e,r){let s=o(e.subscribe,e.getState,e.getInitialState,t,r);return n.useDebugValue(s),s})(r,e,s);return Object.assign(s,r),s},l=(e,t)=>e?a(e,t):a},56369:(e,t,r)=>{r.d(t,{_c:()=>o,pP:()=>s});var n=r(42412);function s(e,t=!1){let r=null!==e[0].index,o=new Set(Object.keys(e[0].attributes)),a=new Set(Object.keys(e[0].morphAttributes)),l={},u={},c=e[0].morphTargetsRelative,h=new n.LoY,d=0;for(let n=0;n<e.length;++n){let s=e[n],i=0;if(r!==(null!==s.index))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+n+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let e in s.attributes){if(!o.has(e))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+n+'. All geometries must have compatible attributes; make sure "'+e+'" attribute exists among all geometries, or in none of them.'),null;void 0===l[e]&&(l[e]=[]),l[e].push(s.attributes[e]),i++}if(i!==o.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+n+". Make sure all geometries have the same number of attributes."),null;if(c!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+n+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let e in s.morphAttributes){if(!a.has(e))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+n+". .morphAttributes must be consistent throughout all geometries."),null;void 0===u[e]&&(u[e]=[]),u[e].push(s.morphAttributes[e])}if(t){let e;if(r)e=s.index.count;else{if(void 0===s.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+n+". The geometry must have either an index or a position attribute"),null;e=s.attributes.position.count}h.addGroup(d,e,n),d+=e}}if(r){let t=0,r=[];for(let n=0;n<e.length;++n){let s=e[n].index;for(let e=0;e<s.count;++e)r.push(s.getX(e)+t);t+=e[n].attributes.position.count}h.setIndex(r)}for(let e in l){let t=i(l[e]);if(!t)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+e+" attribute."),null;h.setAttribute(e,t)}for(let e in u){let t=u[e][0].length;if(0!==t){h.morphAttributes=h.morphAttributes||{},h.morphAttributes[e]=[];for(let r=0;r<t;++r){let t=[];for(let n=0;n<u[e].length;++n)t.push(u[e][n][r]);let n=i(t);if(!n)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+e+" morphAttribute."),null;h.morphAttributes[e].push(n)}}}return h}function i(e){let t,r,s,i=-1,o=0;for(let n=0;n<e.length;++n){let a=e[n];if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(void 0===r&&(r=a.itemSize),r!==a.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===s&&(s=a.normalized),s!==a.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(-1===i&&(i=a.gpuType),i!==a.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;o+=a.count*r}let a=new t(o),l=new n.THS(a,r,s),u=0;for(let t=0;t<e.length;++t){let n=e[t];if(n.isInterleavedBufferAttribute){let e=u/r;for(let t=0,s=n.count;t<s;t++)for(let s=0;s<r;s++){let r=n.getComponent(t,s);l.setComponent(t+e,s,r)}}else a.set(n.array,u);u+=n.count*r}return void 0!==i&&(l.gpuType=i),l}function o(e,t){if(t===n.RJ4)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t!==n.rYR&&t!==n.O49)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e;{let r=e.getIndex();if(null===r){let t=[],n=e.getAttribute("position");if(void 0===n)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<n.count;e++)t.push(e);e.setIndex(t),r=e.getIndex()}let s=r.count-2,i=[];if(t===n.rYR)for(let e=1;e<=s;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<s;e++)e%2==0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));return i.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles."),e.setIndex(i),e.clearGroups(),e}}},65538:(e,t,r)=>{var n=r(12115),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,o=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!s(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),s=n[0].inst,c=n[1];return a(function(){s.value=r,s.getSnapshot=t,u(s)&&c({inst:s})},[e,r,t]),o(function(){return u(s)&&c({inst:s}),e(function(){u(s)&&c({inst:s})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},69326:(e,t,r)=>{r.d(t,{DY:()=>o,IU:()=>l,uv:()=>a});let n=[];function s(e,t,r=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;let n=e.length;if(t.length!==n)return!1;for(let s=0;s<n;s++)if(!r(e[s],t[s]))return!1;return!0}function i(e,t=null,r=!1,o={}){for(let i of(null===t&&(t=[e]),n))if(s(t,i.keys,i.equal)){if(r)return;if(Object.prototype.hasOwnProperty.call(i,"error"))throw i.error;if(Object.prototype.hasOwnProperty.call(i,"response"))return o.lifespan&&o.lifespan>0&&(i.timeout&&clearTimeout(i.timeout),i.timeout=setTimeout(i.remove,o.lifespan)),i.response;if(!r)throw i.promise}let a={keys:t,equal:o.equal,remove:()=>{let e=n.indexOf(a);-1!==e&&n.splice(e,1)},promise:("object"==typeof e&&"function"==typeof e.then?e:e(...t)).then(e=>{a.response=e,o.lifespan&&o.lifespan>0&&(a.timeout=setTimeout(a.remove,o.lifespan))}).catch(e=>a.error=e)};if(n.push(a),!r)throw a.promise}let o=(e,t,r)=>i(e,t,!1,r),a=(e,t,r)=>void i(e,t,!0,r),l=e=>{if(void 0===e||0===e.length)n.splice(0,n.length);else{let t=n.find(t=>s(e,t.keys,t.equal));t&&t.remove()}}},77930:(e,t)=>{function r(e,t){var r=e.length;for(e.push(t);0<r;){var n=r-1>>>1,s=e[n];if(0<i(s,t))e[n]=t,e[r]=s,r=n;else break}}function n(e){return 0===e.length?null:e[0]}function s(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;for(var n=0,s=e.length,o=s>>>1;n<o;){var a=2*(n+1)-1,l=e[a],u=a+1,c=e[u];if(0>i(l,r))u<s&&0>i(c,l)?(e[n]=c,e[u]=r,n=u):(e[n]=l,e[a]=r,n=a);else if(u<s&&0>i(c,r))e[n]=c,e[u]=r,n=u;else break}}return t}function i(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}var c=[],h=[],d=1,f=null,m=3,p=!1,g=!1,T=!1,v=!1,x="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,y="u">typeof setImmediate?setImmediate:null;function R(e){for(var t=n(h);null!==t;){if(null===t.callback)s(h);else if(t.startTime<=e)s(h),t.sortIndex=t.expirationTime,r(c,t);else break;t=n(h)}}function E(e){if(T=!1,R(e),!g)if(null!==n(c))g=!0,w||(w=!0,o());else{var t=n(h);null!==t&&C(E,t.startTime-e)}}var w=!1,_=-1,A=5,S=-1;function I(){return!!v||!(t.unstable_now()-S<A)}function M(){if(v=!1,w){var e=t.unstable_now();S=e;var r=!0;try{e:{g=!1,T&&(T=!1,b(_),_=-1),p=!0;var i=m;try{t:{for(R(e),f=n(c);null!==f&&!(f.expirationTime>e&&I());){var a=f.callback;if("function"==typeof a){f.callback=null,m=f.priorityLevel;var l=a(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,R(e),r=!0;break t}f===n(c)&&s(c),R(e)}else s(c);f=n(c)}if(null!==f)r=!0;else{var u=n(h);null!==u&&C(E,u.startTime-e),r=!1}}break e}finally{f=null,m=i,p=!1}}}finally{r?o():w=!1}}}if("function"==typeof y)o=function(){y(M)};else if("u">typeof MessageChannel){var L=new MessageChannel,O=L.port2;L.port1.onmessage=M,o=function(){O.postMessage(null)}}else o=function(){x(M,0)};function C(e,r){_=x(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(e){switch(m){case 1:case 2:case 3:var t=3;break;default:t=m}var r=m;m=t;try{return e()}finally{m=r}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=m;m=e;try{return t()}finally{m=r}},t.unstable_scheduleCallback=function(e,s,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=0x3fffffff;break;case 4:l=1e4;break;default:l=5e3}return l=i+l,e={id:d++,callback:s,priorityLevel:e,startTime:i,expirationTime:l,sortIndex:-1},i>a?(e.sortIndex=i,r(h,e),null===n(c)&&e===n(h)&&(T?(b(_),_=-1):T=!0,C(E,i-a))):(e.sortIndex=l,r(c,e),g||p||(g=!0,w||(w=!0,o()))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=m;return function(){var r=m;m=t;try{return e.apply(this,arguments)}finally{m=r}}}},86275:(e,t,r)=>{r.d(t,{Hl:()=>h});var n=r(15692),s=r(12115),i=r(29625);function o(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}let a=["x","y","top","bottom","left","right","width","height"];var l=r(94400),u=r(95155);function c({ref:e,children:t,fallback:r,resize:l,style:h,gl:d,events:f=n.f,eventSource:m,eventPrefix:p,shadows:g,linear:T,flat:v,legacy:x,orthographic:b,frameloop:y,dpr:R,performance:E,raycaster:w,camera:_,scene:A,onPointerMissed:S,onCreated:I,...M}){s.useMemo(()=>(0,n.e)(i),[]);let L=(0,n.u)(),[O,C]=function({debounce:e,scroll:t,polyfill:r,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){var i,l,u;let c=r||("u"<typeof window?class{}:window.ResizeObserver);if(!c)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[h,d]=(0,s.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),f=(0,s.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:h,orientationHandler:null}),m=e?"number"==typeof e?e:e.scroll:null,p=e?"number"==typeof e?e:e.resize:null,g=(0,s.useRef)(!1);(0,s.useEffect)(()=>(g.current=!0,()=>void(g.current=!1)));let[T,v,x]=(0,s.useMemo)(()=>{let e=()=>{let e,t;if(!f.current.element)return;let{left:r,top:s,width:i,height:o,bottom:l,right:u,x:c,y:h}=f.current.element.getBoundingClientRect(),m={left:r,top:s,width:i,height:o,bottom:l,right:u,x:c,y:h};f.current.element instanceof HTMLElement&&n&&(m.height=f.current.element.offsetHeight,m.width=f.current.element.offsetWidth),Object.freeze(m),g.current&&(e=f.current.lastBounds,t=m,!a.every(r=>e[r]===t[r]))&&d(f.current.lastBounds=m)};return[e,p?o(e,p):e,m?o(e,m):e]},[d,n,m,p]);function b(){f.current.scrollContainers&&(f.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",x,!0)),f.current.scrollContainers=null),f.current.resizeObserver&&(f.current.resizeObserver.disconnect(),f.current.resizeObserver=null),f.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",f.current.orientationHandler))}function y(){f.current.element&&(f.current.resizeObserver=new c(x),f.current.resizeObserver.observe(f.current.element),t&&f.current.scrollContainers&&f.current.scrollContainers.forEach(e=>e.addEventListener("scroll",x,{capture:!0,passive:!0})),f.current.orientationHandler=()=>{x()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",f.current.orientationHandler))}return i=x,l=!!t,(0,s.useEffect)(()=>{if(l)return window.addEventListener("scroll",i,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",i,!0)},[i,l]),u=v,(0,s.useEffect)(()=>(window.addEventListener("resize",u),()=>void window.removeEventListener("resize",u)),[u]),(0,s.useEffect)(()=>{b(),y()},[t,x,v]),(0,s.useEffect)(()=>b,[]),[e=>{e&&e!==f.current.element&&(b(),f.current.element=e,f.current.scrollContainers=function e(t){let r=[];if(!t||t===document.body)return r;let{overflow:n,overflowX:s,overflowY:i}=window.getComputedStyle(t);return[n,s,i].some(e=>"auto"===e||"scroll"===e)&&r.push(t),[...r,...e(t.parentElement)]}(e),y())},h,T]}({scroll:!0,debounce:{scroll:50,resize:0},...l}),N=s.useRef(null),P=s.useRef(null);s.useImperativeHandle(e,()=>N.current);let H=(0,n.a)(S),k=s.useCallback(e=>null==H.current?void 0:H.current(e),[H]),[U,F]=s.useState(!1),[B,G]=s.useState(!1);if(U)throw U;if(B)throw B;let D=s.useRef(null),[j,K]=(0,n.b)(),z=s.useRef(null),V=()=>m?(0,n.i)(m)?m.current:m:P.current;s.useInsertionEffect(()=>()=>{let e=D.current;D.current=null,null==e||e.unmount()},[]),(0,n.c)(()=>{let e=N.current;C.width>0&&C.height>0&&e&&(D.current||(D.current=(0,n.d)(e)),D.current.configure({gl:d,scene:A,events:f,shadows:g,linear:T,flat:v,legacy:x,orthographic:b,frameloop:y,dpr:R,performance:E,raycaster:w,camera:_,size:C,onPointerMissed:k,onCreated:e=>{var t;z.current=e,null==e.events.connect||e.events.connect(null!=(t=V())?t:P.current),p&&e.setEvents({compute:(e,t)=>{let r=e[p+"X"],n=e[p+"Y"];t.pointer.set(r/t.size.width*2-1,-(2*(n/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==I||I(e)}}).catch(G),"fulfilled"===D.current.ready.status?D.current.render((0,u.jsx)(L,{children:(0,u.jsx)(n.E,{set:G,children:(0,u.jsx)(s.Suspense,{fallback:(0,u.jsx)(n.B,{set:F}),children:null!=t?t:null})})})):"pending"===D.current.ready.status&&K(D.current.ready))}),s.useEffect(()=>{var e;let t=null==(e=z.current)?void 0:e.get(),r=V();t&&r&&t.events.connected!==r&&(null==t.events.connect||t.events.connect(r))}),s.useEffect(()=>{let e=N.current;return()=>{var t;e.isConnected||null==(t=D.current)||t.unmount()}},[]);let X=m?"none":"auto";return(0,u.jsxs)("div",{ref:P,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:X,...h},...M,children:[(0,u.jsx)("div",{ref:O,style:{width:"100%",height:"100%"},children:(0,u.jsx)("canvas",{ref:N,style:{display:"block"},children:r})}),j]})}function h(e){return(0,u.jsx)(l.Af,{children:(0,u.jsx)(c,{...e})})}r(88745)},88745:(e,t,r)=>{e.exports=r(77930)},94400:(e,t,r)=>{r.d(t,{Af:()=>u,Go:()=>m,Nz:()=>o,u5:()=>c,y3:()=>f});var n,s,i=r(12115);function o(e,t,r){if(!e)return;if(!0===r(e))return e;let n=t?e.return:e.child;for(;n;){let e=o(n,t,r);if(e)return e;n=t?null:n.sibling}}function a(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}"u">typeof window&&((null==(n=window.document)?void 0:n.createElement)||(null==(s=window.navigator)?void 0:s.product)==="ReactNative")?i.useLayoutEffect:i.useEffect;let l=a(i.createContext(null));class u extends i.Component{render(){return i.createElement(l.Provider,{value:this._reactInternals},this.props.children)}}function c(){let e=i.useContext(l);if(null===e)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let t=i.useId();return i.useMemo(()=>{for(let r of[e,null==e?void 0:e.alternate]){if(!r)continue;let e=o(r,!1,e=>{let r=e.memoizedState;for(;r;){if(r.memoizedState===t)return!0;r=r.next}});if(e)return e}},[e,t])}let h=Symbol.for("react.context"),d=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===h;function f(){let e=function(){let e=c(),[t]=i.useState(()=>new Map);t.clear();let r=e;for(;r;){let e=r.type;d(e)&&e!==l&&!t.has(e)&&t.set(e,i.use(a(e))),r=r.return}return t}();return i.useMemo(()=>Array.from(e.keys()).reduce((t,r)=>n=>i.createElement(t,null,i.createElement(r.Provider,{...n,value:e.get(r)})),e=>i.createElement(u,{...e})),[e])}function m(){if(!i.Activity)throw Error("its-fine: useActivityBridge requires React 19.2 or later!");let e=c(),[t]=i.useState(()=>{let t,r=[],n=!1;o(e,!0,e=>{var t,s;if(e.elementType===i.Activity){let n=(null==(t=e.child)?void 0:t.tag)===22?e.child.stateNode:null;if("number"!=typeof(null==n?void 0:n._visibility))throw Error("its-fine: unsupported React Activity internals!");r.push(n)}else 22===e.tag&&(null==(s=e.return)?void 0:s.elementType)!==i.Activity&&(n=!0)});let s="hidden",a=new Set,l={mounted:!1,connected:!1,subscribe:e=>(a.add(e),()=>{a.delete(e)}),sync(e){l.mounted&&!l.connected&&n&&r.length>0?t||(t=function(e){if("function"==typeof requestAnimationFrame){let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)}let t=setTimeout(e,16);return()=>clearTimeout(t)}(()=>{t=void 0,l.sync(!0)})):(null==t||t(),t=void 0);let i=s;if(l.mounted?l.connected?i="visible":e&&(i=r.every(e=>(1&e._visibility)!=0)?"visible":"hidden"):i="hidden",s!==i)for(let e of(s=i,a))e()},Bridge:({children:e})=>i.createElement(i.Activity,{mode:i.useSyncExternalStore(l.subscribe,()=>s,()=>"hidden")},e)};return l});return i.useInsertionEffect(()=>(t.mounted=!0,queueMicrotask(()=>t.sync(!1)),()=>{t.mounted=!1,queueMicrotask(()=>t.sync(!1))}),[t]),i.useLayoutEffect(()=>(t.connected=!0,t.sync(!1),()=>{t.connected=!1,t.sync(!0)}),[t]),t.Bridge}},94577:(e,t,r)=>{e.exports=r(99617)},99617:(e,t,r)=>{var n=r(12115),s=r(8039),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=s.useSyncExternalStore,a=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,s){var h=a(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var f=o(e,(h=u(function(){function e(e){if(!l){if(l=!0,o=e,e=n(e),void 0!==s&&d.hasValue){var t=d.value;if(s(t,e))return a=t}return a=e}if(t=a,i(o,e))return t;var r=n(e);return void 0!==s&&s(t,r)?(o=e,t):(o=e,a=r)}var o,a,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,s]))[0],h[1]);return l(function(){d.hasValue=!0,d.value=f},[f]),c(f),f}}}]);
|