agmon 0.1.1 → 0.1.3

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 (233) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +7 -0
  3. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js +502 -0
  4. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js.map +11 -0
  5. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js +190 -0
  6. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js.map +8 -0
  7. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js +13 -0
  8. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js.map +5 -0
  9. package/.next/build/chunks/[turbopack]_runtime.js +1056 -0
  10. package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
  11. package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js +7314 -0
  12. package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js.map +47 -0
  13. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js +6 -0
  14. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js.map +5 -0
  15. package/.next/build/package.json +1 -0
  16. package/.next/build-manifest.json +54 -0
  17. package/.next/export-marker.json +6 -0
  18. package/.next/fallback-build-manifest.json +15 -0
  19. package/.next/images-manifest.json +68 -0
  20. package/.next/next-minimal-server.js.nft.json +1 -0
  21. package/.next/next-server.js.nft.json +1 -0
  22. package/.next/package.json +1 -0
  23. package/.next/prerender-manifest.json +97 -0
  24. package/.next/required-server-files.js +366 -0
  25. package/.next/required-server-files.json +366 -0
  26. package/.next/routes-manifest.json +75 -0
  27. package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  28. package/.next/server/app/_global-error/page/build-manifest.json +21 -0
  29. package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  30. package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  31. package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  32. package/.next/server/app/_global-error/page.js +10 -0
  33. package/.next/server/app/_global-error/page.js.map +5 -0
  34. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  35. package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  36. package/.next/server/app/_global-error.html +1 -0
  37. package/.next/server/app/_global-error.meta +30 -0
  38. package/.next/server/app/_global-error.rsc +18 -0
  39. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
  40. package/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
  41. package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
  42. package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  43. package/.next/server/app/_not-found/page/build-manifest.json +21 -0
  44. package/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
  45. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  46. package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  47. package/.next/server/app/_not-found/page.js +12 -0
  48. package/.next/server/app/_not-found/page.js.map +5 -0
  49. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  50. package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  51. package/.next/server/app/_not-found.html +1 -0
  52. package/.next/server/app/_not-found.meta +35 -0
  53. package/.next/server/app/_not-found.rsc +22 -0
  54. package/.next/server/app/_not-found.segments/_full.segment.rsc +22 -0
  55. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +28 -0
  56. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  57. package/.next/server/app/api/traces/stream/route/app-paths-manifest.json +3 -0
  58. package/.next/server/app/api/traces/stream/route/build-manifest.json +12 -0
  59. package/.next/server/app/api/traces/stream/route/server-reference-manifest.json +4 -0
  60. package/.next/server/app/api/traces/stream/route.js +7 -0
  61. package/.next/server/app/api/traces/stream/route.js.map +5 -0
  62. package/.next/server/app/api/traces/stream/route.js.nft.json +1 -0
  63. package/.next/server/app/api/traces/stream/route_client-reference-manifest.js +3 -0
  64. package/.next/server/app/api/version/route/app-paths-manifest.json +3 -0
  65. package/.next/server/app/api/version/route/build-manifest.json +12 -0
  66. package/.next/server/app/api/version/route/server-reference-manifest.json +4 -0
  67. package/.next/server/app/api/version/route.js +7 -0
  68. package/.next/server/app/api/version/route.js.map +5 -0
  69. package/.next/server/app/api/version/route.js.nft.json +1 -0
  70. package/.next/server/app/api/version/route_client-reference-manifest.js +3 -0
  71. package/.next/server/app/index.html +1 -0
  72. package/.next/server/app/index.meta +29 -0
  73. package/.next/server/app/index.rsc +29 -0
  74. package/.next/server/app/index.segments/__PAGE__.segment.rsc +34 -0
  75. package/.next/server/app/index.segments/_full.segment.rsc +29 -0
  76. package/.next/server/app/index.segments/_tree.segment.rsc +3 -0
  77. package/.next/server/app/page/app-paths-manifest.json +3 -0
  78. package/.next/server/app/page/build-manifest.json +21 -0
  79. package/.next/server/app/page/next-font-manifest.json +6 -0
  80. package/.next/server/app/page/react-loadable-manifest.json +1 -0
  81. package/.next/server/app/page/server-reference-manifest.json +4 -0
  82. package/.next/server/app/page.js +13 -0
  83. package/.next/server/app/page.js.map +5 -0
  84. package/.next/server/app/page.js.nft.json +1 -0
  85. package/.next/server/app/page_client-reference-manifest.js +3 -0
  86. package/.next/server/app-paths-manifest.json +7 -0
  87. package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js +3 -0
  88. package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js.map +1 -0
  89. package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js +3 -0
  90. package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js.map +1 -0
  91. package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js +5 -0
  92. package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js.map +1 -0
  93. package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js +5 -0
  94. package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js.map +1 -0
  95. package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js +320 -0
  96. package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js.map +1 -0
  97. package/.next/server/chunks/[turbopack]_runtime.js +937 -0
  98. package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
  99. package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js +3 -0
  100. package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js.map +1 -0
  101. package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js +3 -0
  102. package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js.map +1 -0
  103. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js +3 -0
  104. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js.map +1 -0
  105. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js +76 -0
  106. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js.map +1 -0
  107. package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js +3 -0
  108. package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js.map +1 -0
  109. package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js +3 -0
  110. package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js.map +1 -0
  111. package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js +3 -0
  112. package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js.map +1 -0
  113. package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js +3 -0
  114. package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js.map +1 -0
  115. package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
  116. package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js.map +1 -0
  117. package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js +14 -0
  118. package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js.map +1 -0
  119. package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js +3 -0
  120. package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js.map +1 -0
  121. package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js +3 -0
  122. package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js.map +1 -0
  123. package/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
  124. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
  125. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
  126. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js.map +1 -0
  127. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
  128. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js.map +1 -0
  129. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
  130. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js.map +1 -0
  131. package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js +33 -0
  132. package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js.map +1 -0
  133. package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js +23 -0
  134. package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js.map +1 -0
  135. package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
  136. package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js.map +1 -0
  137. package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
  138. package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js.map +1 -0
  139. package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js +3 -0
  140. package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js.map +1 -0
  141. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
  142. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js.map +1 -0
  143. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
  144. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js.map +1 -0
  145. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
  146. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js.map +1 -0
  147. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
  148. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js.map +1 -0
  149. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js +3 -0
  150. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js.map +1 -0
  151. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
  152. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js.map +1 -0
  153. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js +3 -0
  154. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js.map +1 -0
  155. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js +3 -0
  156. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js.map +1 -0
  157. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js +3 -0
  158. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js.map +1 -0
  159. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js +3 -0
  160. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js.map +1 -0
  161. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js +5 -0
  162. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js.map +1 -0
  163. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js +5 -0
  164. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js.map +1 -0
  165. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js +208 -0
  166. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js.map +1 -0
  167. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js +3 -0
  168. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js.map +1 -0
  169. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js +16 -0
  170. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js.map +1 -0
  171. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js +3 -0
  172. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js.map +1 -0
  173. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js +3 -0
  174. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js.map +1 -0
  175. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js +196 -0
  176. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js.map +1 -0
  177. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js +196 -0
  178. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js.map +1 -0
  179. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js +3 -0
  180. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js.map +1 -0
  181. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js +153 -0
  182. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js.map +1 -0
  183. package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js +3 -0
  184. package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js.map +1 -0
  185. package/.next/server/functions-config-manifest.json +4 -0
  186. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  187. package/.next/server/middleware-build-manifest.js +54 -0
  188. package/.next/server/middleware-manifest.json +6 -0
  189. package/.next/server/next-font-manifest.js +1 -0
  190. package/.next/server/next-font-manifest.json +6 -0
  191. package/.next/server/pages/404.html +1 -0
  192. package/.next/server/pages/500.html +1 -0
  193. package/.next/server/pages-manifest.json +4 -0
  194. package/.next/server/prefetch-hints.json +34 -0
  195. package/.next/server/preview-props.json +5 -0
  196. package/.next/server/server-reference-manifest.js +1 -0
  197. package/.next/server/server-reference-manifest.json +5 -0
  198. package/.next/static/chunks/0_9x2udu0iodw.js +1 -0
  199. package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  200. package/.next/static/chunks/0umf92h1sb77c.js +1 -0
  201. package/.next/static/chunks/10om7oix6wjze.js +1 -0
  202. package/.next/static/chunks/1780fh11o7pze.js +1 -0
  203. package/.next/static/chunks/1cldmiyw3ya18.js +21 -0
  204. package/.next/static/chunks/1unuqfq-vfqtp.js +1 -0
  205. package/.next/static/chunks/2-vsu_pt58kse.js +3 -0
  206. package/.next/static/chunks/2drjv1ti9t4pg.js +1 -0
  207. package/.next/static/chunks/2hgsvrrwu57--.css +1 -0
  208. package/.next/static/chunks/2ogvir8krwwhf.js +1 -0
  209. package/.next/static/chunks/2tc54fmsk8v8q.js +1 -0
  210. package/.next/static/chunks/304ue7hvto0o0.js +206 -0
  211. package/.next/static/chunks/31gve42sn75--.js +1 -0
  212. package/.next/static/chunks/32kizm_7q94vd.js +194 -0
  213. package/.next/static/chunks/33bap0u4zwgab.js +74 -0
  214. package/.next/static/chunks/3c4xol65z2da2.js +22 -0
  215. package/.next/static/chunks/3cfn99dbrcvvp.js +31 -0
  216. package/.next/static/chunks/3d6xc1eemxy82.js +1 -0
  217. package/.next/static/chunks/3ycr8gfnsg-xv.js +151 -0
  218. package/.next/static/chunks/3ytt3vrdhke9u.js +14 -0
  219. package/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
  220. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_buildManifest.js +11 -0
  221. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_clientMiddlewareManifest.js +1 -0
  222. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_ssgManifest.js +1 -0
  223. package/.next/trace +1 -0
  224. package/.next/trace-build +1 -0
  225. package/.next/types/cache-life.d.ts +114 -0
  226. package/.next/types/root-params.d.ts +3 -0
  227. package/.next/types/routes.d.ts +74 -0
  228. package/.next/types/validator.ts +17 -0
  229. package/bin/cli.js +24 -6
  230. package/package.json +6 -6
  231. package/src/app/api/traces/stream/route.js +2 -2
  232. package/src/app/layout.js +1 -1
  233. package/src/app/page.js +6 -19
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/pixi.js/src/rendering/batcher/shared/BatchTextureArray.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/buffer/utils/fastCopy.ts","../../../../node_modules/pixi.js/src/utils/data/ViewableBuffer.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/state/const.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/state/getAdjustedBlendModeBlend.ts","../../../../node_modules/pixi.js/src/rendering/batcher/gl/utils/checkMaxIfStatementsInShader.ts","../../../../node_modules/pixi.js/src/rendering/batcher/gl/utils/maxRecommendedTextures.ts","../../../../node_modules/pixi.js/src/rendering/batcher/shared/BatchGeometry.ts","../../../../node_modules/pixi.js/src/rendering/batcher/shared/Batcher.ts","../../../../node_modules/pixi.js/src/rendering/batcher/shared/DefaultBatcher.ts","../../../../node_modules/pixi.js/src/rendering/batcher/shared/DefaultShader.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/shader-bits/roundPixelsBit.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/shader-bits/colorBit.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/compiler/utils/injectBits.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/compiler/utils/compileOutputs.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/shader-bits/globalUniformsBit.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/shader-bits/generateTextureBatchBit.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/compiler/utils/compileHooks.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/compiler/utils/compileInputs.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/compiler/utils/addBits.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/compiler/compileHighShader.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/compileHighShaderToProgram.ts","../../../../node_modules/pixi.js/src/rendering/high-shader/defaultProgramTemplate.ts","../../../../node_modules/pixi.js/src/rendering/renderers/gl/shader/getBatchSamplersUniformGroup.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/system/SystemRunner.ts","../../../../node_modules/pixi.js/src/rendering/renderers/gl/const.ts","../../../../node_modules/pixi.js/src/utils/browser/unsafeEvalSupported.ts","../../../../node_modules/pixi.js/src/environment/autoDetectEnvironment.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/system/AbstractRenderer.ts","../../../../node_modules/pixi.js/src/scene/graphics/gpu/colorToUniform.ts","../../../../node_modules/pixi.js/src/scene/sprite/BatchableSprite.ts","../../../../node_modules/pixi.js/src/utils/data/GCManagedHash.ts","../../../../node_modules/pixi.js/src/utils/const.ts","../../../../node_modules/pixi.js/src/utils/global/globalHooks.ts"],"sourcesContent":["import type { TextureSource } from '../../renderers/shared/texture/sources/TextureSource';\n\n/**\n * Used by the batcher to build texture batches. Holds list of textures and their respective locations.\n * @category rendering\n * @advanced\n */\nexport class BatchTextureArray\n{\n /** Inside textures array. */\n public textures: TextureSource[];\n\n /** Respective locations for textures. */\n public ids: Record<number, number> = Object.create(null);\n\n /** Number of filled elements. */\n public count: number;\n\n constructor()\n {\n this.textures = [];\n this.count = 0;\n }\n\n /** Clear the textures and their locations. */\n public clear(): void\n {\n for (let i = 0; i < this.count; i++)\n {\n const t = this.textures[i];\n\n this.textures[i] = null;\n this.ids[t.uid] = null;\n }\n\n this.count = 0;\n }\n}\n","/**\n * Copies from one ArrayBuffer to another.\n * Uses Float64Array (8-byte), Float32Array (4-byte), or Uint8Array depending on alignment.\n * @param sourceBuffer - the array buffer to copy from\n * @param destinationBuffer - the array buffer to copy to\n * @param sourceOffset - the byte offset to start copying from (default 0)\n * @param byteLength - the number of bytes to copy (default: min of source available and destination size)\n * @category rendering\n * @advanced\n */\nexport function fastCopy(\n sourceBuffer: ArrayBuffer | ArrayBufferLike,\n destinationBuffer: ArrayBuffer | ArrayBufferLike,\n sourceOffset?: number,\n byteLength?: number\n): void\n{\n sourceOffset ??= 0;\n byteLength ??= Math.min(sourceBuffer.byteLength - sourceOffset, destinationBuffer.byteLength);\n\n if (!(sourceOffset & 7) && !(byteLength & 7))\n {\n // 8-byte aligned - use Float64Array (8x faster)\n const len = byteLength / 8;\n\n new Float64Array(destinationBuffer, 0, len).set(new Float64Array(sourceBuffer, sourceOffset, len));\n }\n else if (!(sourceOffset & 3) && !(byteLength & 3))\n {\n // 4-byte aligned - use Float32Array (4x faster)\n const len = byteLength / 4;\n\n new Float32Array(destinationBuffer, 0, len).set(new Float32Array(sourceBuffer, sourceOffset, len));\n }\n else\n {\n // Fall back to byte-by-byte copy\n new Uint8Array(destinationBuffer).set(new Uint8Array(sourceBuffer, sourceOffset, byteLength));\n }\n}\n","import { type TypedArray } from '../../rendering/renderers/shared/buffer/Buffer';\n\n/**\n * Flexible wrapper around `ArrayBuffer` that also provides typed array views on demand.\n * @category utils\n * @advanced\n */\nexport class ViewableBuffer\n{\n /** The size of the buffer in bytes. */\n public size: number;\n\n /** Underlying `ArrayBuffer` that holds all the data and is of capacity `this.size`. */\n public rawBinaryData: ArrayBufferLike;\n\n /** View on the raw binary data as a `Uint32Array`. */\n public uint32View: Uint32Array;\n\n /** View on the raw binary data as a `Float32Array`. */\n public float32View: Float32Array;\n /** View on the raw binary data as a `Uint16Array`. */\n public uint16View: Uint16Array;\n\n private _int8View: Int8Array;\n private _uint8View: Uint8Array;\n private _int16View: Int16Array;\n private _int32View: Int32Array;\n private _float64Array: Float64Array;\n private _bigUint64Array: BigUint64Array;\n\n /**\n * @param length - The size of the buffer in bytes.\n */\n constructor(length: number);\n\n /**\n * @param arrayBuffer - The source array buffer.\n */\n constructor(arrayBuffer: ArrayBufferLike);\n\n constructor(sizeOrBuffer: number | ArrayBufferLike | Uint8Array)\n {\n if (typeof sizeOrBuffer === 'number')\n {\n this.rawBinaryData = new ArrayBuffer(sizeOrBuffer);\n }\n else if (sizeOrBuffer instanceof Uint8Array)\n {\n this.rawBinaryData = sizeOrBuffer.buffer as ArrayBuffer;\n }\n else\n {\n this.rawBinaryData = sizeOrBuffer;\n }\n\n this.uint32View = new Uint32Array(this.rawBinaryData);\n this.float32View = new Float32Array(this.rawBinaryData);\n\n this.size = this.rawBinaryData.byteLength;\n }\n\n /** View on the raw binary data as a `Int8Array`. */\n get int8View(): Int8Array\n {\n if (!this._int8View)\n {\n this._int8View = new Int8Array(this.rawBinaryData);\n }\n\n return this._int8View;\n }\n\n /** View on the raw binary data as a `Uint8Array`. */\n get uint8View(): Uint8Array\n {\n if (!this._uint8View)\n {\n this._uint8View = new Uint8Array(this.rawBinaryData);\n }\n\n return this._uint8View;\n }\n\n /** View on the raw binary data as a `Int16Array`. */\n get int16View(): Int16Array\n {\n if (!this._int16View)\n {\n this._int16View = new Int16Array(this.rawBinaryData);\n }\n\n return this._int16View;\n }\n\n /** View on the raw binary data as a `Int32Array`. */\n get int32View(): Int32Array\n {\n if (!this._int32View)\n {\n this._int32View = new Int32Array(this.rawBinaryData);\n }\n\n return this._int32View;\n }\n\n /** View on the raw binary data as a `Float64Array`. */\n get float64View(): Float64Array\n {\n if (!this._float64Array)\n {\n this._float64Array = new Float64Array(this.rawBinaryData);\n }\n\n return this._float64Array;\n }\n\n /** View on the raw binary data as a `BigUint64Array`. */\n get bigUint64View(): BigUint64Array\n {\n if (!this._bigUint64Array)\n {\n this._bigUint64Array = new BigUint64Array(this.rawBinaryData);\n }\n\n return this._bigUint64Array;\n }\n\n /**\n * Returns the view of the given type.\n * @param type - One of `int8`, `uint8`, `int16`,\n * `uint16`, `int32`, `uint32`, and `float32`.\n * @returns - typed array of given type\n */\n public view(type: string): TypedArray\n {\n return (this as any)[`${type}View`];\n }\n\n /** Destroys all buffer references. Do not use after calling this. */\n public destroy(): void\n {\n this.rawBinaryData = null;\n this.uint32View = null;\n this.float32View = null;\n this.uint16View = null;\n this._int8View = null;\n this._uint8View = null;\n this._int16View = null;\n this._int32View = null;\n this._float64Array = null;\n this._bigUint64Array = null;\n }\n\n /**\n * Returns the size of the given type in bytes.\n * @param type - One of `int8`, `uint8`, `int16`,\n * `uint16`, `int32`, `uint32`, and `float32`.\n * @returns - size of the type in bytes\n */\n public static sizeOf(type: string): number\n {\n switch (type)\n {\n case 'int8':\n case 'uint8':\n return 1;\n case 'int16':\n case 'uint16':\n return 2;\n case 'int32':\n case 'uint32':\n case 'float32':\n return 4;\n default:\n throw new Error(`${type} isn't a valid view type`);\n }\n }\n}\n","/**\n * Various blend modes supported by Pixi\n * @category filters\n * @standard\n */\nexport type BLEND_MODES = 'inherit'\n| 'normal'\n| 'add'\n| 'multiply'\n| 'screen'\n| 'darken'\n| 'lighten'\n| 'erase'\n| 'color-dodge'\n| 'color-burn'\n| 'linear-burn'\n| 'linear-dodge'\n| 'linear-light'\n| 'hard-light'\n| 'soft-light'\n| 'pin-light'\n| 'difference'\n| 'exclusion'\n| 'overlay'\n// | 'hue'\n| 'saturation'\n| 'color'\n| 'luminosity'\n| 'normal-npm'\n| 'add-npm'\n| 'screen-npm'\n| 'none'\n| 'subtract'\n| 'divide'\n| 'vivid-light'\n| 'hard-mix'\n| 'negation'\n| 'min'\n| 'max';\n\n/**\n * The map of blend modes supported by Pixi\n * @category rendering\n * @advanced\n */\nexport const BLEND_TO_NPM = {\n normal: 'normal-npm',\n add: 'add-npm',\n screen: 'screen-npm',\n};\n\n/**\n * The stencil operation to perform when using the stencil buffer\n * @category rendering\n * @advanced\n */\nexport enum STENCIL_MODES\n{\n DISABLED = 0,\n RENDERING_MASK_ADD = 1,\n MASK_ACTIVE = 2,\n INVERSE_MASK_ACTIVE = 3,\n RENDERING_MASK_REMOVE = 4,\n NONE = 5,\n}\n\n/**\n * The culling mode to use. It can be either `none`, `front` or `back`.\n * @category rendering\n * @advanced\n */\nexport type CULL_MODES = 'none' | 'back' | 'front';\n\n","import { type BLEND_MODES, BLEND_TO_NPM } from './const';\n\nimport type { TextureSource } from '../texture/sources/TextureSource';\n\n/**\n * Adjusts a blend mode for the current alpha mode. Returns the blend mode that works with that format.\n * eg 'normal' blend mode will return 'normal-npm' when rendering with premultiplied alpha.\n * and 'normal' if the texture is already premultiplied (the default)\n * @param blendMode - The blend mode to get the adjusted blend mode for.\n * @param textureSource - The texture to test the format of.\n * @returns - the blend mode that should be used to render this texture correctly based on its alphaMode\n * @internal\n */\nexport function getAdjustedBlendModeBlend(blendMode: BLEND_MODES, textureSource: TextureSource): BLEND_MODES\n{\n if (textureSource.alphaMode === 'no-premultiply-alpha')\n {\n return (BLEND_TO_NPM[blendMode as keyof typeof BLEND_TO_NPM] || blendMode) as BLEND_MODES;\n }\n\n return blendMode;\n}\n","import type { GlRenderingContext } from '../../../renderers/gl/context/GlRenderingContext';\n\nconst fragTemplate = [\n 'precision mediump float;',\n 'void main(void){',\n 'float test = 0.1;',\n '%forloop%',\n 'gl_FragColor = vec4(0.0);',\n '}',\n].join('\\n');\n\nfunction generateIfTestSrc(maxIfs: number): string\n{\n let src = '';\n\n for (let i = 0; i < maxIfs; ++i)\n {\n if (i > 0)\n {\n src += '\\nelse ';\n }\n\n if (i < maxIfs - 1)\n {\n src += `if(test == ${i}.0){}`;\n }\n }\n\n return src;\n}\n\n/**\n * @param maxIfs\n * @param gl\n * @internal\n */\nexport function checkMaxIfStatementsInShader(maxIfs: number, gl: GlRenderingContext): number\n{\n if (maxIfs === 0)\n {\n throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`');\n }\n\n const shader = gl.createShader(gl.FRAGMENT_SHADER);\n\n try\n {\n while (true)\n {\n const fragmentSrc = fragTemplate.replace(/%forloop%/gi, generateIfTestSrc(maxIfs));\n\n gl.shaderSource(shader, fragmentSrc);\n gl.compileShader(shader);\n\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))\n {\n maxIfs = (maxIfs / 2) | 0;\n }\n else\n {\n // valid!\n break;\n }\n }\n }\n finally\n {\n gl.deleteShader(shader);\n }\n\n return maxIfs;\n}\n","import { getTestContext } from '../../../renderers/gl/shader/program/getTestContext';\nimport { checkMaxIfStatementsInShader } from './checkMaxIfStatementsInShader';\n\nlet maxTexturesPerBatchCache: number | null = null;\n\n/**\n * Returns the maximum number of textures that can be batched. This uses WebGL1's `MAX_TEXTURE_IMAGE_UNITS`.\n * The response for this is that to get this info via WebGPU, we would need to make a context, which\n * would make this function async, and we want to avoid that.\n * @private\n * @deprecated Use `Renderer.limits.maxBatchableTextures` instead.\n * @returns {number} The maximum number of textures that can be batched\n */\nexport function getMaxTexturesPerBatch(): number\n{\n if (maxTexturesPerBatchCache) return maxTexturesPerBatchCache;\n\n const gl = getTestContext();\n\n // step 1: first check max textures the GPU can handle.\n maxTexturesPerBatchCache = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n\n // step 2: check the maximum number of if statements the shader can have too..\n maxTexturesPerBatchCache = checkMaxIfStatementsInShader(\n maxTexturesPerBatchCache, gl);\n\n gl.getExtension('WEBGL_lose_context')?.loseContext();\n\n return maxTexturesPerBatchCache;\n}\n","import { Buffer } from '../../renderers/shared/buffer/Buffer';\nimport { BufferUsage } from '../../renderers/shared/buffer/const';\nimport { Geometry } from '../../renderers/shared/geometry/Geometry';\n\nconst placeHolderBufferData = new Float32Array(1);\nconst placeHolderIndexData = new Uint32Array(1);\n\n/**\n * This class represents a geometry used for batching in the rendering system.\n * It defines the structure of vertex attributes and index buffers for batched rendering.\n * @category rendering\n * @advanced\n */\nexport class BatchGeometry extends Geometry\n{\n constructor()\n {\n const vertexSize = 6;\n\n const attributeBuffer = new Buffer({\n data: placeHolderBufferData,\n label: 'attribute-batch-buffer',\n usage: BufferUsage.VERTEX | BufferUsage.COPY_DST,\n shrinkToFit: false,\n });\n\n const indexBuffer = new Buffer({\n data: placeHolderIndexData,\n label: 'index-batch-buffer',\n usage: BufferUsage.INDEX | BufferUsage.COPY_DST, // | BufferUsage.STATIC,\n shrinkToFit: false,\n });\n\n const stride = vertexSize * 4;\n\n super({\n attributes: {\n aPosition: {\n buffer: attributeBuffer,\n format: 'float32x2',\n stride,\n offset: 0,\n },\n aUV: {\n buffer: attributeBuffer,\n format: 'float32x2',\n stride,\n offset: 2 * 4,\n },\n aColor: {\n buffer: attributeBuffer,\n format: 'unorm8x4',\n stride,\n offset: 4 * 4,\n },\n aTextureIdAndRound: {\n buffer: attributeBuffer,\n format: 'uint16x2',\n stride,\n offset: 5 * 4,\n },\n },\n indexBuffer\n });\n }\n}\n\n","import { uid } from '../../../utils/data/uid';\nimport { ViewableBuffer } from '../../../utils/data/ViewableBuffer';\nimport { deprecation } from '../../../utils/logging/deprecation';\nimport { GlobalResourceRegistry } from '../../../utils/pool/GlobalResourceRegistry';\nimport { fastCopy } from '../../renderers/shared/buffer/utils/fastCopy';\nimport { type BLEND_MODES } from '../../renderers/shared/state/const';\nimport { getAdjustedBlendModeBlend } from '../../renderers/shared/state/getAdjustedBlendModeBlend';\nimport { getMaxTexturesPerBatch } from '../gl/utils/maxRecommendedTextures';\nimport { BatchTextureArray } from './BatchTextureArray';\n\nimport type { BoundsData } from '../../../scene/container/bounds/Bounds';\nimport type { BindGroup } from '../../renderers/gpu/shader/BindGroup';\nimport type { Topology } from '../../renderers/shared/geometry/const';\nimport type { Geometry, IndexBufferArray } from '../../renderers/shared/geometry/Geometry';\nimport type { Instruction } from '../../renderers/shared/instructions/Instruction';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { Shader } from '../../renderers/shared/shader/Shader';\nimport type { Texture } from '../../renderers/shared/texture/Texture';\n\n/**\n * The action types for a batch.\n * @category rendering\n * @advanced\n */\nexport type BatchAction = 'startBatch' | 'renderBatch';\n\n/**\n * A batch pool is used to store batches when they are not currently in use.\n * @category rendering\n * @advanced\n */\nexport class Batch implements Instruction\n{\n public renderPipeId = 'batch';\n public action: BatchAction = 'startBatch';\n\n // TODO - eventually this could be useful for flagging batches as dirty and then only rebuilding those ones\n // public elementStart = 0;\n // public elementSize = 0;\n\n // for drawing..\n public start = 0;\n public size = 0;\n public textures: BatchTextureArray = new BatchTextureArray();\n\n public blendMode: BLEND_MODES = 'normal';\n public topology: Topology = 'triangle-strip';\n\n public canBundle = true;\n\n /**\n * breaking rules slightly here in the name of performance..\n * storing references to these bindgroups here is just faster for access!\n * keeps a reference to the GPU bind group to set when rendering this batch for WebGPU. Will be null is using WebGL.\n */\n public gpuBindGroup: GPUBindGroup;\n /**\n * breaking rules slightly here in the name of performance..\n * storing references to these bindgroups here is just faster for access!\n * keeps a reference to the bind group to set when rendering this batch for WebGPU. Will be null if using WebGl.\n */\n public bindGroup: BindGroup;\n\n public batcher: Batcher;\n /** Elements contained in this batch. Used by the Canvas renderer. */\n public elements: BatchableElement[];\n\n public destroy()\n {\n this.textures = null;\n this.gpuBindGroup = null;\n this.bindGroup = null;\n this.batcher = null;\n this.elements = null;\n }\n}\n\n// inlined pool for SPEEEEEEEEEED :D\nconst batchPool: Batch[] = [];\nlet batchPoolIndex = 0;\n\nGlobalResourceRegistry.register({\n clear: () =>\n {\n // check if the first element has a destroy method\n if (batchPool.length > 0)\n {\n for (const item of batchPool)\n {\n if (item) item.destroy();\n }\n }\n batchPool.length = 0; // clear the array\n batchPoolIndex = 0;\n },\n});\n\nfunction getBatchFromPool()\n{\n return batchPoolIndex > 0 ? batchPool[--batchPoolIndex] : new Batch();\n}\n\nfunction returnBatchToPool(batch: Batch)\n{\n batch.elements = null;\n batchPool[batchPoolIndex++] = batch;\n}\n\n/**\n * Represents an element that can be batched for rendering.\n * @interface\n * @category rendering\n * @advanced\n */\nexport interface BatchableElement\n{\n /**\n * The name of the batcher to use. Must be registered.\n * @type {string}\n */\n batcherName: string;\n\n /**\n * The texture to be used for rendering.\n * @type {Texture}\n */\n texture: Texture;\n\n /**\n * The blend mode to be applied.\n * @type {BLEND_MODES}\n */\n blendMode: BLEND_MODES;\n\n /**\n * The size of the index data.\n * @type {number}\n */\n indexSize: number;\n\n /**\n * The size of the attribute data.\n * @type {number}\n */\n attributeSize: number;\n\n /**\n * The topology to be used for rendering.\n * @type {Topology}\n */\n topology: Topology\n\n /**\n * Whether the element should be packed as a quad for better performance.\n * @type {boolean}\n */\n packAsQuad: boolean;\n\n /**\n * The texture ID, stored for efficient updating.\n * @type {number}\n * @private\n */\n _textureId: number;\n\n /**\n * The starting position in the attribute buffer.\n * @type {number}\n * @private\n */\n _attributeStart: number;\n\n /**\n * The starting position in the index buffer.\n * @type {number}\n * @private\n */\n _indexStart: number;\n\n /**\n * Reference to the batcher.\n * @type {Batcher}\n * @private\n */\n _batcher: Batcher;\n\n /**\n * Reference to the batch.\n * @type {Batch}\n * @private\n */\n _batch: Batch;\n\n}\n\n/**\n * Represents a batchable quad element.\n * @extends BatchableElement\n * @category rendering\n * @advanced\n */\nexport interface BatchableQuadElement extends BatchableElement\n{\n /**\n * Indicates that this element should be packed as a quad.\n * @type {true}\n */\n packAsQuad: true;\n\n /**\n * The size of the attribute data for this quad element.\n * @type {4}\n */\n attributeSize: 4;\n\n /**\n * The size of the index data for this quad element.\n * @type {6}\n */\n indexSize: 6;\n\n /**\n * The bounds data for this quad element.\n * @type {BoundsData}\n */\n bounds: BoundsData;\n}\n\n/**\n * Represents a batchable mesh element.\n * @extends BatchableElement\n * @category rendering\n * @advanced\n */\nexport interface BatchableMeshElement extends BatchableElement\n{\n /**\n * The UV coordinates of the mesh.\n * @type {number[] | Float32Array}\n */\n uvs: number[] | Float32Array;\n\n /**\n * The vertex positions of the mesh.\n * @type {number[] | Float32Array}\n */\n positions: number[] | Float32Array;\n\n /**\n * The indices of the mesh.\n * @type {number[] | Uint16Array | Uint32Array}\n */\n indices: number[] | Uint16Array | Uint32Array;\n\n /**\n * The offset in the index buffer.\n * @type {number}\n */\n indexOffset: number;\n\n /**\n * The offset in the attribute buffer.\n * @type {number}\n */\n attributeOffset: number;\n\n /**\n * Indicates that this element should not be packed as a quad.\n * @type {false}\n */\n packAsQuad: false;\n}\n\nlet BATCH_TICK = 0;\n\n/**\n * The options for the batcher.\n * @category rendering\n * @advanced\n */\nexport interface BatcherOptions\n{\n /** The maximum number of textures per batch. */\n maxTextures: number;\n /** The initial size of the attribute buffer. */\n attributesInitialSize?: number;\n /** The initial size of the index buffer. */\n indicesInitialSize?: number;\n}\n\n/**\n * A batcher is used to batch together objects with the same texture.\n * It is an abstract class that must be extended. see DefaultBatcher for an example.\n * @category rendering\n * @advanced\n */\nexport abstract class Batcher\n{\n public static defaultOptions: Partial<BatcherOptions> = {\n maxTextures: null,\n attributesInitialSize: 4,\n indicesInitialSize: 6,\n };\n\n /** unique id for this batcher */\n public readonly uid: number = uid('batcher');\n\n /** The buffer containing attribute data for all elements in the batch. */\n public attributeBuffer: ViewableBuffer;\n\n /** The buffer containing index data for all elements in the batch. */\n public indexBuffer: IndexBufferArray;\n\n /** The current size of the attribute data in the batch. */\n public attributeSize: number;\n\n /** The current size of the index data in the batch. */\n public indexSize: number;\n\n /** The total number of elements currently in the batch. */\n public elementSize: number;\n\n /** The starting index of elements in the current batch. */\n public elementStart: number;\n\n /** Indicates whether the batch data has been modified and needs updating. */\n public dirty = true;\n\n /** The current index of the batch being processed. */\n public batchIndex = 0;\n\n /** An array of all batches created during the current rendering process. */\n public batches: Batch[] = [];\n\n private _elements: BatchableElement[] = [];\n\n private _batchIndexStart: number;\n private _batchIndexSize: number;\n\n /** The maximum number of textures per batch. */\n public readonly maxTextures: number;\n\n /** The name of the batcher. Must be implemented by subclasses. */\n public abstract name: string;\n /** The vertex size of the batcher. Must be implemented by subclasses. */\n protected abstract vertexSize: number;\n\n /** The geometry used by this batcher. Must be implemented by subclasses. */\n public abstract geometry: Geometry;\n\n /**\n * The shader used by this batcher. Must be implemented by subclasses.\n * this can be shared by multiple batchers of the same type.\n */\n public abstract shader: Shader;\n\n /**\n * Packs the attributes of a BatchableMeshElement into the provided views.\n * Must be implemented by subclasses.\n * @param element - The BatchableMeshElement to pack.\n * @param float32View - The Float32Array view to pack into.\n * @param uint32View - The Uint32Array view to pack into.\n * @param index - The starting index in the views.\n * @param textureId - The texture ID to use.\n */\n public abstract packAttributes(\n element: BatchableMeshElement,\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number\n ): void;\n\n /**\n * Packs the attributes of a BatchableQuadElement into the provided views.\n * Must be implemented by subclasses.\n * @param element - The BatchableQuadElement to pack.\n * @param float32View - The Float32Array view to pack into.\n * @param uint32View - The Uint32Array view to pack into.\n * @param index - The starting index in the views.\n * @param textureId - The texture ID to use.\n */\n public abstract packQuadAttributes(\n element: BatchableQuadElement,\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number\n ): void;\n\n constructor(options: BatcherOptions)\n {\n options = { ...Batcher.defaultOptions, ...options };\n\n if (!options.maxTextures)\n {\n deprecation('v8.8.0', 'maxTextures is a required option for Batcher now, please pass it in the options');\n options.maxTextures = getMaxTexturesPerBatch();\n }\n\n const { maxTextures, attributesInitialSize, indicesInitialSize } = options;\n\n this.attributeBuffer = new ViewableBuffer(attributesInitialSize * 4);\n\n this.indexBuffer = new Uint16Array(indicesInitialSize);\n\n this.maxTextures = maxTextures;\n }\n\n public begin()\n {\n this.elementSize = 0;\n this.elementStart = 0;\n this.indexSize = 0;\n this.attributeSize = 0;\n\n for (let i = 0; i < this.batchIndex; i++)\n {\n returnBatchToPool(this.batches[i]);\n }\n\n this.batchIndex = 0;\n\n this._batchIndexStart = 0;\n this._batchIndexSize = 0;\n\n this.dirty = true;\n }\n\n public add(batchableObject: BatchableElement)\n {\n this._elements[this.elementSize++] = batchableObject;\n\n batchableObject._indexStart = this.indexSize;\n batchableObject._attributeStart = this.attributeSize;\n batchableObject._batcher = this;\n\n this.indexSize += batchableObject.indexSize;\n this.attributeSize += ((batchableObject.attributeSize) * this.vertexSize);\n }\n\n public checkAndUpdateTexture(batchableObject: BatchableElement, texture: Texture): boolean\n {\n const textureId = batchableObject._batch.textures.ids[texture._source.uid];\n\n // TODO could try to be a bit smarter if there are spare textures..\n // but need to figure out how to alter the bind groups too..\n if (!textureId && textureId !== 0) return false;\n\n batchableObject._textureId = textureId;\n batchableObject.texture = texture;\n\n return true;\n }\n\n public updateElement(batchableObject: BatchableElement)\n {\n this.dirty = true;\n\n const attributeBuffer = this.attributeBuffer;\n\n if (batchableObject.packAsQuad)\n {\n this.packQuadAttributes(\n batchableObject as BatchableQuadElement,\n attributeBuffer.float32View,\n attributeBuffer.uint32View,\n batchableObject._attributeStart, batchableObject._textureId);\n }\n else\n {\n this.packAttributes(\n batchableObject as BatchableMeshElement,\n attributeBuffer.float32View,\n attributeBuffer.uint32View,\n batchableObject._attributeStart, batchableObject._textureId);\n }\n }\n\n /**\n * breaks the batcher. This happens when a batch gets too big,\n * or we need to switch to a different type of rendering (a filter for example)\n * @param instructionSet\n */\n public break(instructionSet: InstructionSet)\n {\n const elements = this._elements;\n\n // length 0??!! (we broke without adding anything)\n if (!elements[this.elementStart]) return;\n\n let batch = getBatchFromPool();\n let textureBatch = batch.textures;\n\n textureBatch.clear();\n\n const firstElement = elements[this.elementStart];\n let blendMode = getAdjustedBlendModeBlend(firstElement.blendMode, firstElement.texture._source);\n let topology = firstElement.topology;\n\n if (this.attributeSize * 4 > this.attributeBuffer.size)\n {\n this._resizeAttributeBuffer(this.attributeSize * 4);\n }\n\n if (this.indexSize > this.indexBuffer.length)\n {\n this._resizeIndexBuffer(this.indexSize);\n }\n\n const f32 = this.attributeBuffer.float32View;\n const u32 = this.attributeBuffer.uint32View;\n const indexBuffer = this.indexBuffer;\n\n let size = this._batchIndexSize;\n let start = this._batchIndexStart;\n\n let action: BatchAction = 'startBatch';\n let batchElements: BatchableElement[] = [];\n\n const maxTextures = this.maxTextures;\n\n for (let i = this.elementStart; i < this.elementSize; ++i)\n {\n const element = elements[i];\n\n elements[i] = null;\n\n const texture = element.texture;\n const source = texture._source;\n\n const adjustedBlendMode = getAdjustedBlendModeBlend(element.blendMode, source);\n\n const breakRequired = blendMode !== adjustedBlendMode || topology !== element.topology;\n\n if (source._batchTick === BATCH_TICK && !breakRequired)\n {\n element._textureId = source._textureBindLocation;\n\n size += element.indexSize;\n\n if (element.packAsQuad)\n {\n this.packQuadAttributes(\n element as BatchableQuadElement,\n f32, u32,\n element._attributeStart, element._textureId\n );\n this.packQuadIndex(\n indexBuffer,\n element._indexStart,\n element._attributeStart / this.vertexSize\n );\n }\n else\n {\n this.packAttributes(\n element as BatchableMeshElement,\n f32, u32,\n element._attributeStart,\n element._textureId\n );\n this.packIndex(\n element as BatchableMeshElement,\n indexBuffer,\n element._indexStart,\n element._attributeStart / this.vertexSize\n );\n }\n\n element._batch = batch;\n batchElements.push(element);\n\n continue;\n }\n\n source._batchTick = BATCH_TICK;\n\n if (textureBatch.count >= maxTextures || breakRequired)\n {\n this._finishBatch(\n batch,\n start,\n size - start,\n textureBatch,\n blendMode,\n topology,\n instructionSet,\n action,\n batchElements\n );\n\n action = 'renderBatch';\n start = size;\n // create a batch...\n blendMode = adjustedBlendMode;\n topology = element.topology;\n\n batch = getBatchFromPool();\n textureBatch = batch.textures;\n textureBatch.clear();\n batchElements = [];\n\n ++BATCH_TICK;\n }\n\n element._textureId = source._textureBindLocation = textureBatch.count;\n textureBatch.ids[source.uid] = textureBatch.count;\n textureBatch.textures[textureBatch.count++] = source;\n element._batch = batch;\n batchElements.push(element);\n\n size += element.indexSize;\n\n if (element.packAsQuad)\n {\n this.packQuadAttributes(\n element as BatchableQuadElement,\n f32, u32,\n element._attributeStart, element._textureId\n );\n this.packQuadIndex(\n indexBuffer,\n element._indexStart,\n element._attributeStart / this.vertexSize\n );\n }\n else\n {\n this.packAttributes(element as BatchableMeshElement,\n f32, u32,\n element._attributeStart, element._textureId\n );\n\n this.packIndex(\n element as BatchableMeshElement,\n indexBuffer,\n element._indexStart,\n element._attributeStart / this.vertexSize\n );\n }\n }\n\n if (textureBatch.count > 0)\n {\n this._finishBatch(\n batch,\n start,\n size - start,\n textureBatch,\n blendMode,\n topology,\n instructionSet,\n action,\n batchElements\n );\n\n start = size;\n ++BATCH_TICK;\n }\n\n this.elementStart = this.elementSize;\n this._batchIndexStart = start;\n this._batchIndexSize = size;\n }\n\n private _finishBatch(\n batch: Batch,\n indexStart: number,\n indexSize: number,\n textureBatch: BatchTextureArray,\n blendMode: BLEND_MODES,\n topology: Topology,\n instructionSet: InstructionSet,\n action: BatchAction,\n elements?: BatchableElement[]\n )\n {\n batch.gpuBindGroup = null;\n batch.bindGroup = null;\n batch.action = action;\n\n batch.batcher = this;\n batch.textures = textureBatch;\n batch.blendMode = blendMode;\n batch.topology = topology;\n batch.start = indexStart;\n batch.size = indexSize;\n batch.elements = elements;\n\n ++BATCH_TICK;\n\n // track for returning later!\n this.batches[this.batchIndex++] = batch;\n instructionSet.add(batch);\n }\n\n public finish(instructionSet: InstructionSet)\n {\n this.break(instructionSet);\n }\n\n /**\n * Resizes the attribute buffer to the given size (1 = 1 float32)\n * @param size - the size in vertices to ensure (not bytes!)\n */\n public ensureAttributeBuffer(size: number)\n {\n if (size * 4 <= this.attributeBuffer.size) return;\n\n this._resizeAttributeBuffer(size * 4);\n }\n\n /**\n * Resizes the index buffer to the given size (1 = 1 float32)\n * @param size - the size in vertices to ensure (not bytes!)\n */\n public ensureIndexBuffer(size: number)\n {\n if (size <= this.indexBuffer.length) return;\n\n this._resizeIndexBuffer(size);\n }\n\n private _resizeAttributeBuffer(size: number)\n {\n const newSize = Math.max(size, this.attributeBuffer.size * 2);\n\n const newArrayBuffer = new ViewableBuffer(newSize);\n\n fastCopy(this.attributeBuffer.rawBinaryData, newArrayBuffer.rawBinaryData);\n\n this.attributeBuffer = newArrayBuffer;\n }\n\n private _resizeIndexBuffer(size: number)\n {\n const indexBuffer = this.indexBuffer;\n\n let newSize = Math.max(size, indexBuffer.length * 1.5);\n\n newSize += newSize % 2;\n\n // this, is technically not 100% accurate, as really we should\n // be checking the maximum value in the buffer. This approximation\n // does the trick though...\n\n // make sure buffer is always an even number..\n const newIndexBuffer = (newSize > 65535) ? new Uint32Array(newSize) : new Uint16Array(newSize);\n\n if (newIndexBuffer.BYTES_PER_ELEMENT !== indexBuffer.BYTES_PER_ELEMENT)\n {\n for (let i = 0; i < indexBuffer.length; i++)\n {\n newIndexBuffer[i] = indexBuffer[i];\n }\n }\n else\n {\n fastCopy(indexBuffer.buffer as ArrayBuffer, newIndexBuffer.buffer);\n }\n\n this.indexBuffer = newIndexBuffer;\n }\n\n public packQuadIndex(indexBuffer: IndexBufferArray, index: number, indicesOffset: number)\n {\n indexBuffer[index] = indicesOffset + 0;\n indexBuffer[index + 1] = indicesOffset + 1;\n indexBuffer[index + 2] = indicesOffset + 2;\n\n indexBuffer[index + 3] = indicesOffset + 0;\n indexBuffer[index + 4] = indicesOffset + 2;\n indexBuffer[index + 5] = indicesOffset + 3;\n }\n\n public packIndex(element: BatchableMeshElement, indexBuffer: IndexBufferArray, index: number, indicesOffset: number)\n {\n const indices = element.indices;\n const size = element.indexSize;\n const indexOffset = element.indexOffset;\n const attributeOffset = element.attributeOffset;\n\n for (let i = 0; i < size; i++)\n {\n indexBuffer[index++] = indicesOffset + indices[i + indexOffset] - attributeOffset;\n }\n }\n\n /**\n * Destroys the batch and its resources.\n * @param options - destruction options\n * @param options.shader - whether to destroy the associated shader\n */\n public destroy(options: {shader?: boolean} = {})\n {\n if (this.batches === null) return;\n\n for (let i = 0; i < this.batchIndex; i++)\n {\n returnBatchToPool(this.batches[i]);\n }\n\n this.batches = null;\n this.geometry.destroy(true);\n this.geometry = null;\n\n if (options.shader)\n {\n this.shader?.destroy();\n this.shader = null;\n }\n\n for (let i = 0; i < this._elements.length; i++)\n {\n if (this._elements[i]) this._elements[i]._batch = null;\n }\n\n this._elements = null;\n\n this.indexBuffer = null;\n\n this.attributeBuffer.destroy();\n this.attributeBuffer = null;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Batcher } from './Batcher';\nimport { BatchGeometry } from './BatchGeometry';\nimport { DefaultShader } from './DefaultShader';\n\nimport type { Matrix } from '../../../maths/matrix/Matrix';\nimport type { Shader } from '../../renderers/shared/shader/Shader';\nimport type { BatchableMeshElement, BatchableQuadElement, BatcherOptions } from './Batcher';\n\nlet defaultShader: Shader = null;\n\n/**\n * Represents the common elements for default batch rendering.\n * This interface defines the properties that are used by the DefaultBatcher\n * to render elements efficiently in a batch.\n * @category rendering\n * @advanced\n */\nexport interface DefaultBatchElements\n{\n /**\n * The color of the element that will be multiplied with the texture color.\n * This is typically represented as a 32-bit integer in RGBA format.\n */\n color: number;\n\n /**\n * Determines whether the element should be rounded to the nearest pixel.\n * - 0: No rounding (default)\n * - 1: Round to nearest pixel\n * This can help with visual consistency, especially for pixel art styles.\n */\n roundPixels: 0 | 1;\n\n /**\n * The transform matrix of the element.\n * This matrix represents the position, scale, rotation, and skew of the element.\n */\n transform: Matrix;\n}\n\n/**\n * Represents a batchable quad element with default batch properties.\n * @category rendering\n * @advanced\n */\nexport interface DefaultBatchableQuadElement extends BatchableQuadElement, DefaultBatchElements {}\n\n/**\n * Represents a batchable mesh element with default batch properties.\n * @category rendering\n * @advanced\n */\nexport interface DefaultBatchableMeshElement extends BatchableMeshElement, DefaultBatchElements {}\n\n/**\n * The default batcher is used to batch quads and meshes. This batcher will batch the following elements:\n * - tints\n * - roundPixels\n * - texture\n * - transform\n * @category rendering\n * @advanced\n */\nexport class DefaultBatcher extends Batcher\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.Batcher,\n ],\n name: 'default',\n } as const;\n\n public geometry = new BatchGeometry();\n public shader: DefaultShader;\n\n public name = DefaultBatcher.extension.name;\n\n /** The size of one attribute. 1 = 32 bit. x, y, u, v, color, textureIdAndRound -> total = 6 */\n public vertexSize = 6;\n\n constructor(options: BatcherOptions)\n {\n super(options);\n\n defaultShader ??= new DefaultShader(options.maxTextures);\n\n this.shader = defaultShader;\n }\n\n /**\n * Packs the attributes of a DefaultBatchableMeshElement into the provided views.\n * @param element - The DefaultBatchableMeshElement to pack.\n * @param float32View - The Float32Array view to pack into.\n * @param uint32View - The Uint32Array view to pack into.\n * @param index - The starting index in the views.\n * @param textureId - The texture ID to use.\n */\n public packAttributes(\n element: DefaultBatchableMeshElement,\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number\n )\n {\n const textureIdAndRound = (textureId << 16) | (element.roundPixels & 0xFFFF);\n\n const wt = element.transform;\n\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n\n const { positions, uvs } = element;\n\n const argb = element.color;\n\n const offset = element.attributeOffset;\n const end = offset + element.attributeSize;\n\n for (let i = offset; i < end; i++)\n {\n const i2 = i * 2;\n\n const x = positions[i2];\n const y = positions[(i2) + 1];\n\n float32View[index++] = (a * x) + (c * y) + tx;\n float32View[index++] = (d * y) + (b * x) + ty;\n\n float32View[index++] = uvs[i2];\n float32View[index++] = uvs[(i2) + 1];\n\n uint32View[index++] = argb;\n uint32View[index++] = textureIdAndRound;\n }\n }\n\n /**\n * Packs the attributes of a DefaultBatchableQuadElement into the provided views.\n * @param element - The DefaultBatchableQuadElement to pack.\n * @param float32View - The Float32Array view to pack into.\n * @param uint32View - The Uint32Array view to pack into.\n * @param index - The starting index in the views.\n * @param textureId - The texture ID to use.\n */\n public packQuadAttributes(\n element: DefaultBatchableQuadElement,\n float32View: Float32Array,\n uint32View: Uint32Array,\n index: number,\n textureId: number\n )\n {\n const texture = element.texture;\n\n const wt = element.transform;\n\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n\n const bounds = element.bounds;\n\n const w0 = bounds.maxX;\n const w1 = bounds.minX;\n const h0 = bounds.maxY;\n const h1 = bounds.minY;\n\n const uvs = texture.uvs;\n\n // _ _ _ _\n // a b g r\n const argb = element.color;\n\n const textureIdAndRound = (textureId << 16) | (element.roundPixels & 0xFFFF);\n\n float32View[index + 0] = (a * w1) + (c * h1) + tx;\n float32View[index + 1] = (d * h1) + (b * w1) + ty;\n\n float32View[index + 2] = uvs.x0;\n float32View[index + 3] = uvs.y0;\n\n uint32View[index + 4] = argb;\n uint32View[index + 5] = textureIdAndRound;\n\n // xy\n float32View[index + 6] = (a * w0) + (c * h1) + tx;\n float32View[index + 7] = (d * h1) + (b * w0) + ty;\n\n float32View[index + 8] = uvs.x1;\n float32View[index + 9] = uvs.y1;\n\n uint32View[index + 10] = argb;\n uint32View[index + 11] = textureIdAndRound;\n\n // xy\n float32View[index + 12] = (a * w0) + (c * h0) + tx;\n float32View[index + 13] = (d * h0) + (b * w0) + ty;\n\n float32View[index + 14] = uvs.x2;\n float32View[index + 15] = uvs.y2;\n\n uint32View[index + 16] = argb;\n uint32View[index + 17] = textureIdAndRound;\n\n // xy\n float32View[index + 18] = (a * w1) + (c * h0) + tx;\n float32View[index + 19] = (d * h0) + (b * w1) + ty;\n\n float32View[index + 20] = uvs.x3;\n float32View[index + 21] = uvs.y3;\n\n uint32View[index + 22] = argb;\n uint32View[index + 23] = textureIdAndRound;\n }\n\n /**\n * Updates the maximum number of textures that can be used in the shader.\n * @param maxTextures - The maximum number of textures that can be used in the shader.\n * @internal\n */\n public _updateMaxTextures(maxTextures: number): void\n {\n if (this.shader.maxTextures === maxTextures) return;\n defaultShader = new DefaultShader(maxTextures);\n this.shader = defaultShader;\n }\n\n public override destroy(): void\n {\n // do not destroy default shader!\n this.shader = null;\n super.destroy();\n }\n}\n\n","import { compileHighShaderGlProgram, compileHighShaderGpuProgram } from '../../high-shader/compileHighShaderToProgram';\nimport { colorBit, colorBitGl } from '../../high-shader/shader-bits/colorBit';\nimport { generateTextureBatchBit, generateTextureBatchBitGl } from '../../high-shader/shader-bits/generateTextureBatchBit';\nimport { roundPixelsBit, roundPixelsBitGl } from '../../high-shader/shader-bits/roundPixelsBit';\nimport { getBatchSamplersUniformGroup } from '../../renderers/gl/shader/getBatchSamplersUniformGroup';\nimport { Shader } from '../../renderers/shared/shader/Shader';\n\n/**\n * DefaultShader is a specialized shader class designed for batch rendering.\n * It extends the base Shader class and provides functionality for handling\n * color, texture batching, and pixel rounding in both WebGL and WebGPU contexts.\n *\n * It is used by the default batcher\n * @extends Shader\n * @category rendering\n * @advanced\n */\nexport class DefaultShader extends Shader\n{\n /** @internal */\n public maxTextures?: number;\n\n constructor(maxTextures: number)\n {\n const glProgram = compileHighShaderGlProgram({\n name: 'batch',\n bits: [\n colorBitGl,\n generateTextureBatchBitGl(maxTextures),\n roundPixelsBitGl,\n ]\n });\n\n const gpuProgram = compileHighShaderGpuProgram({\n name: 'batch',\n bits: [\n colorBit,\n generateTextureBatchBit(maxTextures),\n roundPixelsBit,\n ]\n });\n\n super({\n glProgram,\n gpuProgram,\n resources: {\n batchSamplers: getBatchSamplersUniformGroup(maxTextures),\n }\n });\n\n this.maxTextures = maxTextures;\n }\n}\n","/** @internal */\nexport const roundPixelsBit = {\n name: 'round-pixels-bit',\n vertex: {\n header: /* wgsl */`\n fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>\n {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n `\n }\n};\n\n/** @internal */\nexport const roundPixelsBitGl = {\n name: 'round-pixels-bit',\n vertex: {\n header: /* glsl */`\n vec2 roundPixels(vec2 position, vec2 targetSize)\n {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n `\n }\n};\n\n","/** @internal */\nexport const colorBit = {\n name: 'color-bit',\n vertex: {\n header: /* wgsl */`\n @in aColor: vec4<f32>;\n `,\n main: /* wgsl */`\n vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);\n `\n }\n};\n\n/** @internal */\nexport const colorBitGl = {\n name: 'color-bit',\n vertex: {\n header: /* glsl */`\n in vec4 aColor;\n `,\n main: /* glsl */`\n vColor *= vec4(aColor.rgb * aColor.a, aColor.a);\n `\n }\n};\n","/**\n * takes a shader src and replaces any hooks with the HighFragment code.\n * @param templateSrc - the program src template\n * @param fragmentParts - the fragments to inject\n * @internal\n */\nexport function injectBits(templateSrc: string, fragmentParts: Record<string, string[]>): string\n{\n let out = templateSrc;\n\n for (const i in fragmentParts)\n {\n const parts = fragmentParts[i];\n\n const toInject = parts.join('\\n');\n\n if (toInject.length)\n {\n out = out.replace(`{{${i}}}`, `//-----${i} START-----//\\n${parts.join('\\n')}\\n//----${i} FINISH----//`);\n }\n\n else\n {\n out = out.replace(`{{${i}}}`, '');\n }\n }\n\n return out;\n}\n","function extractOutputs(fragmentSource: string, out: string[])\n{\n let match;\n const regex = /@out\\s+([^;]+);/g;\n\n while ((match = regex.exec(fragmentSource)) !== null)\n {\n out.push(match[1]);\n }\n}\n\nfunction extractVariableName(value: string)\n{\n const regex = /\\b(\\w+)\\s*:/g;\n\n const match = regex.exec(value);\n\n return match ? match[1] : '';\n}\n\nfunction stripVariable(value: string)\n{\n const regex = /@.*?\\s+/g;\n\n return value.replace(regex, '');\n}\n\n/**\n * @param fragments\n * @param template\n * @internal\n */\nexport function compileOutputs(fragments: any[], template: string)\n{\n // get all the inputs from the fragments..\n const results: string[] = [];\n\n extractOutputs(template, results);\n\n fragments.forEach((fragment) =>\n {\n if (fragment.header)\n {\n extractOutputs(fragment.header, results);\n }\n });\n\n let index = 0;\n\n // generate the output struct\n const mainStruct = results\n .sort()\n .map((inValue) =>\n {\n if (inValue.indexOf('builtin') > -1)\n {\n return inValue;\n }\n\n return `@location(${index++}) ${inValue}`;\n })\n .join(',\\n');\n\n // generate the variables we will set:\n const mainStart = results\n .sort()\n .map((inValue) => ` var ${stripVariable(inValue)};`)\n .join('\\n');\n\n // generate the return object\n const mainEnd = `return VSOutput(\n ${results\n .sort()\n .map((inValue) => ` ${extractVariableName(inValue)}`)\n .join(',\\n')});`;\n\n // Remove lines from original string\n let compiledCode = template.replace(/@out\\s+[^;]+;\\s*/g, '');\n\n compiledCode = compiledCode.replace('{{struct}}', `\\n${mainStruct}\\n`);\n compiledCode = compiledCode.replace('{{start}}', `\\n${mainStart}\\n`);\n compiledCode = compiledCode.replace('{{return}}', `\\n${mainEnd}\\n`);\n\n return compiledCode;\n}\n","/** @internal */\nexport const globalUniformsBit = {\n name: 'global-uniforms-bit',\n vertex: {\n header: /* wgsl */`\n struct GlobalUniforms {\n uProjectionMatrix:mat3x3<f32>,\n uWorldTransformMatrix:mat3x3<f32>,\n uWorldColorAlpha: vec4<f32>,\n uResolution: vec2<f32>,\n }\n\n @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;\n `\n }\n};\n\n/** @internal */\nexport const globalUniformsUBOBitGl = {\n name: 'global-uniforms-ubo-bit',\n vertex: {\n header: /* glsl */`\n uniform globalUniforms {\n mat3 uProjectionMatrix;\n mat3 uWorldTransformMatrix;\n vec4 uWorldColorAlpha;\n vec2 uResolution;\n };\n `\n }\n};\n\n/** @internal */\nexport const globalUniformsBitGl = {\n name: 'global-uniforms-bit',\n vertex: {\n header: /* glsl */`\n uniform mat3 uProjectionMatrix;\n uniform mat3 uWorldTransformMatrix;\n uniform vec4 uWorldColorAlpha;\n uniform vec2 uResolution;\n `\n }\n\n};\n","import type { HighShaderBit } from '../compiler/types';\n\nconst textureBatchBitGpuCache: Record<number, HighShaderBit> = {};\n\n/**\n *\n * @param maxTextures - the max textures the shader can use.\n * @returns a shader bit that will allow the shader to sample multiple textures AND round pixels.\n */\nfunction generateBindingSrc(maxTextures: number): string\n{\n const src = [];\n\n if (maxTextures === 1)\n {\n src.push('@group(1) @binding(0) var textureSource1: texture_2d<f32>;');\n src.push('@group(1) @binding(1) var textureSampler1: sampler;');\n }\n else\n {\n let bindingIndex = 0;\n\n for (let i = 0; i < maxTextures; i++)\n {\n src.push(`@group(1) @binding(${bindingIndex++}) var textureSource${i + 1}: texture_2d<f32>;`);\n src.push(`@group(1) @binding(${bindingIndex++}) var textureSampler${i + 1}: sampler;`);\n }\n }\n\n return src.join('\\n');\n}\n\nfunction generateSampleSrc(maxTextures: number): string\n{\n const src = [];\n\n if (maxTextures === 1)\n {\n src.push('outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);');\n }\n else\n {\n src.push('switch vTextureId {');\n\n for (let i = 0; i < maxTextures; i++)\n {\n if (i === maxTextures - 1)\n {\n src.push(` default:{`);\n }\n else\n {\n src.push(` case ${i}:{`);\n }\n src.push(` outColor = textureSampleGrad(textureSource${i + 1}, textureSampler${i + 1}, vUV, uvDx, uvDy);`);\n src.push(` break;}`);\n }\n\n src.push(`}`);\n }\n\n return src.join('\\n');\n}\n\n/**\n * @param maxTextures\n * @internal\n */\nexport function generateTextureBatchBit(maxTextures: number): HighShaderBit\n{\n if (!textureBatchBitGpuCache[maxTextures])\n {\n textureBatchBitGpuCache[maxTextures] = {\n name: 'texture-batch-bit',\n vertex: {\n header: `\n @in aTextureIdAndRound: vec2<u32>;\n @out @interpolate(flat) vTextureId : u32;\n `,\n main: `\n vTextureId = aTextureIdAndRound.y;\n `,\n end: `\n if(aTextureIdAndRound.x == 1)\n {\n vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n `\n },\n fragment: {\n header: `\n @in @interpolate(flat) vTextureId: u32;\n\n ${generateBindingSrc(maxTextures)}\n `,\n main: `\n var uvDx = dpdx(vUV);\n var uvDy = dpdy(vUV);\n\n ${generateSampleSrc(maxTextures)}\n `\n }\n };\n }\n\n return textureBatchBitGpuCache[maxTextures];\n}\n\nconst textureBatchBitGlCache: Record<number, HighShaderBit> = {};\n\n/**\n *\n * @param maxTextures - the max textures the shader can use.\n * @returns a shader bit that will allow the shader to sample multiple textures AND round pixels.\n */\nfunction generateSampleGlSrc(maxTextures: number): string\n{\n const src = [];\n\n for (let i = 0; i < maxTextures; i++)\n {\n if (i > 0)\n {\n src.push('else');\n }\n\n if (i < maxTextures - 1)\n {\n src.push(`if(vTextureId < ${i}.5)`);\n }\n\n src.push('{');\n src.push(`\\toutColor = texture(uTextures[${i}], vUV);`);\n src.push('}');\n }\n\n return src.join('\\n');\n}\n\n/**\n * @param maxTextures\n * @internal\n */\nexport function generateTextureBatchBitGl(maxTextures: number): HighShaderBit\n{\n if (!textureBatchBitGlCache[maxTextures])\n {\n textureBatchBitGlCache[maxTextures] = {\n name: 'texture-batch-bit',\n vertex: {\n header: `\n in vec2 aTextureIdAndRound;\n out float vTextureId;\n\n `,\n main: `\n vTextureId = aTextureIdAndRound.y;\n `,\n end: `\n if(aTextureIdAndRound.x == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n `\n },\n fragment: {\n header: `\n in float vTextureId;\n\n uniform sampler2D uTextures[${maxTextures}];\n\n `,\n main: `\n\n ${generateSampleGlSrc(maxTextures)}\n `\n }\n };\n }\n\n return textureBatchBitGlCache[maxTextures];\n}\n","const findHooksRx = /\\{\\{(.*?)\\}\\}/g;\n\n/**\n * takes a program string and returns an hash mapping the hooks to empty arrays\n * @param programSrc - the program containing hooks\n * @internal\n */\nexport function compileHooks(programSrc: string): Record<string, string[]>\n{\n const parts: Record<string, string[]> = {};\n\n const partMatches = programSrc\n .match(findHooksRx)\n ?.map((hook) => hook.replace(/[{()}]/g, '')) ?? [];\n\n partMatches.forEach((hook) =>\n {\n parts[hook] = [];\n });\n\n return parts;\n}\n","function extractInputs(fragmentSource: string, out: string[])\n{\n let match;\n const regex = /@in\\s+([^;]+);/g;\n\n while ((match = regex.exec(fragmentSource)) !== null)\n {\n out.push(match[1]);\n }\n}\n\n/**\n * @param fragments\n * @param template\n * @param sort\n * @internal\n */\nexport function compileInputs(fragments: any[], template: string, sort = false)\n{\n // get all the inputs from the fragments..\n const results: string[] = [];\n\n extractInputs(template, results);\n\n fragments.forEach((fragment) =>\n {\n if (fragment.header)\n {\n extractInputs(fragment.header, results);\n }\n });\n\n // build the input:\n const mainInput = results;\n\n if (sort)\n {\n mainInput.sort();\n }\n\n const finalString = mainInput\n .map((inValue, i) => ` @location(${i}) ${inValue},`)\n .join('\\n');\n\n // Remove lines from original string\n let cleanedString = template.replace(/@in\\s+[^;]+;\\s*/g, '');\n\n cleanedString = cleanedString.replace('{{in}}', `\\n${finalString}\\n`);\n\n return cleanedString;\n}\n","import { warn } from '../../../../utils/logging/warn';\n\n/**\n * takes the HighFragment source parts and adds them to the hook hash\n * @param srcParts - the hash of hook arrays\n * @param parts - the code to inject into the hooks\n * @param name - optional the name of the part to add\n * @internal\n */\nexport function addBits(srcParts: Record<string, string>, parts: Record<string, string[]>, name?: string)\n{\n if (srcParts)\n {\n for (const i in srcParts)\n {\n const id = i.toLocaleLowerCase();\n\n const part = parts[id];\n\n if (part)\n {\n let sanitisedPart = srcParts[i];\n\n if (i === 'header')\n {\n sanitisedPart = sanitisedPart\n .replace(/@in\\s+[^;]+;\\s*/g, '')\n .replace(/@out\\s+[^;]+;\\s*/g, '');\n }\n\n if (name)\n {\n part.push(`//----${name}----//`);\n }\n part.push(sanitisedPart);\n }\n\n else\n {\n // #if _DEBUG\n warn(`${i} placement hook does not exist in shader`);\n // #endif\n }\n }\n }\n}\n","import { addBits } from './utils/addBits';\nimport { compileHooks } from './utils/compileHooks';\nimport { compileInputs } from './utils/compileInputs';\nimport { compileOutputs } from './utils/compileOutputs';\nimport { injectBits } from './utils/injectBits';\n\nimport type { HighShaderBit, HighShaderSource } from './types';\n\n/**\n * A high template consists of vertex and fragment source\n * @internal\n */\nexport interface HighShaderTemplate\n{\n name?: string;\n fragment: string;\n vertex: string;\n}\n\n/** @internal */\nexport interface CompileHighShaderOptions\n{\n template: HighShaderTemplate;\n bits: HighShaderBit[];\n}\n\nconst cacheMap: {[key: string]: HighShaderSource} = Object.create(null);\nconst bitCacheMap: Map<HighShaderBit, number> = new Map();\n\nlet CACHE_UID = 0;\n\n/**\n * This function will take a HighShader template, some High fragments and then merge them in to a shader source.\n * @param options\n * @param options.template\n * @param options.bits\n * @internal\n */\nexport function compileHighShader({\n template,\n bits\n}: CompileHighShaderOptions): HighShaderSource\n{\n const cacheId = generateCacheId(template, bits);\n\n if (cacheMap[cacheId]) return cacheMap[cacheId];\n\n const { vertex, fragment } = compileInputsAndOutputs(template, bits);\n\n cacheMap[cacheId] = compileBits(vertex, fragment, bits);\n\n return cacheMap[cacheId];\n}\n\n/**\n * This function will take a HighShader template, some High fragments and then merge them in to a shader source.\n * It is specifically for WebGL and does not compile inputs and outputs.\n * @param options\n * @param options.template - The HighShader template containing vertex and fragment source.\n * @param options.bits - An array of HighShaderBit objects to be compiled into the shader.\n * @returns A HighShaderSource object containing the compiled vertex and fragment shaders.\n * @internal\n */\nexport function compileHighShaderGl({\n template,\n bits\n}: CompileHighShaderOptions): HighShaderSource\n{\n const cacheId = generateCacheId(template, bits);\n\n if (cacheMap[cacheId]) return cacheMap[cacheId];\n\n cacheMap[cacheId] = compileBits(template.vertex, template.fragment, bits);\n\n return cacheMap[cacheId];\n}\n\nfunction compileInputsAndOutputs(template: HighShaderTemplate, bits: HighShaderBit[])\n{\n const vertexFragments = bits.map((shaderBit) => shaderBit.vertex).filter((v) => !!v);\n const fragmentFragments = bits.map((shaderBit) => shaderBit.fragment).filter((v) => !!v);\n\n // WebGPU compile inputs and outputs..\n let compiledVertex = compileInputs(vertexFragments, template.vertex, true);\n\n compiledVertex = compileOutputs(vertexFragments, compiledVertex);\n\n const compiledFragment = compileInputs(fragmentFragments, template.fragment, true);\n\n return {\n vertex: compiledVertex,\n fragment: compiledFragment,\n };\n}\n\nfunction generateCacheId(template: HighShaderTemplate, bits: HighShaderBit[]): string\n{\n return bits\n .map((highFragment) =>\n {\n if (!bitCacheMap.has(highFragment))\n {\n bitCacheMap.set(highFragment, CACHE_UID++);\n }\n\n return bitCacheMap.get(highFragment);\n })\n .sort((a, b) => a - b)\n .join('-') + template.vertex + template.fragment;\n}\n\nfunction compileBits(vertex: string, fragment: string, bits: HighShaderBit[])\n{\n const vertexParts = compileHooks(vertex);\n const fragmentParts = compileHooks(fragment);\n\n bits.forEach((shaderBit) =>\n {\n addBits(shaderBit.vertex, vertexParts, shaderBit.name);\n addBits(shaderBit.fragment, fragmentParts, shaderBit.name);\n });\n\n return {\n vertex: injectBits(vertex, vertexParts),\n fragment: injectBits(fragment, fragmentParts),\n };\n}\n","import { GlProgram } from '../renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../renderers/gpu/shader/GpuProgram';\nimport { compileHighShader, compileHighShaderGl } from './compiler/compileHighShader';\nimport { fragmentGlTemplate, fragmentGPUTemplate, vertexGlTemplate, vertexGPUTemplate } from './defaultProgramTemplate';\nimport { globalUniformsBit, globalUniformsBitGl } from './shader-bits/globalUniformsBit';\n\nimport type { HighShaderBit } from './compiler/types';\n\n/**\n * @param root0\n * @param root0.bits\n * @param root0.name\n * @internal\n */\nexport function compileHighShaderGpuProgram({ bits, name }: {bits: HighShaderBit[], name: string}): GpuProgram\n{\n const source = compileHighShader({\n template: {\n fragment: fragmentGPUTemplate,\n vertex: vertexGPUTemplate,\n },\n bits: [\n globalUniformsBit,\n ...bits,\n ]\n });\n\n return GpuProgram.from({\n name,\n vertex: {\n source: source.vertex,\n entryPoint: 'main',\n },\n fragment: {\n source: source.fragment,\n entryPoint: 'main',\n },\n });\n}\n\n/**\n * @param root0\n * @param root0.bits\n * @param root0.name\n * @internal\n */\nexport function compileHighShaderGlProgram({ bits, name }: {bits: HighShaderBit[], name: string}): GlProgram\n{\n return new GlProgram({\n name,\n ...compileHighShaderGl({\n template: {\n vertex: vertexGlTemplate,\n fragment: fragmentGlTemplate,\n },\n bits: [\n globalUniformsBitGl,\n ...bits,\n ]\n })\n });\n}\n","/** @ignore */\nconst vertexGPUTemplate = /* wgsl */`\n @in aPosition: vec2<f32>;\n @in aUV: vec2<f32>;\n\n @out @builtin(position) vPosition: vec4<f32>;\n @out vUV : vec2<f32>;\n @out vColor : vec4<f32>;\n\n {{header}}\n\n struct VSOutput {\n {{struct}}\n };\n\n @vertex\n fn main( {{in}} ) -> VSOutput {\n\n var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;\n var modelMatrix = mat3x3<f32>(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n var position = aPosition;\n var uv = aUV;\n\n {{start}}\n\n vColor = vec4<f32>(1., 1., 1., 1.);\n\n {{main}}\n\n vUV = uv;\n\n var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);\n\n vColor *= globalUniforms.uWorldColorAlpha;\n\n {{end}}\n\n {{return}}\n };\n`;\n\n/** @ignore */\nconst fragmentGPUTemplate = /* wgsl */`\n @in vUV : vec2<f32>;\n @in vColor : vec4<f32>;\n\n {{header}}\n\n @fragment\n fn main(\n {{in}}\n ) -> @location(0) vec4<f32> {\n\n {{start}}\n\n var outColor:vec4<f32>;\n\n {{main}}\n\n var finalColor:vec4<f32> = outColor * vColor;\n\n {{end}}\n\n return finalColor;\n };\n`;\n\n/** @ignore */\nconst vertexGlTemplate = /* glsl */`\n in vec2 aPosition;\n in vec2 aUV;\n\n out vec4 vColor;\n out vec2 vUV;\n\n {{header}}\n\n void main(void){\n\n mat3 worldTransformMatrix = uWorldTransformMatrix;\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n vec2 position = aPosition;\n vec2 uv = aUV;\n\n {{start}}\n\n vColor = vec4(1.);\n\n {{main}}\n\n vUV = uv;\n\n mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n\n vColor *= uWorldColorAlpha;\n\n {{end}}\n }\n`;\n\n/** @ignore */\nconst fragmentGlTemplate = /* glsl */`\n\n in vec4 vColor;\n in vec2 vUV;\n\n out vec4 finalColor;\n\n {{header}}\n\n void main(void) {\n\n {{start}}\n\n vec4 outColor;\n\n {{main}}\n\n finalColor = outColor * vColor;\n\n {{end}}\n }\n`;\n\nexport {\n fragmentGlTemplate,\n fragmentGPUTemplate,\n vertexGlTemplate,\n vertexGPUTemplate\n};\n","import { UniformGroup } from '../../shared/shader/UniformGroup';\n\nconst batchSamplersUniformGroupHash: Record<number, UniformGroup> = {};\n\n/**\n * Automatically generates a uniform group that holds the texture samplers for a shader.\n * This is used mainly by the shaders that batch textures!\n * @param maxTextures - the number of textures that this uniform group will contain.\n * @returns a uniform group that holds the texture samplers.\n * @internal\n */\nexport function getBatchSamplersUniformGroup(maxTextures: number)\n{\n let batchSamplersUniformGroup = batchSamplersUniformGroupHash[maxTextures];\n\n if (batchSamplersUniformGroup) return batchSamplersUniformGroup;\n\n const sampleValues = new Int32Array(maxTextures);\n\n for (let i = 0; i < maxTextures; i++)\n {\n sampleValues[i] = i;\n }\n\n batchSamplersUniformGroup = batchSamplersUniformGroupHash[maxTextures] = new UniformGroup({\n uTextures: { value: sampleValues, type: `i32`, size: maxTextures }\n }, { isStatic: true });\n\n return batchSamplersUniformGroup;\n}\n","/**\n * SystemRunner is used internally by the renderers as an efficient way for systems to\n * be notified about what the renderer is up to during the rendering phase.\n *\n * ```ts\n * import { SystemRunner } from 'pixi.js';\n *\n * const myObject = {\n * loaded: new SystemRunner('loaded')\n * }\n *\n * const listener = {\n * loaded: function(){\n * // thin\n * }\n * }\n *\n * myObject.loaded.add(listener);\n *\n * myObject.loaded.emit();\n * ```\n *\n * Or for handling calling the same function on many items\n * ```ts\n * import { SystemRunner } from 'pixi.js';\n *\n * const myGame = {\n * update: new SystemRunner('update')\n * }\n *\n * const gameObject = {\n * update: function(time){\n * // update my gamey state\n * }\n * }\n *\n * myGame.update.add(gameObject);\n *\n * myGame.update.emit(time);\n * ```\n * @category rendering\n * @internal\n */\nexport class SystemRunner\n{\n public items: any[];\n private _name: string;\n\n /**\n * @param name - The function name that will be executed on the listeners added to this Runner.\n */\n constructor(name: string)\n {\n this.items = [];\n this._name = name;\n }\n\n /* jsdoc/check-param-names */\n /**\n * Dispatch/Broadcast Runner to all listeners added to the queue.\n * @param {...any} params - (optional) parameters to pass to each listener\n */\n /* jsdoc/check-param-names */\n public emit(a0?: unknown, a1?: unknown, a2?: unknown, a3?: unknown,\n a4?: unknown, a5?: unknown, a6?: unknown, a7?: unknown): this\n {\n const { name, items } = this;\n\n for (let i = 0, len = items.length; i < len; i++)\n {\n items[i][name](a0, a1, a2, a3, a4, a5, a6, a7);\n }\n\n return this;\n }\n\n /**\n * Add a listener to the Runner\n *\n * Runners do not need to have scope or functions passed to them.\n * All that is required is to pass the listening object and ensure that it has contains a function that has the same name\n * as the name provided to the Runner when it was created.\n *\n * Eg A listener passed to this Runner will require a 'complete' function.\n *\n * ```ts\n * import { Runner } from 'pixi.js';\n *\n * const complete = new Runner('complete');\n * ```\n *\n * The scope used will be the object itself.\n * @param {any} item - The object that will be listening.\n */\n public add(item: unknown): this\n {\n if ((item as any)[this._name])\n {\n this.remove(item);\n this.items.push(item);\n }\n\n return this;\n }\n\n /**\n * Remove a single listener from the dispatch queue.\n * @param {any} item - The listener that you would like to remove.\n */\n public remove(item: unknown): this\n {\n const index = this.items.indexOf(item);\n\n if (index !== -1)\n {\n this.items.splice(index, 1);\n }\n\n return this;\n }\n\n /**\n * Check to see if the listener is already in the Runner\n * @param {any} item - The listener that you would like to check.\n */\n public contains(item: unknown): boolean\n {\n return this.items.indexOf(item) !== -1;\n }\n\n /** Remove all listeners from the Runner */\n public removeAll(): this\n {\n this.items.length = 0;\n\n return this;\n }\n\n /** Remove all references, don't use after this. */\n public destroy(): void\n {\n this.removeAll();\n this.items = null;\n this._name = null;\n }\n\n /**\n * `true` if there are no this Runner contains no listeners\n * @readonly\n */\n public get empty(): boolean\n {\n return this.items.length === 0;\n }\n\n /**\n * The name of the runner.\n * @readonly\n */\n public get name(): string\n {\n return this._name;\n }\n}\n","/**\n * Constants used by the renderer for clearing the screen or render textures.\n * @category rendering\n * @advanced\n */\nexport enum CLEAR\n{\n /** No clear operation. */\n NONE = 0,\n /** Clear the color buffer. */\n COLOR = 16384,\n /** Clear the stencil buffer. */\n STENCIL = 1024,\n /** Clear the depth buffer. */\n DEPTH = 256,\n\n /** Clear the color and depth buffers. */\n COLOR_DEPTH = COLOR | DEPTH,\n /** Clear the color and stencil buffers. */\n COLOR_STENCIL = COLOR | STENCIL,\n /** Clear the depth and stencil buffers. */\n DEPTH_STENCIL = DEPTH | STENCIL,\n /** Clear the color, depth, and stencil buffers. */\n ALL = COLOR | DEPTH | STENCIL,\n\n}\n\n/**\n * Used for clearing render textures. true is the same as `ALL` false is the same as `NONE`\n * @category rendering\n * @advanced\n */\nexport type CLEAR_OR_BOOL = CLEAR | boolean;\n","// Cache the result to prevent running this over and over\nlet unsafeEval: boolean;\n\n/**\n * Not all platforms allow to generate function code (e.g., `new Function`).\n * this provides the platform-level detection.\n * @private\n * @returns {boolean} `true` if `new Function` is supported.\n */\nexport function unsafeEvalSupported(): boolean\n{\n if (typeof unsafeEval === 'boolean')\n {\n return unsafeEval;\n }\n\n try\n {\n /* eslint-disable no-new-func */\n const func = new Function('param1', 'param2', 'param3', 'return param1[param2] === param3;');\n /* eslint-enable no-new-func */\n\n unsafeEval = func({ a: 'b' }, 'a', 'b') === true;\n }\n catch (_e)\n {\n unsafeEval = false;\n }\n\n return unsafeEval;\n}\n","import { extensions, ExtensionType } from '../extensions/Extensions';\n\nconst environments: { name: string; value: { test: () => boolean; load: () => Promise<boolean> } }[] = [];\n\nextensions.handleByNamedList(ExtensionType.Environment, environments);\n\n/**\n * Automatically detects the environment and loads the appropriate extensions.\n * @param skip - whether to skip loading the default extensions\n * @category environment\n * @advanced\n */\nexport async function loadEnvironmentExtensions(skip: boolean): Promise<void>\n{\n if (skip) return;\n\n for (let i = 0; i < environments.length; i++)\n {\n const env = environments[i];\n\n if (env.value.test())\n {\n await env.value.load();\n\n return;\n }\n }\n}\n\n/**\n * @param add - whether to add the default imports to the bundle\n * @deprecated since 8.1.6. Use `loadEnvironmentExtensions` instead\n * @category environment\n * @advanced\n */\nexport async function autoDetectEnvironment(add: boolean): Promise<void>\n{\n return loadEnvironmentExtensions(!add);\n}\n","import { Color } from '../../../../color/Color';\nimport { loadEnvironmentExtensions } from '../../../../environment/autoDetectEnvironment';\nimport { Container } from '../../../../scene/container/Container';\nimport { unsafeEvalSupported } from '../../../../utils/browser/unsafeEvalSupported';\nimport { uid } from '../../../../utils/data/uid';\nimport { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\nimport { GlobalResourceRegistry } from '../../../../utils/pool/GlobalResourceRegistry';\nimport { EventEmitter } from '../../../../utils/utils';\nimport { CLEAR } from '../../gl/const';\nimport { SystemRunner } from './SystemRunner';\n\nimport type { ColorSource, RgbaArray } from '../../../../color/Color';\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { Matrix } from '../../../../maths/matrix/Matrix';\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport type { TypeOrBool } from '../../../../scene/container/destroyTypes';\nimport type { CLEAR_OR_BOOL } from '../../gl/const';\nimport type { Renderer } from '../../types';\nimport type { BackgroundSystem } from '../background/BackgroundSystem';\nimport type { GenerateTextureOptions, GenerateTextureSystem } from '../extract/GenerateTextureSystem';\nimport type { PipeConstructor } from '../instructions/RenderPipe';\nimport type { RenderSurface } from '../renderTarget/RenderTargetSystem';\nimport type { Texture } from '../texture/Texture';\nimport type { ViewSystem, ViewSystemDestroyOptions } from '../view/ViewSystem';\nimport type { SharedRendererOptions } from './SharedSystems';\nimport type { System, SystemConstructor } from './System';\n\n/**\n * An async hook a renderer awaits while it initialises, after the environment extensions load and\n * before it creates its systems and pipes. Registered as a `WebGLLoader`, `WebGPULoader` or\n * `CanvasLoader` extension, it lets a package `import()` backend-specific systems and pipes and\n * register them in time for the renderer to pick them up. Loaders for a backend run concurrently;\n * the systems and pipes they register are ordered by their own `priority`, not by which loader finished first.\n * @category rendering\n * @advanced\n */\nexport interface RendererLoader\n{\n /** Called once per renderer init. The renderer waits for the returned promise before adding its systems. */\n load(): Promise<unknown>;\n}\n\n/**\n * The configuration for the renderer.\n * This is used to define the systems and render pipes that will be used by the renderer.\n * @category rendering\n * @advanced\n */\nexport interface RendererConfig\n{\n type: number;\n name: string;\n runners?: string[];\n systems: {name: string, value: SystemConstructor}[];\n renderPipes: {name: string, value: PipeConstructor}[];\n renderPipeAdaptors: {name: string, value: any}[];\n /** Async hooks awaited during `init`, after the environment extensions load and before systems are added. */\n loaders?: {name: string, value: RendererLoader}[];\n}\n\n/**\n * The options for rendering a view.\n * @category rendering\n * @standard\n */\nexport interface RenderOptions extends ClearOptions\n{\n /** The container to render. */\n container: Container;\n /** the transform to apply to the container. */\n transform?: Matrix;\n /**\n * Opt-in toggle that inverts the render's Y orientation. Defaults to `false` — a no-op, so existing\n * renders are unchanged on both WebGL and WebGPU.\n *\n * Set `flipY: true` to invert the automatic orientation: when rendering to a texture this stores the\n * capture in screen orientation (the un-flipped result 3D geometry UVs expect), removing the need to\n * flip at sample time on every consuming material.\n *\n * The projection flip and the winding/cull inversion flip together, so back-face culling of 3D content\n * rendered into the texture stays correct.\n * @default false\n */\n flipY?: boolean;\n}\n\n/**\n * The options for clearing the render target.\n * @category rendering\n * @advanced\n */\nexport interface ClearOptions\n{\n /**\n * The render target to render. if this target is a canvas and you are using the WebGL renderer,\n * please ensure you have set `multiView` to `true` on renderer.\n */\n target?: RenderSurface;\n /** The color to clear with. */\n clearColor?: ColorSource;\n /** The clear mode to use. */\n clear?: CLEAR_OR_BOOL\n\n /**\n * Mip level to render/clear to when the target is a texture-backed render surface.\n * @default 0\n *\n * Note: When rendering to a {@link Texture} target, Pixi renders into the underlying {@link TextureSource}\n * (via an internal {@link RenderTarget}). The texture's `frame` is interpreted in mip 0 space and is scaled/clamped\n * to the requested mip level.\n * @advanced\n */\n mipLevel?: number;\n\n /**\n * Layer to render/clear to when the target has layers: an array layer of a 2D array (`arrayLayerCount > 1`),\n * a face of a cube map, or a depth slice of a 3D texture (`depth`).\n *\n * This maps to WebGPU's `GPUTextureViewDescriptor.baseArrayLayer` for arrays and cube faces, and to\n * `GPURenderPassColorAttachment.depthSlice` for 3D textures.\n * @default 0\n * @advanced\n */\n layer?: number;\n}\n\n/**\n * Options for destroying the renderer.\n * This can be a boolean or an object.\n * @category rendering\n * @standard\n */\nexport type RendererDestroyOptions = TypeOrBool<ViewSystemDestroyOptions & {\n /** Whether to clean up global resource pools/caches */\n releaseGlobalResources?: boolean;\n}>;\n\nconst defaultRunners = [\n 'init',\n 'destroy',\n 'contextChange',\n 'resolutionChange',\n 'resetState',\n 'renderEnd',\n 'renderStart',\n 'render',\n 'update',\n 'postrender',\n 'prerender'\n] as const;\n\ntype DefaultRunners = typeof defaultRunners[number];\ntype Runners = {[key in DefaultRunners]: SystemRunner} & {\n [K: ({} & string) | ({} & symbol)]: SystemRunner;\n};\n\n/* eslint-disable max-len */\n/**\n * The base class for a PixiJS Renderer. It contains the shared logic for all renderers.\n *\n * You should not use this class directly, but instead use {@link WebGLRenderer}\n * or {@link WebGPURenderer}.\n * Alternatively, you can also use {@link autoDetectRenderer} if you want us to\n * determine the best renderer for you.\n *\n * The renderer is composed of systems that manage specific tasks. The following systems are added by default\n * whenever you create a renderer:\n *\n *\n * | Generic Systems | Systems that manage functionality that all renderer types share |\n * | ------------------------------------ | ----------------------------------------------------------------------------- |\n * | {@link ViewSystem} | This manages the main view of the renderer usually a Canvas |\n * | {@link BackgroundSystem} | This manages the main views background color and alpha |\n * | {@link EventSystem} | This manages UI events. |\n * | {@link AccessibilitySystem} | This manages accessibility features. Requires `import 'pixi.js/accessibility'`|\n *\n * | Core Systems | Provide an optimised, easy to use API to work with WebGL/WebGPU |\n * | ------------------------------------ | ----------------------------------------------------------------------------- |\n * | {@link GlobalUniformSystem} | This manages shaders, programs that run on the GPU to calculate 'em pixels. |\n * | {@link TextureGCSystem} | This will automatically remove textures from the GPU if they are not used. |\n *\n * | PixiJS High-Level Systems | Set of specific systems designed to work with PixiJS objects |\n * | ------------------------------------ | ----------------------------------------------------------------------------- |\n * | {@link HelloSystem} | Says hello, buy printing out the pixi version into the console log (along with the renderer type) |\n * | {@link GenerateTextureSystem} | This adds the ability to generate textures from any Container |\n * | {@link FilterSystem} | This manages the filtering pipeline for post-processing effects. |\n * | {@link PrepareSystem} | This manages uploading assets to the GPU. Requires `import 'pixi.js/prepare'`|\n * | {@link ExtractSystem} | This extracts image data from display objects. |\n *\n * The breadth of the API surface provided by the renderer is contained within these systems.\n * @abstract\n * @category rendering\n * @advanced\n * @property {HelloSystem} hello - HelloSystem instance.\n * @property {TextureGCSystem} textureGC - TextureGCSystem instance.\n * @property {FilterSystem} filter - FilterSystem instance.\n * @property {GlobalUniformSystem} globalUniforms - GlobalUniformSystem instance.\n * @property {TextureSystem} texture - TextureSystem instance.\n * @property {EventSystem} events - EventSystem instance.\n * @property {ExtractSystem} extract - ExtractSystem instance. Requires `import 'pixi.js/extract'`.\n * @property {PrepareSystem} prepare - PrepareSystem instance. Requires `import 'pixi.js/prepare'`.\n * @property {AccessibilitySystem} accessibility - AccessibilitySystem instance. Requires `import 'pixi.js/accessibility'`.\n */\nexport class AbstractRenderer<\n PIPES, OPTIONS extends SharedRendererOptions, CANVAS extends ICanvas = HTMLCanvasElement\n> extends EventEmitter<{resize: [screenWidth: number, screenHeight: number, resolution: number]}>\n{\n /** The default options for the renderer. */\n public static defaultOptions = {\n /**\n * Default resolution / device pixel ratio of the renderer.\n * @default 1\n */\n resolution: 1,\n /**\n * Should the `failIfMajorPerformanceCaveat` flag be enabled as a context option used in the `isWebGLSupported`\n * function. If set to true, a WebGL renderer can fail to be created if the browser thinks there could be\n * performance issues when using WebGL.\n *\n * In PixiJS v6 this has changed from true to false by default, to allow WebGL to work in as many\n * scenarios as possible. However, some users may have a poor experience, for example, if a user has a gpu or\n * driver version blacklisted by the\n * browser.\n *\n * If your application requires high performance rendering, you may wish to set this to false.\n * We recommend one of two options if you decide to set this flag to false:\n *\n * 1: Use the Canvas renderer as a fallback in case high performance WebGL is\n * not supported.\n *\n * 2: Call `isWebGLSupported` (which if found in the utils package) in your code before attempting to create a\n * PixiJS renderer, and show an error message to the user if the function returns false, explaining that their\n * device & browser combination does not support high performance WebGL.\n * This is a much better strategy than trying to create a PixiJS renderer and finding it then fails.\n * @default false\n */\n failIfMajorPerformanceCaveat: false,\n /**\n * Should round pixels be forced when rendering?\n * @default false\n */\n roundPixels: false\n };\n\n /** @internal */\n public readonly type: number;\n /** The name of the renderer. */\n public readonly name: string;\n\n /** The current tick of the renderer. */\n public tick: number = 0;\n\n /** @internal */\n public readonly uid = uid('renderer');\n\n /** @internal */\n public _roundPixels: 0 | 1;\n\n /** @internal */\n public readonly runners: Runners = Object.create(null) as Runners;\n /** @internal */\n public readonly renderPipes = Object.create(null) as PIPES;\n /** The view system manages the main canvas that is attached to the DOM */\n public view!: ViewSystem;\n /** The background system manages the background color and alpha of the main view. */\n public background: BackgroundSystem;\n /** System that manages the generation of textures from the renderer */\n public textureGenerator: GenerateTextureSystem;\n\n protected _initOptions: OPTIONS = {} as OPTIONS;\n protected config: RendererConfig;\n\n private _systemsHash: Record<string, System> = Object.create(null);\n private _lastObjectRendered: Container;\n\n /**\n * Set up a system with a collection of SystemClasses and runners.\n * Systems are attached dynamically to this class when added.\n * @param config - the config for the system manager\n */\n constructor(config: RendererConfig)\n {\n super();\n this.type = config.type;\n this.name = config.name;\n this.config = config;\n\n const combinedRunners = [...defaultRunners, ...(this.config.runners ?? [])];\n\n this._addRunners(...combinedRunners);\n // Validation check that this environment support `new Function`\n this._unsafeEvalCheck();\n }\n\n /**\n * Initialize the renderer.\n * @param options - The options to use to create the renderer.\n */\n public async init(options: Partial<OPTIONS> = {})\n {\n const skip = options.skipExtensionImports === true ? true : options.manageImports === false;\n\n await loadEnvironmentExtensions(skip);\n\n if (!skip && this.config.loaders)\n {\n await Promise.all(this.config.loaders.map((loader) => loader.value.load()));\n }\n\n this._addSystems(this.config.systems);\n this._addPipes(this.config.renderPipes, this.config.renderPipeAdaptors);\n\n // loop through all systems...\n for (const systemName in this._systemsHash)\n {\n const system = this._systemsHash[systemName];\n\n const defaultSystemOptions = (system.constructor as any).defaultOptions;\n\n options = { ...defaultSystemOptions, ...options };\n }\n\n options = { ...AbstractRenderer.defaultOptions, ...options };\n this._roundPixels = options.roundPixels ? 1 : 0;\n\n // await emits..\n for (let i = 0; i < this.runners.init.items.length; i++)\n {\n await this.runners.init.items[i].init(options);\n }\n\n // store options\n this._initOptions = options as OPTIONS;\n }\n\n /**\n * Renders the object to its view.\n * @param options - The options to render with.\n * @param options.container - The container to render.\n * @param [options.target] - The target to render to.\n */\n public render(options: RenderOptions | Container): void;\n /** @deprecated since 8.0.0 */\n public render(container: Container, options: {renderTexture: any}): void;\n public render(args: RenderOptions | Container, deprecated?: {renderTexture: any}): void\n {\n this.tick++;\n\n let options = args;\n\n if (options instanceof Container)\n {\n options = { container: options };\n\n if (deprecated)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'passing a second argument is deprecated, please use render options instead');\n // #endif\n\n options.target = deprecated.renderTexture;\n }\n }\n\n options.target ||= this.view.renderTarget;\n\n // TODO: we should eventually fix events so that it can handle multiple canvas elements\n if (options.target === this.view.renderTarget)\n {\n // TODO get rid of this\n this._lastObjectRendered = options.container;\n\n options.clearColor ??= this.background.colorRgba;\n options.clear ??= this.background.clearBeforeRender;\n }\n\n if (options.clearColor)\n {\n const isRGBAArray = Array.isArray(options.clearColor) && options.clearColor.length === 4;\n\n options.clearColor = isRGBAArray ? options.clearColor : Color.shared.setValue(options.clearColor).toArray();\n }\n\n if (!options.transform)\n {\n options.container.updateLocalTransform();\n options.transform = options.container.localTransform;\n }\n\n // Check if the container is visible before proceeding with rendering\n if (!options.container.visible)\n {\n return;\n }\n\n // lets ensure this object is a render group so we can render it!\n // the renderer only likes to render - render groups.\n options.container.enableRenderGroup();\n\n this.runners.prerender.emit(options);\n this.runners.renderStart.emit(options);\n this.runners.render.emit(options);\n this.runners.renderEnd.emit(options);\n this.runners.postrender.emit(options);\n }\n\n /**\n * Resizes the WebGL view to the specified width and height.\n * @param desiredScreenWidth - The desired width of the screen.\n * @param desiredScreenHeight - The desired height of the screen.\n * @param resolution - The resolution / device pixel ratio of the renderer.\n */\n public resize(desiredScreenWidth: number, desiredScreenHeight: number, resolution?: number): void\n {\n const previousResolution = this.view.resolution;\n\n this.view.resize(desiredScreenWidth, desiredScreenHeight, resolution);\n this.emit('resize', this.view.screen.width, this.view.screen.height, this.view.resolution);\n if (resolution !== undefined && resolution !== previousResolution)\n {\n this.runners.resolutionChange.emit(resolution);\n }\n }\n\n /**\n * Clears the render target.\n * @param options - The options to use when clearing the render target.\n * @param options.target - The render target to clear.\n * @param options.clearColor - The color to clear with.\n * @param options.clear - The clear mode to use.\n * @advanced\n */\n public clear(options: ClearOptions = {}): void\n {\n // override!\n const renderer = this as unknown as Renderer;\n\n options.target ||= renderer.renderTarget.renderTarget;\n options.clearColor ||= this.background.colorRgba;\n options.clear ??= CLEAR.ALL;\n\n const { clear, clearColor, target, mipLevel, layer } = options;\n\n Color.shared.setValue(clearColor ?? this.background.colorRgba);\n\n renderer.renderTarget.clear(target, clear, Color.shared.toArray() as RgbaArray, mipLevel ?? 0, layer ?? 0);\n }\n\n /** The resolution / device pixel ratio of the renderer. */\n get resolution(): number\n {\n return this.view.resolution;\n }\n\n set resolution(value: number)\n {\n this.view.resolution = value;\n this.runners.resolutionChange.emit(value);\n }\n\n /**\n * Same as view.width, actual number of pixels in the canvas by horizontal.\n * @type {number}\n * @readonly\n * @default 800\n */\n get width(): number\n {\n return this.view.texture.frame.width;\n }\n\n /**\n * Same as view.height, actual number of pixels in the canvas by vertical.\n * @default 600\n */\n get height(): number\n {\n return this.view.texture.frame.height;\n }\n\n // NOTE: this was `view` in v7\n /**\n * The canvas element that everything is drawn to.\n * @type {environment.ICanvas}\n */\n get canvas(): CANVAS\n {\n return this.view.canvas as CANVAS;\n }\n\n /**\n * the last object rendered by the renderer. Useful for other plugins like interaction managers\n * @readonly\n */\n get lastObjectRendered(): Container\n {\n return this._lastObjectRendered;\n }\n\n /**\n * Flag if we are rendering to the screen vs renderTexture\n * @readonly\n * @default true\n */\n get renderingToScreen(): boolean\n {\n const renderer = this as unknown as Renderer;\n\n return renderer.renderTarget.renderingToScreen;\n }\n\n /**\n * Measurements of the screen. (0, 0, screenWidth, screenHeight).\n *\n * Its safe to use as filterArea or hitArea for the whole stage.\n */\n get screen(): Rectangle\n {\n return this.view.screen;\n }\n\n /**\n * Create a bunch of runners based of a collection of ids\n * @param runnerIds - the runner ids to add\n */\n private _addRunners(...runnerIds: string[]): void\n {\n runnerIds.forEach((runnerId) =>\n {\n this.runners[runnerId] = new SystemRunner(runnerId);\n });\n }\n\n private _addSystems(systems: RendererConfig['systems']): void\n {\n let i: keyof typeof systems;\n\n for (i in systems)\n {\n const val = systems[i];\n\n this._addSystem(val.value, val.name);\n }\n }\n\n /**\n * Add a new system to the renderer.\n * @param ClassRef - Class reference\n * @param name - Property name for system, if not specified\n * will use a static `name` property on the class itself. This\n * name will be assigned as s property on the Renderer so make\n * sure it doesn't collide with properties on Renderer.\n * @returns Return instance of renderer\n */\n private _addSystem(ClassRef: SystemConstructor, name: string): this\n {\n const system = new ClassRef(this as unknown as Renderer);\n\n if ((this as any)[name])\n {\n throw new Error(`Whoops! The name \"${name}\" is already in use`);\n }\n\n (this as any)[name] = system;\n\n this._systemsHash[name] = system;\n\n for (const i in this.runners)\n {\n this.runners[i].add(system);\n }\n\n return this;\n }\n\n private _addPipes(pipes: RendererConfig['renderPipes'], pipeAdaptors: RendererConfig['renderPipeAdaptors']): void\n {\n const adaptors = pipeAdaptors.reduce((acc, adaptor) =>\n {\n acc[adaptor.name] = adaptor.value;\n\n return acc;\n }, {} as Record<string, any>);\n\n pipes.forEach((pipe) =>\n {\n const PipeClass = pipe.value;\n const name = pipe.name;\n\n const Adaptor = adaptors[name];\n\n // sorry typescript..\n (this.renderPipes as any)[name] = new PipeClass(\n this as unknown as Renderer,\n Adaptor ? new Adaptor() : null\n );\n\n this.runners.destroy.add((this.renderPipes as any)[name]);\n });\n }\n\n public destroy(options: RendererDestroyOptions = false): void\n {\n this.runners.destroy.items.reverse();\n this.runners.destroy.emit(options);\n\n if (options === true || (typeof options === 'object' && options.releaseGlobalResources))\n {\n GlobalResourceRegistry.release();\n }\n\n // destroy all runners\n Object.values(this.runners).forEach((runner) =>\n {\n runner.destroy();\n });\n\n this._systemsHash = null;\n\n // destroy all pipes\n (this.renderPipes as null) = null;\n\n this.removeAllListeners();\n }\n\n /**\n * Generate a texture from a container.\n * @param options - options or container target to use when generating the texture\n * @returns a texture\n */\n public generateTexture(options: GenerateTextureOptions | Container): Texture\n {\n return this.textureGenerator.generateTexture(options);\n }\n\n /**\n * Whether the renderer will round coordinates to whole pixels when rendering.\n * Can be overridden on a per scene item basis.\n */\n get roundPixels(): boolean\n {\n return !!this._roundPixels;\n }\n\n /**\n * Overridable function by `pixi.js/unsafe-eval` to silence\n * throwing an error if platform doesn't support unsafe-evals.\n * @private\n * @ignore\n */\n public _unsafeEvalCheck(): void\n {\n if (!unsafeEvalSupported())\n {\n throw new Error('Current environment does not allow unsafe-eval, '\n + 'please use pixi.js/unsafe-eval module to enable support.');\n }\n }\n /**\n * Resets the rendering state of the renderer.\n * This is useful when you want to use the WebGL context directly and need to ensure PixiJS's internal state\n * stays synchronized. When modifying the WebGL context state externally, calling this method before the next Pixi\n * render will reset all internal caches and ensure it executes correctly.\n *\n * This is particularly useful when combining PixiJS with other rendering engines like Three.js:\n * ```js\n * // Reset Three.js state\n * threeRenderer.resetState();\n *\n * // Render a Three.js scene\n * threeRenderer.render(threeScene, threeCamera);\n *\n * // Reset PixiJS state since Three.js modified the WebGL context\n * pixiRenderer.resetState();\n *\n * // Now render Pixi content\n * pixiRenderer.render(pixiScene);\n * ```\n * @advanced\n */\n public resetState(): void\n {\n this.runners.resetState.emit();\n }\n}\n","/**\n * @param rgb\n * @param alpha\n * @param out\n * @param offset\n * @internal\n */\nexport function colorToUniform(rgb: number, alpha: number, out: Float32Array, offset: number)\n{\n // TODO replace with Color..\n out[offset++] = ((rgb >> 16) & 0xFF) / 255;\n out[offset++] = ((rgb >> 8) & 0xFF) / 255;\n out[offset++] = (rgb & 0xFF) / 255;\n out[offset++] = alpha;\n}\n\n/**\n * @param abgr\n * @param out\n * @param offset\n * @internal\n */\nexport function color32BitToUniform(abgr: number, out: Float32Array, offset: number)\n{\n const alpha = ((abgr >> 24) & 0xFF) / 255;\n\n out[offset++] = ((abgr & 0xFF) / 255) * alpha;\n out[offset++] = (((abgr >> 8) & 0xFF) / 255) * alpha;\n out[offset++] = (((abgr >> 16) & 0xFF) / 255) * alpha;\n out[offset++] = alpha;\n}\n","import { type GPUData } from '../view/ViewContainer';\n\nimport type { Matrix } from '../../maths/matrix/Matrix';\nimport type { Batch, Batcher } from '../../rendering/batcher/shared/Batcher';\nimport type { DefaultBatchableQuadElement } from '../../rendering/batcher/shared/DefaultBatcher';\nimport type { Topology } from '../../rendering/renderers/shared/geometry/const';\nimport type { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport type { BoundsData } from '../container/bounds/Bounds';\nimport type { Container } from '../container/Container';\n\n/**\n * A batchable sprite object.\n * @internal\n */\nexport class BatchableSprite implements DefaultBatchableQuadElement, GPUData\n{\n public batcherName = 'default';\n public topology: Topology = 'triangle-list';\n\n // batch specific..\n public readonly attributeSize = 4;\n public readonly indexSize = 6;\n public readonly packAsQuad = true;\n\n public transform: Matrix;\n\n public renderable: Container;\n public texture: Texture;\n public bounds: BoundsData;\n\n public roundPixels: 0 | 1 = 0;\n\n public _indexStart: number;\n public _textureId: number;\n public _attributeStart = 0; // location in the buffer\n public _batcher: Batcher = null;\n public _batch: Batch = null;\n\n get blendMode() { return this.renderable.groupBlendMode; }\n get color() { return this.renderable.groupColorAlpha; }\n\n public reset()\n {\n this.renderable = null;\n this.texture = null;\n this._batcher = null;\n this._batch = null;\n this.bounds = null;\n }\n\n public destroy()\n {\n this.reset();\n }\n}\n","import { type GCable, type GCData } from '../../rendering/renderers/shared/GCSystem';\nimport { type Renderer } from '../../rendering/renderers/types';\n\nimport type EventEmitter from 'eventemitter3';\n\n/**\n * Options for the {@link GCManagedHash}.\n * @internal\n */\nexport interface GCManagedHashOptions<T extends GCable & { uid: number } & Pick<EventEmitter, 'once' | 'off'>>\n{\n renderer: Renderer;\n type: GCData['type'];\n onUnload?: (item: T, ...args: any[]) => void;\n priority?: number;\n name: string;\n}\n\n/**\n * A hash for managing renderable and resource resources with GC integration.\n * @internal\n */\nexport class GCManagedHash<T extends GCable & { uid: number } & Pick<EventEmitter, 'once' | 'off'>>\n{\n // Exposed directly for GC system access\n public items: Record<number, T> = Object.create(null);\n private _renderer: Renderer;\n private _onUnload?: (item: T, ...args: unknown[]) => void;\n public readonly name: string;\n\n constructor(options: GCManagedHashOptions<T>)\n {\n const { renderer, type, onUnload, priority, name } = options;\n\n this._renderer = renderer;\n renderer.gc.addResourceHash(this, 'items', type, priority ?? 0);\n this._onUnload = onUnload;\n this.name = name;\n }\n\n /**\n * Add an item to the hash. No-op if already added.\n * @param item\n * @returns true if the item was added, false if it was already in the hash\n */\n public add(item: T): boolean\n {\n if (this.items[item.uid]) return false;\n this.items[item.uid] = item;\n item.once('unload', this.remove, this);\n item._gcLastUsed = this._renderer.gc.now;\n\n return true;\n }\n\n public remove(item: T, ...args: unknown[]): void\n {\n if (!this.items[item.uid]) return;\n\n const gpuData = item._gpuData[this._renderer.uid];\n\n if (!gpuData) return;\n\n this._onUnload?.(item, ...args);\n\n item.off('unload', this.remove, this);\n gpuData.destroy();\n item._gpuData[this._renderer.uid] = null;\n this.items[item.uid] = null;\n }\n\n public removeAll(...args: unknown[]): void\n {\n Object.values(this.items).forEach((item) => item && this.remove(item, ...args));\n }\n\n public destroy(...args: unknown[]): void\n {\n this.removeAll(...args);\n this.items = Object.create(null);\n this._renderer = null;\n this._onUnload = null;\n }\n}\n","import EventEmitter from 'eventemitter3';\n\n/**\n * Regexp for data URI.\n * Based on: {@link https://github.com/ragingwind/data-uri-regex}\n * @type {RegExp}\n * @default /(?:^data:image\\/([\\w+]+);(?:[\\w=]+|charset=[\\w-]+)?(?:;base64)?,)/i\n * @example\n * import { DATA_URI } from 'pixi.js';\n *\n * DATA_URI.test('data:image/png;base64,foobar'); // => true\n * @category utils\n * @advanced\n */\nexport const DATA_URI = /^\\s*data:(?:([\\w-]+)\\/([\\w+.-]+))?(?:;charset=([\\w-]+))?(?:;(base64))?,(.*)/i;\n\n// export the event emitter so we can use it in external modules\nexport { EventEmitter };\n\n/**\n * The current version of PixiJS. This is automatically replaced by the build process.\n * @internal\n */\nexport const VERSION = '$_VERSION';\n","import { type ExtensionMetadata, ExtensionType } from '../../extensions/Extensions';\nimport { VERSION } from '../const';\n\nimport type { Application } from '../../app/Application';\nimport type { System } from '../../rendering/renderers/shared/system/System';\nimport type { Renderer } from '../../rendering/renderers/types';\n\ndeclare global\n{\n var __PIXI_APP_INIT__: undefined | ((arg: Application | Renderer, version: string) => void);\n var __PIXI_RENDERER_INIT__: undefined | ((arg: Application | Renderer, version: string) => void);\n}\n\n/**\n * Calls global __PIXI_APP_INIT__ hook with the application instance, after the application is initialized.\n * @category app\n * @internal\n */\nexport class ApplicationInitHook\n{\n /** @ignore */\n public static extension: ExtensionMetadata = ExtensionType.Application;\n public static init(): void\n {\n globalThis.__PIXI_APP_INIT__?.(this as unknown as Application, VERSION);\n }\n public static destroy(): void\n {\n // nothing to do\n }\n}\n\n/**\n * Calls global __PIXI_RENDERER_INIT__ hook with the renderer instance, after the renderer is initialized.\n * @category rendering\n * @internal\n */\nexport class RendererInitHook implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'initHook',\n priority: -10,\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n public init(): void\n {\n globalThis.__PIXI_RENDERER_INIT__?.(this._renderer, VERSION);\n }\n public destroy(): void\n {\n this._renderer = null;\n }\n}\n"],"names":["STENCIL_MODES","CLEAR"],"mappings":"6GEwCgB,CAAA,CAEoB,EE7BpB,QF8BR,AADI,OAAO,OAEF,aAAA,CAAgB,IAAA,YAAgB,GAEhC,aAAwB,OK1CP,KL2C1B,GACI,CAAK,aAAA,CAAgB,EAAA,MAAA,mBAIhB,CAAgB,CIhC7B,ALUgB,KCyBZ,CAAA,UAAK,CAAa,IAAI,YAAA,IAAY,CAAK,aAAa,OAC/C,CKpCD,UAAA,CLoCe,IAAI,CGzCP,YHyCoB,IAAA,CAAK,aAAa,EAEtD,IAAA,CAAA,IAAA,CAAA,IAAA,CAAA,aAAiB,CAAc,EKrCpB,QLqCoB,CAInC,IAAI,UAAA,CAOA,OALI,AAAC,IAAA,CAAK,OKtCJ,ELsCI,EACV,MACS,SAAA,CAAY,IAAI,KKvCf,ILuCe,CAAU,IAAA,CAAK,cAAa,CAAA,CAGrD,IAAO,CAAK,CM3BF,QAAA,AN4Bd,uCAKc,CM3BK,CN4Bf,AACI,GK5CW,EL4CX,CAAK,UAAA,CAAa,IAAI,UAAA,CAAW,IAAA,CAAK,cAAa,CAAA,CAGhD,IAAA,CAAK,UAAA,AAChB,CAGA,IAAA,WACA,CAMI,OALK,IAAA,CAAK,EK7CE,QL6CF,EACV,GGnC2B,CAAA,YHoClB,CAAa,IAAI,WAAW,IAAA,CAAA,cAAkB,EAGhD,IAAA,CAAA,UAAK,AAChB,CAGA,IAAI,EKnDoB,SLmDpB,CAOA,YALU,GMZN,ONYM,EACV,KACI,CAAK,GKlDD,OLkDC,CAAa,IAAI,MMZH,KNYc,IAAA,CAAK,cAAa,CAAA,CAGhD,IAAA,CAAA,UACX,AADgB,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,CACjB,IAAA,CAAK,SAAA,CAAY,IAAA,AACrB,CACJ,uDC5DuB,SCLV,CACb,mBADO,OAAM,EAIT,KDCS,ECDK,IAAA,EACd,CACI,UAAA,CAAW,iBAAA,GAAoB,IAAA,CAAgC,EACnE,CACA,IAF0E,CAAA,EAE5D,OAAA,EACd,CAEA,CACJ,CAZa,EAGK,SAAA,CAA+B,EAAA,CAAA,CAAc,GAHlD,QAGkD,AAgBxD,OAAM,EAcT,YAAY,CAAA,CAdH,AAeT,CAdJ,AAeQ,IAAA,CAAK,SAAA,CAAY,CACrB,CACO,IAAA,EAFc,AAGrB,CACI,UAAA,CAAW,sBAAA,GAAyB,IAAA,CAAK,SAAA,CAAW,EACxD,CACO,IAFwD,CAAA,EAExD,EACP,CACI,IAAA,CAAK,SAAA,CAAY,IAAA,AACrB,CACJ,CA1Ba,EAGK,SAAA,CAAY,CACtB,GAJK,CAIL,CAAM,CACF,EAAA,CAAA,CAAc,WAAA,CACd,EAAA,CAAA,CAAc,YAAA,CAClB,CACA,IAAA,CAAM,UAAA,CACN,QAAA,CAAU,CAAA,EACd,CAAA","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,32,33]}
@@ -0,0 +1,3 @@
1
+ (()=>{"use strict";module.exports=[82513,a=>{a.i(91540),a.i(28755),a.i(32419),a.s([])},21437,a=>{var b=a.i(53229),c=a.i(66722),d=a.i(56312),e=a.i(45287);let f=class a extends d.f{constructor(b){super(b={...a.defaultOptions,...b}),this.enabled=!0,this._state=e.A.for2d(),this.blendMode=b.blendMode,this.padding=b.padding,"boolean"==typeof b.antialias?this.antialias=b.antialias?"on":"off":this.antialias=b.antialias,this.resolution=b.resolution,this.blendRequired=b.blendRequired,this.clipToViewport=b.clipToViewport,this.addResource("uTexture",0,1),b.blendRequired&&this.addResource("uBackTexture",0,3)}apply(a,b,c,d){a.applyFilter(this,b,c,d)}get blendMode(){return this._state.blendMode}set blendMode(a){this._state.blendMode=a}static from(d){let e,f,{gpu:g,gl:h,...i}=d;return g&&(e=c.f.from(g)),h&&(f=b.f.from(h)),new a({gpuProgram:e,glProgram:f,...i})}};f.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0},a.s(["f",0,f])}]})();
2
+
3
+ //# sourceMappingURL=node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/pixi.js/src/filters/Filter.ts"],"sourcesContent":["import { GlProgram } from '../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../rendering/renderers/gpu/shader/GpuProgram';\nimport { Shader } from '../rendering/renderers/shared/shader/Shader';\nimport { State } from '../rendering/renderers/shared/state/State';\n\nimport type { RenderSurface } from '../rendering/renderers/shared/renderTarget/RenderTargetSystem';\nimport type {\n IShaderWithResources,\n ShaderFromResources,\n ShaderWithResources\n} from '../rendering/renderers/shared/shader/Shader';\nimport type { BLEND_MODES } from '../rendering/renderers/shared/state/const';\nimport type { Texture } from '../rendering/renderers/shared/texture/Texture';\nimport type { FilterSystem } from './FilterSystem';\n\n/**\n * The options to use when creating a new filter.\n * @category filters\n * @advanced\n */\nexport interface FilterOptions\n{\n /** optional blend mode used by the filter when rendering (defaults to 'normal') */\n blendMode?: BLEND_MODES;\n /**\n * the resolution the filter should be rendered at. The lower the resolution, the more performant\n * the filter will be, but the lower the quality of the output. (default 1)\n * If 'inherit', the resolution of the render target is used.\n * Consider lowering this for things like blurs filters\n */\n resolution?: number | 'inherit';\n /**\n * the amount of pixels to pad the container with when applying the filter. For example a blur extends the\n * container out as it blurs, so padding is applied to ensure that extra detail is rendered as well\n * without clipping occurring. (default 0)\n */\n padding?: number;\n /**\n * If true the filter will make use of antialiasing. Although it looks better this can have a performance impact.\n * If set to 'inherit', the filter will detect the antialiasing of the render target and change this automatically.\n * Definitely don't set this to true if the render target has antialiasing set to false. As it will antialias,\n * but you won't see the difference. (default 'off')\n *\n * This can be a boolean or [FilterAntialias]{@link FilterAntialias} string.\n */\n antialias?: FilterAntialias | boolean;\n /**\n * If this is set to true, the filter system will grab a snap shot of the area being rendered\n * to and pass this into the shader. This is useful for blend modes that need to be aware of the pixels\n * they are rendering to. Only use if you need that data, otherwise its an extra gpu copy you don't need!\n * (default false)\n *\n * If given, the shader should have a uniform named `uBackTexture`, which is where the pixels of the\n * area being rendered to can be sampled from.\n */\n blendRequired?: boolean;\n /**\n * If this is set to true, the filter system will clip filter texture into viewport\n * This is useful for filters that applied to whole texture.\n * (default true)\n */\n clipToViewport?: boolean;\n}\n\n/**\n * Filter options mixed with shader resources. A filter needs a shader and some resources to work.\n * @category filters\n * @advanced\n * @see {@link FilterOptions}\n */\nexport type FilterWithShader = FilterOptions & IShaderWithResources;\n\n/**\n * The antialiasing mode of the filter. This can be either:\n * - `on` - the filter is always antialiased regardless of the render target settings\n * - `off` - (default) the filter is never antialiased regardless of the render target settings\n * - `inherit` - the filter uses the antialias settings of the render target\n * @category filters\n * @advanced\n */\nexport type FilterAntialias = 'on' | 'off' | 'inherit';\n\n/**\n * The Filter class is the base for all filter effects used in Pixi.js\n * As it extends a shader, it requires that a glProgram is parsed in to work with WebGL and a gpuProgram for WebGPU.\n * If you don't proved one, then the filter is skipped and just rendered as if it wasn't there for that renderer.\n *\n * A filter can be applied to anything that extends Container in Pixi.js which also includes Sprites, Graphics etc.\n *\n * Its worth noting Performance-wise filters can be pretty expensive if used too much in a single scene.\n * The following happens under the hood when a filter is applied:\n *\n * .1. Break the current batch\n * <br>\n * .2. The target is measured using getGlobalBounds\n * (recursively go through all children and figure out how big the object is)\n * <br>\n * .3. Get power of two or screen sized textures from the texture pool\n * <br>\n * .4. Render the target to that texture\n * <br>\n * .5. Render that texture back to the main frame buffer as a quad using the filters program.\n * <br>\n * <br>\n * Some filters (such as blur) require multiple passes too which can result in an even bigger performance hit. So be careful!\n * Its not generally the complexity of the shader that is the bottle neck,\n * but all the framebuffer / shader switching that has to take place.\n * One filter applied to a container with many objects is MUCH faster than many filter applied to many objects.\n * @category filters\n * @advanced\n * @example\n * import { Filter } from 'pixi.js';\n *\n * const customFilter = new Filter({\n * glProgram: new GlProgram({\n * fragment,\n * vertex,\n * }),\n * resources: {\n * timeUniforms: {\n * uTime: { value: 0.0, type: 'f32' },\n * },\n * },\n * });\n *\n * // Apply the filter\n * sprite.filters = [customFilter];\n *\n * // Update uniform\n * app.ticker.add((ticker) => {\n * filter.resources.timeUniforms.uniforms.uTime += 0.04 * ticker.deltaTime;\n * });\n */\nexport class Filter extends Shader\n{\n /** The default filter settings */\n public static defaultOptions: FilterOptions = {\n blendMode: 'normal',\n resolution: 1,\n padding: 0,\n antialias: 'off',\n blendRequired: false,\n clipToViewport: true,\n };\n\n /**\n * The padding of the filter. Some filters require extra space to breath such as a blur.\n * Increasing this will add extra width and height to the bounds of the object that the\n * filter is applied to.\n * @default 0\n */\n public padding: number;\n\n /**\n * should the filter use antialiasing?\n * @default inherit\n */\n public antialias: FilterAntialias;\n\n /** If enabled is true the filter is applied, if false it will not. */\n public enabled = true;\n\n /**\n * The gpu state the filter requires to render.\n * @internal\n */\n public _state = State.for2d();\n\n /**\n * The resolution of the filter. Setting this to be lower will lower the quality but\n * increase the performance of the filter.\n * @default 1\n */\n public resolution: number | 'inherit';\n\n /**\n * Whether or not this filter requires the previous render texture for blending.\n * @default false\n */\n public blendRequired: boolean;\n\n /**\n * Clip texture into viewport or not\n * @default true\n */\n public clipToViewport: boolean;\n\n /**\n * @param options - The optional parameters of this filter.\n */\n constructor(options: FilterWithShader)\n {\n options = { ...Filter.defaultOptions, ...options };\n\n super(options as ShaderWithResources);\n\n this.blendMode = options.blendMode;\n this.padding = options.padding;\n\n // check if is boolean\n if (typeof options.antialias === 'boolean')\n {\n this.antialias = options.antialias ? 'on' : 'off';\n }\n else\n {\n this.antialias = options.antialias;\n }\n\n this.resolution = options.resolution;\n this.blendRequired = options.blendRequired;\n this.clipToViewport = options.clipToViewport;\n\n // this is where the filter system will attach the filter texture\n this.addResource('uTexture', 0, 1);\n\n if (options.blendRequired)\n {\n // this is where the filter system will attach the back texture\n this.addResource('uBackTexture', 0, 3);\n }\n }\n\n /**\n * Applies the filter\n * @param filterManager - The renderer to retrieve the filter from\n * @param input - The input render target.\n * @param output - The target to output to.\n * @param clearMode - Should the output be cleared before rendering to it\n */\n public apply(\n filterManager: FilterSystem,\n input: Texture,\n output: RenderSurface,\n clearMode: boolean\n ): void\n {\n filterManager.applyFilter(this, input, output, clearMode);\n }\n\n /**\n * Get the blend mode of the filter.\n * @default \"normal\"\n */\n get blendMode(): BLEND_MODES\n {\n return this._state.blendMode;\n }\n\n /** Sets the blend mode of the filter. */\n set blendMode(value: BLEND_MODES)\n {\n this._state.blendMode = value;\n }\n\n /**\n * A short hand function to create a filter based of a vertex and fragment shader src.\n * @param options\n * @returns A shiny new PixiJS filter!\n */\n public static from(options: FilterOptions & ShaderFromResources): Filter\n {\n const { gpu, gl, ...rest } = options;\n\n let gpuProgram: GpuProgram;\n let glProgram: GlProgram;\n\n if (gpu)\n {\n gpuProgram = GpuProgram.from(gpu);\n }\n\n if (gl)\n {\n glProgram = GlProgram.from(gl);\n }\n\n return new Filter({\n gpuProgram,\n glProgram,\n ...rest\n });\n }\n}\n"],"names":[],"mappings":"yJAqIO,IAAM,EAAN,KAAM,CAAA,OAAA,GAAe,EAAA,CAAA,CAC5B,AAwDI,YAAY,CAAA,CACZ,CAGI,KAAA,CAFA,AAEM,EAFI,CAAE,GAAG,CAEqB,AAFpC,CAAsB,AAEc,KAFrB,SAAO,CAAgB,GAAG,CAAA,CAAQ,EAhCrD,IAAA,CAAO,OAAA,EAAU,EAMjB,EANiB,EAMjB,CAAO,MAAA,CAAS,EAAA,CAAA,CAAM,KAAA,EAAM,CA8BxB,IAAA,CAAK,SAAA,CAAY,EAAQ,KAAR,IAAQ,CACzB,IAAA,CAAK,OAAA,CAAU,EAAQ,KAAR,EAAQ,CAGU,SAAA,EAA7B,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X,UAAA,CAAY,CAAA,CACZ,OAAA,CAAS,CAAA,CACT,SAAA,CAAW,KAAA,CACX,aAAA,EAAe,EACf,GADe,WACf,EAAgB,CACpB,CAAA,YAVG"}
@@ -0,0 +1,16 @@
1
+ module.exports=[40662,a=>{"use strict";var b=a.i(44373),c=a.i(84764),d=a.i(83019),e=a.i(83717);class f{constructor(a){if(this._lastTransform="",this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;let a=this._canvas.getBoundingClientRect(),b=this._canvas.width,c=this._canvas.height,d=a.width/b*this._renderer.resolution,e=a.height/c*this._renderer.resolution,f=a.left,g=a.top,h=`translate(${f}px, ${g}px) scale(${d}, ${e})`;h!==this._lastTransform&&(this._domElement.style.transform=h,this._lastTransform=h)},this._domElement=a.domElement,this._renderer=a.renderer,globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)return;this._canvas=this._renderer.canvas,this._attachObserver()}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){"ResizeObserver"in globalThis?(this._observer&&(this._observer.disconnect(),this._observer=null),this._observer=new ResizeObserver(a=>{for(let b of a){if(b.target!==this._canvas)continue;let a=this.canvas.width,c=this.canvas.height,d=b.contentRect.width/a*this._renderer.resolution,e=b.contentRect.height/c*this._renderer.resolution;(this._lastScaleX!==d||this._lastScaleY!==e)&&(this.updateTranslation(),this._lastScaleX=d,this._lastScaleY=e)}}),this._observer.observe(this._canvas)):this._tickerAttached||e.f.shared.add(this.updateTranslation,this,d.f.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&e.f.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform="",this._lastScaleX=null,this._lastScaleY=null}}var g=a.i(47790);class h{constructor(a){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=h.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new g.f,this.page=new g.f,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=a}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(a,b,c){throw Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(a,b,c,d,e){throw Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}var i=/iPhone/i,j=/iPod/i,k=/iPad/i,l=/\biOS-universal(?:.+)Mac\b/i,m=/\bAndroid(?:.+)Mobile\b/i,n=/Android/i,o=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,p=/Silk/i,q=/Windows Phone/i,r=/\bWindows(?:.+)ARM\b/i,s=/BlackBerry/i,t=/BB10/i,u=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,w=/Mobile(?:.+)Firefox\b/i,x=function(a){return void 0!==a&&"MacIntel"===a.platform&&"number"==typeof a.maxTouchPoints&&a.maxTouchPoints>1&&"u"<typeof MSStream};function y(a){var b,c={userAgent:"",platform:"",maxTouchPoints:0};!a&&"u">typeof navigator?c={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:"string"==typeof a?c.userAgent=a:a&&a.userAgent&&(c={userAgent:a.userAgent,platform:a.platform,maxTouchPoints:a.maxTouchPoints||0});var d=c.userAgent,e=d.split("[FBAN");void 0!==e[1]&&(d=e[0]),void 0!==(e=d.split("Twitter"))[1]&&(d=e[0]);var f=(b=d,function(a){return a.test(b)}),g={apple:{phone:f(i)&&!f(q),ipod:f(j),tablet:!f(i)&&(f(k)||x(c))&&!f(q),universal:f(l),device:(f(i)||f(j)||f(k)||f(l)||x(c))&&!f(q)},amazon:{phone:f(o),tablet:!f(o)&&f(p),device:f(o)||f(p)},android:{phone:!f(q)&&f(o)||!f(q)&&f(m),tablet:!f(q)&&!f(o)&&!f(m)&&(f(p)||f(n)),device:!f(q)&&(f(o)||f(p)||f(m)||f(n))||f(/\bokhttp\b/i)},windows:{phone:f(q),tablet:f(r),device:f(q)||f(r)},other:{blackberry:f(s),blackberry10:f(t),opera:f(u),firefox:f(w),chrome:f(v),device:f(s)||f(t)||f(u)||f(w)||f(v)},any:!1,phone:!1,tablet:!1};return g.any=g.apple.device||g.android.device||g.windows.device||g.other.device,g.phone=g.apple.phone||g.android.phone||g.windows.phone,g.tablet=g.apple.tablet||g.android.tablet||g.windows.tablet,g}let z=(y.default??y)(globalThis.navigator);var A=a.i(5561);let B=class a{constructor(a,b=z){this._mobileInfo=b,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(b.tablet||b.phone)&&this._createTouchHook(),this._renderer=a}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){let a=document.createElement("button");a.style.width="1px",a.style.height="1px",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.style.zIndex="2",a.style.backgroundColor="#FF0000",a.title="select to enable accessibility for this content",a.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(a),this._hookDiv=a}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement("div"),this._div.style.position="absolute",this._div.style.top="0px",this._div.style.left="0px",this._div.style.pointerEvents="none",this._div.style.zIndex="2",this._canvasObserver=new f({domElement:this._div,renderer:this._renderer})),this._deactivateOnMouseMove&&globalThis.document.addEventListener("mousemove",this._boundOnMouseMove,!0);let a=this._renderer.view.canvas;if(a.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{let b=new MutationObserver(()=>{a.parentNode&&(b.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});b.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(this._isActive&&!this._isMobileAccessibility){for(let a of(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._boundOnMouseMove,!0),this._renderer.runners.postrender.remove(this),this._children))a._accessibleDiv?.parentNode&&(a._accessibleDiv.parentNode.removeChild(a._accessibleDiv),a._accessibleDiv=null),a._accessibleActive=!1;for(let a in this._pools)this._pools[a].forEach(a=>{a.parentNode&&a.parentNode.removeChild(a)}),delete this._pools[a];this._div?.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(a){if(!a.visible||!a.accessibleChildren)return;a.accessible&&(a._accessibleActive||this._addChild(a),a._renderId=this._renderId);let b=a.children;if(b)for(let a=0;a<b.length;a++)this._updateAccessibleObjects(b[a])}init(b){let c={accessibilityOptions:{...a.defaultOptions,...b?.accessibilityOptions||{}}};this.debug=c.accessibilityOptions.debug,this._activateOnTab=c.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=c.accessibilityOptions.deactivateOnMouseMove,this._activateOnTab&&globalThis.addEventListener("keydown",this._boundOnKeyDown,!1),c.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){let a=performance.now();if(this._mobileInfo.android.device&&a<this._androidUpdateCount||(this._androidUpdateCount=a+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;let b=new Set;if(this._renderer.lastObjectRendered)for(let a of(this._updateAccessibleObjects(this._renderer.lastObjectRendered),this._children))a._renderId===this._renderId&&b.add(this._children.indexOf(a));for(let a=this._children.length-1;a>=0;a--){let c=this._children[a];b.has(a)||(c._accessibleDiv&&c._accessibleDiv.parentNode&&(c._accessibleDiv.parentNode.removeChild(c._accessibleDiv),this._getPool(c.accessibleType).push(c._accessibleDiv),c._accessibleDiv=null),c._accessibleActive=!1,(0,A.f)(this._children,a,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let a=0;a<this._children.length;a++){let b=this._children[a];if(!b._accessibleActive||!b._accessibleDiv)continue;let c=b._accessibleDiv,d=b.hitArea||b.getBounds().rectangle;if(b.hitArea){let a=b.worldTransform;c.style.left=`${a.tx+d.x*a.a}px`,c.style.top=`${a.ty+d.y*a.d}px`,c.style.width=`${d.width*a.a}px`,c.style.height=`${d.height*a.d}px`}else this._capHitArea(d),c.style.left=`${d.x}px`,c.style.top=`${d.y}px`,c.style.width=`${d.width}px`,c.style.height=`${d.height}px`}this._renderId++}_updateDebugHTML(a){a.innerHTML=`type: ${a.type}</br> title : ${a.title}</br> tabIndex: ${a.tabIndex}`}_capHitArea(a){a.x<0&&(a.width+=a.x,a.x=0),a.y<0&&(a.height+=a.y,a.y=0);let{width:b,height:c}=this._renderer;a.x+a.width>b&&(a.width=b-a.x),a.y+a.height>c&&(a.height=c-a.y)}_addChild(a){let b=this._getPool(a.accessibleType).pop();b?(b.innerHTML="",b.removeAttribute("title"),b.removeAttribute("aria-label"),b.tabIndex=0):("button"===a.accessibleType?(b=document.createElement("button"),this.debug||(b.style.color="transparent")):(b=document.createElement(a.accessibleType)).style.cssText=`
2
+ color: transparent;
3
+ pointer-events: none;
4
+ padding: 0;
5
+ margin: 0;
6
+ border: 0;
7
+ outline: 0;
8
+ background: transparent;
9
+ box-sizing: border-box;
10
+ user-select: none;
11
+ -webkit-user-select: none;
12
+ -moz-user-select: none;
13
+ -ms-user-select: none;
14
+ `,b.style.width="100px",b.style.height="100px",b.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",b.style.position="absolute",b.style.zIndex="2",b.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?b.setAttribute("aria-live","off"):b.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?b.setAttribute("aria-relevant","additions"):b.setAttribute("aria-relevant","text"),b.addEventListener("click",this._onClick.bind(this)),b.addEventListener("focus",this._onFocus.bind(this)),b.addEventListener("focusout",this._onFocusOut.bind(this))),b.style.pointerEvents=a.accessiblePointerEvents,b.type=a.accessibleType,a.accessibleText&&(b.innerText=a.accessibleText),a.accessibleTitle&&null!==a.accessibleTitle?b.title=a.accessibleTitle:a.accessibleHint&&null!==a.accessibleHint||(b.title=`container ${a.tabIndex}`),a.accessibleHint&&null!==a.accessibleHint&&b.setAttribute("aria-label",a.accessibleHint),a.interactive?b.tabIndex=a.tabIndex:b.tabIndex=0,this.debug&&this._updateDebugHTML(b),a._accessibleActive=!0,a._accessibleDiv=b,b.container=a,this._children.push(a),this._div.appendChild(a._accessibleDiv)}_dispatchEvent(a,b){let{container:c}=a.target,d=this._renderer.events.rootBoundary,e=Object.assign(new h(d),{target:c});d.rootTarget=this._renderer.lastObjectRendered,b.forEach(a=>d.dispatchEvent(e,a))}_onClick(a){this._dispatchEvent(a,["click","pointertap","tap"])}_onFocus(a){a.target.getAttribute("aria-live")||a.target.setAttribute("aria-live","assertive"),this._dispatchEvent(a,["mouseover"])}_onFocusOut(a){a.target.getAttribute("aria-live")||a.target.setAttribute("aria-live","polite"),this._dispatchEvent(a,["mouseout"])}_onKeyDown(a){9===a.keyCode&&this._activateOnTab&&this._activate()}_onMouseMove(a){(0!==a.movementX||0!==a.movementY)&&this._deactivate()}destroy(){this._deactivate(),this._destroyTouchHook(),this._canvasObserver?.destroy(),this._canvasObserver=null,this._div=null,this._pools=null,this._children=null,this._renderer=null,this._hookDiv=null,globalThis.removeEventListener("keydown",this._boundOnKeyDown),this._boundOnKeyDown=null,globalThis.document.removeEventListener("mousemove",this._boundOnMouseMove,!0),this._boundOnMouseMove=null}setAccessibilityEnabled(a){a?this._activate():this._deactivate()}_getPool(a){return this._pools[a]||(this._pools[a]=[]),this._pools[a]}};B.extension={type:[b.x.WebGLSystem,b.x.WebGPUSystem],name:"accessibility"},B.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0},b.H.add(B),b.H.mixin(c.t,{accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:"button",accessibleText:null,accessiblePointerEvents:"auto",accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1});class C{constructor(a){this._attachedDomElements=[],this._renderer=a,this._renderer.runners.postrender.add(this),this._renderer.runners.init.add(this),this._domElement=document.createElement("div"),this._domElement.style.position="absolute",this._domElement.style.top="0",this._domElement.style.left="0",this._domElement.style.pointerEvents="none",this._domElement.style.zIndex="1000"}init(){this._canvasObserver=new f({domElement:this._domElement,renderer:this._renderer})}addRenderable(a,b){this._attachedDomElements.includes(a)||this._attachedDomElements.push(a)}updateRenderable(a){}validateRenderable(a){return!0}postrender(){let a=this._attachedDomElements;if(0===a.length)return void this._domElement.remove();this._canvasObserver.ensureAttached();for(let b=0;b<a.length;b++){let c=a[b],d=c.element;if(!c.parent||c.globalDisplayStatus<7)d?.remove(),a.splice(b,1),b--;else{this._domElement.contains(d)||(d.style.position="absolute",d.style.pointerEvents="auto",this._domElement.appendChild(d));let a=c.worldTransform,b=c._anchor,e=c.width*b.x,f=c.height*b.y;d.style.transformOrigin=`${e}px ${f}px`,d.style.transform=`matrix(${a.a}, ${a.b}, ${a.c}, ${a.d}, ${a.tx-e}, ${a.ty-f})`,d.style.opacity=c.groupAlpha.toString()}}}destroy(){this._renderer.runners.postrender.remove(this);for(let a=0;a<this._attachedDomElements.length;a++){let b=this._attachedDomElements[a];b.element?.remove()}this._attachedDomElements.length=0,this._domElement.remove(),this._canvasObserver.destroy(),this._renderer=null}}C.extension={type:[b.x.WebGLPipes,b.x.WebGPUPipes,b.x.CanvasPipes],name:"dom"},b.H.add(C);var D=a.i(61607),E=a.i(51983);let F=new class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(a){this.removeTickerListener(),this.events=a,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(a){this._pauseUpdate=a}addTickerListener(){!this._tickerAdded&&this.domElement&&(e.f.system.add(this._tickerUpdate,this,d.f.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&(e.f.system.remove(this._tickerUpdate,this),this._tickerAdded=!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let a=this.events._rootPointerEvent;this.events.supportsTouchEvents&&"touch"===a.pointerType||globalThis.document.dispatchEvent(this.events.supportsPointerEvents?new PointerEvent("pointermove",{clientX:a.clientX,clientY:a.clientY,pointerType:a.pointerType,pointerId:a.pointerId}):new MouseEvent("mousemove",{clientX:a.clientX,clientY:a.clientY}))}_tickerUpdate(a){this._deltaTime+=a.deltaTime,this._deltaTime<this.interactionFrequency||(this._deltaTime=0,this._update())}destroy(){this.removeTickerListener(),this.events=null,this.domElement=null,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}};class G extends h{constructor(){super(...arguments),this.client=new g.f,this.movement=new g.f,this.offset=new g.f,this.global=new g.f,this.screen=new g.f}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(a,b,c){return a.worldTransform.applyInverse(c||this.global,b)}getModifierState(a){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(a)}initMouseEvent(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){throw Error("Method not implemented.")}}class H extends G{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1,this.persistentDeviceId=0}getCoalescedEvents(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}getPredictedEvents(){throw Error("getPredictedEvents is not supported!")}}class I extends G{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}I.DOM_DELTA_PIXEL=0,I.DOM_DELTA_LINE=1,I.DOM_DELTA_PAGE=2;let J=new g.f,K=new g.f;class L{constructor(a){this.dispatch=new D.f,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=a,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mapContextMenu=this.mapContextMenu.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel),this.addEventMapping("contextmenu",this.mapContextMenu)}addEventMapping(a,b){this.mappingTable[a]||(this.mappingTable[a]=[]),this.mappingTable[a].push({fn:b,priority:0}),this.mappingTable[a].sort((a,b)=>a.priority-b.priority)}dispatchEvent(a,b){a.propagationStopped=!1,a.propagationImmediatelyStopped=!1,this.propagate(a,b),this.dispatch.emit(b||a.type,a)}mapEvent(a){if(!this.rootTarget)return;let b=this.mappingTable[a.type];if(b)for(let c=0,d=b.length;c<d;c++)b[c].fn(a);else(0,E.f)(`[EventBoundary]: Event mapping not defined for ${a.type}`)}hitTest(a,b){F.pauseUpdate=!0;let c=this[this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive"](this.rootTarget,this.rootTarget.eventMode,J.set(a,b),this.hitTestFn,this.hitPruneFn);return c&&c[0]}propagate(a,b){if(!a.target)return;let c=a.composedPath();a.eventPhase=a.CAPTURING_PHASE;for(let d=0,e=c.length-1;d<e;d++)if(a.currentTarget=c[d],this.notifyTarget(a,b),a.propagationStopped||a.propagationImmediatelyStopped)return;if(a.eventPhase=a.AT_TARGET,a.currentTarget=a.target,this.notifyTarget(a,b),!a.propagationStopped&&!a.propagationImmediatelyStopped){a.eventPhase=a.BUBBLING_PHASE;for(let d=c.length-2;d>=0;d--)if(a.currentTarget=c[d],this.notifyTarget(a,b),a.propagationStopped||a.propagationImmediatelyStopped)return}}all(a,b,c=this._allInteractiveElements){if(0===c.length)return;a.eventPhase=a.BUBBLING_PHASE;let d=Array.isArray(b)?b:[b];for(let b=c.length-1;b>=0;b--)d.forEach(d=>{a.currentTarget=c[b],this.notifyTarget(a,d)})}propagationPath(a){let b=[a];for(let c=0;c<2048&&a!==this.rootTarget&&a.parent;c++){if(!a.parent)throw Error("Cannot find propagation path to disconnected target");b.push(a.parent),a=a.parent}return b.reverse(),b}hitTestMoveRecursive(a,b,c,d,e,f=!1){let g=!1;if(this._interactivePrune(a))return null;if(("dynamic"===a.eventMode||"dynamic"===b)&&(F.pauseUpdate=!1),a.interactiveChildren&&a.children){let h=a.children;for(let i=h.length-1;i>=0;i--){let j=h[i],k=this.hitTestMoveRecursive(j,this._isInteractive(b)?b:j.eventMode,c,d,e,f||e(a,c));if(k){if(k.length>0&&!k[k.length-1].parent)continue;let b=a.isInteractive();(k.length>0||b)&&(b&&this._allInteractiveElements.push(a),k.push(a)),0===this._hitElements.length&&(this._hitElements=k),g=!0}}}let h=this._isInteractive(b),i=a.isInteractive();return(i&&i&&this._allInteractiveElements.push(a),f||this._hitElements.length>0)?null:g?this._hitElements:h&&!e(a,c)&&d(a,c)?i?[a]:[]:null}hitTestRecursive(a,b,c,d,e){if(this._interactivePrune(a)||e(a,c))return null;if(("dynamic"===a.eventMode||"dynamic"===b)&&(F.pauseUpdate=!1),a.interactiveChildren&&a.children){let f=a.children;for(let g=f.length-1;g>=0;g--){let h=f[g],i=this.hitTestRecursive(h,this._isInteractive(b)?b:h.eventMode,c,d,e);if(i){if(i.length>0&&!i[i.length-1].parent)continue;let b=a.isInteractive();return(i.length>0||b)&&i.push(a),i}}}let f=this._isInteractive(b),g=a.isInteractive();return f&&d(a,c)?g?[a]:[]:null}_isInteractive(a){return"static"===a||"dynamic"===a}_interactivePrune(a){return!a||!a.visible||!a.renderable||!a.measurable||"none"===a.eventMode||"passive"===a.eventMode&&!a.interactiveChildren}hitPruneFn(a,b){if(a.hitArea&&(a.worldTransform.applyInverse(b,K),!a.hitArea.contains(K.x,K.y)))return!0;if(a.effects&&a.effects.length)for(let c=0;c<a.effects.length;c++){let d=a.effects[c];if(d.containsPoint&&!d.containsPoint(b,this.hitTestFn))return!0}return!1}hitTestFn(a,b){return!!a.hitArea||!!a?.containsPoint&&(a.worldTransform.applyInverse(b,K),a.containsPoint(K))}notifyTarget(a,b){if(!a.currentTarget.isInteractive())return;b??(b=a.type);let c=`on${b}`;a.currentTarget[c]?.(a);let d=a.eventPhase===a.CAPTURING_PHASE||a.eventPhase===a.AT_TARGET?`${b}capture`:b;this._notifyListeners(a,d),a.eventPhase===a.AT_TARGET&&this._notifyListeners(a,b)}mapPointerDown(a){if(!(a instanceof H))return void(0,E.f)("EventBoundary cannot map a non-pointer event as a pointer event");let b=this.createPointerEvent(a);if(this.dispatchEvent(b,"pointerdown"),"touch"===b.pointerType)this.dispatchEvent(b,"touchstart");else if("mouse"===b.pointerType||"pen"===b.pointerType){let a=2===b.button;this.dispatchEvent(b,a?"rightdown":"mousedown")}this.trackingData(a.pointerId).pressTargetsByButton[a.button]=b.composedPath(),this.freeEvent(b)}mapPointerMove(a){if(!(a instanceof H))return void(0,E.f)("EventBoundary cannot map a non-pointer event as a pointer event");this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let b=this.createPointerEvent(a);this._isPointerMoveEvent=!1;let c="mouse"===b.pointerType||"pen"===b.pointerType,d=this.trackingData(a.pointerId),e=this.findMountedTarget(d.overTargets);if(d.overTargets?.length>0&&e!==b.target){let d="mousemove"===a.type?"mouseout":"pointerout",f=this.createPointerEvent(a,d,e);if(this.dispatchEvent(f,"pointerout"),c&&this.dispatchEvent(f,"mouseout"),!b.composedPath().includes(e)){let d=this.createPointerEvent(a,"pointerleave",e);for(d.eventPhase=d.AT_TARGET;d.target&&!b.composedPath().includes(d.target);)d.currentTarget=d.target,this.notifyTarget(d),c&&this.notifyTarget(d,"mouseleave"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(f)}if(e!==b.target){let d="mousemove"===a.type?"mouseover":"pointerover",f=this.clonePointerEvent(b,d);this.dispatchEvent(f,"pointerover"),c&&this.dispatchEvent(f,"mouseover");let g=e?.parent;for(;g&&g!==this.rootTarget.parent&&g!==b.target;)g=g.parent;if(!g||g===this.rootTarget.parent){let a=this.clonePointerEvent(b,"pointerenter");for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==e&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),c&&this.notifyTarget(a,"mouseenter"),a.target=a.target.parent;this.freeEvent(a)}this.freeEvent(f)}let f=[],g=this.enableGlobalMoveEvents??!0;this.moveOnAll?f.push("pointermove"):this.dispatchEvent(b,"pointermove"),g&&f.push("globalpointermove"),"touch"===b.pointerType&&(this.moveOnAll?f.splice(1,0,"touchmove"):this.dispatchEvent(b,"touchmove"),g&&f.push("globaltouchmove")),c&&(this.moveOnAll?f.splice(1,0,"mousemove"):this.dispatchEvent(b,"mousemove"),g&&f.push("globalmousemove"),this.cursor=b.target?.cursor),f.length>0&&this.all(b,f),this._allInteractiveElements.length=0,this._hitElements.length=0,d.overTargets=b.composedPath(),this.freeEvent(b)}mapPointerOver(a){if(!(a instanceof H))return void(0,E.f)("EventBoundary cannot map a non-pointer event as a pointer event");let b=this.trackingData(a.pointerId),c=this.createPointerEvent(a),d="mouse"===c.pointerType||"pen"===c.pointerType;this.dispatchEvent(c,"pointerover"),d&&this.dispatchEvent(c,"mouseover"),"mouse"===c.pointerType&&(this.cursor=c.target?.cursor);let e=this.clonePointerEvent(c,"pointerenter");for(e.eventPhase=e.AT_TARGET;e.target&&e.target!==this.rootTarget.parent;)e.currentTarget=e.target,this.notifyTarget(e),d&&this.notifyTarget(e,"mouseenter"),e.target=e.target.parent;b.overTargets=c.composedPath(),this.freeEvent(c),this.freeEvent(e)}mapPointerOut(a){if(!(a instanceof H))return void(0,E.f)("EventBoundary cannot map a non-pointer event as a pointer event");let b=this.trackingData(a.pointerId);if(b.overTargets){let c="mouse"===a.pointerType||"pen"===a.pointerType,d=this.findMountedTarget(b.overTargets),e=this.createPointerEvent(a,"pointerout",d);this.dispatchEvent(e),c&&this.dispatchEvent(e,"mouseout");let f=this.createPointerEvent(a,"pointerleave",d);for(f.eventPhase=f.AT_TARGET;f.target&&f.target!==this.rootTarget.parent;)f.currentTarget=f.target,this.notifyTarget(f),c&&this.notifyTarget(f,"mouseleave"),f.target=f.target.parent;b.overTargets=null,this.freeEvent(e),this.freeEvent(f)}this.cursor=null}mapPointerUp(a){if(!(a instanceof H))return void(0,E.f)("EventBoundary cannot map a non-pointer event as a pointer event");let b=performance.now(),c=this.createPointerEvent(a);if(this.dispatchEvent(c,"pointerup"),"touch"===c.pointerType)this.dispatchEvent(c,"touchend");else if("mouse"===c.pointerType||"pen"===c.pointerType){let a=2===c.button;this.dispatchEvent(c,a?"rightup":"mouseup")}let d=this.trackingData(a.pointerId),e=this.findMountedTarget(d.pressTargetsByButton[a.button]),f=e;if(e&&!c.composedPath().includes(e)){let b=e;for(;b&&!c.composedPath().includes(b);){if(c.currentTarget=b,this.notifyTarget(c,"pointerupoutside"),"touch"===c.pointerType)this.notifyTarget(c,"touchendoutside");else if("mouse"===c.pointerType||"pen"===c.pointerType){let a=2===c.button;this.notifyTarget(c,a?"rightupoutside":"mouseupoutside")}b=b.parent}delete d.pressTargetsByButton[a.button],f=b}if(f){let e=this.clonePointerEvent(c,"click");e.target=f,e.path=null,d.clicksByButton[a.button]||(d.clicksByButton[a.button]={clickCount:0,target:e.target,timeStamp:b});let g=d.clicksByButton[a.button];if(g.target===e.target&&b-g.timeStamp<200?++g.clickCount:g.clickCount=1,g.target=e.target,g.timeStamp=b,e.detail=g.clickCount,"mouse"===e.pointerType){let a=2===e.button;this.dispatchEvent(e,a?"rightclick":"click")}else"touch"===e.pointerType&&this.dispatchEvent(e,"tap");this.dispatchEvent(e,"pointertap"),this.freeEvent(e)}this.freeEvent(c)}mapPointerUpOutside(a){if(!(a instanceof H))return void(0,E.f)("EventBoundary cannot map a non-pointer event as a pointer event");let b=this.trackingData(a.pointerId),c=this.findMountedTarget(b.pressTargetsByButton[a.button]),d=this.createPointerEvent(a);if(c){let e=c;for(;e;)d.currentTarget=e,this.notifyTarget(d,"pointerupoutside"),"touch"===d.pointerType?this.notifyTarget(d,"touchendoutside"):("mouse"===d.pointerType||"pen"===d.pointerType)&&this.notifyTarget(d,2===d.button?"rightupoutside":"mouseupoutside"),e=e.parent;delete b.pressTargetsByButton[a.button]}this.freeEvent(d)}mapWheel(a){if(!(a instanceof I))return void(0,E.f)("EventBoundary cannot map a non-wheel event as a wheel event");let b=this.createWheelEvent(a);this.dispatchEvent(b),this.freeEvent(b)}mapContextMenu(a){if(!(a instanceof H))return void(0,E.f)("EventBoundary cannot map a non-pointer event as a pointer event");let b=this.createPointerEvent(a);this.dispatchEvent(b,"contextmenu"),this.freeEvent(b)}findMountedTarget(a){if(!a)return null;let b=a[0];for(let c=1;c<a.length;c++)if(a[c].parent===b)b=a[c];else break;return b}createPointerEvent(a,b,c){let d=this.allocateEvent(H);return this.copyPointerData(a,d),this.copyMouseData(a,d),this.copyData(a,d),d.nativeEvent=a.nativeEvent,d.originalEvent=a,d.target=c??this.hitTest(d.global.x,d.global.y)??this._hitElements[0],"string"==typeof b&&(d.type=b),d}createWheelEvent(a){let b=this.allocateEvent(I);return this.copyWheelData(a,b),this.copyMouseData(a,b),this.copyData(a,b),b.nativeEvent=a.nativeEvent,b.originalEvent=a,b.target=this.hitTest(b.global.x,b.global.y),b}clonePointerEvent(a,b){let c=this.allocateEvent(H);return c.nativeEvent=a.nativeEvent,c.originalEvent=a.originalEvent,this.copyPointerData(a,c),this.copyMouseData(a,c),this.copyData(a,c),c.target=a.target,c.path=a.composedPath().slice(),c.type=b??c.type,c}copyWheelData(a,b){b.deltaMode=a.deltaMode,b.deltaX=a.deltaX,b.deltaY=a.deltaY,b.deltaZ=a.deltaZ}copyPointerData(a,b){a instanceof H&&b instanceof H&&(b.pointerId=a.pointerId,b.width=a.width,b.height=a.height,b.isPrimary=a.isPrimary,b.pointerType=a.pointerType,b.pressure=a.pressure,b.tangentialPressure=a.tangentialPressure,b.tiltX=a.tiltX,b.tiltY=a.tiltY,b.twist=a.twist,b.persistentDeviceId=a.persistentDeviceId)}copyMouseData(a,b){a instanceof G&&b instanceof G&&(b.altKey=a.altKey,b.button=a.button,b.buttons=a.buttons,b.client.copyFrom(a.client),b.ctrlKey=a.ctrlKey,b.metaKey=a.metaKey,b.movement.copyFrom(a.movement),b.screen.copyFrom(a.screen),b.shiftKey=a.shiftKey,b.global.copyFrom(a.global))}copyData(a,b){b.isTrusted=a.isTrusted,b.srcElement=a.srcElement,b.timeStamp=performance.now(),b.type=a.type,b.detail=a.detail,b.view=a.view,b.which=a.which,b.layer.copyFrom(a.layer),b.page.copyFrom(a.page)}trackingData(a){return this.mappingState.trackingData[a]||(this.mappingState.trackingData[a]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[a]}allocateEvent(a){this.eventPool.has(a)||this.eventPool.set(a,[]);let b=this.eventPool.get(a).pop()||new a(this);return b.eventPhase=b.NONE,b.currentTarget=null,b.defaultPrevented=!1,b.path=null,b.target=null,b}freeEvent(a){if(a.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");let b=a.constructor;this.eventPool.has(b)||this.eventPool.set(b,[]),this.eventPool.get(b).push(a)}_notifyListeners(a,b){let c=a.currentTarget._events[b];if(c)if("fn"in c)c.once&&a.currentTarget.removeListener(b,c.fn,void 0,!0),c.fn.call(c.context,a);else for(let d=0,e=c.length;d<e&&!a.propagationImmediatelyStopped;d++)c[d].once&&a.currentTarget.removeListener(b,c[d].fn,void 0,!0),c[d].fn.call(c[d].context,a)}}let M={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},N=class a{constructor(b){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=b,this.rootBoundary=new L(null),F.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new H(null),this._rootWheelEvent=new I(null),this._rootContextMenuEvent=new H(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...a.defaultEventFeatures},{set:(a,b,c)=>("globalMove"===b&&(this.rootBoundary.enableGlobalMoveEvents=c),a[b]=c,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(b){let{canvas:c,resolution:d}=this.renderer;this.setTargetElement(c),this.resolution=d,a._defaultEventMode=b.eventMode??"passive",Object.assign(this.features,b.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(a){this.resolution=a}destroy(){F.destroy(),this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(a){a||(a="default");let b=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(b=!1),this._currentCursor===a)return;this._currentCursor=a;let c=this.cursorStyles[a];if(c)switch(typeof c){case"string":b&&(this.domElement.style.cursor=c);break;case"function":c(a);break;case"object":b&&Object.assign(this.domElement.style,c)}else b&&"string"==typeof a&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,a)&&(this.domElement.style.cursor=a)}get pointer(){return this._rootPointerEvent}_onPointerDown(a){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let b=this._normalizeToPointerData(a);this.autoPreventDefault&&b[0].isNormalized&&(!a.cancelable&&"cancelable"in a||a.preventDefault());for(let a=0,c=b.length;a<c;a++){let c=b[a],d=this._bootstrapEvent(this._rootPointerEvent,c);this.rootBoundary.mapEvent(d)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(a){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,F.pointerMoved();let b=this._normalizeToPointerData(a);for(let a=0,c=b.length;a<c;a++){let c=this._bootstrapEvent(this._rootPointerEvent,b[a]);this.rootBoundary.mapEvent(c)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(a){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let b=a.target;a.composedPath&&a.composedPath().length>0&&(b=a.composedPath()[0]);let c=b!==this.domElement?"outside":"",d=this._normalizeToPointerData(a);for(let a=0,b=d.length;a<b;a++){let b=this._bootstrapEvent(this._rootPointerEvent,d[a]);b.type+=c,this.rootBoundary.mapEvent(b)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(a){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let b=this._normalizeToPointerData(a);for(let a=0,c=b.length;a<c;a++){let c=this._bootstrapEvent(this._rootPointerEvent,b[a]);this.rootBoundary.mapEvent(c)}this.setCursor(this.rootBoundary.cursor)}_onContextMenu(a){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let b=this._normalizeToPointerData(a);for(let a=0,c=b.length;a<c;a++){let c=this._bootstrapEvent(this._rootContextMenuEvent,b[a]);this.rootBoundary.mapEvent(c)}this.setCursor(this.rootBoundary.cursor)}onWheel(a){if(!this.features.wheel)return;let b=this.normalizeWheelEvent(a);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(b)}setTargetElement(a){this._removeEvents(),this.domElement=a,F.domElement=a,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;F.addTickerListener();let a=this.domElement.style;a&&(globalThis.navigator.msPointerEnabled?(a.msContentZooming="none",a.msTouchAction="none"):this.supportsPointerEvents&&(a.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this._onPointerMove,!0),this.domElement.addEventListener("pointerdown",this._onPointerDown,!0),this.domElement.addEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this._onPointerOverOut,!0),globalThis.addEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this._onPointerMove,!0),this.domElement.addEventListener("mousedown",this._onPointerDown,!0),this.domElement.addEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this._onPointerOverOut,!0),globalThis.addEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this._onPointerDown,!0),this.domElement.addEventListener("touchend",this._onPointerUp,!0),this.domElement.addEventListener("touchmove",this._onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this.domElement.addEventListener("contextmenu",this._onContextMenu,!0),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;F.removeTickerListener();let a=this.domElement.style;a&&(globalThis.navigator.msPointerEnabled?(a.msContentZooming="",a.msTouchAction=""):this.supportsPointerEvents&&(a.touchAction="")),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this._onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this._onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this._onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this._onPointerMove,!0),this.domElement.removeEventListener("mousedown",this._onPointerDown,!0),this.domElement.removeEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this._onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this._onPointerDown,!0),this.domElement.removeEventListener("touchend",this._onPointerUp,!0),this.domElement.removeEventListener("touchmove",this._onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement.removeEventListener("contextmenu",this._onContextMenu,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(a,b,c){let d=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},e=1/this.resolution;a.x=(b-d.left)*(this.domElement.width/d.width)*e,a.y=(c-d.top)*(this.domElement.height/d.height)*e}_normalizeToPointerData(a){let b=[];if(this.supportsTouchEvents&&a instanceof TouchEvent)for(let c=0,d=a.changedTouches.length;c<d;c++){let d=a.changedTouches[c];void 0===d.button&&(d.button=0),void 0===d.buttons&&(d.buttons=1),void 0===d.isPrimary&&(d.isPrimary=1===a.touches.length&&"touchstart"===a.type),void 0===d.width&&(d.width=d.radiusX||1),void 0===d.height&&(d.height=d.radiusY||1),void 0===d.tiltX&&(d.tiltX=0),void 0===d.tiltY&&(d.tiltY=0),void 0===d.pointerType&&(d.pointerType="touch"),void 0===d.pointerId&&(d.pointerId=d.identifier||0),void 0===d.pressure&&(d.pressure=d.force||.5),void 0===d.twist&&(d.twist=0),void 0===d.tangentialPressure&&(d.tangentialPressure=0),void 0===d.layerX&&(d.layerX=d.offsetX=d.clientX),void 0===d.layerY&&(d.layerY=d.offsetY=d.clientY),d.isNormalized=!0,d.type=a.type,d.altKey??(d.altKey=a.altKey),d.ctrlKey??(d.ctrlKey=a.ctrlKey),d.metaKey??(d.metaKey=a.metaKey),d.shiftKey??(d.shiftKey=a.shiftKey),b.push(d)}else(!globalThis.MouseEvent||a instanceof MouseEvent&&(!this.supportsPointerEvents||!(a instanceof globalThis.PointerEvent)))&&(void 0===a.isPrimary&&(a.isPrimary=!0),void 0===a.width&&(a.width=1),void 0===a.height&&(a.height=1),void 0===a.tiltX&&(a.tiltX=0),void 0===a.tiltY&&(a.tiltY=0),void 0===a.pointerType&&(a.pointerType="mouse"),void 0===a.pointerId&&(a.pointerId=1),void 0===a.pressure&&(a.pressure=.5),void 0===a.twist&&(a.twist=0),void 0===a.tangentialPressure&&(a.tangentialPressure=0),a.isNormalized=!0),b.push(a);return b}normalizeWheelEvent(a){let b=this._rootWheelEvent;return this._transferMouseData(b,a),b.deltaX=a.deltaX,b.deltaY=a.deltaY,b.deltaZ=a.deltaZ,b.deltaMode=a.deltaMode,this.mapPositionToPoint(b.screen,a.clientX,a.clientY),b.global.copyFrom(b.screen),b.offset.copyFrom(b.screen),b.nativeEvent=a,b.type=a.type,b}_bootstrapEvent(a,b){return a.originalEvent=null,a.nativeEvent=b,a.pointerId=b.pointerId,a.width=b.width,a.height=b.height,a.isPrimary=b.isPrimary,a.pointerType=b.pointerType,a.pressure=b.pressure,a.tangentialPressure=b.tangentialPressure,a.tiltX=b.tiltX,a.tiltY=b.tiltY,a.twist=b.twist,this._transferMouseData(a,b),this.mapPositionToPoint(a.screen,b.clientX,b.clientY),a.global.copyFrom(a.screen),a.offset.copyFrom(a.screen),a.isTrusted=b.isTrusted,"pointerleave"===a.type&&(a.type="pointerout"),a.type.startsWith("mouse")&&(a.type=a.type.replace("mouse","pointer")),a.type.startsWith("touch")&&(a.type=M[a.type]||a.type),a}_transferMouseData(a,b){a.isTrusted=b.isTrusted,a.srcElement=b.srcElement,a.timeStamp=performance.now(),a.type=b.type,a.altKey=b.altKey,a.button=b.button,a.buttons=b.buttons,a.client.x=b.clientX,a.client.y=b.clientY,a.ctrlKey=b.ctrlKey,a.metaKey=b.metaKey,a.movement.x=b.movementX,a.movement.y=b.movementY,a.page.x=b.pageX,a.page.y=b.pageY,a.relatedTarget=null,a.shiftKey=b.shiftKey}};N.extension={name:"events",type:[b.x.WebGLSystem,b.x.CanvasSystem,b.x.WebGPUSystem],priority:-1},N.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0},b.H.add(N),b.H.mixin(c.t,{onclick:null,oncontextmenu:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return"dynamic"===this.eventMode||"static"===this.eventMode},set interactive(a){this.eventMode=a?"static":"passive"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??N.defaultEventMode},set eventMode(a){this._internalEventMode=a},isInteractive(){return"static"===this.eventMode||"dynamic"===this.eventMode},interactiveChildren:!0,hitArea:null,addEventListener(a,b,c){let d="boolean"==typeof c&&c||"object"==typeof c&&c.capture,e="object"==typeof c?c.signal:void 0,f="object"==typeof c&&!0===c.once,g="function"==typeof b?void 0:b;a=d?`${a}capture`:a;let h="function"==typeof b?b:b.handleEvent,i=this;e&&e.addEventListener("abort",()=>{i.off(a,h,g)}),f?i.once(a,h,g):i.on(a,h,g)},removeEventListener(a,b,c){let d="boolean"==typeof c&&c||"object"==typeof c&&c.capture,e="function"==typeof b?void 0:b;a=d?`${a}capture`:a,b="function"==typeof b?b:b.handleEvent,this.off(a,b,e)},dispatchEvent(a){if(!(a instanceof h))throw Error("Container cannot propagate events outside of the Federated Events API");return a.defaultPrevented=!1,a.path=null,a.target=this,a.manager.dispatchEvent(a),!a.defaultPrevented}}),a.i(91540),a.i(28755),a.i(32419),a.s([],40662)}];
15
+
16
+ //# sourceMappingURL=node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js.map