cuelo 0.10.38 → 0.10.39

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.
Files changed (382) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +7 -11
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -51
  5. package/.next/react-loadable-manifest.json +3 -14
  6. package/.next/required-server-files.js +1 -1
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/routes-manifest.json +0 -26
  9. package/.next/server/app/_global-error/page.js +2 -2
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  18. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/.next/server/app/_not-found/page.js +2 -2
  20. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/_not-found.html +1 -1
  22. package/.next/server/app/_not-found.rsc +3 -3
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  26. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/api/agent/[id]/account/route.js +1 -1
  30. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  31. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  32. package/.next/server/app/api/agent/[id]/route.js +1 -1
  33. package/.next/server/app/api/agent/new/route.js +1 -1
  34. package/.next/server/app/api/agent/running/route.js +1 -1
  35. package/.next/server/app/api/attachment-settings/route.js +1 -1
  36. package/.next/server/app/api/attachments/[id]/transcription/route.js +2 -2
  37. package/.next/server/app/api/attachments/draft/route.js +1 -1
  38. package/.next/server/app/api/attachments/route.js +3 -3
  39. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  40. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  41. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  42. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  43. package/.next/server/app/api/auth/providers/route.js +1 -1
  44. package/.next/server/app/api/cwd/browse/route.js +1 -1
  45. package/.next/server/app/api/cwd/validate/route.js +1 -1
  46. package/.next/server/app/api/default-cwd/route.js +1 -1
  47. package/.next/server/app/api/display-settings/route.js +1 -1
  48. package/.next/server/app/api/document-text/route.js +1 -1
  49. package/.next/server/app/api/experiments/route.js +1 -1
  50. package/.next/server/app/api/file-index/route.js +1 -1
  51. package/.next/server/app/api/files/[...path]/route.js +1 -1
  52. package/.next/server/app/api/git/diff/route.js +1 -1
  53. package/.next/server/app/api/git/status/route.js +1 -1
  54. package/.next/server/app/api/github/projects/route.js +1 -1
  55. package/.next/server/app/api/gpt6/handles/route.js +1 -1
  56. package/.next/server/app/api/gpt6/reply/route.js +1 -1
  57. package/.next/server/app/api/gpt6/token/route.js +1 -1
  58. package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
  59. package/.next/server/app/api/home/route.js +1 -1
  60. package/.next/server/app/api/live/call/[callId]/route.js +1 -1
  61. package/.next/server/app/api/live/events/route.js +2 -2
  62. package/.next/server/app/api/live/interpret/route.js +2 -2
  63. package/.next/server/app/api/live/offer/route.js +1 -1
  64. package/.next/server/app/api/live/voices/route.js +1 -1
  65. package/.next/server/app/api/mcp/route.js +1 -1
  66. package/.next/server/app/api/model-roles/route.js +1 -1
  67. package/.next/server/app/api/models/route.js +1 -1
  68. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  69. package/.next/server/app/api/models-config/discover/route.js +1 -1
  70. package/.next/server/app/api/models-config/route.js +3 -3
  71. package/.next/server/app/api/models-config/test/route.js +1 -1
  72. package/.next/server/app/api/plugins/route.js +1 -1
  73. package/.next/server/app/api/project-docs/route.js +1 -1
  74. package/.next/server/app/api/project-trust/route.js +1 -1
  75. package/.next/server/app/api/projects/route.js +1 -1
  76. package/.next/server/app/api/runs/[runId]/prelude/route.js +1 -1
  77. package/.next/server/app/api/runs/[runId]/route.js +1 -1
  78. package/.next/server/app/api/runs/[runId]/turns/route.js +1 -1
  79. package/.next/server/app/api/runs/route.js +1 -1
  80. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  81. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  82. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  83. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  84. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  85. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  86. package/.next/server/app/api/sessions/route.js +1 -1
  87. package/.next/server/app/api/sessions/search/route.js +1 -1
  88. package/.next/server/app/api/settings/route.js +1 -1
  89. package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
  90. package/.next/server/app/api/skills/check/route.js +1 -1
  91. package/.next/server/app/api/skills/install/route.js +2 -2
  92. package/.next/server/app/api/skills/route.js +1 -1
  93. package/.next/server/app/api/skills/search/route.js +1 -1
  94. package/.next/server/app/api/skills/update/route.js +1 -1
  95. package/.next/server/app/api/subagents/eta/route.js +1 -1
  96. package/.next/server/app/api/theme/route.js +1 -1
  97. package/.next/server/app/api/tool-image/route.js +1 -1
  98. package/.next/server/app/api/update-maintenance/route.js +3 -3
  99. package/.next/server/app/api/updates/route.js +1 -1
  100. package/.next/server/app/api/web-access/recovery/route.js +1 -1
  101. package/.next/server/app/api/web-access/route.js +1 -1
  102. package/.next/server/app/api/web6/consults/route.js +1 -1
  103. package/.next/server/app/api/worktrees/route.js +1 -1
  104. package/.next/server/app/favicon.ico/route.js +1 -1
  105. package/.next/server/app/index.html +1 -1
  106. package/.next/server/app/index.rsc +5 -6
  107. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -4
  108. package/.next/server/app/index.segments/_full.segment.rsc +5 -6
  109. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  110. package/.next/server/app/index.segments/_index.segment.rsc +3 -3
  111. package/.next/server/app/index.segments/_tree.segment.rsc +2 -3
  112. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  113. package/.next/server/app/page.js +32 -2
  114. package/.next/server/app/page.js.nft.json +1 -1
  115. package/.next/server/app/page_client-reference-manifest.js +1 -1
  116. package/.next/server/app/recover/page.js +2 -2
  117. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/recover.html +1 -1
  119. package/.next/server/app/recover.rsc +3 -3
  120. package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
  121. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  122. package/.next/server/app/recover.segments/_index.segment.rsc +3 -3
  123. package/.next/server/app/recover.segments/_tree.segment.rsc +2 -2
  124. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  125. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  126. package/.next/server/app-paths-manifest.json +7 -11
  127. package/.next/server/functions-config-manifest.json +0 -4
  128. package/.next/server/middleware-build-manifest.js +1 -1
  129. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  130. package/.next/server/middleware.js +4 -4
  131. package/.next/server/pages/404.html +1 -1
  132. package/.next/server/pages/500.html +1 -1
  133. package/.next/server/server-reference-manifest.json +1 -1
  134. package/.next/static/Hnj-vLLVhpk85eE5EC5YJ/_buildManifest.js +1 -0
  135. package/.next/static/chunks/2619.9aac8983f30c7c8a.js +1 -0
  136. package/.next/static/chunks/{3308.8b94b38809d1b8b6.js → 3308.34ea31e24088c85f.js} +1 -1
  137. package/.next/static/chunks/52733464.3870f99cc446f9ff.js +1 -0
  138. package/.next/static/chunks/app/_global-error/page-0975ca1ea02edd84.js +1 -0
  139. package/.next/static/chunks/app/api/agent/[id]/account/route-0975ca1ea02edd84.js +1 -0
  140. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-0975ca1ea02edd84.js +1 -0
  141. package/.next/static/chunks/app/api/agent/[id]/events/route-0975ca1ea02edd84.js +1 -0
  142. package/.next/static/chunks/app/api/agent/[id]/route-0975ca1ea02edd84.js +1 -0
  143. package/.next/static/chunks/app/api/agent/new/route-0975ca1ea02edd84.js +1 -0
  144. package/.next/static/chunks/app/api/agent/running/route-0975ca1ea02edd84.js +1 -0
  145. package/.next/static/chunks/app/api/attachment-settings/route-0975ca1ea02edd84.js +1 -0
  146. package/.next/static/chunks/app/api/attachments/[id]/transcription/route-0975ca1ea02edd84.js +1 -0
  147. package/.next/static/chunks/app/api/attachments/draft/route-0975ca1ea02edd84.js +1 -0
  148. package/.next/static/chunks/app/api/attachments/route-0975ca1ea02edd84.js +1 -0
  149. package/.next/static/chunks/app/api/auth/all-providers/route-0975ca1ea02edd84.js +1 -0
  150. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-0975ca1ea02edd84.js +1 -0
  151. package/.next/static/chunks/app/api/auth/login/[provider]/route-0975ca1ea02edd84.js +1 -0
  152. package/.next/static/chunks/app/api/auth/logout/[provider]/route-0975ca1ea02edd84.js +1 -0
  153. package/.next/static/chunks/app/api/auth/providers/route-0975ca1ea02edd84.js +1 -0
  154. package/.next/static/chunks/app/api/cwd/browse/route-0975ca1ea02edd84.js +1 -0
  155. package/.next/static/chunks/app/api/cwd/validate/route-0975ca1ea02edd84.js +1 -0
  156. package/.next/static/chunks/app/api/default-cwd/route-0975ca1ea02edd84.js +1 -0
  157. package/.next/static/chunks/app/api/display-settings/route-0975ca1ea02edd84.js +1 -0
  158. package/.next/static/chunks/app/api/document-text/route-0975ca1ea02edd84.js +1 -0
  159. package/.next/static/chunks/app/api/experiments/route-0975ca1ea02edd84.js +1 -0
  160. package/.next/static/chunks/app/api/file-index/route-0975ca1ea02edd84.js +1 -0
  161. package/.next/static/chunks/app/api/files/[...path]/route-0975ca1ea02edd84.js +1 -0
  162. package/.next/static/chunks/app/api/git/diff/route-0975ca1ea02edd84.js +1 -0
  163. package/.next/static/chunks/app/api/git/status/route-0975ca1ea02edd84.js +1 -0
  164. package/.next/static/chunks/app/api/github/projects/route-0975ca1ea02edd84.js +1 -0
  165. package/.next/static/chunks/app/api/gpt6/handles/route-0975ca1ea02edd84.js +1 -0
  166. package/.next/static/chunks/app/api/gpt6/reply/route-0975ca1ea02edd84.js +1 -0
  167. package/.next/static/chunks/app/api/gpt6/token/route-0975ca1ea02edd84.js +1 -0
  168. package/.next/static/chunks/app/api/gpt6/web6-session/route-0975ca1ea02edd84.js +1 -0
  169. package/.next/static/chunks/app/api/home/route-0975ca1ea02edd84.js +1 -0
  170. package/.next/static/chunks/app/api/live/call/[callId]/route-0975ca1ea02edd84.js +1 -0
  171. package/.next/static/chunks/app/api/live/events/route-0975ca1ea02edd84.js +1 -0
  172. package/.next/static/chunks/app/api/live/interpret/route-0975ca1ea02edd84.js +1 -0
  173. package/.next/static/chunks/app/api/live/offer/route-0975ca1ea02edd84.js +1 -0
  174. package/.next/static/chunks/app/api/live/voices/route-0975ca1ea02edd84.js +1 -0
  175. package/.next/static/chunks/app/api/mcp/route-0975ca1ea02edd84.js +1 -0
  176. package/.next/static/chunks/app/api/model-roles/route-0975ca1ea02edd84.js +1 -0
  177. package/.next/static/chunks/app/api/models/route-0975ca1ea02edd84.js +1 -0
  178. package/.next/static/chunks/app/api/models-config/catalog/route-0975ca1ea02edd84.js +1 -0
  179. package/.next/static/chunks/app/api/models-config/discover/route-0975ca1ea02edd84.js +1 -0
  180. package/.next/static/chunks/app/api/models-config/route-0975ca1ea02edd84.js +1 -0
  181. package/.next/static/chunks/app/api/models-config/test/route-0975ca1ea02edd84.js +1 -0
  182. package/.next/static/chunks/app/api/plugins/route-0975ca1ea02edd84.js +1 -0
  183. package/.next/static/chunks/app/api/project-docs/route-0975ca1ea02edd84.js +1 -0
  184. package/.next/static/chunks/app/api/project-trust/route-0975ca1ea02edd84.js +1 -0
  185. package/.next/static/chunks/app/api/projects/route-0975ca1ea02edd84.js +1 -0
  186. package/.next/static/chunks/app/api/runs/[runId]/prelude/route-0975ca1ea02edd84.js +1 -0
  187. package/.next/static/chunks/app/api/runs/[runId]/route-0975ca1ea02edd84.js +1 -0
  188. package/.next/static/chunks/app/api/runs/[runId]/turns/route-0975ca1ea02edd84.js +1 -0
  189. package/.next/static/chunks/app/api/runs/route-0975ca1ea02edd84.js +1 -0
  190. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-0975ca1ea02edd84.js +1 -0
  191. package/.next/static/chunks/app/api/sessions/[id]/context/route-0975ca1ea02edd84.js +1 -0
  192. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-0975ca1ea02edd84.js +1 -0
  193. package/.next/static/chunks/app/api/sessions/[id]/export/route-0975ca1ea02edd84.js +1 -0
  194. package/.next/static/chunks/app/api/sessions/[id]/route-0975ca1ea02edd84.js +1 -0
  195. package/.next/static/chunks/app/api/sessions/[id]/state/route-0975ca1ea02edd84.js +1 -0
  196. package/.next/static/chunks/app/api/sessions/route-0975ca1ea02edd84.js +1 -0
  197. package/.next/static/chunks/app/api/sessions/search/route-0975ca1ea02edd84.js +1 -0
  198. package/.next/static/chunks/app/api/settings/route-0975ca1ea02edd84.js +1 -0
  199. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-0975ca1ea02edd84.js +1 -0
  200. package/.next/static/chunks/app/api/skills/check/route-0975ca1ea02edd84.js +1 -0
  201. package/.next/static/chunks/app/api/skills/install/route-0975ca1ea02edd84.js +1 -0
  202. package/.next/static/chunks/app/api/skills/route-0975ca1ea02edd84.js +1 -0
  203. package/.next/static/chunks/app/api/skills/search/route-0975ca1ea02edd84.js +1 -0
  204. package/.next/static/chunks/app/api/skills/update/route-0975ca1ea02edd84.js +1 -0
  205. package/.next/static/chunks/app/api/subagents/eta/route-0975ca1ea02edd84.js +1 -0
  206. package/.next/static/chunks/app/api/theme/route-0975ca1ea02edd84.js +1 -0
  207. package/.next/static/chunks/app/api/tool-image/route-0975ca1ea02edd84.js +1 -0
  208. package/.next/static/chunks/app/api/update-maintenance/route-0975ca1ea02edd84.js +1 -0
  209. package/.next/static/chunks/app/api/updates/route-0975ca1ea02edd84.js +1 -0
  210. package/.next/static/chunks/app/api/web-access/recovery/route-0975ca1ea02edd84.js +1 -0
  211. package/.next/static/chunks/app/api/web-access/route-0975ca1ea02edd84.js +1 -0
  212. package/.next/static/chunks/app/api/web6/consults/route-0975ca1ea02edd84.js +1 -0
  213. package/.next/static/chunks/app/api/worktrees/route-0975ca1ea02edd84.js +1 -0
  214. package/.next/static/chunks/app/{layout-31adbf190d20135c.js → layout-b55ad6b60182cd98.js} +1 -1
  215. package/.next/static/chunks/app/manifest.webmanifest/route-0975ca1ea02edd84.js +1 -0
  216. package/.next/static/chunks/app/page-b358723ff38b0fd2.js +26 -0
  217. package/.next/static/chunks/{framework-e405bc515d75023a.js → framework-32a7466d5cae4a81.js} +1 -1
  218. package/.next/static/chunks/{main-26b32c580fb6231f.js → main-1ddb405481ce21f6.js} +3 -3
  219. package/.next/static/chunks/next/dist/client/components/builtin/app-error-0975ca1ea02edd84.js +1 -0
  220. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-0975ca1ea02edd84.js +1 -0
  221. package/.next/static/chunks/next/dist/client/components/builtin/not-found-0975ca1ea02edd84.js +1 -0
  222. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-0975ca1ea02edd84.js +1 -0
  223. package/.next/static/chunks/webpack-5e1ebce946df08c7.js +1 -0
  224. package/.next/static/css/{bd5a7fe85955c5e5.css → f9ae9aa15286f229.css} +1 -1
  225. package/.next/trace +107 -108
  226. package/.next/trace-build +1 -1
  227. package/.next/types/routes.d.ts +2 -6
  228. package/.next/types/validator.ts +0 -36
  229. package/README.md +0 -5
  230. package/Tools/CUELO_Setup/files/native-runtime-patch.js +1 -1
  231. package/Tools/OMP_Global_Config/agent/AGENTS.md +1 -1
  232. package/Tools/OMP_Global_Config/agent/extensions/cross-review.ts +4 -2
  233. package/Tools/OMP_Global_Config/agent/extensions/korean-reply-guard.ts +34 -22
  234. package/Tools/OMP_Global_Config/agent/extensions/lib/cross-review.ts +261 -42
  235. package/Tools/OMP_Global_Config/agent/extensions/lib/maker-routing.ts +5 -3
  236. package/Tools/OMP_Global_Config/agent/extensions/lib/routing-ledger.ts +31 -1
  237. package/Tools/OMP_Global_Config/agent/extensions/report-chart-guard.ts +102 -0
  238. package/Tools/OMP_Global_Config/agent/prompt-copies/AGENTS.en.md +2 -2
  239. package/Tools/OMP_Global_Config/agent/rules/harness-policy.json +36 -3
  240. package/Tools/OMP_Global_Config/agent/rules/subagent.md +38 -3
  241. package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +135 -2
  242. package/package.json +1 -5
  243. package/.next/server/app/api/office-avatars/[id]/route.js +0 -1
  244. package/.next/server/app/api/office-avatars/[id]/route.js.nft.json +0 -1
  245. package/.next/server/app/api/office-avatars/[id]/route_client-reference-manifest.js +0 -1
  246. package/.next/server/app/api/office-avatars/route.js +0 -1
  247. package/.next/server/app/api/office-avatars/route.js.nft.json +0 -1
  248. package/.next/server/app/api/office-avatars/route_client-reference-manifest.js +0 -1
  249. package/.next/server/app/office/page.js +0 -2
  250. package/.next/server/app/office/page.js.nft.json +0 -1
  251. package/.next/server/app/office/page_client-reference-manifest.js +0 -1
  252. package/.next/server/app/office-preview/page.js +0 -2
  253. package/.next/server/app/office-preview/page.js.nft.json +0 -1
  254. package/.next/server/app/office-preview/page_client-reference-manifest.js +0 -1
  255. package/.next/server/app/office-preview.html +0 -1
  256. package/.next/server/app/office-preview.meta +0 -16
  257. package/.next/server/app/office-preview.rsc +0 -21
  258. package/.next/server/app/office-preview.segments/_full.segment.rsc +0 -21
  259. package/.next/server/app/office-preview.segments/_head.segment.rsc +0 -6
  260. package/.next/server/app/office-preview.segments/_index.segment.rsc +0 -8
  261. package/.next/server/app/office-preview.segments/_tree.segment.rsc +0 -5
  262. package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +0 -7
  263. package/.next/server/app/office-preview.segments/office-preview.segment.rsc +0 -5
  264. package/.next/server/app/office.html +0 -1
  265. package/.next/server/app/office.meta +0 -15
  266. package/.next/server/app/office.rsc +0 -24
  267. package/.next/server/app/office.segments/_full.segment.rsc +0 -24
  268. package/.next/server/app/office.segments/_head.segment.rsc +0 -6
  269. package/.next/server/app/office.segments/_index.segment.rsc +0 -8
  270. package/.next/server/app/office.segments/_tree.segment.rsc +0 -7
  271. package/.next/server/app/office.segments/office/__PAGE__.segment.rsc +0 -10
  272. package/.next/server/app/office.segments/office.segment.rsc +0 -5
  273. package/.next/server/chunks/5489.js +0 -25
  274. package/.next/server/chunks/6137.js +0 -7
  275. package/.next/server/chunks/6432.js +0 -353
  276. package/.next/server/chunks/7362.js +0 -1
  277. package/.next/static/6Ye1oAX1ZDpTBW_o9tyNb/_buildManifest.js +0 -1
  278. package/.next/static/chunks/52733464.85a1551044fef357.js +0 -1
  279. package/.next/static/chunks/6110-0762189a59a0ff14.js +0 -1
  280. package/.next/static/chunks/726.66a45469e1fb0093.js +0 -1
  281. package/.next/static/chunks/9304.1f940d490ea5c972.js +0 -1
  282. package/.next/static/chunks/9575-87af221fbf48d9e4.js +0 -26
  283. package/.next/static/chunks/9703.36cc00cc10e10f45.js +0 -1
  284. package/.next/static/chunks/app/_global-error/page-ee0da967a5fed113.js +0 -1
  285. package/.next/static/chunks/app/api/agent/[id]/account/route-ee0da967a5fed113.js +0 -1
  286. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-ee0da967a5fed113.js +0 -1
  287. package/.next/static/chunks/app/api/agent/[id]/events/route-ee0da967a5fed113.js +0 -1
  288. package/.next/static/chunks/app/api/agent/[id]/route-ee0da967a5fed113.js +0 -1
  289. package/.next/static/chunks/app/api/agent/new/route-ee0da967a5fed113.js +0 -1
  290. package/.next/static/chunks/app/api/agent/running/route-ee0da967a5fed113.js +0 -1
  291. package/.next/static/chunks/app/api/attachment-settings/route-ee0da967a5fed113.js +0 -1
  292. package/.next/static/chunks/app/api/attachments/[id]/transcription/route-ee0da967a5fed113.js +0 -1
  293. package/.next/static/chunks/app/api/attachments/draft/route-ee0da967a5fed113.js +0 -1
  294. package/.next/static/chunks/app/api/attachments/route-ee0da967a5fed113.js +0 -1
  295. package/.next/static/chunks/app/api/auth/all-providers/route-ee0da967a5fed113.js +0 -1
  296. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-ee0da967a5fed113.js +0 -1
  297. package/.next/static/chunks/app/api/auth/login/[provider]/route-ee0da967a5fed113.js +0 -1
  298. package/.next/static/chunks/app/api/auth/logout/[provider]/route-ee0da967a5fed113.js +0 -1
  299. package/.next/static/chunks/app/api/auth/providers/route-ee0da967a5fed113.js +0 -1
  300. package/.next/static/chunks/app/api/cwd/browse/route-ee0da967a5fed113.js +0 -1
  301. package/.next/static/chunks/app/api/cwd/validate/route-ee0da967a5fed113.js +0 -1
  302. package/.next/static/chunks/app/api/default-cwd/route-ee0da967a5fed113.js +0 -1
  303. package/.next/static/chunks/app/api/display-settings/route-ee0da967a5fed113.js +0 -1
  304. package/.next/static/chunks/app/api/document-text/route-ee0da967a5fed113.js +0 -1
  305. package/.next/static/chunks/app/api/experiments/route-ee0da967a5fed113.js +0 -1
  306. package/.next/static/chunks/app/api/file-index/route-ee0da967a5fed113.js +0 -1
  307. package/.next/static/chunks/app/api/files/[...path]/route-ee0da967a5fed113.js +0 -1
  308. package/.next/static/chunks/app/api/git/diff/route-ee0da967a5fed113.js +0 -1
  309. package/.next/static/chunks/app/api/git/status/route-ee0da967a5fed113.js +0 -1
  310. package/.next/static/chunks/app/api/github/projects/route-ee0da967a5fed113.js +0 -1
  311. package/.next/static/chunks/app/api/gpt6/handles/route-ee0da967a5fed113.js +0 -1
  312. package/.next/static/chunks/app/api/gpt6/reply/route-ee0da967a5fed113.js +0 -1
  313. package/.next/static/chunks/app/api/gpt6/token/route-ee0da967a5fed113.js +0 -1
  314. package/.next/static/chunks/app/api/gpt6/web6-session/route-ee0da967a5fed113.js +0 -1
  315. package/.next/static/chunks/app/api/home/route-ee0da967a5fed113.js +0 -1
  316. package/.next/static/chunks/app/api/live/call/[callId]/route-ee0da967a5fed113.js +0 -1
  317. package/.next/static/chunks/app/api/live/events/route-ee0da967a5fed113.js +0 -1
  318. package/.next/static/chunks/app/api/live/interpret/route-ee0da967a5fed113.js +0 -1
  319. package/.next/static/chunks/app/api/live/offer/route-ee0da967a5fed113.js +0 -1
  320. package/.next/static/chunks/app/api/live/voices/route-ee0da967a5fed113.js +0 -1
  321. package/.next/static/chunks/app/api/mcp/route-ee0da967a5fed113.js +0 -1
  322. package/.next/static/chunks/app/api/model-roles/route-ee0da967a5fed113.js +0 -1
  323. package/.next/static/chunks/app/api/models/route-ee0da967a5fed113.js +0 -1
  324. package/.next/static/chunks/app/api/models-config/catalog/route-ee0da967a5fed113.js +0 -1
  325. package/.next/static/chunks/app/api/models-config/discover/route-ee0da967a5fed113.js +0 -1
  326. package/.next/static/chunks/app/api/models-config/route-ee0da967a5fed113.js +0 -1
  327. package/.next/static/chunks/app/api/models-config/test/route-ee0da967a5fed113.js +0 -1
  328. package/.next/static/chunks/app/api/office-avatars/[id]/route-ee0da967a5fed113.js +0 -1
  329. package/.next/static/chunks/app/api/office-avatars/route-ee0da967a5fed113.js +0 -1
  330. package/.next/static/chunks/app/api/plugins/route-ee0da967a5fed113.js +0 -1
  331. package/.next/static/chunks/app/api/project-docs/route-ee0da967a5fed113.js +0 -1
  332. package/.next/static/chunks/app/api/project-trust/route-ee0da967a5fed113.js +0 -1
  333. package/.next/static/chunks/app/api/projects/route-ee0da967a5fed113.js +0 -1
  334. package/.next/static/chunks/app/api/runs/[runId]/prelude/route-ee0da967a5fed113.js +0 -1
  335. package/.next/static/chunks/app/api/runs/[runId]/route-ee0da967a5fed113.js +0 -1
  336. package/.next/static/chunks/app/api/runs/[runId]/turns/route-ee0da967a5fed113.js +0 -1
  337. package/.next/static/chunks/app/api/runs/route-ee0da967a5fed113.js +0 -1
  338. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-ee0da967a5fed113.js +0 -1
  339. package/.next/static/chunks/app/api/sessions/[id]/context/route-ee0da967a5fed113.js +0 -1
  340. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-ee0da967a5fed113.js +0 -1
  341. package/.next/static/chunks/app/api/sessions/[id]/export/route-ee0da967a5fed113.js +0 -1
  342. package/.next/static/chunks/app/api/sessions/[id]/route-ee0da967a5fed113.js +0 -1
  343. package/.next/static/chunks/app/api/sessions/[id]/state/route-ee0da967a5fed113.js +0 -1
  344. package/.next/static/chunks/app/api/sessions/route-ee0da967a5fed113.js +0 -1
  345. package/.next/static/chunks/app/api/sessions/search/route-ee0da967a5fed113.js +0 -1
  346. package/.next/static/chunks/app/api/settings/route-ee0da967a5fed113.js +0 -1
  347. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-ee0da967a5fed113.js +0 -1
  348. package/.next/static/chunks/app/api/skills/check/route-ee0da967a5fed113.js +0 -1
  349. package/.next/static/chunks/app/api/skills/install/route-ee0da967a5fed113.js +0 -1
  350. package/.next/static/chunks/app/api/skills/route-ee0da967a5fed113.js +0 -1
  351. package/.next/static/chunks/app/api/skills/search/route-ee0da967a5fed113.js +0 -1
  352. package/.next/static/chunks/app/api/skills/update/route-ee0da967a5fed113.js +0 -1
  353. package/.next/static/chunks/app/api/subagents/eta/route-ee0da967a5fed113.js +0 -1
  354. package/.next/static/chunks/app/api/theme/route-ee0da967a5fed113.js +0 -1
  355. package/.next/static/chunks/app/api/tool-image/route-ee0da967a5fed113.js +0 -1
  356. package/.next/static/chunks/app/api/update-maintenance/route-ee0da967a5fed113.js +0 -1
  357. package/.next/static/chunks/app/api/updates/route-ee0da967a5fed113.js +0 -1
  358. package/.next/static/chunks/app/api/web-access/recovery/route-ee0da967a5fed113.js +0 -1
  359. package/.next/static/chunks/app/api/web-access/route-ee0da967a5fed113.js +0 -1
  360. package/.next/static/chunks/app/api/web6/consults/route-ee0da967a5fed113.js +0 -1
  361. package/.next/static/chunks/app/api/worktrees/route-ee0da967a5fed113.js +0 -1
  362. package/.next/static/chunks/app/manifest.webmanifest/route-ee0da967a5fed113.js +0 -1
  363. package/.next/static/chunks/app/office/page-a237492b750463b7.js +0 -1
  364. package/.next/static/chunks/app/office-preview/page-d11ce602c2d80ddd.js +0 -1
  365. package/.next/static/chunks/app/page-756dbb8ce3c1cb9e.js +0 -1
  366. package/.next/static/chunks/b536a0f1.f7e390612229faa9.js +0 -342
  367. package/.next/static/chunks/bd904a5c.b74776e0b23d0607.js +0 -1
  368. package/.next/static/chunks/c9cb82ce.18c8cafa64d76bc3.js +0 -1
  369. package/.next/static/chunks/f5ef5e1c.14b6095722ff4f0b.js +0 -12
  370. package/.next/static/chunks/next/dist/client/components/builtin/app-error-ee0da967a5fed113.js +0 -1
  371. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-ee0da967a5fed113.js +0 -1
  372. package/.next/static/chunks/next/dist/client/components/builtin/not-found-ee0da967a5fed113.js +0 -1
  373. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ee0da967a5fed113.js +0 -1
  374. package/.next/static/chunks/webpack-2bdefe555a609a48.js +0 -1
  375. package/.next/static/css/8cdfcac889e08fd3.css +0 -1
  376. package/.next/types/app/api/office-avatars/[id]/route.ts +0 -351
  377. package/.next/types/app/api/office-avatars/route.ts +0 -351
  378. package/.next/types/app/office/page.ts +0 -87
  379. package/.next/types/app/office-preview/page.ts +0 -87
  380. package/public/office3d/ASSETS.md +0 -55
  381. package/public/office3d/office-kit.glb +0 -0
  382. /package/.next/static/{6Ye1oAX1ZDpTBW_o9tyNb → Hnj-vLLVhpk85eE5EC5YJ}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[726],{726:(e,t,a)=>{a.r(t),a.d(t,{default:()=>O});var o=a(95155),r=a(12115),n=a(15692),s=a(86275),i=a(42412),l=a(16377),c=a(3270),h=a(14199);let d=["rin","mio","nova","yuki","isana","shion","hikari"],p="/api/office-avatars";var f=a(56369);let u=[{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"}]}],m={hair:"#9aa0a8",length:"short",bangs:"choppy",eyes:"#4b5058",eyeShape:"round",skin:"#c9ccd2",outfit:"#7d838d",inner:"#9aa0a8",accent:"#b6bbc3",legs:"#5d626b",accessories:[]},g=.36+.31+.19+.2+.02,w=.36+.31+.19+.2+.02+.12,x=.36+.31+.02;function y(e,t,a,o,r,n,s=[0,0,0],l="XYZ"){let c=new i.eaF(a,"string"==typeof o?e.material(o):o);return c.position.set(...r),c.scale.set(...n),c.rotation.set(s[0],s[1],s[2],l),t.add(c),c}function b(e,t){let a=new i.YJl;return a.position.set(...t),e.add(a),a}function k(e,t,a,{angle:o,rootY:r,length:n,width:s,tilt:i=.32,roll:l=0,depth:c=.035,lift:h=.012}){y(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]}(r-.45*n,o,h),[s,n,c],[Math.PI-i,o,l],"YXZ")}let M={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}]},v={short:.22,bob:.27,long:.44};var j=a(36545);let z=["spine","chest","head","leftUpperLeg","rightUpperLeg","leftLowerLeg","rightLowerLeg","leftUpperArm","rightUpperArm","leftLowerArm","rightLowerArm"];async function E(e,t){let a=new l.B;a.register(e=>new j.aQ(e));let o=await a.parseAsync(t,""),r=o.userData.vrm;if(!r)throw Error(`office avatar ${e}.vrm has no VRM extension`);j.dG.removeUnnecessaryVertices(o.scene),j.dG.combineSkeletons(o.scene),j.dG.combineMorphs(r),r.scene.traverse(e=>{e.frustumCulled=!1});let n={};for(let t of z){let a=r.humanoid.getNormalizedBoneNode(t);if(!a)throw Error(`office avatar ${e}.vrm has no ${t} bone`);n[t]=a}r.scene.updateMatrixWorld(!0);let s=new i.Pq0,c=.91/n.head.getWorldPosition(s).y,h=n.leftUpperLeg.getWorldPosition(s).y*c-.28,d=Math.PI/2-Math.acos(Math.min(1,.28/(n.leftLowerLeg.getWorldPosition(s).y*c))),p=new i.YJl;p.scale.setScalar(c),p.add(r.scene);let f=new i.YJl;f.add(p);let u=new i.B69;return u.position.y=(x-.91)/c,n.head.add(u),{id:e,root:f,body:p,head:u,vrm:r,bones:n,sitDrop:h,sitKnee:d,springReset:!0,reduced:!1}}async function P(e){let t=await fetch(p,{signal:e});if(!t.ok)throw Error(`office avatar list failed: HTTP ${t.status}`);let a=await t.json(),o=new Map,r=new Map,n=!1;return{available:new Set(a.available),async acquire(t){let a=r.get(t)?.pop();if(a)return a.springReset=!0,a;let n=o.get(t);return n||(n=fetch(`${p}/${t}`,{signal:e}).then(e=>{if(!e.ok)throw Error(`office avatar ${t}.vrm failed: HTTP ${e.status}`);return e.arrayBuffer()}),o.set(t,n)),E(t,await n)},release(e){if(n)return void j.dG.deepDispose(e.vrm.scene);e.root.removeFromParent();let t=r.get(e.id)??[];t.push(e),r.set(e.id,t)},dispose(){for(let e of(n=!0,r.values()))for(let t of e)j.dG.deepDispose(t.vrm.scene);r.clear(),o.clear()}}}function S(e,t,a){let o=e.getObjectByName(a.name);if(!o)return null;let r=o.clone(!0);return r.position.set(...a.at),r.rotation.y=(a.yaw??0)*Math.PI/180,"number"==typeof a.scale?r.scale.setScalar(a.scale):a.scale&&r.scale.set(...a.scale),t.add(r),r}let L=[{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]}],I=new i.Pq0(-.15,.35,.2),_=new i.Pq0(1.2,4.9,8.2),G=[h.NZ.minX,h.NZ.maxX].flatMap(e=>[0,h.NZ.height].flatMap(t=>[h.NZ.minZ,h.NZ.maxZ].map(a=>new i.Pq0(e,t,a))));function D(e,t){return Math.atan2(Math.sin(t-e),Math.cos(t-e))}function A({view:e}){let t=(0,n.D)(e=>e.camera),a=(0,n.D)(e=>e.size.width/Math.max(e.size.height,1)),o=(0,n.D)(e=>e.invalidate);return(0,r.useEffect)(()=>{t instanceof i.ubm&&(t.aspect=a,t.updateProjectionMatrix());let r=new i.Pq0,n=new i.Pq0,s=e=>{t.position.copy(_).multiplyScalar(e).add(n),t.lookAt(n),t.updateMatrixWorld()},l=e=>(s(e),G.every(e=>(r.copy(e).project(t),.94>=Math.abs(r.x)&&.94>=Math.abs(r.y))));n.copy(I);let c=1,h=2.6;if(l(1))h=c;else for(let e=0;e<14;e+=1){let e=(c+h)/2;l(e)?h=e:c=e}n.set(I.x+e.x,I.y,I.z+e.z),s(h/e.zoom),o()},[a,t,o,e.x,e.z,e.zoom]),null}function R({zoomed:e,onPan:t}){let a=(0,n.D)(e=>e.gl.domElement),o=(0,n.D)(e=>e.camera),s=(0,r.useRef)(t);return s.current=t,(0,r.useEffect)(()=>{if(a.style.touchAction=e?"none":"",!e)return;let t=new i.Zcv(new i.Pq0(0,1,0),0),r=new i.tBo,n=new i.I9Y,l=new i.Pq0,c=new i.Pq0,h=null,d=!1,p=(e,s,i)=>{let l=a.getBoundingClientRect();return n.set((e-l.left)/l.width*2-1,-(2*((s-l.top)/l.height))+1),r.setFromCamera(n,o),null!==r.ray.intersectPlane(t,i)},f=e=>{d=!1,e.isPrimary&&0===e.button&&(h={id:e.pointerId,startX:e.clientX,startY:e.clientY,lastX:e.clientX,lastY:e.clientY,moving:!1})},u=e=>{if(h&&e.pointerId===h.id){if(!h.moving){if(5>=Math.hypot(e.clientX-h.startX,e.clientY-h.startY))return;h.moving=!0,a.setPointerCapture(e.pointerId),a.style.cursor="grabbing"}p(h.lastX,h.lastY,l)&&p(e.clientX,e.clientY,c)&&s.current(l.x-c.x,l.z-c.z),h.lastX=e.clientX,h.lastY=e.clientY}},m=e=>{h&&e.pointerId===h.id&&(h.moving&&(a.style.cursor="","pointerup"===e.type&&(d=!0)),h=null)},g=e=>{d&&(d=!1,e.stopPropagation())};return a.addEventListener("pointerdown",f),a.addEventListener("pointermove",u),a.addEventListener("pointerup",m),a.addEventListener("pointercancel",m),a.addEventListener("lostpointercapture",m),a.addEventListener("click",g,!0),()=>{a.removeEventListener("pointerdown",f),a.removeEventListener("pointermove",u),a.removeEventListener("pointerup",m),a.removeEventListener("pointercancel",m),a.removeEventListener("lostpointercapture",m),a.removeEventListener("click",g,!0),a.style.touchAction=""}},[o,a,e]),null}function Y(e,t,a){return a<t?(t+a)/2:Math.min(a,Math.max(t,e))}function W(e,t,a,o,r,n,s){let i=a;for(let a=0;a<=t.length;a+=1){e.top=i-r,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+r)<n||i>s)break}return null}function B({shared:e,bubbles:t,reserved:a,onReady:o}){let s=(0,n.D)(e=>e.camera),l=(0,n.D)(e=>e.size),c=(0,n.D)(e=>e.invalidate),h=(0,r.useMemo)(()=>({point:new i.Pq0,written:new Map,sizes:new Map,observer:null,items:[],placed:[],blocked:[],ready:!1}),[]);return(0,r.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 r=h.blocked;for(let e of(r.length=0,a.values())){let t=e.offsetLeft,a=e.offsetTop;r.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 r=h.sizes.get(e);r||(r={width:e.offsetWidth,height:e.offsetHeight},h.sizes.set(e,r),h.observer?.observe(e)),o.head.getWorldPosition(h.point),h.point.y+=w-g+.22+.42*o.lift,h.point.project(s),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:r.width,height:r.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=Y(e.x,o+4,l.width-o-4);if(e.rest)({x:n,y:t}=function(e,t,a,o,r){let n=o.width/2,s=r.height-4,i={left:0,right:0,top:0,bottom:0},l=null,c=Y(a.x,n+4,r.width-n-4);for(let h=0;h<=6;h+=1){let d=Y(c+(0===h?0:(h%2==1?-1:1)*Math.ceil(h/2)*(o.width+4)),n+4,r.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=Y(a.y,p,s);i.left=d-n,i.right=d+n;let u=W(i,e,f,!0,o.height,p,s)??W(i,e,f,!1,o.height,p,s);if(null!==u){let e=Math.abs(d-a.x)+Math.abs(u-a.y);(!l||e<l.cost)&&(l={x:d,y:u,cost:e})}}return l??{x:c,y:Y(a.y,o.height+4,s)}}(i,r,e,e,l));else{let s=e.height+4;for(let t of r)n-o<t.right&&t.left<n+o&&(s=Math.max(s,t.bottom+4+e.height));t=Y(e.y,s,l.height-4-a)}i.push({left:n-o,right:n+o,top:t-e.height,bottom:t+a});let s=`translate(${Math.round(n)}px, ${Math.round(t)}px) translate(-50%, -100%)`;h.written.get(e.key)!==s&&(h.written.set(e.key,s),e.element.style.transform=s,e.element.style.zIndex=String(Math.round((1-e.depth)*1e4)),e.element.dataset.placed="true")}h.ready||(h.ready=!0,o())}),null}function F({x:e,z:t,width:a,cushion:r,chairs:n,lit:s}){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,r])=>(0,o.jsxs)("mesh",{position:[e+a,.21,t+r],children:[(0,o.jsx)("boxGeometry",{args:[.04,.42,.04]}),(0,o.jsx)("meshStandardMaterial",{color:"#5b4a3b"})]},`${a}:${r}`)),l.map(e=>{let t=!!e.key&&!0===s.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:r,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:r,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 $({layout:e,lit:t}){let a=(0,r.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,r)=>(0,o.jsx)(F,{x:e.center.x,z:e.center.z,width:e.width,cushion:null===e.seat?"#9aa0a8":u[e.seat%u.length].hair,chairs:a[r],lit:t},`${e.seat??"guest"}:${r}`))]})}function q(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 C({layout:e,lit:t}){let a=(0,n.D)(e=>e.invalidate),[s,c]=(0,r.useState)(null);(0,r.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()):q(o.scene)},e=>console.warn("[office] office kit failed; keeping the drawn room",e)),()=>{e=!1,t&&q(t)}},[a]);let h=(0,r.useMemo)(()=>s?function(e,t,a){let o=new i.YJl,r=new i.bdM(8.5,6),n=new i._4j({color:"#e9dfcf",roughness:.95}),s=new i.eaF(r,n);s.rotation.x=-Math.PI/2,s.position.set(0,0,.1),o.add(s);let l=new i.YJl;for(let t of(o.add(l),L))S(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)},h=c("desk"),d=.22/(.44*c("chairDesk").y),p=new i.V9B({color:"#2a3036"}),u=new i.V9B({color:"#a8d8ff"}),m=new i.V9B({color:"#565b63"}),g=new i.V9B({color:"#7cc4ff"}),w=new i.bdM(1,1),x=new i.tcD(.018,12),y=new Map,b=new Map;t.desks.forEach((r,n)=>{S(e,l,{name:"desk",at:[r.center.x,0,r.center.z],yaw:180,scale:[r.width/h.x,.42/h.y,.5/h.z]});let s=t.stations.filter(e=>e.deskIndex===n);for(let t of s.length>0?s.map(e=>({x:e.desk.point.x,z:e.desk.point.z,key:e.key})):[{x:r.center.x,z:r.center.z-.34,key:""}]){let n=S(e,l,{name:"chairDesk",at:[t.x,0,t.z-.04*!!t.key],scale:d});if(n&&null!==r.seat){let e=a(r.seat);n.traverse(t=>{if(!(t instanceof i.eaF)||!(t.material instanceof i._4j)||"carpet"!==t.material.name)return;let a=b.get(e);a||((a=t.material.clone()).color.set(e),b.set(e,a)),t.material=a})}let s=S(e,l,{name:"screen",at:[t.x,.42,t.z+.33],yaw:180});if(S(e,l,{name:"keyboard",at:[t.x,.42,t.z+.2],yaw:180}),s&&t.key){let e=new i.NRn().setFromObject(s),a=e.getSize(new i.Pq0),r=new i.eaF(w,p);r.scale.set(.86*a.x,.62*a.y,1),r.position.set(t.x,e.min.y+.62*a.y,e.min.z-.003),r.rotation.y=Math.PI;let n=new i.eaF(x,m);n.position.set(t.x,e.min.y+.62*a.y,e.max.z+.003),o.add(r,n),y.set(t.key,{face:r,dot:n})}}});let k=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 r=(function(e){let t=new i.LoY;for(let a of["position","normal","uv"]){let o=e.getAttribute(a);if(!o)continue;let r=new Float32Array(o.count*o.itemSize);for(let e=0;e<o.count;e+=1)for(let t=0;t<o.itemSize;t+=1)r[e*o.itemSize+t]=o.getComponent(e,t);t.setAttribute(a,new i.THS(r,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(r),a.set(e.material,n)}),e.clear();let r=[];for(let[t,o]of a){let a=o.length>1?(0,f.pP)(o,!1):o[0];if(a&&a!==o[0])for(let e of o)e.dispose();for(let n of a?[a]:o)r.push(n),e.add(new i.eaF(n,t))}return r}(l);return{group:o,setLit:e=>{for(let[t,a]of y){let o=!0===e.get(t);a.face.material=o?u:p,a.dot.material=o?g:m}},dispose:()=>{for(let e of k)e.dispose();for(let e of[n,p,u,m,g,...b.values()])e.dispose();for(let e of[r,w,x])e.dispose()}}}(s,e,e=>u[e%u.length].hair):null,[s,e]);return(0,r.useEffect)(()=>()=>h?.dispose(),[h]),(0,r.useEffect)(()=>{h?.setLit(t),a()},[a,t,h]),h?(0,o.jsx)("primitive",{object:h.group}):(0,o.jsx)($,{layout:e,lit:t})}function H({actorKey:e,seat:t,shared:a,avatars:s,target:l,onSelect:h,onHover:p,onMotionChange:w}){let j=(0,n.D)(e=>e.gl),z=(0,n.D)(e=>e.invalidate),E=null===t?null:d[t%d.length],P=null!==E&&null!==s&&s.available.has(E),S=null===E||null!==s&&!P,L=(0,r.useMemo)(()=>{if(!S)return null;let e=null===t?m:u[t%u.length];return function(e,t,a=!1){let{sphere:o,cylinder:r,torso:n,box:s}=e.geometry,l=new i.YJl,c=b(l,[0,0,0]),h=b(c,[.062,.36,0]),d=b(c,[-.062,.36,0]);for(let a of[h,d])y(e,a,r,t.legs,[0,-.15,0],[.048,.3,.048]),y(e,a,s,"#2b2a2e",[0,-.322,.022],[.08,.045,.13]);let p=b(c,[0,.36,0]);y(e,p,n,t.outfit,[0,.15,0],[.15,.3,.122]),y(e,p,s,t.inner,[0,.17,.106],[.075,.2,.02],[-.13,0,0]),y(e,p,e.geometry.ring,t.accent,[0,.3,0],[.08,.08,.065],[Math.PI/2,0,0]),y(e,p,r,t.skin,[0,.31,0],[.04,.06,.04]),t.hood&&y(e,p,o,t.outfit,[0,.29,-.1],[.13,.065,.07],[.3,0,0]),t.skirt&&y(e,p,n,t.skirt,[0,-.045,0],[.19,.13,.17]);let u=b(p,[.14,.27,0]),m=b(p,[-.14,.27,0]);for(let a of[u,m])y(e,a,r,t.outfit,[0,-.12,0],[.042,.24,.042]),t.stripe&&y(e,a,r,t.stripe,[0,-.108,0],[.045,.03,.045]),y(e,a,r,t.accent,[0,-.24+.015,0],[.046,.03,.046]),y(e,a,o,t.skin,[0,-.266,0],[.04,.042,.04]);let g=b(p,[0,.33,0]);if(y(e,g,o,t.skin,[0,.19,0],[.2,.194,.19]),a)for(let a of[-1,1])y(e,g,o,t.eyes,[.072*a,.17,.178],[.034,.046,.02]);else{let a=`#${new i.Q1f(t.eyes).multiplyScalar(.32).getHexString()}`;for(let r of[-1,1])!function(e,t,a,o,r){let{sphere:n}=e.geometry,s="sharp"===a.eyeShape,i=s?.05:.058,l=.078*o,c=.38*o;y(e,t,n,e.flat(a.eyes),[l,.155,.168],[.043,i,.02],[0,c,0]),y(e,t,n,e.flat(r),[l-.003*o,.149,.184],[.023,.55*i,.008],[0,c,0]),y(e,t,n,e.flat("#2a1d22"),[l,.155+.1*i,.167],[.049,1.1*i,.016],[0,c,0]),s&&y(e,t,n,e.flat("#2a1d22"),[l+.046*o,.155+.92*i,.17],[.018,.007,.008],[0,c,.5*o]),y(e,t,n,e.flat("#ffffff"),[l+.013*o,.155+.3*i,.19],[.014,.017,.006],[0,c,0]),y(e,t,n,e.flat("#ffffff"),[l-.014*o,.155-.5*i,.188],[.007,.007,.004],[0,c,0])}(e,g,t,r,a),y(e,g,o,"#f6aaa6",[.105*r,.085,.122],[.03,.012,.01],[0,.6*r,0])}y(e,g,o,"#b85a5c",[0,.065,.143],[.018,.007,.006]),a||function(e,t,a){let{sphere:o,dome:r,box:n,cone:s}=e.geometry,i=a.hair;for(let o of(y(e,t,r,i,[0,.19+.014,-.01],[.22400000000000003,.22400000000000003,.22799999999999998],[-.36,0,0]),M[a.bangs]))k(e,t,i,{angle:o.angle,rootY:.145,length:o.length,width:o.width,roll:o.roll??0});a.streak&&k(e,t,a.streak,{angle:.4,rootY:.13,length:.1,width:.026,roll:-.3,lift:.022});let l=v[a.length];for(let o of[-1,1])y(e,t,s,i,[.19*o,.22-.5*l,.055],[.05,l,.045],[Math.PI,0,.1*o]),a.streak&&y(e,t,s,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(y(e,t,o,i,[0,.2,-.065],[.212,.205,.175]),[-.1,0,.1]))y(e,t,s,i,[a,.19-.14,-.1],[.05,.11,.045],[Math.PI+.45,0,2.5*a]);else if(y(e,t,o,i,[0,.155,-.085],[.232,.24,.188]),"bob"===a.length)for(let a of[-1,1])y(e,t,o,i,[.175*a,.19-.2,-.05],[.075,.055,.09],[0,0,-.5*a]);else for(let a of(y(e,t,o,i,[0,.19-.3,-.13],[.215,.33,.09],[-.16,0,0]),[-.12,0,.12]))y(e,t,s,i,[a,-.44,-.17],[.075,.13,.055],[Math.PI-.1,0,1.5*a]);if(a.ahoge&&y(e,t,s,i,[.02,.45,.03],[.02,.13,.015],[.45,0,-.55]),a.ponytail){let r=a.ponytail.x,n=a.ponytail.high?.32:.21;y(e,t,o,i,[.18*r,n,-.07],[.055,.055,.055]),y(e,t,o,i,[.25*r,n-.06,-.09],[.075,.08,.075],[0,0,.3*r]),y(e,t,o,i,[.29*r,n-.18,-.1],[.062,.11,.064],[0,0,.2*r]),y(e,t,s,i,[.3*r,n-.33,-.1],[.05,.13,.05],[Math.PI,0,-.15*r])}if(a.braid){let r=a.braid.x,s=a.braid.color??i;for(let a=0;a<5;a+=1){let n=.048-.004*a;y(e,t,o,s,[r*(.17-.008*a),.09-.068*a,.06+.022*a],[n,1.15*n,n])}y(e,t,n,"#2b2b2b",[.135*r,-.26,.16],[.045,.02,.045])}}(e,g,t),function(e,t,a,o){let{sphere:r,box:n,ring:s,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])y(e,t,r,l.color,[o[0]+.058*n*a,o[1],o[2]],[.064*a,.042*a,.026*a],[0,0,.35*n]),l.tails&&y(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]);y(e,t,r,l.color,o,[.026*a,.026*a,.026*a]);break}case"goggles":for(let a of[-1,1])y(e,t,s,l.frame,[.066*a,.36,.12],[.047,.047,.047],[-.95,0,0]),y(e,t,r,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 r of[.78,-.78])y(e,t,n,l.color,o,[.06,.016,.016],[0,.5*a,r]);break;case"whale":y(e,t,r,l.color,o,[.04,.027,.02],[0,.5*a,0]),y(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":y(e,t,n,l.color,o,[.055,.036,.022],[0,.5*a,0]),y(e,t,r,"#2b2b2b",[o[0]-.005*a,o[1],o[2]+.012],[.012,.012,.008]);break;default:y(e,t,n,l.color,o,[.055,.022,.02],[0,0,-.5*a])}break}case"glasses":for(let a of[-1,1])y(e,t,s,l.color,[.078*a,.155,.198],[.056,.056,.03],[0,.3*a,0]);y(e,t,n,l.color,[0,.165,.205],[.04,.007,.007]);break;case"pendant":y(e,a,r,l.color,[0,.235,.1],[.022,.022,.012]);break;case"choker":y(e,a,s,l.color,[0,.305,0],[.05,.05,.07],[Math.PI/2,0,0]),y(e,a,r,l.color,[0,.28,.052],[.014,.016,.01])}}(e,g,p,t);let w=[];for(let e of[h,d,p,u,m,g])!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),r=t.material,n=a.get(r)??[];n.push(o),a.set(r,n),e.remove(t)}for(let[o,r]of a){let a=1===r.length?r[0]:(0,f.pP)(r,!1);if(r.length>1)for(let e of r)e.dispose();a&&(t.push(a),e.add(new i.eaF(a,o)))}}(e,w);return{root:l,body:c,torso:p,head:g,armLeft:u,armRight:m,legLeft:h,legRight:d,baked:w}}(a.kit,e,null===t)},[S,t,a.kit]),[I,_]=(0,r.useState)(null),[G,A]=(0,r.useState)(null);if(G)throw G;let R=(0,r.useMemo)(()=>{let e=new i.B69;return e.position.y=x,e},[]),Y=I?.head??L?.head??R,W=(0,r.useRef)(null),B=(0,r.useRef)(l),F="rest"===l.kind?l.place.point:c.kn,$=(0,r.useRef)({point:{...F},heading:0,phase:"rest"===l.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,r.useEffect)(()=>{B.current=l,z()},[l,z]);let q="participant"===l.kind?l.station.bubbleLift:0,C="rest"===l.kind;return(0,r.useLayoutEffect)(()=>{let e=$.current;if(null!==t){let o=a.departed.get(t);o&&(a.departed.delete(t),e.point={...o.point},e.heading=o.heading,e.phase="walk")}return()=>{null!==t&&a.departed.set(t,{point:{...e.point},heading:e.heading})}},[t,a]),(0,r.useLayoutEffect)(()=>(a.heads.set(e,{head:Y,lift:q,rest:C}),()=>{a.heads.delete(e)}),[e,q,Y,C,a]),(0,r.useEffect)(()=>()=>{L&&function(e){for(let t of e.baked)t.dispose()}(L)},[L]),(0,r.useEffect)(()=>{if(!s||!E||!P)return;let e=!0,t=null;return s.acquire(E).then(a=>{e?(t=a,_(a),z()):s.release(a)},t=>{e&&(console.error(`[office] avatar ${E} failed`,t),A(t))}),()=>{e=!1,_(null),t&&s.release(t)}},[E,s,z,P]),(0,r.useEffect)(()=>()=>{j.domElement.style.cursor=""},[j]),(0,n.F)((e,t)=>{var o,r,n,s,i,l,h,d;let p,f,u,m,g,x,y,b,k,M,v=Math.min(t,.1),j=a.reducedMotion.current,z=$.current;z.time+=v;let E=B.current;if("participant"===E.kind)k="desk"===E.plan.spot?E.station.desk:E.station.lounge,M=E.plan.pose;else{let e=E.place;M=e.pose,k={point:e.to&&1===z.paceLeg&&!j?e.to:e.point,facing:e.facing}}let P="work"===M||"sofa"===M,S=j?1:v/.45,_=!1;if("sitDown"===z.phase||"seated"===z.phase)P?"sitDown"===z.phase?(z.sit=Math.min(1,z.sit+S),z.sit>=1&&(z.phase="seated")):_=!0:z.phase="standUp";else if("standUp"===z.phase)z.sit=Math.max(0,z.sit-S),z.sit<=0&&(z.phase="walk");else{let e=(0,c.yA)(z.point,k.point,j?1/0:1.15*v);if(e.arrived){z.point=e.point;let t=D(z.heading,k.facing);Math.abs(t)>.12&&!j?(z.heading+=t*Math.min(1,7*v),z.phase="turn"):(z.heading=k.facing,P?z.phase="sitDown":(z.phase="pose","pace"!==M||j?_=!0:(z.paceWait-=v,z.paceWait<=0&&(z.paceWait=2.6,z.paceLeg=+(1!==z.paceLeg)))))}else{let t=Math.atan2(e.point.x-z.point.x,e.point.z-z.point.z);z.heading+=D(z.heading,t)*Math.min(1,7*v),z.point=e.point,z.phase="walk",z.walkPhase+=9*v}}let G=j?1:Math.min(1,8*v),A=z.blend;A.walk+=(("walk"===z.phase)-A.walk)*G,A.type+=(("seated"===z.phase&&"work"===M)-A.type)*G,A.wave+=(("pose"===z.phase&&"wave"===M)-A.wave)*G,A.slump+=(("pose"===z.phase&&"slump"===M)-A.slump)*G;let R={walkPhase:z.walkPhase,walk:A.walk,sit:z.sit,type:A.type,wave:A.wave,slump:A.slump,breathe:+!j};if(I?!function(e,t,a){var o,r,n,s;let{bones:i}=e,l=.6*Math.sin(t.walkPhase)*t.walk,c=-Math.PI/2*t.sit;i.leftUpperLeg.rotation.x=c+l,i.rightUpperLeg.rotation.x=c-l;let h=.7*Math.cos(t.walkPhase)*t.walk;i.leftLowerLeg.rotation.x=e.sitKnee*t.sit+Math.max(0,-h),i.rightLowerLeg.rotation.x=e.sitKnee*t.sit+Math.max(0,h);let d=Math.sin(2.1*a)*t.breathe,p=.025*Math.abs(Math.sin(t.walkPhase))*t.walk;e.body.position.y=-e.sitDrop*t.sit+p+.004*d;let f=e=>.07*Math.sin(9*a+1.7*e)*t.breathe,u=.12*t.slump,m=.1+-.08*t.slump+.12,g=.15+.9999999999999999*t.type;if(i.leftUpperArm.rotation.set((o=-(.8*l))+(-.6+f(1)-o)*t.type+u,0,m-Math.PI/2),i.rightUpperArm.rotation.set((r=.8*l)+(-.6+f(-1)-r)*t.type+u,0,Math.PI/2-m),i.leftLowerArm.rotation.y=-g,i.rightLowerArm.rotation.y=g,t.wave>0){let e=i.rightUpperArm.rotation;n=e.z,e.z=n+(Math.PI/2-2.55+.35*Math.sin(7*a)*t.breathe-n)*t.wave,s=e.x,e.x=s+(0-s)*t.wave,i.rightLowerArm.rotation.y=g+(.35-g)*t.wave}i.head.rotation.x=.05*t.type+.3*t.slump+.02*d,i.head.rotation.y=.06*Math.sin(.6*a)*t.breathe*(1-t.type),i.spine.rotation.x=.1*t.slump,i.chest.rotation.x=.015*d;let w=a%4.2;e.vrm.expressionManager?.setValue("blink",w<.16?Math.sin(w/.16*Math.PI)*t.breathe:0)}(I,R,z.time):L&&(n=L,s=R,i=z.time,p=.6*Math.sin(s.walkPhase)*s.walk,f=-Math.PI/2*s.sit,n.legLeft.rotation.x=f+p,n.legRight.rotation.x=f-p,u=Math.sin(2.1*i)*s.breathe,m=.025*Math.abs(Math.sin(s.walkPhase))*s.walk,n.body.position.y=-(.36-.25)*s.sit+m+.004*u,n.torso.scale.y=1+.012*u,g=e=>.07*Math.sin(9*i+1.7*e)*s.breathe,x=(l=-(.8*p))+(-1.15+g(1)-l)*s.type,y=(h=.8*p)+(-1.15+g(-1)-h)*s.type,b=.12*s.slump,n.armLeft.rotation.set(x+b,0,.1+-.08*s.slump),n.armRight.rotation.set(y+b,0,-.1+.08*s.slump),s.wave>0&&(n.armRight.rotation.z=-.1+(-2.55+.35*Math.sin(7*i)*s.breathe- -.1)*s.wave,n.armRight.rotation.x=(d=n.armRight.rotation.x)+(0-d)*s.wave),n.head.rotation.x=.05*s.type+.3*s.slump+.02*u,n.head.rotation.y=.06*Math.sin(.6*i)*s.breathe*(1-s.type),n.torso.rotation.x=.1*s.slump),W.current&&(W.current.position.set(z.point.x,0,z.point.z),W.current.rotation.y=z.heading),I&&(j!==I.reduced&&(I.reduced=j,I.springReset=!0),I.springReset&&(I.springReset=!1,I.vrm.humanoid.update(),I.root.updateWorldMatrix(!0,!0),I.vrm.springBoneManager?.reset()),I.vrm.update(j?0:v)),"participant"===E.kind&&w){let e=(o=z.phase,r=E.plan,"walk"===o?"desk"===r.spot?"toDesk":"toLounge":"sitDown"===o||"seated"===o?"work":"standUp"===o?"desk"===r.spot?"atDesk":"toLounge":"desk"===r.spot?"slump"===r.pose?"slump":"atDesk":"wave"===r.pose?"wave":"idle");e!==z.motion&&(z.motion=e,w(e))}j&&!_&&e.invalidate()}),(0,o.jsxs)("group",{ref:W,children:[I?(0,o.jsx)("primitive",{object:I.root},"model"):L?(0,o.jsx)("primitive",{object:L.root},"shape"):(0,o.jsx)("primitive",{object:R},"waiting"),(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"===l.kind?.1:.16,depthWrite:!1})]}),(0,o.jsxs)("mesh",{position:[0,g/2,0],onClick:e=>{e.stopPropagation(),h?.()},onPointerOver:t=>{t.stopPropagation(),j.domElement.style.cursor=h?"pointer":"help",p(e)},onPointerOut:()=>{j.domElement.style.cursor="",p(null)},children:[(0,o.jsx)("boxGeometry",{args:[.5,g,.45]}),(0,o.jsx)("meshBasicMaterial",{transparent:!0,opacity:0,depthWrite:!1})]})]})}function N({onContextLost:e}){let t=(0,n.D)(e=>e.gl.domElement);return(0,r.useEffect)(()=>(t.addEventListener("webglcontextlost",e),()=>t.removeEventListener("webglcontextlost",e)),[t,e]),null}function U({layout:e,participants:t,bubbles:a,reserved:s,view:l,onPan:h,onSelect:d,onHover:p,onReady:f,onMotionChange:u}){let m=(0,r.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,r.useEffect)(()=>()=>m.kit.dispose(),[m]);let g=(0,n.D)(e=>e.invalidate);(0,r.useEffect)(()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=e=>{m.reducedMotion.current=e.matches,g()};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[g,m]);let[w,x]=(0,r.useState)(null),[y,b]=(0,r.useState)(null);if(y)throw y;(0,r.useEffect)(()=>{let e=new AbortController,t=null;return P(e.signal).then(a=>{e.signal.aborted||(t=a,x(a),g())},t=>{e.signal.aborted||(console.error("[office] avatar list failed",t),b(t))}),()=>{e.abort(),t?.dispose()}},[g]);let k=(0,r.useMemo)(()=>new Map(e.stations.map(e=>[e.key,e])),[e]),M=(0,r.useMemo)(()=>new Map(t.map(e=>[e.key,"desk"===e.plan.spot&&"work"===e.plan.pose])),[t]),v=(0,r.useRef)(new Map),j=(0,r.useRef)({onSelect:d,onMotionChange:u});return j.current={onSelect:d,onMotionChange:u},(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A,{view:l}),(0,o.jsx)(R,{zoomed:l.zoom>1,onPan:h}),(0,o.jsx)("hemisphereLight",{args:["#ffffff","#b5a993",1.7]}),(0,o.jsx)("directionalLight",{position:[3,6,5],intensity:1.5}),(0,o.jsx)(C,{layout:e,lit:M}),t.map(e=>{var t;let a,r=k.get(e.key);if(!r)return null;let n=(t=e.key,(a=v.current.get(t))||(a={select:()=>j.current.onSelect(t),motion:e=>j.current.onMotionChange(t,e)},v.current.set(t,a)),a);return(0,o.jsx)(X,{participant:e,station:r,shared:m,avatars:w,onSelect:n.select,onHover:p,onMotionChange:n.motion},e.key)}),e.rest.map(e=>(0,o.jsx)(T,{place:e,shared:m,avatars:w,onHover:p},(0,c.wC)(e.seat))),(0,o.jsx)(B,{shared:m,bubbles:a,reserved:s,onReady:f})]})}function X({participant:e,station:t,shared:a,avatars:n,onSelect:s,onHover:i,onMotionChange:l}){let{plan:c}=e,h=(0,r.useMemo)(()=>({kind:"participant",station:t,plan:c}),[t,c.spot,c.pose]);return(0,o.jsx)(H,{actorKey:e.key,seat:e.seat,shared:a,avatars:n,target:h,onSelect:s,onHover:i,onMotionChange:l})}function T({place:e,shared:t,avatars:a,onHover:n}){let s=(0,r.useMemo)(()=>({kind:"rest",place:e}),[e]);return(0,o.jsx)(H,{actorKey:(0,c.wC)(e.seat),seat:e.seat,shared:t,avatars:a,target:s,onHover:n})}function O({onContextLost:e,...t}){let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return(0,o.jsxs)(s.Hl,{dpr:[1,1.75],frameloop:a?"demand":"always",camera:{fov:36,near:.1,far:60,position:_.clone().add(I).toArray()},gl:{antialias:!0,alpha:!0,powerPreference:"low-power"},children:[(0,o.jsx)(N,{onContextLost:e}),(0,o.jsx)(U,{...t})]})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9304],{26801:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,o=s(t),f=o[0],u=o[1],h=new i((f+u)*3/4-u),a=0,l=u>0?f-4:f;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],h[a++]=e>>16&255,h[a++]=e>>8&255,h[a++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[a++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[a++]=e>>8&255,h[a++]=255&e),h},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],f=0,u=n-i;f<u;f+=16383)o.push(function(t,e,n){for(var i,o=[],f=e;f<n;f+=3)i=(t[f]<<16&0xff0000)+(t[f+1]<<8&65280)+(255&t[f+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(t,f,f+16383>u?u:f+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,u=o.length;f<u;++f)r[f]=o[f],n[o.charCodeAt(f)]=f;function s(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},49304:(t,e,r)=>{"use strict";let n=r(26801),i=r(81852),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function f(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return a(t)}return s(t,e,r)}function s(t,e,r){if("string"==typeof t){var n=t,i=e;if(("string"!=typeof i||""===i)&&(i="utf8"),!u.isEncoding(i))throw TypeError("Unknown encoding: "+i);let r=0|y(n,i),o=f(r),s=o.write(n,i);return s!==r&&(o=o.slice(0,s)),o}if(ArrayBuffer.isView(t)){var o=t;if(k(o,Uint8Array)){let t=new Uint8Array(o);return p(t.buffer,t.byteOffset,t.byteLength)}return l(o)}if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(k(t,ArrayBuffer)||t&&k(t.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(k(t,SharedArrayBuffer)||t&&k(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let s=t.valueOf&&t.valueOf();if(null!=s&&s!==t)return u.from(s,e,r);let h=function(t){if(u.isBuffer(t)){let e=0|c(t.length),r=f(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?f(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(h)return h;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return h(t),f(t<0?0:0|c(t))}function l(t){let e=t.length<0?0:0|c(t.length),r=f(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){let n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),u.prototype),n}function c(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function y(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||k(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(i)return n?-1:$(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=P[t[n]];return i}(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":var o,f,u;return o=this,f=e,u=r,0===f&&u===o.length?n.fromByteArray(o):n.fromByteArray(o.slice(f,u));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}(this,e,r);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function d(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(i)return -1;else r=t.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return w(t,[e],r,n,i)}throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,f=1,u=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;f=2,u/=2,s/=2,r/=2}function h(t,e){return 1===f?t[e]:t.readUInt16BE(e*f)}if(i){let n=-1;for(o=r;o<u;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===s)return n*f}else -1!==n&&(o-=o-n),n=-1}else for(r+s>u&&(r=u-s),o=r;o>=0;o--){let r=!0;for(let n=0;n<s;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return -1}function B(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,f=e>239?4:e>223?3:e>191?2:1;if(i+f<=r){let r,n,u,s;switch(f){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(s=(31&e)<<6|63&r)>127&&(o=s);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(s=(15&e)<<12|(63&r)<<6|63&n)>2047&&(s<55296||s>57343)&&(o=s);break;case 4:r=t[i+1],n=t[i+2],u=t[i+3],(192&r)==128&&(192&n)==128&&(192&u)==128&&(s=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&u)>65535&&s<1114112&&(o=s)}}null===o?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=f}var o=n;let f=o.length;if(f<=4096)return String.fromCharCode.apply(String,o);let u="",s=0;for(;s<f;)u+=String.fromCharCode.apply(String,o.slice(s,s+=4096));return u}function E(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function m(t,e,r,n,i,o){if(!u.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function I(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(0xffffffff));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let f=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r++]=f,f>>=8,t[r++]=f,f>>=8,t[r++]=f,f>>=8,t[r++]=f,r}function A(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(0xffffffff));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let f=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r+3]=f,f>>=8,t[r+2]=f,f>>=8,t[r+1]=f,f>>=8,t[r]=f,r+8}function v(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function U(t,e,r,n,o){return e*=1,r>>>=0,o||v(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,o){return e*=1,r>>>=0,o||v(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.hp=u,e.IS=50,u.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),!u.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return s(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return(h(t),t<=0)?f(t):void 0!==e?"string"==typeof r?f(t).fill(e,r):f(t).fill(e):f(t)},u.allocUnsafe=function(t){return a(t)},u.allocUnsafeSlow=function(t){return a(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(k(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),k(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:+(n<r)},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(k(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(u.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)d(this,e,e+1);return this},u.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},u.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},u.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?B(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(k(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,f=r-e,s=Math.min(o,f),h=this.slice(n,i),a=t.slice(e,r);for(let t=0;t<s;++t)if(h[t]!==a[t]){o=h[t],f=a[t];break}return o<f?-1:+(f<o)},u.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){var i,o,f,u,s,h,a,l;if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let p=this.length-e;if((void 0===r||r>p)&&(r=p),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let c=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let f=e.length;for(n>f/2&&(n=f/2),i=0;i<n;++i){var u;let n=parseInt(e.substr(2*i,2),16);if((u=n)!=u)break;t[r+i]=n}return i}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,M($(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return f=e,u=r,M(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,f,u);case"base64":return s=e,h=r,M(N(t),this,s,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=e,l=r,M(function(t,e){let r,n,i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-a),this,a,l);default:if(c)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=j(function(t){_(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&S(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+0x1000000*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+0x1000000*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=j(function(t){_(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&S(t,this.length-8);let n=0x1000000*e+65536*this[++t]+256*this[++t]+this[++t],i=0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return(t>>>=0,e||E(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=j(function(t){_(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&S(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+0x1000000*this[++t])}),u.prototype.readBigInt64BE=j(function(t){_(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&S(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;m(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;m(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=j(function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=j(function(t,e=0){return A(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e>>>=0,!n){let n=Math.pow(2,8*r-1);m(this,t,e,r,n-1,-n)}let i=0,o=1,f=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===f&&0!==this[e+i-1]&&(f=1),this[e+i]=(t/o|0)-f&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e>>>=0,!n){let n=Math.pow(2,8*r-1);m(this,t,e,r,n-1,-n)}let i=r-1,o=1,f=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===f&&0!==this[e+i+1]&&(f=1),this[e+i]=(t/o|0)-f&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=j(function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=j(function(t,e=0){return A(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){let i;if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=u.isBuffer(t)?t:u.from(t,n),f=o.length;if(0===f)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%f]}return this};let x={};function O(t,e,r){x[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function T(t){let e="",r=t.length,n=+("-"===t[0]);for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function L(t,e,r,n,i,o){if(t>r||t<e){let n,i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new x.ERR_OUT_OF_RANGE("value",n,t)}_(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&S(i,n.length-(o+1))}function _(t,e){if("number"!=typeof t)throw new x.ERR_INVALID_ARG_TYPE(e,"number",t)}function S(t,e,r){if(Math.floor(t)!==t)throw _(t,r),new x.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new x.ERR_BUFFER_OUT_OF_BOUNDS;throw new x.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${e}`,t)}O("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),O("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=T(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=T(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let C=/[^+/0-9A-Za-z-_]/g;function $(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let f=0;f<n;++f){if((r=t.charCodeAt(f))>55295&&r<57344){if(!i){if(r>56319||f+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function N(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function M(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function k(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let P=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function j(t){return"u"<typeof BigInt?F:t}function F(){throw Error("BigInt not supported")}},81852:(t,e)=>{e.read=function(t,e,r,n,i){var o,f,u=8*i-n-1,s=(1<<u)-1,h=s>>1,a=-7,l=r?i-1:0,p=r?-1:1,c=t[e+l];for(l+=p,o=c&(1<<-a)-1,c>>=-a,a+=u;a>0;o=256*o+t[e+l],l+=p,a-=8);for(f=o&(1<<-a)-1,o>>=-a,a+=n;a>0;f=256*f+t[e+l],l+=p,a-=8);if(0===o)o=1-h;else{if(o===s)return f?NaN:1/0*(c?-1:1);f+=Math.pow(2,n),o-=h}return(c?-1:1)*f*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var f,u,s,h=8*o-i-1,a=(1<<h)-1,l=a>>1,p=5960464477539062e-23*(23===i),c=n?0:o-1,y=n?1:-1,g=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(u=+!!isNaN(e),f=a):(f=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-f))<1&&(f--,s*=2),f+l>=1?e+=p/s:e+=p*Math.pow(2,1-l),e*s>=2&&(f++,s/=2),f+l>=a?(u=0,f=a):f+l>=1?(u=(e*s-1)*Math.pow(2,i),f+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),f=0));i>=8;t[r+c]=255&u,c+=y,u/=256,i-=8);for(f=f<<i|u,h+=i;h>0;t[r+c]=255&f,c+=y,f/=256,h-=8);t[r+c-y]|=128*g}}}]);