gdcore-tools 1.0.5 → 1.0.7

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 (603) hide show
  1. package/GDevelop/ExtLibs/7za.exe +0 -0
  2. package/GDevelop/ExtLibs/curl.exe +0 -0
  3. package/GDevelop/scripts/libgettextlib-0-17.dll +0 -0
  4. package/GDevelop/scripts/libgettextsrc-0-17.dll +0 -0
  5. package/LICENSE +1 -1
  6. package/dist/Runtime/AsyncTasksManager.js +5 -0
  7. package/dist/Runtime/AsyncTasksManager.js.map +7 -0
  8. package/dist/Runtime/Cordova/config.xml +44 -0
  9. package/dist/Runtime/Cordova/package.json +22 -0
  10. package/dist/Runtime/Cordova/www/index.html +45 -0
  11. package/dist/Runtime/CustomRuntimeObject.js +2 -0
  12. package/dist/Runtime/CustomRuntimeObject.js.map +7 -0
  13. package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js +2 -0
  14. package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js.map +7 -0
  15. package/dist/Runtime/Electron/main.js +65 -0
  16. package/dist/Runtime/Electron/package.json +26 -0
  17. package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js +2 -0
  18. package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js.map +7 -0
  19. package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js +2 -0
  20. package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js.map +7 -0
  21. package/dist/Runtime/Extensions/3D/AmbientLight.js +2 -0
  22. package/dist/Runtime/Extensions/3D/AmbientLight.js.map +7 -0
  23. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js +2 -0
  24. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js.map +7 -0
  25. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js +2 -0
  26. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js.map +7 -0
  27. package/dist/Runtime/Extensions/3D/DirectionalLight.js +2 -0
  28. package/dist/Runtime/Extensions/3D/DirectionalLight.js.map +7 -0
  29. package/dist/Runtime/Extensions/3D/ExponentialFog.js +2 -0
  30. package/dist/Runtime/Extensions/3D/ExponentialFog.js.map +7 -0
  31. package/dist/Runtime/Extensions/3D/HemisphereLight.js +2 -0
  32. package/dist/Runtime/Extensions/3D/HemisphereLight.js.map +7 -0
  33. package/dist/Runtime/Extensions/3D/JsExtension.js +2809 -0
  34. package/dist/Runtime/Extensions/3D/LinearFog.js +2 -0
  35. package/dist/Runtime/Extensions/3D/LinearFog.js.map +7 -0
  36. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js +2 -0
  37. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js.map +7 -0
  38. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js +2 -0
  39. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js.map +7 -0
  40. package/dist/Runtime/Extensions/3D/Scene3DTools.js +2 -0
  41. package/dist/Runtime/Extensions/3D/Scene3DTools.js.map +7 -0
  42. package/dist/Runtime/Extensions/AdMob/JsExtension.js +798 -0
  43. package/dist/Runtime/Extensions/AdMob/admobtools.js +2 -0
  44. package/dist/Runtime/Extensions/AdMob/admobtools.js.map +7 -0
  45. package/dist/Runtime/Extensions/AdvancedWindow/JsExtension.js +719 -0
  46. package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js +2 -0
  47. package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js.map +7 -0
  48. package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js +2 -0
  49. package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js.map +7 -0
  50. package/dist/Runtime/Extensions/BBText/JsExtension.js +639 -0
  51. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject-pixi-renderer.js +2 -0
  52. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject-pixi-renderer.js.map +7 -0
  53. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js +2 -0
  54. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js.map +7 -0
  55. package/dist/Runtime/Extensions/BBText/pixi-multistyle-text/dist/pixi-multistyle-text.umd.js +1 -0
  56. package/dist/Runtime/Extensions/BitmapText/JsExtension.js +756 -0
  57. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject-pixi-renderer.js +2 -0
  58. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject-pixi-renderer.js.map +7 -0
  59. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js +2 -0
  60. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js.map +7 -0
  61. package/dist/Runtime/Extensions/DebuggerTools/JsExtension.js +123 -0
  62. package/dist/Runtime/Extensions/DebuggerTools/debuggertools.js +2 -0
  63. package/dist/Runtime/Extensions/DebuggerTools/debuggertools.js.map +7 -0
  64. package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js +2 -0
  65. package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js.map +7 -0
  66. package/dist/Runtime/Extensions/DeviceSensors/JsExtension.js +461 -0
  67. package/dist/Runtime/Extensions/DeviceSensors/devicesensortools.js +2 -0
  68. package/dist/Runtime/Extensions/DeviceSensors/devicesensortools.js.map +7 -0
  69. package/dist/Runtime/Extensions/DeviceVibration/JsExtension.js +108 -0
  70. package/dist/Runtime/Extensions/DeviceVibration/devicevibrationtools.js +2 -0
  71. package/dist/Runtime/Extensions/DeviceVibration/devicevibrationtools.js.map +7 -0
  72. package/dist/Runtime/Extensions/DialogueTree/JsExtension.js +730 -0
  73. package/dist/Runtime/Extensions/DialogueTree/bondage.js/dist/bondage.min.js +11 -0
  74. package/dist/Runtime/Extensions/DialogueTree/dialoguetools.js +3 -0
  75. package/dist/Runtime/Extensions/DialogueTree/dialoguetools.js.map +7 -0
  76. package/dist/Runtime/Extensions/DraggableBehavior/draggableruntimebehavior.js +2 -0
  77. package/dist/Runtime/Extensions/DraggableBehavior/draggableruntimebehavior.js.map +7 -0
  78. package/dist/Runtime/Extensions/Effects/JsExtension.js +1197 -0
  79. package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js +2 -0
  80. package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js.map +7 -0
  81. package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js +2 -0
  82. package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js.map +7 -0
  83. package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js +2 -0
  84. package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js.map +7 -0
  85. package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js +2 -0
  86. package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js.map +7 -0
  87. package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js +2 -0
  88. package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js.map +7 -0
  89. package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js +2 -0
  90. package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js.map +7 -0
  91. package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js +2 -0
  92. package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js.map +7 -0
  93. package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js +2 -0
  94. package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js.map +7 -0
  95. package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js +2 -0
  96. package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js.map +7 -0
  97. package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js +2 -0
  98. package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js.map +7 -0
  99. package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js +2 -0
  100. package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js.map +7 -0
  101. package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js +2 -0
  102. package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js.map +7 -0
  103. package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js +2 -0
  104. package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js.map +7 -0
  105. package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js +2 -0
  106. package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js.map +7 -0
  107. package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js +2 -0
  108. package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js.map +7 -0
  109. package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js +2 -0
  110. package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js.map +7 -0
  111. package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js +2 -0
  112. package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js.map +7 -0
  113. package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js +2 -0
  114. package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js.map +7 -0
  115. package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js +2 -0
  116. package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js.map +7 -0
  117. package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js +3 -0
  118. package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js.map +7 -0
  119. package/dist/Runtime/Extensions/Effects/night-pixi-filter.js +3 -0
  120. package/dist/Runtime/Extensions/Effects/night-pixi-filter.js.map +7 -0
  121. package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js +2 -0
  122. package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js.map +7 -0
  123. package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js +2 -0
  124. package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js.map +7 -0
  125. package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js +2 -0
  126. package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js.map +7 -0
  127. package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js +2 -0
  128. package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js.map +7 -0
  129. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-adjustment.js +8 -0
  130. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-advanced-bloom.js +8 -0
  131. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-ascii.js +8 -0
  132. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-bevel.js +8 -0
  133. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-bulge-pinch.js +8 -0
  134. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-color-map.js +8 -0
  135. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-color-replace.js +8 -0
  136. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-crt.js +8 -0
  137. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-dot.js +8 -0
  138. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-drop-shadow.js +8 -0
  139. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-glitch.js +8 -0
  140. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-glow.js +8 -0
  141. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-godray.js +8 -0
  142. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-kawase-blur.js +8 -0
  143. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-old-film.js +8 -0
  144. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-outline.js +8 -0
  145. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-pixelate.js +8 -0
  146. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-radial-blur.js +8 -0
  147. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-reflection.js +8 -0
  148. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-rgb-split.js +8 -0
  149. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-tilt-shift.js +171 -0
  150. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-twist.js +8 -0
  151. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-zoom-blur.js +8 -0
  152. package/dist/Runtime/Extensions/Effects/pixi-filters/types/adjustment/types.d.ts +29 -0
  153. package/dist/Runtime/Extensions/Effects/pixi-filters/types/advanced-bloom/types.d.ts +30 -0
  154. package/dist/Runtime/Extensions/Effects/pixi-filters/types/ascii/types.d.ts +11 -0
  155. package/dist/Runtime/Extensions/Effects/pixi-filters/types/bevel/types.d.ts +25 -0
  156. package/dist/Runtime/Extensions/Effects/pixi-filters/types/bloom/types.d.ts +18 -0
  157. package/dist/Runtime/Extensions/Effects/pixi-filters/types/bulge-pinch/types.d.ts +24 -0
  158. package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-map/types.d.ts +22 -0
  159. package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-overlay/types.d.ts +11 -0
  160. package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-replace/types.d.ts +17 -0
  161. package/dist/Runtime/Extensions/Effects/pixi-filters/types/convolution/types.d.ts +13 -0
  162. package/dist/Runtime/Extensions/Effects/pixi-filters/types/cross-hatch/types.d.ts +10 -0
  163. package/dist/Runtime/Extensions/Effects/pixi-filters/types/crt/types.d.ts +35 -0
  164. package/dist/Runtime/Extensions/Effects/pixi-filters/types/dot/types.d.ts +12 -0
  165. package/dist/Runtime/Extensions/Effects/pixi-filters/types/drop-shadow/types.d.ts +33 -0
  166. package/dist/Runtime/Extensions/Effects/pixi-filters/types/emboss/types.d.ts +11 -0
  167. package/dist/Runtime/Extensions/Effects/pixi-filters/types/glitch/types.d.ts +38 -0
  168. package/dist/Runtime/Extensions/Effects/pixi-filters/types/glow/types.d.ts +23 -0
  169. package/dist/Runtime/Extensions/Effects/pixi-filters/types/godray/types.d.ts +27 -0
  170. package/dist/Runtime/Extensions/Effects/pixi-filters/types/kawase-blur/types.d.ts +15 -0
  171. package/dist/Runtime/Extensions/Effects/pixi-filters/types/motion-blur/types.d.ts +17 -0
  172. package/dist/Runtime/Extensions/Effects/pixi-filters/types/multi-color-replace/types.d.ts +18 -0
  173. package/dist/Runtime/Extensions/Effects/pixi-filters/types/old-film/types.d.ts +33 -0
  174. package/dist/Runtime/Extensions/Effects/pixi-filters/types/outline/types.d.ts +13 -0
  175. package/dist/Runtime/Extensions/Effects/pixi-filters/types/pixelate/types.d.ts +11 -0
  176. package/dist/Runtime/Extensions/Effects/pixi-filters/types/radial-blur/types.d.ts +19 -0
  177. package/dist/Runtime/Extensions/Effects/pixi-filters/types/reflection/types.d.ts +25 -0
  178. package/dist/Runtime/Extensions/Effects/pixi-filters/types/rgb-split/types.d.ts +13 -0
  179. package/dist/Runtime/Extensions/Effects/pixi-filters/types/shockwave/types.d.ts +25 -0
  180. package/dist/Runtime/Extensions/Effects/pixi-filters/types/simple-lightmap/types.d.ts +13 -0
  181. package/dist/Runtime/Extensions/Effects/pixi-filters/types/tilt-shift/types.d.ts +19 -0
  182. package/dist/Runtime/Extensions/Effects/pixi-filters/types/twist/types.d.ts +13 -0
  183. package/dist/Runtime/Extensions/Effects/pixi-filters/types/zoom-blur/types.d.ts +28 -0
  184. package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js +2 -0
  185. package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js.map +7 -0
  186. package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js +2 -0
  187. package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js.map +7 -0
  188. package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js +2 -0
  189. package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js.map +7 -0
  190. package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js +2 -0
  191. package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js.map +7 -0
  192. package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js +2 -0
  193. package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js.map +7 -0
  194. package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js +2 -0
  195. package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js.map +7 -0
  196. package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js +2 -0
  197. package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js.map +7 -0
  198. package/dist/Runtime/Extensions/ExampleJsExtension/JsExtension.js +589 -0
  199. package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js +3 -0
  200. package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js.map +7 -0
  201. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimebehavior.js +2 -0
  202. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimebehavior.js.map +7 -0
  203. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject-pixi-renderer.js +2 -0
  204. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject-pixi-renderer.js.map +7 -0
  205. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject.js +2 -0
  206. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject.js.map +7 -0
  207. package/dist/Runtime/Extensions/ExampleJsExtension/dummywithshareddataruntimebehavior.js +2 -0
  208. package/dist/Runtime/Extensions/ExampleJsExtension/dummywithshareddataruntimebehavior.js.map +7 -0
  209. package/dist/Runtime/Extensions/ExampleJsExtension/examplejsextensiontools.js +2 -0
  210. package/dist/Runtime/Extensions/ExampleJsExtension/examplejsextensiontools.js.map +7 -0
  211. package/dist/Runtime/Extensions/FacebookInstantGames/FBInstant.d.ts +2 -0
  212. package/dist/Runtime/Extensions/FacebookInstantGames/JsExtension.js +379 -0
  213. package/dist/Runtime/Extensions/FacebookInstantGames/facebookinstantgamestools.js +2 -0
  214. package/dist/Runtime/Extensions/FacebookInstantGames/facebookinstantgamestools.js.map +7 -0
  215. package/dist/Runtime/Extensions/FileSystem/JsExtension.js +559 -0
  216. package/dist/Runtime/Extensions/FileSystem/filesystemtools.js +2 -0
  217. package/dist/Runtime/Extensions/FileSystem/filesystemtools.js.map +7 -0
  218. package/dist/Runtime/Extensions/Firebase/A_firebasejs/A_firebase-base.js +2 -0
  219. package/dist/Runtime/Extensions/Firebase/A_firebasejs/A_firebase-base.js.map +1 -0
  220. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-analytics.js +2 -0
  221. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-analytics.js.map +1 -0
  222. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-auth.js +2 -0
  223. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-auth.js.map +1 -0
  224. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-database.js +2 -0
  225. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-database.js.map +1 -0
  226. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-firestore.js +2 -0
  227. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-firestore.js.map +1 -0
  228. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-functions.js +2 -0
  229. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-functions.js.map +1 -0
  230. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-messaging.js +2 -0
  231. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-messaging.js.map +1 -0
  232. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-performance.js +2 -0
  233. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-performance.js.map +1 -0
  234. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-remote-config.js +2 -0
  235. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-remote-config.js.map +1 -0
  236. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-storage.js +2 -0
  237. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-storage.js.map +1 -0
  238. package/dist/Runtime/Extensions/Firebase/A_firebasejs/firebase.d.ts +10191 -0
  239. package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js +2 -0
  240. package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js.map +7 -0
  241. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_analyticstools.js +2 -0
  242. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_analyticstools.js.map +7 -0
  243. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_authtools.js +2 -0
  244. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_authtools.js.map +7 -0
  245. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_cloudfirestoretools.js +2 -0
  246. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_cloudfirestoretools.js.map +7 -0
  247. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_databasetools.js +2 -0
  248. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_databasetools.js.map +7 -0
  249. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_functionstools.js +2 -0
  250. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_functionstools.js.map +7 -0
  251. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_performancetools.js +2 -0
  252. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_performancetools.js.map +7 -0
  253. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_remoteconfigtools.js +2 -0
  254. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_remoteconfigtools.js.map +7 -0
  255. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_storagetools.js +2 -0
  256. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_storagetools.js.map +7 -0
  257. package/dist/Runtime/Extensions/Firebase/JsExtension.js +2323 -0
  258. package/dist/Runtime/Extensions/Inventory/inventory.js +2 -0
  259. package/dist/Runtime/Extensions/Inventory/inventory.js.map +7 -0
  260. package/dist/Runtime/Extensions/Inventory/inventorytools.js +2 -0
  261. package/dist/Runtime/Extensions/Inventory/inventorytools.js.map +7 -0
  262. package/dist/Runtime/Extensions/JsExtensionTypes.flow.js +34 -0
  263. package/dist/Runtime/Extensions/Leaderboards/JsExtension.js +299 -0
  264. package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js +2 -0
  265. package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js.map +7 -0
  266. package/dist/Runtime/Extensions/Leaderboards/sha256.d.ts +234 -0
  267. package/dist/Runtime/Extensions/Leaderboards/sha256.js +21 -0
  268. package/dist/Runtime/Extensions/Lighting/JsExtension.js +371 -0
  269. package/dist/Runtime/Extensions/Lighting/lightobstacleruntimebehavior.js +2 -0
  270. package/dist/Runtime/Extensions/Lighting/lightobstacleruntimebehavior.js.map +7 -0
  271. package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js +40 -0
  272. package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js.map +7 -0
  273. package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js +2 -0
  274. package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js.map +7 -0
  275. package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js +2 -0
  276. package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js.map +7 -0
  277. package/dist/Runtime/Extensions/P2P/A_peer.js +4 -0
  278. package/dist/Runtime/Extensions/P2P/A_peer.js.map +1 -0
  279. package/dist/Runtime/Extensions/P2P/B_p2ptools.js +2 -0
  280. package/dist/Runtime/Extensions/P2P/B_p2ptools.js.map +7 -0
  281. package/dist/Runtime/Extensions/P2P/JsExtension.js +483 -0
  282. package/dist/Runtime/Extensions/P2P/peerjs.d.ts +509 -0
  283. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject-pixi-renderer.js +2 -0
  284. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject-pixi-renderer.js.map +7 -0
  285. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js +2 -0
  286. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js.map +7 -0
  287. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js +2 -0
  288. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js.map +7 -0
  289. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js +2 -0
  290. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js.map +7 -0
  291. package/dist/Runtime/Extensions/ParticleSystem/pixi-particles-pixi-renderer.min.js +3 -0
  292. package/dist/Runtime/Extensions/PathfindingBehavior/PathTools.js +2 -0
  293. package/dist/Runtime/Extensions/PathfindingBehavior/PathTools.js.map +7 -0
  294. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingobstacleruntimebehavior.js +2 -0
  295. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingobstacleruntimebehavior.js.map +7 -0
  296. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js +2 -0
  297. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js.map +7 -0
  298. package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.js +2 -0
  299. package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.js.map +7 -0
  300. package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.wasm +0 -0
  301. package/dist/Runtime/Extensions/Physics2Behavior/JsExtension.js +4072 -0
  302. package/dist/Runtime/Extensions/Physics2Behavior/box2d.d.ts +1804 -0
  303. package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js +2 -0
  304. package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js.map +7 -0
  305. package/dist/Runtime/Extensions/Physics2Behavior/physics2tools.js +2 -0
  306. package/dist/Runtime/Extensions/Physics2Behavior/physics2tools.js.map +7 -0
  307. package/dist/Runtime/Extensions/PhysicsBehavior/box2djs/box2d.js +804 -0
  308. package/dist/Runtime/Extensions/PhysicsBehavior/physicsruntimebehavior.js +2 -0
  309. package/dist/Runtime/Extensions/PhysicsBehavior/physicsruntimebehavior.js.map +7 -0
  310. package/dist/Runtime/Extensions/PlatformBehavior/benchmarks/platformerobjectruntimebehavior.benchmark.js +2 -0
  311. package/dist/Runtime/Extensions/PlatformBehavior/benchmarks/platformerobjectruntimebehavior.benchmark.js.map +7 -0
  312. package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js +2 -0
  313. package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js.map +7 -0
  314. package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js +2 -0
  315. package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js.map +7 -0
  316. package/dist/Runtime/Extensions/PlatformBehavior/platformtools.js +2 -0
  317. package/dist/Runtime/Extensions/PlatformBehavior/platformtools.js.map +7 -0
  318. package/dist/Runtime/Extensions/PlayerAuthentication/JsExtension.js +218 -0
  319. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js +5 -0
  320. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js.map +7 -0
  321. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js +2 -0
  322. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js.map +7 -0
  323. package/dist/Runtime/Extensions/PrimitiveDrawing/pixi-graphics-extras/graphics-extras.min.js +10 -0
  324. package/dist/Runtime/Extensions/PrimitiveDrawing/pixi-graphics-extras/graphics-extras.min.js.map +1 -0
  325. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js +2 -0
  326. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js.map +7 -0
  327. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js +2 -0
  328. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js.map +7 -0
  329. package/dist/Runtime/Extensions/Screenshot/JsExtension.js +68 -0
  330. package/dist/Runtime/Extensions/Screenshot/screenshottools.js +2 -0
  331. package/dist/Runtime/Extensions/Screenshot/screenshottools.js.map +7 -0
  332. package/dist/Runtime/Extensions/Shopify/shopify-buy.umd.polyfilled.min.js +2 -0
  333. package/dist/Runtime/Extensions/Shopify/shopifytools.js +2 -0
  334. package/dist/Runtime/Extensions/Shopify/shopifytools.js.map +7 -0
  335. package/dist/Runtime/Extensions/SpatialSound/JsExtension.js +92 -0
  336. package/dist/Runtime/Extensions/SpatialSound/howler.spatial.min.js +2 -0
  337. package/dist/Runtime/Extensions/SpatialSound/spatialsoundtools.js +2 -0
  338. package/dist/Runtime/Extensions/SpatialSound/spatialsoundtools.js.map +7 -0
  339. package/dist/Runtime/Extensions/SystemInfo/systeminfotools.js +2 -0
  340. package/dist/Runtime/Extensions/SystemInfo/systeminfotools.js.map +7 -0
  341. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject-pixi-renderer.js +2 -0
  342. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject-pixi-renderer.js.map +7 -0
  343. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject.js +2 -0
  344. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject.js.map +7 -0
  345. package/dist/Runtime/Extensions/TextInput/JsExtension.js +790 -0
  346. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js +2 -0
  347. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js.map +7 -0
  348. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js +2 -0
  349. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js.map +7 -0
  350. package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js +2 -0
  351. package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js.map +7 -0
  352. package/dist/Runtime/Extensions/TextObject/textruntimeobject.js +2 -0
  353. package/dist/Runtime/Extensions/TextObject/textruntimeobject.js.map +7 -0
  354. package/dist/Runtime/Extensions/TileMap/JsExtension.js +1653 -0
  355. package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js +2 -0
  356. package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js.map +7 -0
  357. package/dist/Runtime/Extensions/TileMap/collision/TileMapCollisionMaskRenderer.js +2 -0
  358. package/dist/Runtime/Extensions/TileMap/collision/TileMapCollisionMaskRenderer.js.map +7 -0
  359. package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js +2 -0
  360. package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js.map +7 -0
  361. package/dist/Runtime/Extensions/TileMap/example/anotherIsland.json +5769 -0
  362. package/dist/Runtime/Extensions/TileMap/example/island.json +5823 -0
  363. package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.d.ts +25 -0
  364. package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js +2 -0
  365. package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js.map +7 -0
  366. package/dist/Runtime/Extensions/TileMap/helper/dts/index.d.ts +16 -0
  367. package/dist/Runtime/Extensions/TileMap/helper/dts/index.d.ts.map +1 -0
  368. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapFileContent.d.ts +12 -0
  369. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapFileContent.d.ts.map +1 -0
  370. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapLoader.d.ts +18 -0
  371. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapLoader.d.ts.map +1 -0
  372. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkFormat.d.ts +589 -0
  373. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkFormat.d.ts.map +1 -0
  374. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoader.d.ts +16 -0
  375. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoader.d.ts.map +1 -0
  376. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoaderHelper.d.ts +5 -0
  377. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoaderHelper.d.ts.map +1 -0
  378. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledFormat.d.ts +343 -0
  379. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledFormat.d.ts.map +1 -0
  380. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.d.ts +16 -0
  381. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.d.ts.map +1 -0
  382. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.spec.d.ts +2 -0
  383. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.spec.d.ts.map +1 -0
  384. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoaderHelper.d.ts +37 -0
  385. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoaderHelper.d.ts.map +1 -0
  386. package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts +5 -0
  387. package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts.map +1 -0
  388. package/dist/Runtime/Extensions/TileMap/helper/dts/model/GID.d.ts +45 -0
  389. package/dist/Runtime/Extensions/TileMap/helper/dts/model/GID.d.ts.map +1 -0
  390. package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts +361 -0
  391. package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts.map +1 -0
  392. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ResourceCache.d.ts +27 -0
  393. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ResourceCache.d.ts.map +1 -0
  394. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts +70 -0
  395. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts.map +1 -0
  396. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts +56 -0
  397. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts.map +1 -0
  398. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileTextureCache.d.ts +24 -0
  399. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileTextureCache.d.ts.map +1 -0
  400. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ldtk/LDtkPixiHelper.d.ts +26 -0
  401. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ldtk/LDtkPixiHelper.d.ts.map +1 -0
  402. package/dist/Runtime/Extensions/TileMap/helper/dts/render/tiled/TiledPixiHelper.d.ts +21 -0
  403. package/dist/Runtime/Extensions/TileMap/helper/dts/render/tiled/TiledPixiHelper.d.ts.map +1 -0
  404. package/dist/Runtime/Extensions/TileMap/helper/dts/types/index.d.ts +12 -0
  405. package/dist/Runtime/Extensions/TileMap/helper/dts/types/index.d.ts.map +1 -0
  406. package/dist/Runtime/Extensions/TileMap/pako/dist/pako.d.ts +166 -0
  407. package/dist/Runtime/Extensions/TileMap/pako/dist/pako.min.js +2 -0
  408. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/global-pixi-tilemap.d.ts +23 -0
  409. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.d.ts +270 -0
  410. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.umd.js +74 -0
  411. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.umd.js.map +7 -0
  412. package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js +2 -0
  413. package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js.map +7 -0
  414. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js +2 -0
  415. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js.map +7 -0
  416. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js +2 -0
  417. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js.map +7 -0
  418. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject-pixi-renderer.js +2 -0
  419. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject-pixi-renderer.js.map +7 -0
  420. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js +2 -0
  421. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js.map +7 -0
  422. package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js +2 -0
  423. package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js.map +7 -0
  424. package/dist/Runtime/Extensions/TweenBehavior/JsExtension.js +1087 -0
  425. package/dist/Runtime/Extensions/TweenBehavior/shifty.d.ts +839 -0
  426. package/dist/Runtime/Extensions/TweenBehavior/shifty.js +5 -0
  427. package/dist/Runtime/Extensions/TweenBehavior/shifty.js.map +1 -0
  428. package/dist/Runtime/Extensions/TweenBehavior/shifty_setup.js +2 -0
  429. package/dist/Runtime/Extensions/TweenBehavior/shifty_setup.js.map +7 -0
  430. package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js +2 -0
  431. package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js.map +7 -0
  432. package/dist/Runtime/Extensions/TweenBehavior/tweentools.js +2 -0
  433. package/dist/Runtime/Extensions/TweenBehavior/tweentools.js.map +7 -0
  434. package/dist/Runtime/Extensions/Video/JsExtension.js +694 -0
  435. package/dist/Runtime/Extensions/Video/videoruntimeobject-pixi-renderer.js +2 -0
  436. package/dist/Runtime/Extensions/Video/videoruntimeobject-pixi-renderer.js.map +7 -0
  437. package/dist/Runtime/Extensions/Video/videoruntimeobject.js +2 -0
  438. package/dist/Runtime/Extensions/Video/videoruntimeobject.js.map +7 -0
  439. package/dist/Runtime/FacebookInstantGames/fbapp-config.json +17 -0
  440. package/dist/Runtime/FacebookInstantGames/index.html +68 -0
  441. package/dist/Runtime/Model3DManager.js +2 -0
  442. package/dist/Runtime/Model3DManager.js.map +7 -0
  443. package/dist/Runtime/RuntimeCustomObjectLayer.js +2 -0
  444. package/dist/Runtime/RuntimeCustomObjectLayer.js.map +7 -0
  445. package/dist/Runtime/RuntimeInstanceContainer.js +2 -0
  446. package/dist/Runtime/RuntimeInstanceContainer.js.map +7 -0
  447. package/dist/Runtime/RuntimeLayer.js +2 -0
  448. package/dist/Runtime/RuntimeLayer.js.map +7 -0
  449. package/dist/Runtime/affinetransformation.js +2 -0
  450. package/dist/Runtime/affinetransformation.js.map +7 -0
  451. package/dist/Runtime/debugger-client/abstract-debugger-client.js +2 -0
  452. package/dist/Runtime/debugger-client/abstract-debugger-client.js.map +7 -0
  453. package/dist/Runtime/debugger-client/hot-reloader.js +2 -0
  454. package/dist/Runtime/debugger-client/hot-reloader.js.map +7 -0
  455. package/dist/Runtime/debugger-client/websocket-debugger-client.js +2 -0
  456. package/dist/Runtime/debugger-client/websocket-debugger-client.js.map +7 -0
  457. package/dist/Runtime/debugger-client/window-message-debugger-client.js +2 -0
  458. package/dist/Runtime/debugger-client/window-message-debugger-client.js.map +7 -0
  459. package/dist/Runtime/events-tools/cameratools.js +2 -0
  460. package/dist/Runtime/events-tools/cameratools.js.map +7 -0
  461. package/dist/Runtime/events-tools/commontools.js +2 -0
  462. package/dist/Runtime/events-tools/commontools.js.map +7 -0
  463. package/dist/Runtime/events-tools/inputtools.js +2 -0
  464. package/dist/Runtime/events-tools/inputtools.js.map +7 -0
  465. package/dist/Runtime/events-tools/networktools.js +2 -0
  466. package/dist/Runtime/events-tools/networktools.js.map +7 -0
  467. package/dist/Runtime/events-tools/objecttools.js +2 -0
  468. package/dist/Runtime/events-tools/objecttools.js.map +7 -0
  469. package/dist/Runtime/events-tools/runtimescenetools.js +2 -0
  470. package/dist/Runtime/events-tools/runtimescenetools.js.map +7 -0
  471. package/dist/Runtime/events-tools/soundtools.js +2 -0
  472. package/dist/Runtime/events-tools/soundtools.js.map +7 -0
  473. package/dist/Runtime/events-tools/storagetools.js +2 -0
  474. package/dist/Runtime/events-tools/storagetools.js.map +7 -0
  475. package/dist/Runtime/events-tools/stringtools.js +3 -0
  476. package/dist/Runtime/events-tools/stringtools.js.map +7 -0
  477. package/dist/Runtime/events-tools/variabletools.js +2 -0
  478. package/dist/Runtime/events-tools/variabletools.js.map +7 -0
  479. package/dist/Runtime/events-tools/windowtools.js +2 -0
  480. package/dist/Runtime/events-tools/windowtools.js.map +7 -0
  481. package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver-font-manager.js +2 -0
  482. package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver-font-manager.js.map +7 -0
  483. package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver.js +16 -0
  484. package/dist/Runtime/force.js +2 -0
  485. package/dist/Runtime/force.js.map +7 -0
  486. package/dist/Runtime/gd.js +2 -0
  487. package/dist/Runtime/gd.js.map +7 -0
  488. package/dist/Runtime/howler-sound-manager/howler-sound-manager.js +2 -0
  489. package/dist/Runtime/howler-sound-manager/howler-sound-manager.js.map +7 -0
  490. package/dist/Runtime/howler-sound-manager/howler.min.js +3 -0
  491. package/dist/Runtime/index.html +55 -0
  492. package/dist/Runtime/inputmanager.js +2 -0
  493. package/dist/Runtime/inputmanager.js.map +7 -0
  494. package/dist/Runtime/jsonmanager.js +2 -0
  495. package/dist/Runtime/jsonmanager.js.map +7 -0
  496. package/dist/Runtime/layer.js +2 -0
  497. package/dist/Runtime/layer.js.map +7 -0
  498. package/dist/Runtime/libs/CocoonJS/cocoon.min.js +4 -0
  499. package/dist/Runtime/libs/jshashtable.js +2 -0
  500. package/dist/Runtime/libs/jshashtable.js.map +7 -0
  501. package/dist/Runtime/libs/rbush.js +624 -0
  502. package/dist/Runtime/logger.js +2 -0
  503. package/dist/Runtime/logger.js.map +7 -0
  504. package/dist/Runtime/oncetriggers.js +2 -0
  505. package/dist/Runtime/oncetriggers.js.map +7 -0
  506. package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js +2 -0
  507. package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js.map +7 -0
  508. package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js +2 -0
  509. package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js.map +7 -0
  510. package/dist/Runtime/pixi-renderers/RuntimeInstanceContainerPixiRenderer.js +1 -0
  511. package/dist/Runtime/pixi-renderers/RuntimeInstanceContainerPixiRenderer.js.map +7 -0
  512. package/dist/Runtime/pixi-renderers/ThreeAddons.js +2 -0
  513. package/dist/Runtime/pixi-renderers/draco/gltf/draco_decoder.wasm +0 -0
  514. package/dist/Runtime/pixi-renderers/draco/gltf/draco_wasm_wrapper.js +116 -0
  515. package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js +15 -0
  516. package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js.map +7 -0
  517. package/dist/Runtime/pixi-renderers/loadingscreen-pixi-renderer.js +2 -0
  518. package/dist/Runtime/pixi-renderers/loadingscreen-pixi-renderer.js.map +7 -0
  519. package/dist/Runtime/pixi-renderers/pixi-bitmapfont-manager.js +2 -0
  520. package/dist/Runtime/pixi-renderers/pixi-bitmapfont-manager.js.map +7 -0
  521. package/dist/Runtime/pixi-renderers/pixi-effects-manager.js +2 -0
  522. package/dist/Runtime/pixi-renderers/pixi-effects-manager.js.map +7 -0
  523. package/dist/Runtime/pixi-renderers/pixi-filters-tools.js +2 -0
  524. package/dist/Runtime/pixi-renderers/pixi-filters-tools.js.map +7 -0
  525. package/dist/Runtime/pixi-renderers/pixi-image-manager.js +2 -0
  526. package/dist/Runtime/pixi-renderers/pixi-image-manager.js.map +7 -0
  527. package/dist/Runtime/pixi-renderers/pixi.js +11 -0
  528. package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js +2 -0
  529. package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js.map +7 -0
  530. package/dist/Runtime/pixi-renderers/runtimescene-pixi-renderer.js +3 -0
  531. package/dist/Runtime/pixi-renderers/runtimescene-pixi-renderer.js.map +7 -0
  532. package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js +2 -0
  533. package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js.map +7 -0
  534. package/dist/Runtime/pixi-renderers/three.js +7 -0
  535. package/dist/Runtime/polygon.js +2 -0
  536. package/dist/Runtime/polygon.js.map +7 -0
  537. package/dist/Runtime/profiler.js +2 -0
  538. package/dist/Runtime/profiler.js.map +7 -0
  539. package/dist/Runtime/runtimebehavior.js +2 -0
  540. package/dist/Runtime/runtimebehavior.js.map +7 -0
  541. package/dist/Runtime/runtimegame.js +2 -0
  542. package/dist/Runtime/runtimegame.js.map +7 -0
  543. package/dist/Runtime/runtimeobject.js +2 -0
  544. package/dist/Runtime/runtimeobject.js.map +7 -0
  545. package/dist/Runtime/runtimescene.js +2 -0
  546. package/dist/Runtime/runtimescene.js.map +7 -0
  547. package/dist/Runtime/runtimewatermark.js +100 -0
  548. package/dist/Runtime/runtimewatermark.js.map +7 -0
  549. package/dist/Runtime/scenestack.js +2 -0
  550. package/dist/Runtime/scenestack.js.map +7 -0
  551. package/dist/Runtime/splash/gd-logo-dark-colored.js +2 -0
  552. package/dist/Runtime/splash/gd-logo-dark-colored.js.map +7 -0
  553. package/dist/Runtime/splash/gd-logo-dark.js +2 -0
  554. package/dist/Runtime/splash/gd-logo-dark.js.map +7 -0
  555. package/dist/Runtime/splash/gd-logo-light-colored.js +2 -0
  556. package/dist/Runtime/splash/gd-logo-light-colored.js.map +7 -0
  557. package/dist/Runtime/splash/gd-logo-light.js +2 -0
  558. package/dist/Runtime/splash/gd-logo-light.js.map +7 -0
  559. package/dist/Runtime/spriteruntimeobject.js +2 -0
  560. package/dist/Runtime/spriteruntimeobject.js.map +7 -0
  561. package/dist/Runtime/timemanager.js +2 -0
  562. package/dist/Runtime/timemanager.js.map +7 -0
  563. package/dist/Runtime/timer.js +2 -0
  564. package/dist/Runtime/timer.js.map +7 -0
  565. package/dist/Runtime/types/global-pixi.d.ts +22 -0
  566. package/dist/Runtime/types/global-three-addons.d.ts +9 -0
  567. package/dist/Runtime/types/global-three.d.ts +3 -0
  568. package/dist/Runtime/types/global-types.d.ts +61 -0
  569. package/dist/Runtime/types/howler.d.ts +313 -0
  570. package/dist/Runtime/types/project-data.d.ts +276 -0
  571. package/dist/Runtime/variable.js +2 -0
  572. package/dist/Runtime/variable.js.map +7 -0
  573. package/dist/Runtime/variablescontainer.js +2 -0
  574. package/dist/Runtime/variablescontainer.js.map +7 -0
  575. package/dist/lib/libGD.cjs +22 -0
  576. package/dist/lib/libGD.wasm +0 -0
  577. package/dist/loaders.js +1 -0
  578. package/package.json +24 -10
  579. package/src/WrappedGD.js +159 -138
  580. package/src/downloadGD.js +0 -70
  581. package/src/index.js +21 -14
  582. package/examples/create-objects-from-json/assets/Blank button.png +0 -0
  583. package/examples/create-objects-from-json/game.json +0 -258
  584. package/examples/create-objects-from-json/index.js +0 -50
  585. package/examples/create-objects-from-json/mylist.json +0 -7
  586. package/examples/export-game/game.json +0 -205
  587. package/examples/export-game/index.js +0 -13
  588. package/package-lock.json +0 -223
  589. package/src/CaseSensitiveSlug.js +0 -34
  590. package/src/EventsFunctionsExtensionsLoader/LocalEventsFunctionCodeWriter.js +0 -56
  591. package/src/EventsFunctionsExtensionsLoader/MetadataDeclarationHelpers.js +0 -489
  592. package/src/EventsFunctionsExtensionsLoader/index.js +0 -451
  593. package/src/JsExtensionsLoader/LocalJsExtensionsFinder.js +0 -42
  594. package/src/JsExtensionsLoader/LocalJsExtensionsLoader.js +0 -57
  595. package/src/JsExtensionsLoader/index.js +0 -101
  596. package/src/LocalFileSystem.js +0 -158
  597. package/src/LocalProjectOpener.js +0 -46
  598. package/src/LocalProjectWriter.js +0 -96
  599. package/src/MapFor.js +0 -46
  600. package/src/ObjectSplitter.js +0 -187
  601. package/src/Serializer.js +0 -35
  602. package/src/build.js +0 -51
  603. package/src/runtime-files-list.js +0 -143
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.ts"],
4
+ "sourcesContent": ["namespace gdjs {\n import PIXI = GlobalPIXIModule.PIXI;\n\n class ShapePainterRuntimeObjectPixiRenderer {\n _object: gdjs.ShapePainterRuntimeObject;\n _graphics: PIXI.Graphics;\n /**\n * Graphics positions can need updates when shapes are added,\n * this avoids to do it each time.\n */\n _positionXIsUpToDate = false;\n /**\n * Graphics positions can need updates when shapes are added,\n * this avoids to do it each time.\n */\n _positionYIsUpToDate = false;\n /**\n * This allows to use the transformation of the renderer\n * and compute it only when necessary.\n */\n _transformationIsUpToDate = false;\n\n _antialiasingFilter: null | PIXI.Filter = null;\n\n private static readonly _positionForTransformation: PIXI.IPointData = {\n x: 0,\n y: 0,\n };\n\n constructor(\n runtimeObject: gdjs.ShapePainterRuntimeObject,\n instanceContainer: gdjs.RuntimeInstanceContainer\n ) {\n this._object = runtimeObject;\n this._graphics = new PIXI.Graphics();\n instanceContainer\n .getLayer('')\n .getRenderer()\n .addRendererObject(this._graphics, runtimeObject.getZOrder());\n this.updateAntialiasing();\n }\n\n getRendererObject() {\n return this._graphics;\n }\n\n clear() {\n this._graphics.clear();\n this.invalidateBounds();\n }\n\n drawRectangle(x1: float, y1: float, x2: float, y2: float) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n this._graphics.drawRect(x1, y1, x2 - x1, y2 - y1);\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawCircle(x: float, y: float, radius: float) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n this._graphics.drawCircle(x, y, radius);\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawLine(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n if (y2 === y1) {\n this._graphics.drawRect(x1, y1 - thickness / 2, x2 - x1, thickness);\n } else {\n const angle = Math.atan2(y2 - y1, x2 - x1);\n const xIncrement = Math.sin(angle) * thickness;\n const yIncrement = Math.cos(angle) * thickness;\n this._graphics.drawPolygon(\n x1 + xIncrement,\n y1 - yIncrement,\n x1 - xIncrement,\n y1 + yIncrement,\n x2 - xIncrement,\n y2 + yIncrement,\n x2 + xIncrement,\n y2 - yIncrement\n );\n }\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawLineV2(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._graphics.lineStyle(\n thickness,\n this._object._outlineColor,\n this._object._outlineOpacity / 255\n );\n this._graphics.moveTo(x1, y1);\n this._graphics.lineTo(x2, y2);\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawEllipse(x1: float, y1: float, width: float, height: float) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n this._graphics.drawEllipse(x1, y1, width / 2, height / 2);\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawRoundedRectangle(\n x1: float,\n y1: float,\n x2: float,\n y2: float,\n radius: float\n ) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n this._graphics.drawRoundedRect(x1, y1, x2 - x1, y2 - y1, radius);\n this._graphics.closePath();\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawStar(\n x1: float,\n y1: float,\n points: float,\n radius: float,\n innerRadius: float,\n rotation: float\n ) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n //@ts-ignore from @pixi/graphics-extras\n this._graphics.drawStar(\n x1,\n y1,\n points,\n radius,\n innerRadius ? innerRadius : radius / 2,\n rotation ? gdjs.toRad(rotation) : 0\n );\n this._graphics.closePath();\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawArc(\n x1: float,\n y1: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean,\n closePath: boolean\n ) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n this._graphics.moveTo(\n x1 + radius * Math.cos(gdjs.toRad(startAngle)),\n y1 + radius * Math.sin(gdjs.toRad(startAngle))\n );\n this._graphics.arc(\n x1,\n y1,\n radius,\n gdjs.toRad(startAngle),\n gdjs.toRad(endAngle),\n anticlockwise ? true : false\n );\n if (closePath) {\n this._graphics.closePath();\n }\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawBezierCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n x2: float,\n y2: float\n ) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n this._graphics.moveTo(x1, y1);\n this._graphics.bezierCurveTo(cpX, cpY, cpX2, cpY2, x2, y2);\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawQuadraticCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n x2: float,\n y2: float\n ) {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n this._graphics.moveTo(x1, y1);\n this._graphics.quadraticCurveTo(cpX, cpY, x2, y2);\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n beginFillPath() {\n this.updateOutline();\n this._graphics.beginFill(\n this._object._fillColor,\n this._object._fillOpacity / 255\n );\n }\n\n endFillPath() {\n this._graphics.endFill();\n this.invalidateBounds();\n }\n\n drawPathMoveTo(x1: float, y1: float) {\n this._graphics.moveTo(x1, y1);\n }\n\n drawPathLineTo(x1: float, y1: float) {\n this._graphics.lineTo(x1, y1);\n this.invalidateBounds();\n }\n\n drawPathBezierCurveTo(\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n toX: float,\n toY: float\n ) {\n this._graphics.bezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY);\n this.invalidateBounds();\n }\n\n drawPathArc(\n x1: float,\n y1: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean\n ) {\n this._graphics.arc(\n x1,\n y1,\n radius,\n gdjs.toRad(startAngle),\n gdjs.toRad(endAngle),\n anticlockwise ? true : false\n );\n this.invalidateBounds();\n }\n\n drawPathQuadraticCurveTo(cpX: float, cpY: float, toX: float, toY: float) {\n this._graphics.quadraticCurveTo(cpX, cpY, toX, toY);\n this.invalidateBounds();\n }\n\n closePath() {\n this._graphics.closePath();\n this.invalidateBounds();\n }\n\n updateOutline(): void {\n this._graphics.lineStyle(\n this._object._outlineSize,\n this._object._outlineColor,\n this._object._outlineOpacity / 255\n );\n }\n\n invalidateBounds() {\n this._object.invalidateBounds();\n this._positionXIsUpToDate = false;\n this._positionYIsUpToDate = false;\n }\n\n updatePreRender(): void {\n this.updatePositionIfNeeded();\n }\n\n updatePositionX(): void {\n if (this._object._useAbsoluteCoordinates) {\n this._graphics.pivot.x = 0;\n this._graphics.position.x = 0;\n } else {\n // Make the drawing rotate around the rotation center.\n this._graphics.pivot.x = this._object.getRotationCenterX();\n // Multiply by the scale to have the scale anchor\n // at the object position instead of the center.\n this._graphics.position.x =\n this._object.x +\n this._graphics.pivot.x * Math.abs(this._graphics.scale.x);\n }\n this._transformationIsUpToDate = false;\n }\n\n updatePositionY(): void {\n if (this._object._useAbsoluteCoordinates) {\n this._graphics.pivot.y = 0;\n this._graphics.position.y = 0;\n } else {\n this._graphics.pivot.y = this._object.getRotationCenterY();\n this._graphics.position.y =\n this._object.y +\n this._graphics.pivot.y * Math.abs(this._graphics.scale.y);\n }\n this._transformationIsUpToDate = false;\n }\n\n updatePositionIfNeeded() {\n if (!this._positionXIsUpToDate) {\n this.updatePositionX();\n this._positionXIsUpToDate = true;\n }\n if (!this._positionYIsUpToDate) {\n this.updatePositionY();\n this._positionYIsUpToDate = true;\n }\n }\n\n updateTransformationIfNeeded() {\n if (!this._transformationIsUpToDate) {\n this.updatePositionIfNeeded();\n this._graphics.updateTransform();\n }\n this._transformationIsUpToDate = true;\n }\n\n updateRotationCenter(): void {\n // The pivot and position depends on the rotation center point.\n this._positionXIsUpToDate = false;\n this._positionYIsUpToDate = false;\n // The whole transformation changes based on the rotation center point.\n this._transformationIsUpToDate = false;\n }\n\n updateAngle(): void {\n if (this._object._useAbsoluteCoordinates) {\n this._graphics.angle = 0;\n } else {\n this._graphics.angle = this._object.angle;\n }\n this._transformationIsUpToDate = false;\n }\n\n updateScaleX(): void {\n if (this._object._useAbsoluteCoordinates) {\n this._graphics.scale.x = 1;\n } else {\n this._graphics.scale.x = this._object._scaleX;\n }\n // updatePositionX() uses scale.x\n this._positionXIsUpToDate = false;\n this._transformationIsUpToDate = false;\n }\n\n updateScaleY(): void {\n if (this._object._useAbsoluteCoordinates) {\n this._graphics.scale.y = 1;\n } else {\n this._graphics.scale.y = this._object._scaleY;\n }\n // updatePositionY() uses scale.y\n this._positionYIsUpToDate = false;\n this._transformationIsUpToDate = false;\n }\n\n getDrawableX(): float {\n if (this._object._useAbsoluteCoordinates) {\n return this._graphics.getLocalBounds().left;\n }\n let localBound = this._graphics.getLocalBounds().left;\n if (this._object._flippedX) {\n const rotationCenterX = this._object.getRotationCenterX();\n localBound = 2 * rotationCenterX - localBound;\n }\n // When new shape are drawn, the bounds of the object can extend.\n // The object position stays the same but (drawableX; drawableY) can change.\n return (\n this._object.getX() + localBound * Math.abs(this._graphics.scale.x)\n );\n }\n\n getDrawableY(): float {\n if (this._object._useAbsoluteCoordinates) {\n return this._graphics.getLocalBounds().top;\n }\n let localBound = this._graphics.getLocalBounds().top;\n if (this._object._flippedY) {\n const rotationCenterY = this._object.getRotationCenterY();\n localBound = 2 * rotationCenterY - localBound;\n }\n return (\n this._object.getY() + localBound * Math.abs(this._graphics.scale.y)\n );\n }\n\n getWidth(): float {\n return this._graphics.width;\n }\n\n getHeight(): float {\n return this._graphics.height;\n }\n\n getUnscaledWidth(): float {\n return this._graphics.getLocalBounds().width;\n }\n\n getUnscaledHeight(): float {\n return this._graphics.getLocalBounds().height;\n }\n\n /**\n * @returns The drawing origin relatively to the drawable top left corner.\n */\n getFrameRelativeOriginX() {\n return -this._graphics.getLocalBounds().left;\n }\n\n /**\n * @returns The drawing origin relatively to the drawable top left corner.\n */\n getFrameRelativeOriginY() {\n return -this._graphics.getLocalBounds().top;\n }\n\n transformToDrawing(point: FloatPoint): FloatPoint {\n this.updateTransformationIfNeeded();\n const position =\n ShapePainterRuntimeObjectPixiRenderer._positionForTransformation;\n position.x = point[0];\n position.y = point[1];\n this._graphics.localTransform.applyInverse(position, position);\n point[0] = position.x;\n point[1] = position.y;\n return point;\n }\n\n transformToScene(point: FloatPoint): FloatPoint {\n this.updateTransformationIfNeeded();\n const position =\n ShapePainterRuntimeObjectPixiRenderer._positionForTransformation;\n position.x = point[0];\n position.y = point[1];\n this._graphics.localTransform.apply(position, position);\n point[0] = position.x;\n point[1] = position.y;\n return point;\n }\n\n updateAntialiasing(): void {\n if (this._object.getAntialiasing() !== 'none') {\n if (!this._antialiasingFilter) {\n this._antialiasingFilter = new PIXI.filters.FXAAFilter();\n }\n\n const antialiasingFilter = this._antialiasingFilter;\n antialiasingFilter.enabled = true;\n antialiasingFilter.multisample =\n PIXI.MSAA_QUALITY[this._object.getAntialiasing().toUpperCase()] ||\n PIXI.MSAA_QUALITY.LOW;\n\n if (!this._graphics.filters) {\n this._graphics.filters = [];\n }\n // Do not apply the filter if it is already present on the object.\n if (this._graphics.filters.indexOf(antialiasingFilter) === -1) {\n this._graphics.filters.push(antialiasingFilter);\n }\n } else if (this._antialiasingFilter !== null) {\n if (!this._graphics.filters) {\n return;\n }\n const antialiasingFilterIndex = this._graphics.filters.indexOf(\n this._antialiasingFilter\n );\n\n if (antialiasingFilterIndex !== -1) {\n this._graphics.filters.splice(antialiasingFilterIndex, 1);\n }\n }\n }\n }\n\n export const ShapePainterRuntimeObjectRenderer = ShapePainterRuntimeObjectPixiRenderer;\n export type ShapePainterRuntimeObjectRenderer = ShapePainterRuntimeObjectPixiRenderer;\n}\n"],
5
+ "mappings": "AAAA,IAAU,MAAAA,GAAV,CACE,MAAOC,EAAO,iBAAiB,KAE/B,MAAMC,CAAsC,CAC1C,QACA,UAKA,qBAAuB,GAKvB,qBAAuB,GAKvB,0BAA4B,GAE5B,oBAA0C,KAE1C,OAAwB,2BAA8C,CACpE,EAAG,EACH,EAAG,CACL,EAEA,YACEC,EACAC,EACA,CACA,KAAK,QAAUD,EACf,KAAK,UAAY,IAAIF,EAAK,SAC1BG,EACG,SAAS,EAAE,EACX,YAAY,EACZ,kBAAkB,KAAK,UAAWD,EAAc,UAAU,CAAC,EAC9D,KAAK,mBAAmB,CAC1B,CAEA,mBAAoB,CAClB,OAAO,KAAK,SACd,CAEA,OAAQ,CACN,KAAK,UAAU,MAAM,EACrB,KAAK,iBAAiB,CACxB,CAEA,cAAcE,EAAWC,EAAWC,EAAWC,EAAW,CACxD,KAAK,cAAc,EACnB,KAAK,UAAU,UACb,KAAK,QAAQ,WACb,KAAK,QAAQ,aAAe,GAC9B,EACA,KAAK,UAAU,SAASH,EAAIC,EAAIC,EAAKF,EAAIG,EAAKF,CAAE,EAChD,KAAK,UAAU,QAAQ,EACvB,KAAK,iBAAiB,CACxB,CAEA,WAAWG,EAAUC,EAAUC,EAAe,CAC5C,KAAK,cAAc,EACnB,KAAK,UAAU,UACb,KAAK,QAAQ,WACb,KAAK,QAAQ,aAAe,GAC9B,EACA,KAAK,UAAU,WAAWF,EAAG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BC,EAAS,EAAID,EAAM,CAAC,EACpB,KAAK,UAAU,eAAe,aAAaC,EAAUA,CAAQ,EAC7DD,EAAM,CAAC,EAAIC,EAAS,EACpBD,EAAM,CAAC,EAAIC,EAAS,EACbD,CACT,CAEA,iBAAiBA,EAA+B,CAC9C,KAAK,6BAA6B,EAClC,MAAMC,EACJ/B,EAAsC,2BACxC,OAAA+B,EAAS,EAAID,EAAM,CAAC,EACpBC,EAAS,EAAID,EAAM,CAAC,EACpB,KAAK,UAAU,eAAe,MAAMC,EAAUA,CAAQ,EACtDD,EAAM,CAAC,EAAIC,EAAS,EACpBD,EAAM,CAAC,EAAIC,EAAS,EACbD,CACT,CAEA,oBAA2B,CACzB,GAAI,KAAK,QAAQ,gBAAgB,IAAM,OAAQ,CACxC,KAAK,sBACR,KAAK,oBAAsB,IAAI/B,EAAK,QAAQ,YAG9C,MAAMiC,EAAqB,KAAK,oBAChCA,EAAmB,QAAU,GAC7BA,EAAmB,YACjBjC,EAAK,aAAa,KAAK,QAAQ,gBAAgB,EAAE,YAAY,CAAC,GAC9DA,EAAK,aAAa,IAEf,KAAK,UAAU,UAClB,KAAK,UAAU,QAAU,CAAC,GAGxB,KAAK,UAAU,QAAQ,QAAQiC,CAAkB,IAAM,IACzD,KAAK,UAAU,QAAQ,KAAKA,CAAkB,CAElD,SAAW,KAAK,sBAAwB,KAAM,CAC5C,GAAI,CAAC,KAAK,UAAU,QAClB,OAEF,MAAMC,EAA0B,KAAK,UAAU,QAAQ,QACrD,KAAK,mBACP,EAEIA,IAA4B,IAC9B,KAAK,UAAU,QAAQ,OAAOA,EAAyB,CAAC,CAE5D,CACF,CACF,CAEanC,EAAA,kCAAoCE,IA9gBzC",
6
+ "names": ["gdjs", "PIXI", "ShapePainterRuntimeObjectPixiRenderer", "runtimeObject", "instanceContainer", "x1", "y1", "x2", "y2", "x", "y", "radius", "thickness", "angle", "xIncrement", "yIncrement", "width", "height", "points", "innerRadius", "rotation", "startAngle", "endAngle", "anticlockwise", "closePath", "cpX", "cpY", "cpX2", "cpY2", "toX", "toY", "localBound", "point", "position", "antialiasingFilter", "antialiasingFilterIndex"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var gdjs;(s=>{class n extends s.RuntimeObject{_scaleX=1;_scaleY=1;_blendMode=0;_flippedX=!1;_flippedY=!1;_customCenter=null;_customCollisionMask=null;_fillColor;_outlineColor;_fillOpacity;_outlineOpacity;_outlineSize;_useAbsoluteCoordinates;_clearBetweenFrames;_antialiasing;_renderer;static _pointForTransformation=[0,0];constructor(e,t){super(e,t),this._fillColor=parseInt(s.rgbToHex(t.fillColor.r,t.fillColor.g,t.fillColor.b),16),this._outlineColor=parseInt(s.rgbToHex(t.outlineColor.r,t.outlineColor.g,t.outlineColor.b),16),this._fillOpacity=t.fillOpacity,this._outlineOpacity=t.outlineOpacity,this._outlineSize=t.outlineSize,this._useAbsoluteCoordinates=t.absoluteCoordinates,this._clearBetweenFrames=t.clearBetweenFrames,this._antialiasing=t.antialiasing,this._renderer=new s.ShapePainterRuntimeObjectRenderer(this,e),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(e,t){return(e.fillColor.r!==t.fillColor.r||e.fillColor.g!==t.fillColor.g||e.fillColor.b!==t.fillColor.b)&&this.setFillColor(""+t.fillColor.r+";"+t.fillColor.g+";"+t.fillColor.b),(e.outlineColor.r!==t.outlineColor.r||e.outlineColor.g!==t.outlineColor.g||e.outlineColor.b!==t.outlineColor.b)&&this.setOutlineColor(""+t.outlineColor.r+";"+t.outlineColor.g+";"+t.outlineColor.b),e.fillOpacity!==t.fillOpacity&&this.setFillOpacity(t.fillOpacity),e.outlineOpacity!==t.outlineOpacity&&this.setOutlineOpacity(t.outlineOpacity),e.outlineSize!==t.outlineSize&&this.setOutlineSize(t.outlineSize),e.absoluteCoordinates!==t.absoluteCoordinates&&(this._useAbsoluteCoordinates=t.absoluteCoordinates,this._renderer.updatePositionX(),this._renderer.updatePositionY(),this._renderer.updateAngle(),this._renderer.updateScaleX(),this._renderer.updateScaleY()),e.clearBetweenFrames!==t.clearBetweenFrames&&(this._clearBetweenFrames=t.clearBetweenFrames),!0}stepBehaviorsPreEvents(e){this._clearBetweenFrames&&this.clear(),super.stepBehaviorsPreEvents(e)}clear(){this._renderer.clear()}getVisibilityAABB(){return this._useAbsoluteCoordinates?null:this.getAABB()}drawRectangle(e,t,i,o){this._renderer.drawRectangle(e,t,i,o)}drawCircle(e,t,i){this._renderer.drawCircle(e,t,i)}drawLine(e,t,i,o,r){this._renderer.drawLine(e,t,i,o,r)}drawLineV2(e,t,i,o,r){this._renderer.drawLineV2(e,t,i,o,r)}drawEllipse(e,t,i,o){this._renderer.drawEllipse(e,t,i,o)}drawRoundedRectangle(e,t,i,o,r){this._renderer.drawRoundedRectangle(e,t,i,o,r)}drawStar(e,t,i,o,r,l){this._renderer.drawStar(e,t,i,o,r,l)}drawArc(e,t,i,o,r,l,a){this._renderer.drawArc(e,t,i,o,r,l,a)}drawBezierCurve(e,t,i,o,r,l,a,h){this._renderer.drawBezierCurve(e,t,i,o,r,l,a,h)}drawQuadraticCurve(e,t,i,o,r,l){this._renderer.drawQuadraticCurve(e,t,i,o,r,l)}beginFillPath(e,t){this._renderer.beginFillPath(),this._renderer.drawPathMoveTo(e,t)}endFillPath(){this._renderer.endFillPath()}drawPathMoveTo(e,t){this._renderer.drawPathMoveTo(e,t)}drawPathLineTo(e,t){this._renderer.drawPathLineTo(e,t)}drawPathBezierCurveTo(e,t,i,o,r,l){this._renderer.drawPathBezierCurveTo(e,t,i,o,r,l)}drawPathArc(e,t,i,o,r,l){this._renderer.drawPathArc(e,t,i,o,r,l)}drawPathQuadraticCurveTo(e,t,i,o){this._renderer.drawPathQuadraticCurveTo(e,t,i,o)}closePath(){this._renderer.closePath()}setClearBetweenFrames(e){this._clearBetweenFrames=e}isClearedBetweenFrames(){return this._clearBetweenFrames}setAntialiasing(e){this._antialiasing=e,this._renderer.updateAntialiasing()}getAntialiasing(){return this._antialiasing}checkAntialiasing(e){return this._antialiasing===e}setCoordinatesRelative(e){this._useAbsoluteCoordinates=!e}areCoordinatesRelative(){return!this._useAbsoluteCoordinates}setFillColor(e){const t=e.split(";");t.length<3||(this._fillColor=parseInt(s.rgbToHex(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)),16))}getFillColorR(){return s.hexNumberToRGB(this._fillColor).r}getFillColorG(){return s.hexNumberToRGB(this._fillColor).g}getFillColorB(){return s.hexNumberToRGB(this._fillColor).b}setOutlineColor(e){const t=e.split(";");t.length<3||(this._outlineColor=parseInt(s.rgbToHex(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)),16),this._renderer.updateOutline())}getOutlineColorR(){return s.hexNumberToRGB(this._outlineColor).r}getOutlineColorG(){return s.hexNumberToRGB(this._outlineColor).g}getOutlineColorB(){return s.hexNumberToRGB(this._outlineColor).b}setOutlineSize(e){this._outlineSize=e,this._renderer.updateOutline()}getOutlineSize(){return this._outlineSize}setFillOpacity(e){this._fillOpacity=e}getFillOpacity(){return this._fillOpacity}setOutlineOpacity(e){this._outlineOpacity=e,this._renderer.updateOutline()}getOutlineOpacity(){return this._outlineOpacity}setX(e){e!==this.x&&(super.setX(e),this._renderer.updatePositionX())}setY(e){e!==this.y&&(super.setY(e),this._renderer.updatePositionY())}setAngle(e){e!==this.angle&&(super.setAngle(e),this._renderer.updateAngle(),this.invalidateHitboxes())}setRotationCenter(e,t){this._customCenter||(this._customCenter=[0,0]),this._customCenter[0]=e,this._customCenter[1]=t,this._renderer.updateRotationCenter()}getRotationCenterX(){return this._customCenter?this._customCenter[0]:this._renderer.getUnscaledWidth()/2-this._renderer.getFrameRelativeOriginX()}getRotationCenterY(){return this._customCenter?this._customCenter[1]:this._renderer.getUnscaledHeight()/2-this._renderer.getFrameRelativeOriginY()}getCenterX(){return this._customCenter?this._customCenter[0]*Math.abs(this._scaleX)+this.getX()-this.getDrawableX():super.getCenterX()}getCenterY(){return this._customCenter?this._customCenter[1]*Math.abs(this._scaleY)+this.getY()-this.getDrawableY():super.getCenterY()}setWidth(e){const t=this._renderer.getUnscaledWidth();t!==0&&this.setScaleX(e/t)}setHeight(e){const t=this._renderer.getUnscaledHeight();t!==0&&this.setScaleY(e/t)}setScale(e){this.setScaleX(e),this.setScaleY(e)}setScaleX(e){e<0&&(e=0),e!==Math.abs(this._scaleX)&&(this._scaleX=e*(this._flippedX?-1:1),this._renderer.updateScaleX(),this.invalidateHitboxes())}setScaleY(e){e<0&&(e=0),e!==Math.abs(this._scaleY)&&(this._scaleY=e*(this._flippedY?-1:1),this._renderer.updateScaleY(),this.invalidateHitboxes())}flipX(e){e!==this._flippedX&&(this._scaleX*=-1,this._flippedX=e,this._renderer.updateScaleX(),this.invalidateHitboxes())}flipY(e){e!==this._flippedY&&(this._scaleY*=-1,this._flippedY=e,this._renderer.updateScaleY(),this.invalidateHitboxes())}isFlippedX(){return this._flippedX}isFlippedY(){return this._flippedY}getScale(){const e=Math.abs(this._scaleX),t=Math.abs(this._scaleY);return e===t?e:Math.sqrt(e*t)}getScaleY(){return Math.abs(this._scaleY)}getScaleX(){return Math.abs(this._scaleX)}invalidateBounds(){this.invalidateHitboxes()}getDrawableX(){return this._renderer.getDrawableX()}getDrawableY(){return this._renderer.getDrawableY()}getWidth(){return this._renderer.getWidth()}getHeight(){return this._renderer.getHeight()}updatePreRender(e){this._renderer.updatePreRender()}transformToDrawing(e,t){const i=n._pointForTransformation;return i[0]=e,i[1]=t,this._renderer.transformToDrawing(i)}transformToScene(e,t){const i=n._pointForTransformation;return i[0]=e,i[1]=t,this._renderer.transformToScene(i)}transformToDrawingX(e,t){return this.transformToDrawing(e,t)[0]}transformToDrawingY(e,t){return this.transformToDrawing(e,t)[1]}transformToSceneX(e,t){return this.transformToScene(e,t)[0]}transformToSceneY(e,t){return this.transformToScene(e,t)[1]}setRectangularCollisionMask(e,t,i,o){if(!this._customCollisionMask){const l=new s.Polygon;l.vertices.push([0,0]),l.vertices.push([0,0]),l.vertices.push([0,0]),l.vertices.push([0,0]),this._customCollisionMask=[l]}const r=this._customCollisionMask[0].vertices;r[0][0]=e,r[0][1]=t,r[1][0]=i,r[1][1]=t,r[2][0]=i,r[2][1]=o,r[3][0]=e,r[3][1]=o,this.invalidateHitboxes()}updateHitBoxes(){this.hitBoxes=this._defaultHitBoxes;const e=this.getWidth(),t=this.getHeight(),i=this.getCenterX(),o=this.getCenterY(),r=this.hitBoxes[0].vertices;if(this._customCollisionMask){const l=this._customCollisionMask[0].vertices;for(let a=0;a<4;a++){const h=this.transformToScene(l[a][0],l[a][1]);r[a][0]=h[0],r[a][1]=h[1]}}else i===e/2&&o===t/2?(r[0][0]=-i,r[0][1]=-o,r[1][0]=+i,r[1][1]=-o,r[2][0]=+i,r[2][1]=+o,r[3][0]=-i,r[3][1]=+o):(r[0][0]=0-i,r[0][1]=0-o,r[1][0]=e-i,r[1][1]=0-o,r[2][0]=e-i,r[2][1]=t-o,r[3][0]=0-i,r[3][1]=t-o),this._useAbsoluteCoordinates||this.hitBoxes[0].rotate(s.toRad(this.getAngle())),this.hitBoxes[0].move(this.getDrawableX()+i,this.getDrawableY()+o)}}s.ShapePainterRuntimeObject=n,s.registerObject("PrimitiveDrawing::Drawer",s.ShapePainterRuntimeObject),n.supportsReinitialization=!1})(gdjs||={});
2
+ //# sourceMappingURL=shapepainterruntimeobject.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/PrimitiveDrawing/shapepainterruntimeobject.ts"],
4
+ "sourcesContent": ["/*\n * GDevelop JS Platform\n * 2013 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n /** Represents a color in RGB Format */\n export type RGBColor = {\n /** The Red component of the color, from 0 to 255. */\n r: integer;\n /** The Green component of the color, from 0 to 255. */\n g: integer;\n /** The Blue component of the color, from 0 to 255. */\n b: integer;\n };\n\n export type Antialiasing = 'none' | 'low' | 'medium' | 'high';\n\n /** Initial properties for a for {@link gdjs.ShapePainterRuntimeObject}. */\n export type ShapePainterObjectDataType = {\n /** The color (in RGB format) of the inner part of the painted shape */\n fillColor: RGBColor;\n /** The color (in RGB format) of the outline of the painted shape */\n outlineColor: RGBColor;\n /** The opacity of the inner part of the painted shape, from 0 to 255 */\n fillOpacity: float;\n /** The opacity of the outline of the painted shape, from 0 to 255 */\n outlineOpacity: float;\n /** The size of the outline of the painted shape, in pixels. */\n outlineSize: float;\n /** Use absolute coordinates? */\n absoluteCoordinates: boolean;\n /** Clear the previous render before the next draw? */\n clearBetweenFrames: boolean;\n /** The type of anti-aliasing to apply at rendering. */\n antialiasing: Antialiasing;\n };\n\n export type ShapePainterObjectData = ObjectData & ShapePainterObjectDataType;\n\n /**\n * The ShapePainterRuntimeObject allows to draw graphics shapes on screen.\n */\n export class ShapePainterRuntimeObject extends gdjs.RuntimeObject {\n _scaleX: number = 1;\n _scaleY: number = 1;\n _blendMode: number = 0;\n _flippedX: boolean = false;\n _flippedY: boolean = false;\n _customCenter: FloatPoint | null = null;\n _customCollisionMask: Polygon[] | null = null;\n\n _fillColor: integer;\n _outlineColor: integer;\n _fillOpacity: float;\n _outlineOpacity: float;\n _outlineSize: float;\n _useAbsoluteCoordinates: boolean;\n _clearBetweenFrames: boolean;\n _antialiasing: Antialiasing;\n _renderer: gdjs.ShapePainterRuntimeObjectRenderer;\n\n private static readonly _pointForTransformation: FloatPoint = [0, 0];\n\n /**\n * @param instanceContainer The container the object belongs to.\n * @param shapePainterObjectData The initial properties of the object\n */\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n shapePainterObjectData: ShapePainterObjectData\n ) {\n super(instanceContainer, shapePainterObjectData);\n this._fillColor = parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.fillColor.r,\n shapePainterObjectData.fillColor.g,\n shapePainterObjectData.fillColor.b\n ),\n 16\n );\n this._outlineColor = parseInt(\n gdjs.rgbToHex(\n shapePainterObjectData.outlineColor.r,\n shapePainterObjectData.outlineColor.g,\n shapePainterObjectData.outlineColor.b\n ),\n 16\n );\n this._fillOpacity = shapePainterObjectData.fillOpacity;\n this._outlineOpacity = shapePainterObjectData.outlineOpacity;\n this._outlineSize = shapePainterObjectData.outlineSize;\n this._useAbsoluteCoordinates = shapePainterObjectData.absoluteCoordinates;\n this._clearBetweenFrames = shapePainterObjectData.clearBetweenFrames;\n this._antialiasing = shapePainterObjectData.antialiasing;\n this._renderer = new gdjs.ShapePainterRuntimeObjectRenderer(\n this,\n instanceContainer\n );\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n getRendererObject() {\n return this._renderer.getRendererObject();\n }\n\n updateFromObjectData(\n oldObjectData: ShapePainterObjectData,\n newObjectData: ShapePainterObjectData\n ): boolean {\n if (\n oldObjectData.fillColor.r !== newObjectData.fillColor.r ||\n oldObjectData.fillColor.g !== newObjectData.fillColor.g ||\n oldObjectData.fillColor.b !== newObjectData.fillColor.b\n ) {\n this.setFillColor(\n '' +\n newObjectData.fillColor.r +\n ';' +\n newObjectData.fillColor.g +\n ';' +\n newObjectData.fillColor.b\n );\n }\n if (\n oldObjectData.outlineColor.r !== newObjectData.outlineColor.r ||\n oldObjectData.outlineColor.g !== newObjectData.outlineColor.g ||\n oldObjectData.outlineColor.b !== newObjectData.outlineColor.b\n ) {\n this.setOutlineColor(\n '' +\n newObjectData.outlineColor.r +\n ';' +\n newObjectData.outlineColor.g +\n ';' +\n newObjectData.outlineColor.b\n );\n }\n if (oldObjectData.fillOpacity !== newObjectData.fillOpacity) {\n this.setFillOpacity(newObjectData.fillOpacity);\n }\n if (oldObjectData.outlineOpacity !== newObjectData.outlineOpacity) {\n this.setOutlineOpacity(newObjectData.outlineOpacity);\n }\n if (oldObjectData.outlineSize !== newObjectData.outlineSize) {\n this.setOutlineSize(newObjectData.outlineSize);\n }\n if (\n oldObjectData.absoluteCoordinates !== newObjectData.absoluteCoordinates\n ) {\n this._useAbsoluteCoordinates = newObjectData.absoluteCoordinates;\n this._renderer.updatePositionX();\n this._renderer.updatePositionY();\n this._renderer.updateAngle();\n this._renderer.updateScaleX();\n this._renderer.updateScaleY();\n }\n if (\n oldObjectData.clearBetweenFrames !== newObjectData.clearBetweenFrames\n ) {\n this._clearBetweenFrames = newObjectData.clearBetweenFrames;\n }\n return true;\n }\n\n stepBehaviorsPreEvents(instanceContainer: gdjs.RuntimeInstanceContainer) {\n //We redefine stepBehaviorsPreEvents just to clear the graphics before running events.\n if (this._clearBetweenFrames) {\n this.clear();\n }\n super.stepBehaviorsPreEvents(instanceContainer);\n }\n\n /**\n * Clear the graphics.\n */\n clear() {\n this._renderer.clear();\n }\n\n getVisibilityAABB() {\n return this._useAbsoluteCoordinates ? null : this.getAABB();\n }\n\n drawRectangle(x1: float, y1: float, x2: float, y2: float) {\n this._renderer.drawRectangle(x1, y1, x2, y2);\n }\n\n drawCircle(x: float, y: float, radius: float) {\n this._renderer.drawCircle(x, y, radius);\n }\n\n drawLine(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._renderer.drawLine(x1, y1, x2, y2, thickness);\n }\n\n drawLineV2(x1: float, y1: float, x2: float, y2: float, thickness: float) {\n this._renderer.drawLineV2(x1, y1, x2, y2, thickness);\n }\n\n drawEllipse(centerX: float, centerY: float, width: float, height: float) {\n this._renderer.drawEllipse(centerX, centerY, width, height);\n }\n\n drawRoundedRectangle(\n startX1: float,\n startY1: float,\n endX2: float,\n endY2: float,\n radius: float\n ) {\n this._renderer.drawRoundedRectangle(\n startX1,\n startY1,\n endX2,\n endY2,\n radius\n );\n }\n\n drawStar(\n centerX: float,\n centerY: float,\n points: float,\n radius: float,\n innerRadius: float,\n rotation: float\n ) {\n this._renderer.drawStar(\n centerX,\n centerY,\n points,\n radius,\n innerRadius,\n rotation\n );\n }\n\n drawArc(\n centerX: float,\n centerY: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean,\n closePath: boolean\n ) {\n this._renderer.drawArc(\n centerX,\n centerY,\n radius,\n startAngle,\n endAngle,\n anticlockwise,\n closePath\n );\n }\n\n drawBezierCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n x2: float,\n y2: float\n ) {\n this._renderer.drawBezierCurve(x1, y1, cpX, cpY, cpX2, cpY2, x2, y2);\n }\n\n drawQuadraticCurve(\n x1: float,\n y1: float,\n cpX: float,\n cpY: float,\n x2: float,\n y2: float\n ) {\n this._renderer.drawQuadraticCurve(x1, y1, cpX, cpY, x2, y2);\n }\n\n beginFillPath(x1: float, y1: float) {\n this._renderer.beginFillPath();\n this._renderer.drawPathMoveTo(x1, y1);\n }\n\n endFillPath() {\n this._renderer.endFillPath();\n }\n\n drawPathMoveTo(x1: float, y1: float) {\n this._renderer.drawPathMoveTo(x1, y1);\n }\n\n drawPathLineTo(x1: float, y1: float) {\n this._renderer.drawPathLineTo(x1, y1);\n }\n\n drawPathBezierCurveTo(\n cpX: float,\n cpY: float,\n cpX2: float,\n cpY2: float,\n toX: float,\n toY: float\n ) {\n this._renderer.drawPathBezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY);\n }\n\n drawPathArc(\n cx: float,\n cy: float,\n radius: float,\n startAngle: float,\n endAngle: float,\n anticlockwise: boolean\n ) {\n this._renderer.drawPathArc(\n cx,\n cy,\n radius,\n startAngle,\n endAngle,\n anticlockwise\n );\n }\n\n drawPathQuadraticCurveTo(cpX: float, cpY: float, toX: float, toY: float) {\n this._renderer.drawPathQuadraticCurveTo(cpX, cpY, toX, toY);\n }\n\n closePath() {\n this._renderer.closePath();\n }\n\n setClearBetweenFrames(value: boolean): void {\n this._clearBetweenFrames = value;\n }\n\n isClearedBetweenFrames(): boolean {\n return this._clearBetweenFrames;\n }\n\n setAntialiasing(value: Antialiasing): void {\n this._antialiasing = value;\n this._renderer.updateAntialiasing();\n }\n\n getAntialiasing(): Antialiasing {\n return this._antialiasing;\n }\n\n checkAntialiasing(valueToCompare: Antialiasing): boolean {\n return this._antialiasing === valueToCompare;\n }\n\n setCoordinatesRelative(value: boolean): void {\n this._useAbsoluteCoordinates = !value;\n }\n\n areCoordinatesRelative(): boolean {\n return !this._useAbsoluteCoordinates;\n }\n\n /**\n *\n * @param rgbColor semicolon separated decimal values\n */\n setFillColor(rgbColor: string): void {\n const colors = rgbColor.split(';');\n if (colors.length < 3) {\n return;\n }\n this._fillColor = parseInt(\n gdjs.rgbToHex(\n parseInt(colors[0], 10),\n parseInt(colors[1], 10),\n parseInt(colors[2], 10)\n ),\n 16\n );\n }\n\n getFillColorR(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).r;\n }\n getFillColorG(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).g;\n }\n getFillColorB(): integer {\n return gdjs.hexNumberToRGB(this._fillColor).b;\n }\n\n /**\n *\n * @param rgbColor semicolon separated decimal values\n */\n setOutlineColor(rgbColor: string): void {\n const colors = rgbColor.split(';');\n if (colors.length < 3) {\n return;\n }\n this._outlineColor = parseInt(\n gdjs.rgbToHex(\n parseInt(colors[0], 10),\n parseInt(colors[1], 10),\n parseInt(colors[2], 10)\n ),\n 16\n );\n this._renderer.updateOutline();\n }\n\n getOutlineColorR(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).r;\n }\n getOutlineColorG(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).g;\n }\n getOutlineColorB(): integer {\n return gdjs.hexNumberToRGB(this._outlineColor).b;\n }\n\n setOutlineSize(size: float): void {\n this._outlineSize = size;\n this._renderer.updateOutline();\n }\n\n getOutlineSize() {\n return this._outlineSize;\n }\n\n /**\n *\n * @param opacity from 0 to 255\n */\n setFillOpacity(opacity: float): void {\n this._fillOpacity = opacity;\n }\n\n /**\n *\n * @returns an opacity value from 0 to 255.\n */\n getFillOpacity() {\n return this._fillOpacity;\n }\n\n /**\n *\n * @param opacity from 0 to 255\n */\n setOutlineOpacity(opacity: float): void {\n this._outlineOpacity = opacity;\n this._renderer.updateOutline();\n }\n\n /**\n *\n * @returns an opacity value from 0 to 255.\n */\n getOutlineOpacity() {\n return this._outlineOpacity;\n }\n\n setX(x: float): void {\n if (x === this.x) {\n return;\n }\n super.setX(x);\n this._renderer.updatePositionX();\n }\n\n setY(y: float): void {\n if (y === this.y) {\n return;\n }\n super.setY(y);\n this._renderer.updatePositionY();\n }\n\n setAngle(angle: float): void {\n if (angle === this.angle) {\n return;\n }\n super.setAngle(angle);\n this._renderer.updateAngle();\n this.invalidateHitboxes();\n }\n\n /**\n * The center of rotation is defined relatively\n * to the drawing origin (the object position).\n * This avoids the center to move on the drawing\n * when new shapes push the bounds.\n *\n * When no custom center is defined, it will move\n * to stay at the center of the drawable bounds.\n *\n * @param x coordinate of the custom center\n * @param y coordinate of the custom center\n */\n setRotationCenter(x: float, y: float): void {\n if (!this._customCenter) {\n this._customCenter = [0, 0];\n }\n this._customCenter[0] = x;\n this._customCenter[1] = y;\n this._renderer.updateRotationCenter();\n }\n\n /**\n * @returns The center X relatively to the drawing origin\n * (whereas `getCenterX()` is relative to the top left drawable bound and scaled).\n */\n getRotationCenterX(): float {\n return this._customCenter\n ? this._customCenter[0]\n : this._renderer.getUnscaledWidth() / 2 -\n this._renderer.getFrameRelativeOriginX();\n }\n\n /**\n * @returns The center Y relatively to the drawing origin\n * (whereas `getCenterY()` is relative to the top left drawable bound and scaled).\n */\n getRotationCenterY(): float {\n return this._customCenter\n ? this._customCenter[1]\n : this._renderer.getUnscaledHeight() / 2 -\n this._renderer.getFrameRelativeOriginY();\n }\n\n getCenterX(): float {\n if (!this._customCenter) {\n return super.getCenterX();\n }\n return (\n this._customCenter[0] * Math.abs(this._scaleX) +\n this.getX() -\n this.getDrawableX()\n );\n }\n\n getCenterY(): float {\n if (!this._customCenter) {\n return super.getCenterY();\n }\n return (\n this._customCenter[1] * Math.abs(this._scaleY) +\n this.getY() -\n this.getDrawableY()\n );\n }\n\n /**\n * Change the width of the object. This changes the scale on X axis of the object.\n *\n * @param newWidth The new width of the object, in pixels.\n */\n setWidth(newWidth: float): void {\n const unscaledWidth = this._renderer.getUnscaledWidth();\n if (unscaledWidth !== 0) {\n this.setScaleX(newWidth / unscaledWidth);\n }\n }\n\n /**\n * Change the height of the object. This changes the scale on Y axis of the object.\n *\n * @param newHeight The new height of the object, in pixels.\n */\n setHeight(newHeight: float): void {\n const unscaledHeight = this._renderer.getUnscaledHeight();\n if (unscaledHeight !== 0) {\n this.setScaleY(newHeight / unscaledHeight);\n }\n }\n\n /**\n * Change the scale on X and Y axis of the object.\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScale(newScale: float): void {\n this.setScaleX(newScale);\n this.setScaleY(newScale);\n }\n\n /**\n * Change the scale on X axis of the object (changing its width).\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScaleX(newScale: float): void {\n if (newScale < 0) {\n newScale = 0;\n }\n if (newScale === Math.abs(this._scaleX)) {\n return;\n }\n this._scaleX = newScale * (this._flippedX ? -1 : 1);\n this._renderer.updateScaleX();\n this.invalidateHitboxes();\n }\n\n /**\n * Change the scale on Y axis of the object (changing its width).\n *\n * @param newScale The new scale (must be greater than 0).\n */\n setScaleY(newScale: float): void {\n if (newScale < 0) {\n newScale = 0;\n }\n if (newScale === Math.abs(this._scaleY)) {\n return;\n }\n this._scaleY = newScale * (this._flippedY ? -1 : 1);\n this._renderer.updateScaleY();\n this.invalidateHitboxes();\n }\n\n flipX(enable: boolean): void {\n if (enable !== this._flippedX) {\n this._scaleX *= -1;\n this._flippedX = enable;\n this._renderer.updateScaleX();\n this.invalidateHitboxes();\n }\n }\n\n flipY(enable: boolean): void {\n if (enable !== this._flippedY) {\n this._scaleY *= -1;\n this._flippedY = enable;\n this._renderer.updateScaleY();\n this.invalidateHitboxes();\n }\n }\n\n isFlippedX(): boolean {\n return this._flippedX;\n }\n\n isFlippedY(): boolean {\n return this._flippedY;\n }\n\n /**\n * Get the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n *\n * @return the scale of the object (or the geometric mean of the X and Y scale in case they are different).\n */\n getScale(): number {\n const scaleX = Math.abs(this._scaleX);\n const scaleY = Math.abs(this._scaleY);\n return scaleX === scaleY ? scaleX : Math.sqrt(scaleX * scaleY);\n }\n\n /**\n * Get the scale of the object on Y axis.\n *\n * @return the scale of the object on Y axis\n */\n getScaleY(): float {\n return Math.abs(this._scaleY);\n }\n\n /**\n * Get the scale of the object on X axis.\n *\n * @return the scale of the object on X axis\n */\n getScaleX(): float {\n return Math.abs(this._scaleX);\n }\n\n invalidateBounds() {\n this.invalidateHitboxes();\n }\n\n getDrawableX(): float {\n return this._renderer.getDrawableX();\n }\n\n getDrawableY(): float {\n return this._renderer.getDrawableY();\n }\n\n getWidth(): float {\n return this._renderer.getWidth();\n }\n\n getHeight(): float {\n return this._renderer.getHeight();\n }\n\n updatePreRender(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n this._renderer.updatePreRender();\n }\n\n transformToDrawing(x: float, y: float) {\n const point = ShapePainterRuntimeObject._pointForTransformation;\n point[0] = x;\n point[1] = y;\n return this._renderer.transformToDrawing(point);\n }\n\n transformToScene(x: float, y: float) {\n const point = ShapePainterRuntimeObject._pointForTransformation;\n point[0] = x;\n point[1] = y;\n return this._renderer.transformToScene(point);\n }\n\n transformToDrawingX(x: float, y: float) {\n return this.transformToDrawing(x, y)[0];\n }\n\n transformToDrawingY(x: float, y: float) {\n return this.transformToDrawing(x, y)[1];\n }\n\n transformToSceneX(x: float, y: float) {\n return this.transformToScene(x, y)[0];\n }\n\n transformToSceneY(x: float, y: float) {\n return this.transformToScene(x, y)[1];\n }\n\n setRectangularCollisionMask(\n left: float,\n top: float,\n right: float,\n bottom: float\n ) {\n if (!this._customCollisionMask) {\n const rectangle = new gdjs.Polygon();\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n rectangle.vertices.push([0, 0]);\n this._customCollisionMask = [rectangle];\n }\n const rectangle = this._customCollisionMask[0].vertices;\n\n rectangle[0][0] = left;\n rectangle[0][1] = top;\n\n rectangle[1][0] = right;\n rectangle[1][1] = top;\n\n rectangle[2][0] = right;\n rectangle[2][1] = bottom;\n\n rectangle[3][0] = left;\n rectangle[3][1] = bottom;\n\n this.invalidateHitboxes();\n }\n\n updateHitBoxes(): void {\n this.hitBoxes = this._defaultHitBoxes;\n const width = this.getWidth();\n const height = this.getHeight();\n const centerX = this.getCenterX();\n const centerY = this.getCenterY();\n const vertices = this.hitBoxes[0].vertices;\n if (this._customCollisionMask) {\n const customCollisionMaskVertices = this._customCollisionMask[0]\n .vertices;\n for (let i = 0; i < 4; i++) {\n const point = this.transformToScene(\n customCollisionMaskVertices[i][0],\n customCollisionMaskVertices[i][1]\n );\n vertices[i][0] = point[0];\n vertices[i][1] = point[1];\n }\n } else {\n if (centerX === width / 2 && centerY === height / 2) {\n vertices[0][0] = -centerX;\n vertices[0][1] = -centerY;\n vertices[1][0] = +centerX;\n vertices[1][1] = -centerY;\n vertices[2][0] = +centerX;\n vertices[2][1] = +centerY;\n vertices[3][0] = -centerX;\n vertices[3][1] = +centerY;\n } else {\n vertices[0][0] = 0 - centerX;\n vertices[0][1] = 0 - centerY;\n vertices[1][0] = width - centerX;\n vertices[1][1] = 0 - centerY;\n vertices[2][0] = width - centerX;\n vertices[2][1] = height - centerY;\n vertices[3][0] = 0 - centerX;\n vertices[3][1] = height - centerY;\n }\n if (!this._useAbsoluteCoordinates) {\n this.hitBoxes[0].rotate(gdjs.toRad(this.getAngle()));\n }\n this.hitBoxes[0].move(\n this.getDrawableX() + centerX,\n this.getDrawableY() + centerY\n );\n }\n }\n }\n gdjs.registerObject(\n 'PrimitiveDrawing::Drawer',\n gdjs.ShapePainterRuntimeObject\n );\n ShapePainterRuntimeObject.supportsReinitialization = false;\n}\n"],
5
+ "mappings": "AAIA,IAAU,MAAAA,GAAV,CAsCS,MAAMC,UAAkCD,EAAK,aAAc,CAChE,QAAkB,EAClB,QAAkB,EAClB,WAAqB,EACrB,UAAqB,GACrB,UAAqB,GACrB,cAAmC,KACnC,qBAAyC,KAEzC,WACA,cAC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EAClB2C,EAAS,CAAC,EAAE,CAAC,EAAI,CAAC5C,EAClB4C,EAAS,CAAC,EAAE,CAAC,EAAI,CAAC3C,EAClB2C,EAAS,CAAC,EAAE,CAAC,EAAI,CAAC5C,EAClB4C,EAAS,CAAC,EAAE,CAAC,EAAI,CAAC3C,IAElB2C,EAAS,CAAC,EAAE,CAAC,EAAI,EAAI5C,EACrB4C,EAAS,CAAC,EAAE,CAAC,EAAI,EAAI3C,EACrB2C,EAAS,CAAC,EAAE,CAAC,EAAI1C,EAAQF,EACzB4C,EAAS,CAAC,EAAE,CAAC,EAAI,EAAI3C,EACrB2C,EAAS,CAAC,EAAE,CAAC,EAAI1C,EAAQF,EACzB4C,EAAS,CAAC,EAAE,CAAC,EAAIzC,EAASF,EAC1B2C,EAAS,CAAC,EAAE,CAAC,EAAI,EAAI5C,EACrB4C,EAAS,CAAC,EAAE,CAAC,EAAIzC,EAASF,GAEvB,KAAK,yBACR,KAAK,SAAS,CAAC,EAAE,OAAOf,EAAK,MAAM,KAAK,SAAS,CAAC,CAAC,EAErD,KAAK,SAAS,CAAC,EAAE,KACf,KAAK,aAAa,EAAIc,EACtB,KAAK,aAAa,EAAIC,CACxB,CAEJ,CACF,CAlwBOf,EAAM,0BAAAC,EAmwBbD,EAAK,eACH,2BACAA,EAAK,yBACP,EACAC,EAA0B,yBAA2B,KA7yB7C",
6
+ "names": ["gdjs", "ShapePainterRuntimeObject", "instanceContainer", "shapePainterObjectData", "oldObjectData", "newObjectData", "x1", "y1", "x2", "y2", "x", "y", "radius", "thickness", "centerX", "centerY", "width", "height", "startX1", "startY1", "endX2", "endY2", "points", "innerRadius", "rotation", "startAngle", "endAngle", "anticlockwise", "closePath", "cpX", "cpY", "cpX2", "cpY2", "toX", "toY", "cx", "cy", "value", "valueToCompare", "rgbColor", "colors", "size", "opacity", "angle", "newWidth", "unscaledWidth", "newHeight", "unscaledHeight", "newScale", "enable", "scaleX", "scaleY", "point", "left", "top", "right", "bottom", "rectangle", "vertices", "customCollisionMaskVertices", "i"]
7
+ }
@@ -0,0 +1,68 @@
1
+ // @flow
2
+ /**
3
+ * This is a declaration of an extension for GDevelop 5.
4
+ *
5
+ * ℹ️ Changes in this file are watched and automatically imported if the editor
6
+ * is running. You can also manually run `node import-GDJS-Runtime.js` (in newIDE/app/scripts).
7
+ *
8
+ * The file must be named "JsExtension.js", otherwise GDevelop won't load it.
9
+ * ⚠️ If you make a change and the extension is not loaded, open the developer console
10
+ * and search for any errors.
11
+ *
12
+ * More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
13
+ */
14
+
15
+ /*::
16
+ // Import types to allow Flow to do static type checking on this file.
17
+ // Extensions declaration are typed using Flow (like the editor), but the files
18
+ // for the game engine are checked with TypeScript annotations.
19
+ import { type ObjectsRenderingService, type ObjectsEditorService } from '../JsExtensionTypes.flow.js'
20
+ */
21
+
22
+ module.exports = {
23
+ createExtension: function (
24
+ _ /*: (string) => string */,
25
+ gd /*: libGDevelop */
26
+ ) {
27
+ const extension = new gd.PlatformExtension();
28
+ extension
29
+ .setExtensionInformation(
30
+ 'Screenshot',
31
+ _('Screenshot'),
32
+ 'Allows to save screenshots of a running game.',
33
+ 'Matthias Meike',
34
+ 'Open source (MIT License)'
35
+ )
36
+ .setExtensionHelpPath('/all-features/screenshot')
37
+ .setCategory('Advanced');
38
+ extension
39
+ .addInstructionOrExpressionGroupMetadata(_('Screenshot'))
40
+ .setIcon('JsPlatform/Extensions/take_screenshot32.png');
41
+
42
+ extension
43
+ .addAction(
44
+ 'TakeScreenshot',
45
+ _('Take screenshot'),
46
+ _(
47
+ 'Take a screenshot of the game, and save it to a png file (supported only when running on Windows/Linux/macOS).'
48
+ ),
49
+ _('Take a screenshot and save at _PARAM1_'),
50
+ '',
51
+ 'JsPlatform/Extensions/take_screenshot32.png',
52
+ 'JsPlatform/Extensions/take_screenshot32.png'
53
+ )
54
+ .addCodeOnlyParameter('currentScene', '')
55
+ .addParameter('string', _('Save path'), '', false)
56
+ .getCodeExtraInformation()
57
+ .setIncludeFile('Extensions/Screenshot/screenshottools.js')
58
+ .setFunctionName('gdjs.screenshot.takeScreenshot');
59
+
60
+ return extension;
61
+ },
62
+ runExtensionSanityTests: function (
63
+ gd /*: libGDevelop */,
64
+ extension /*: gdPlatformExtension*/
65
+ ) {
66
+ return [];
67
+ },
68
+ };
@@ -0,0 +1,2 @@
1
+ var gdjs;(n=>{let a;(s=>{const t=new n.Logger("Screenshot");s.takeScreenshot=function(i,e){const r=typeof require<"u"?require("fs"):null;if(r){const o=i.getGame().getRenderer().getCanvas();if(o){const c=o.toDataURL("image/png").replace("data:image/png;base64,","");e.toLowerCase().indexOf(".png")==-1&&(e+=".png"),r.writeFile(e,c,"base64",g=>{g&&t.error("Unable to save the screenshot at path: "+e)})}else t.error("Screenshot are not supported on rendering engines without canvas.")}}})(a=n.screenshot||={})})(gdjs||={});
2
+ //# sourceMappingURL=screenshottools.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/Screenshot/screenshottools.ts"],
4
+ "sourcesContent": ["namespace gdjs {\n export namespace screenshot {\n const logger = new gdjs.Logger('Screenshot');\n\n /**\n * Save a screenshot of the game.\n * @param instanceContainer The container\n * @param savePath The path where to save the screenshot\n */\n export const takeScreenshot = function (\n instanceContainer: gdjs.RuntimeInstanceContainer,\n savePath: string\n ) {\n const fs = typeof require !== 'undefined' ? require('fs') : null;\n if (fs) {\n const canvas = instanceContainer.getGame().getRenderer().getCanvas();\n if (canvas) {\n const content = canvas\n .toDataURL('image/png')\n .replace('data:image/png;base64,', '');\n if (savePath.toLowerCase().indexOf('.png') == -1) {\n savePath += '.png';\n }\n fs.writeFile(savePath, content, 'base64', (err) => {\n if (err) {\n logger.error(\n 'Unable to save the screenshot at path: ' + savePath\n );\n }\n });\n } else {\n logger.error(\n 'Screenshot are not supported on rendering engines without canvas.'\n );\n }\n }\n };\n }\n}\n"],
5
+ "mappings": "AAAA,IAAU,MAAAA,GAAV,CACS,IAAUC,MAAV,CACL,MAAMC,EAAS,IAAIF,EAAK,OAAO,YAAY,EAO9BC,EAAA,eAAiB,SAC5BE,EACAC,EACA,CACA,MAAMC,EAAK,OAAO,QAAY,IAAc,QAAQ,IAAI,EAAI,KAC5D,GAAIA,EAAI,CACN,MAAMC,EAASH,EAAkB,QAAQ,EAAE,YAAY,EAAE,UAAU,EACnE,GAAIG,EAAQ,CACV,MAAMC,EAAUD,EACb,UAAU,WAAW,EACrB,QAAQ,yBAA0B,EAAE,EACnCF,EAAS,YAAY,EAAE,QAAQ,MAAM,GAAK,KAC5CA,GAAY,QAEdC,EAAG,UAAUD,EAAUG,EAAS,SAAWC,GAAQ,CAC7CA,GACFN,EAAO,MACL,0CAA4CE,CAC9C,CAEJ,CAAC,CACH,MACEF,EAAO,MACL,mEACF,CAEJ,CACF,IAnCeD,EAAAD,EAAA,mBADT",
6
+ "names": ["gdjs", "screenshot", "logger", "instanceContainer", "savePath", "fs", "canvas", "content", "err"]
7
+ }
@@ -0,0 +1,2 @@
1
+ !function(t,e){if("function"==typeof define&&define.amd)define("shopify-buy",["module"],e);else if("undefined"!=typeof exports)e(module);else{var n={exports:{}};e(n),t.ShopifyBuy=n.exports}}(this,function(t){"use strict";function e(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function r(t,e){ei[t]||(ei[t]=e)}function i(t){return ei[t]}function o(t,e){function n(){var n=this.super;this.super=function(){return e.apply(this,arguments)};var r=t.apply(this,arguments);return this.super=n,r}return n.wrappedFunction=t,n}function a(t,e,n){var r=Object.getPrototypeOf(n);t.forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t),a=r.hasOwnProperty(t)&&Object.getOwnPropertyDescriptor(r,t);if("function"==typeof a.value&&"function"==typeof i.value){var s=o(i.value,a.value);Object.defineProperty(n,t,{value:s})}else Object.defineProperty(n,t,i)})}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=o(t.constructor,e),r=Object.getOwnPropertyNames(t).filter(function(t){return!ai(["constructor","static"],t)});ii(n,e),n.prototype=Object.create(e.prototype),a(r,t,n.prototype),n.prototype.constructor=n;var i=t.static;if(i){var s=Object.getOwnPropertyNames(i);a(s,i,n)}return n}function u(t){var n=function(){var e=void 0;e=console[t]?Function.prototype.bind.call(console[t],console):Function.prototype.bind.call(console.log,console),e.apply(void 0,arguments)};return function(){var t=[].concat(Array.prototype.slice.call(arguments));t.unshift("[JS-BUY-SDK]: "),n.apply(void 0,e(t))}}function c(t,e){var n=void 0;if(e.headers&&Object.keys(e.headers).forEach(function(t){"authorization"===t.toLowerCase()&&(n=e.headers[t])}),n){var r=n.split(" ").slice(-1)[0];try{var i=atob(r),o=void 0;return o=t.indexOf("?")>-1?t+"&_x_http_authorization="+i:t+"?_x_http_authorization="+i}catch(t){}}return t}function f(t,e,n){return new Promise(function(r,i){function o(){i(new Error("There was an error with the XDR"))}var a=new XDomainRequest;a.onload=function(){try{var t=JSON.parse(a.responseText);r({json:t,originalResponse:a,isJSON:!0})}catch(t){r({text:a.responseText,originalResponse:a,isText:!0})}},a.onerror=o,a.ontimeout=o,a.open(t,c(e,n)),a.send(n.data)})}function l(){var t="undefined"==typeof window,e="function"==typeof require;return t&&e}function h(t){if(t.status>=200&&t.status<300)return t;var e=new Error(t.statusText);throw e.status=t.status,e.response=t,e}function p(t){return t.json().then(function(e){return{json:e,originalResponse:t,isJSON:!0}}).catch(function(){var e=t.clone();return e.text().then(function(t){return{text:t,originalResponse:e,isText:!0}})})}function d(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!l()){var r=new XMLHttpRequest;if(!("withCredentials"in r))return f.apply(void 0,arguments)}return n.method=t,n.mode="cors",fetch(e,n).then(h).then(p)}function m(){return++Pi}function v(t){if(t&&t[Oi])return t[Oi];if(void 0===t)return"(undefined)";if(null===t)return"(null)";var e="undefined"==typeof t?"undefined":b(t),n=void 0;switch(e){case"number":n=Si[t],n||(n=Si[t]="nu"+t);break;case"string":n=Ai[t],n||(n=Ai[t]="st"+m());break;case"boolean":n=t?"(true)":"(false)";break;default:if(t===Object){n="(Object)";break}if(t===Array){n="(Array)";break}n=ji+"."+m(),null===t[Oi]?t[Oi]=n:(Ti.value=n,Object.defineProperty(t,Oi,Ti))}return n}function y(t,e){return t===e||Object.keys(t).every(function(n){return t[n]instanceof Date?t[n].toString()===e[n].toString():"object"===b(t[n])?y(t[n],e[n]):t[n]===e[n]})}function g(t,e){var n=void 0;switch(t){case"all":n=function(){return this.fetchAll(e)};break;case"one":n=function(){return this.fetch.apply(this,[e].concat(Array.prototype.slice.call(arguments)))};break;case"query":n=function(){return this.fetchQuery.apply(this,[e].concat(Array.prototype.slice.call(arguments)))}}return n}var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function t(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function e(t){return"string"!=typeof t&&(t=String(t)),t}function n(t){this.map={},t instanceof n?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function r(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function i(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function o(t){var e=new FileReader;return e.readAsArrayBuffer(t),i(e)}function a(t){var e=new FileReader;return e.readAsText(t),i(e)}function s(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(p.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(p.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(t){if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type")}else this._bodyText=""},p.blob?(this.blob=function(){var t=r(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(o)},this.text=function(){var t=r(this);if(t)return t;if(this._bodyBlob)return a(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=r(this);return t?t:Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(t){var e=t.toUpperCase();return d.indexOf(e)>-1?e:t}function c(t,e){e=e||{};var r=e.body;if(c.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new n(t.headers)),this.method=t.method,this.mode=t.mode,r||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new n(e.headers)),this.method=u(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function f(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function l(t){var e=new n,r=t.getAllResponseHeaders().trim().split("\n");return r.forEach(function(t){var n=t.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();e.append(r,i)}),e}function h(t,e){e||(e={}),this._initBody(t),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof n?e.headers:new n(e.headers),this.url=e.url||""}if(!self.fetch){n.prototype.append=function(n,r){n=t(n),r=e(r);var i=this.map[n];i||(i=[],this.map[n]=i),i.push(r)},n.prototype.delete=function(e){delete this.map[t(e)]},n.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},n.prototype.getAll=function(e){return this.map[t(e)]||[]},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(n,r){this.map[t(n)]=[e(r)]},n.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){t.call(e,r,n,this)},this)},this)};var p={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self},d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this)},s.call(c.prototype),s.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},h.error=function(){var t=new h(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];h.redirect=function(t,e){if(m.indexOf(e)===-1)throw new RangeError("Invalid status code");return new h(null,{status:e,headers:{location:t}})},self.Headers=n,self.Request=c,self.Response=h,self.fetch=function(t,e){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=c.prototype.isPrototypeOf(t)&&!e?t:new c(t,e);var a=new XMLHttpRequest;a.onload=function(){var t=1223===a.status?204:a.status;if(t<100||t>599)return void r(new TypeError("Network request failed"));var e={status:t,statusText:a.statusText,headers:l(a),url:i()},o="response"in a?a.response:a.responseText;n(new h(o,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&p.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},self.fetch.polyfill=!0}}();var w={}.toString,_=function(t){return w.call(t).slice(8,-1)},O=n(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),x=O,j="__core-js_shared__",T=x[j]||(x[j]={}),P=function(t){return T[t]||(T[t]={})},S=0,A=Math.random(),E=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++S+A).toString(36))},I=n(function(t){var e=P("wks"),n=E,r=O.Symbol,i="function"==typeof r,o=t.exports=function(t){return e[t]||(e[t]=i&&r[t]||(i?r:n)("Symbol."+t))};o.store=e}),F=_,k=I("toStringTag"),C="Arguments"==F(function(){return arguments}()),R=function(t,e){try{return t[e]}catch(t){}},z=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=R(e=Object(t),k))?n:C?F(e):"Object"==(r=F(e))&&"function"==typeof e.callee?"Arguments":r},M=function(t){return"object"===("undefined"==typeof t?"undefined":b(t))?null!==t:"function"==typeof t},U=M,q=function(t){if(!U(t))throw TypeError(t+" is not an object!");return t},D=function(t){try{return!!t()}catch(t){return!0}},B=!D(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),L=M,K=O.document,N=L(K)&&L(K.createElement),V=function(t){return N?K.createElement(t):{}},H=!B&&!D(function(){return 7!=Object.defineProperty(V("div"),"a",{get:function(){return 7}}).a}),G=M,X=function(t,e){if(!G(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!G(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!G(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!G(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},J=q,Q=H,W=X,Y=Object.defineProperty,$=B?Object.defineProperty:function(t,e,n){if(J(t),e=W(e,!0),J(n),Q)try{return Y(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t},Z={f:$},tt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},et=Z,nt=tt,rt=B?function(t,e,n){return et.f(t,e,nt(1,n))}:function(t,e,n){return t[e]=n,t},it={}.hasOwnProperty,ot=function(t,e){return it.call(t,e)},at=n(function(t){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)}),st=n(function(t){var e=O,n=rt,r=ot,i=E("src"),o="toString",a=Function[o],s=(""+a).split(o);at.inspectSource=function(t){return a.call(t)},(t.exports=function(t,o,a,u){var c="function"==typeof a;c&&(r(a,"name")||n(a,"name",o)),t[o]!==a&&(c&&(r(a,i)||n(a,i,t[o]?""+t[o]:s.join(String(o)))),t===e?t[o]=a:u?t[o]?t[o]=a:n(t,o,a):(delete t[o],n(t,o,a)))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||a.call(this)})}),ut=z,ct={};ct[I("toStringTag")]="z",ct+""!="[object z]"&&st(Object.prototype,"toString",function(){return"[object "+ut(this)+"]"},!0);var ft=Math.ceil,lt=Math.floor,ht=function(t){return isNaN(t=+t)?0:(t>0?lt:ft)(t)},pt=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},dt=ht,mt=pt,vt=function(t){return function(e,n){var r,i,o=String(mt(e)),a=dt(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=o.charCodeAt(a),r<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?t?o.charAt(a):r:t?o.slice(a,a+2):(r-55296<<10)+(i-56320)+65536)}},yt=!1,gt=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},bt=gt,wt=function(t,e,n){if(bt(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},_t=O,Ot=at,xt=rt,jt=st,Tt=wt,Pt="prototype",St=function t(e,n,r){var i,o,a,s,u=e&t.F,c=e&t.G,f=e&t.S,l=e&t.P,h=e&t.B,p=c?_t:f?_t[n]||(_t[n]={}):(_t[n]||{})[Pt],d=c?Ot:Ot[n]||(Ot[n]={}),m=d[Pt]||(d[Pt]={});c&&(r=n);for(i in r)o=!u&&p&&void 0!==p[i],a=(o?p:r)[i],s=h&&o?Tt(a,_t):l&&"function"==typeof a?Tt(Function.call,a):a,p&&jt(p,i,a,e&t.U),d[i]!=a&&xt(d,i,s),l&&m[i]!=a&&(m[i]=a)};_t.core=Ot,St.F=1,St.G=2,St.S=4,St.P=8,St.B=16,St.W=32,St.U=64,St.R=128;var At=St,Et={},It=_,Ft=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==It(t)?t.split(""):Object(t)},kt=Ft,Ct=pt,Rt=function(t){return kt(Ct(t))},zt=ht,Mt=Math.min,Ut=function(t){return t>0?Mt(zt(t),9007199254740991):0},qt=ht,Dt=Math.max,Bt=Math.min,Lt=function(t,e){return t=qt(t),t<0?Dt(t+e,0):Bt(t,e)},Kt=Rt,Nt=Ut,Vt=Lt,Ht=function(t){return function(e,n,r){var i,o=Kt(e),a=Nt(o.length),s=Vt(r,a);if(t&&n!=n){for(;a>s;)if(i=o[s++],i!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},Gt=P("keys"),Xt=E,Jt=function(t){return Gt[t]||(Gt[t]=Xt(t))},Qt=ot,Wt=Rt,Yt=Ht(!1),$t=Jt("IE_PROTO"),Zt=function(t,e){var n,r=Wt(t),i=0,o=[];for(n in r)n!=$t&&Qt(r,n)&&o.push(n);for(;e.length>i;)Qt(r,n=e[i++])&&(~Yt(o,n)||o.push(n));return o},te="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ee=Zt,ne=te,re=Object.keys||function(t){return ee(t,ne)},ie=Z,oe=q,ae=re,se=B?Object.defineProperties:function(t,e){oe(t);for(var n,r=ae(e),i=r.length,o=0;i>o;)ie.f(t,n=r[o++],e[n]);return t},ue=O.document&&document.documentElement,ce=q,fe=se,le=te,he=Jt("IE_PROTO"),pe=function(){},de="prototype",me=function(){var t,e=V("iframe"),n=le.length,r="<",i=">";for(e.style.display="none",ue.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+i+"document.F=Object"+r+"/script"+i),t.close(),me=t.F;n--;)delete me[de][le[n]];return me()},ve=Object.create||function(t,e){var n;return null!==t?(pe[de]=ce(t),n=new pe,pe[de]=null,n[he]=t):n=me(),void 0===e?n:fe(n,e)},ye=Z.f,ge=ot,be=I("toStringTag"),we=function(t,e,n){t&&!ge(t=n?t:t.prototype,be)&&ye(t,be,{configurable:!0,value:e})},_e=ve,Oe=tt,xe=we,je={};rt(je,I("iterator"),function(){return this});var Te=function(t,e,n){t.prototype=_e(je,{next:Oe(1,n)}),xe(t,e+" Iterator")},Pe=pt,Se=function(t){return Object(Pe(t))},Ae=ot,Ee=Se,Ie=Jt("IE_PROTO"),Fe=Object.prototype,ke=Object.getPrototypeOf||function(t){return t=Ee(t),Ae(t,Ie)?t[Ie]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Fe:null},Ce=yt,Re=At,ze=st,Me=rt,Ue=ot,qe=Et,De=Te,Be=we,Le=ke,Ke=I("iterator"),Ne=!([].keys&&"next"in[].keys()),Ve="@@iterator",He="keys",Ge="values",Xe=function(){return this},Je=function(t,e,n,r,i,o,a){De(n,e,r);var s,u,c,f=function(t){if(!Ne&&t in d)return d[t];switch(t){case He:return function(){return new n(this,t)};case Ge:return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h=i==Ge,p=!1,d=t.prototype,m=d[Ke]||d[Ve]||i&&d[i],v=m||f(i),y=i?h?f("entries"):v:void 0,g="Array"==e?d.entries||m:m;if(g&&(c=Le(g.call(new t)),c!==Object.prototype&&(Be(c,l,!0),Ce||Ue(c,Ke)||Me(c,Ke,Xe))),h&&m&&m.name!==Ge&&(p=!0,v=function(){return m.call(this)}),Ce&&!a||!Ne&&!p&&d[Ke]||Me(d,Ke,v),qe[e]=v,qe[l]=Xe,i)if(s={values:h?v:f(Ge),keys:o?v:f(He),entries:y},a)for(u in s)u in d||ze(d,u,s[u]);else Re(Re.P+Re.F*(Ne||p),e,s);return s},Qe=vt(!0);Je(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Qe(e,n),this._i+=t.length,{value:t,done:!1})});var We=I("unscopables"),Ye=Array.prototype;void 0==Ye[We]&&rt(Ye,We,{});var $e=function(t){Ye[We][t]=!0},Ze=function(t,e){return{value:e,done:!!t}},tn=$e,en=Ze,nn=Et,rn=Rt,on=Je(Array,"Array",function(t,e){this._t=rn(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,en(1)):"keys"==e?en(0,n):"values"==e?en(0,t[n]):en(0,[n,t[n]])},"values");nn.Arguments=nn.Array,tn("keys"),tn("values"),tn("entries");for(var an=on,sn=st,un=O,cn=rt,fn=Et,ln=I,hn=ln("iterator"),pn=ln("toStringTag"),dn=fn.Array,mn=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],vn=0;vn<5;vn++){var yn,gn=mn[vn],bn=un[gn],wn=bn&&bn.prototype;if(wn){wn[hn]||cn(wn,hn,dn),wn[pn]||cn(wn,pn,gn),fn[gn]=dn;for(yn in an)wn[yn]||sn(wn,yn,an[yn],!0)}}var _n,On,xn,jn=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Tn=q,Pn=function(t,e,n,r){try{return r?e(Tn(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&Tn(i.call(t)),e}},Sn=Et,An=I("iterator"),En=Array.prototype,In=function(t){return void 0!==t&&(Sn.Array===t||En[An]===t)},Fn=z,kn=I("iterator"),Cn=Et,Rn=at.getIteratorMethod=function(t){if(void 0!=t)return t[kn]||t["@@iterator"]||Cn[Fn(t)]},zn=n(function(t){var e=wt,n=Pn,r=In,i=q,o=Ut,a=Rn,s={},u={},c=t.exports=function(t,c,f,l,h){var p,d,m,v,y=h?function(){return t}:a(t),g=e(f,l,c?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(r(y)){for(p=o(t.length);p>b;b++)if(v=c?g(i(d=t[b])[0],d[1]):g(t[b]),v===s||v===u)return v}else for(m=y.call(t);!(d=m.next()).done;)if(v=n(m,g,d.value,c),v===s||v===u)return v};c.BREAK=s,c.RETURN=u}),Mn=q,Un=gt,qn=I("species"),Dn=function(t,e){var n,r=Mn(t).constructor;return void 0===r||void 0==(n=Mn(r)[qn])?e:Un(n)},Bn=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)},Ln=wt,Kn=Bn,Nn=ue,Vn=V,Hn=O,Gn=Hn.process,Xn=Hn.setImmediate,Jn=Hn.clearImmediate,Qn=Hn.MessageChannel,Wn=0,Yn={},$n="onreadystatechange",Zn=function(){var t=+this;if(Yn.hasOwnProperty(t)){var e=Yn[t];delete Yn[t],e()}},tr=function(t){Zn.call(t.data)};Xn&&Jn||(Xn=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Yn[++Wn]=function(){Kn("function"==typeof t?t:Function(t),e)},_n(Wn),Wn},Jn=function(t){delete Yn[t]},"process"==_(Gn)?_n=function(t){Gn.nextTick(Ln(Zn,t,1))}:Qn?(On=new Qn,xn=On.port2,On.port1.onmessage=tr,_n=Ln(xn.postMessage,xn,1)):Hn.addEventListener&&"function"==typeof postMessage&&!Hn.importScripts?(_n=function(t){Hn.postMessage(t+"","*")},Hn.addEventListener("message",tr,!1)):_n=$n in Vn("script")?function(t){Nn.appendChild(Vn("script"))[$n]=function(){Nn.removeChild(this),Zn.call(t)}}:function(t){setTimeout(Ln(Zn,t,1),0)});var er={set:Xn,clear:Jn},nr=O,rr=er.set,ir=nr.MutationObserver||nr.WebKitMutationObserver,or=nr.process,ar=nr.Promise,sr="process"==_(or),ur=function(){var t,e,n,r=function(){var r,i;for(sr&&(r=or.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(sr)n=function(){or.nextTick(r)};else if(ir){var i=!0,o=document.createTextNode("");new ir(r).observe(o,{characterData:!0}),n=function(){o.data=i=!i}}else if(ar&&ar.resolve){var a=ar.resolve();n=function(){a.then(r)}}else n=function(){rr.call(nr,r)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}},cr=st,fr=function(t,e,n){for(var r in e)cr(t,r,e[r],n);return t},lr=O,hr=Z,pr=B,dr=I("species"),mr=function(t){var e=lr[t];pr&&e&&!e[dr]&&hr.f(e,dr,{configurable:!0,get:function(){return this}})},vr=I("iterator"),yr=!1;try{var gr=[7][vr]();gr.return=function(){yr=!0},Array.from(gr,function(){throw 2})}catch(t){}var br,wr,_r,Or=function(t,e){if(!e&&!yr)return!1;var n=!1;try{var r=[7],i=r[vr]();i.next=function(){return{done:n=!0}},r[vr]=function(){return i},t(r)}catch(t){}return n},xr=yt,jr=O,Tr=wt,Pr=z,Sr=At,Ar=M,Er=gt,Ir=jn,Fr=zn,kr=Dn,Cr=er.set,Rr=ur(),zr="Promise",Mr=jr.TypeError,Ur=jr.process,qr=jr[zr],Ur=jr.process,Dr="process"==Pr(Ur),Br=function(){},Lr=!!function(){try{var t=qr.resolve(1),e=(t.constructor={})[I("species")]=function(t){t(Br,Br)};return(Dr||"function"==typeof PromiseRejectionEvent)&&t.then(Br)instanceof e}catch(t){}}(),Kr=function(t,e){return t===e||t===qr&&e===_r},Nr=function(t){var e;return!(!Ar(t)||"function"!=typeof(e=t.then))&&e},Vr=function(t){return Kr(qr,t)?new Hr(t):new wr(t)},Hr=wr=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw Mr("Bad Promise constructor");e=t,n=r}),this.resolve=Er(e),this.reject=Er(n)},Gr=function(t){try{t()}catch(t){return{error:t}}},Xr=function(t,e){if(!t._n){t._n=!0;var n=t._c;Rr(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,u=e.reject,c=e.domain;try{a?(i||(2==t._h&&Wr(t),t._h=1),a===!0?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===e.promise?u(Mr("Promise-chain cycle")):(o=Nr(n))?o.call(n,s,u):s(n)):u(r)}catch(t){u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&Jr(t)})}},Jr=function(t){Cr.call(jr,function(){var e,n,r,i=t._v;if(Qr(t)&&(e=Gr(function(){Dr?Ur.emit("unhandledRejection",i,t):(n=jr.onunhandledrejection)?n({promise:t,reason:i}):(r=jr.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=Dr||Qr(t)?2:1),t._a=void 0,e)throw e.error})},Qr=function t(e){if(1==e._h)return!1;for(var n,r=e._a||e._c,i=0;r.length>i;)if(n=r[i++],n.fail||!t(n.promise))return!1;return!0},Wr=function(t){Cr.call(jr,function(){var e;Dr?Ur.emit("rejectionHandled",t):(e=jr.onrejectionhandled)&&e({promise:t,reason:t._v})})},Yr=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),Xr(e,!0))},$r=function t(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw Mr("Promise can't be resolved itself");(n=Nr(e))?Rr(function(){var i={_w:r,_d:!1};try{n.call(e,Tr(t,i,1),Tr(Yr,i,1))}catch(t){Yr.call(i,t)}}):(r._v=e,r._s=1,Xr(r,!1))}catch(t){Yr.call({_w:r,_d:!1},t)}}};Lr||(qr=function(t){Ir(this,qr,zr,"_h"),Er(t),br.call(this);try{t(Tr($r,this,1),Tr(Yr,this,1))}catch(t){Yr.call(this,t)}},br=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},br.prototype=fr(qr.prototype,{then:function(t,e){var n=Vr(kr(this,qr));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Dr?Ur.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Xr(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Hr=function(){var t=new br;this.promise=t,this.resolve=Tr($r,t,1),this.reject=Tr(Yr,t,1)}),Sr(Sr.G+Sr.W+Sr.F*!Lr,{Promise:qr}),we(qr,zr),mr(zr),_r=at[zr],Sr(Sr.S+Sr.F*!Lr,zr,{reject:function(t){var e=Vr(this),n=e.reject;return n(t),e.promise}}),Sr(Sr.S+Sr.F*(xr||!Lr),zr,{resolve:function(t){if(t instanceof qr&&Kr(t.constructor,this))return t;var e=Vr(this),n=e.resolve;return n(t),e.promise}}),Sr(Sr.S+Sr.F*!(Lr&&Or(function(t){qr.all(t).catch(Br)})),zr,{all:function(t){var e=this,n=Vr(e),r=n.resolve,i=n.reject,o=Gr(function(){var n=[],o=0,a=1;Fr(t,!1,function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(t){var e=this,n=Vr(e),r=n.reject,i=Gr(function(){Fr(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}});var Zr=at.Promise,ti=n(function(t,e){!function(){function t(t){this.message=t}var n="undefined"!=typeof e?e:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",n.btoa||(n.btoa=function(e){for(var n,i,o=String(e),a=0,s=r,u="";o.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&n>>8-a%1*8)){if(i=o.charCodeAt(a+=.75),i>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return u}),n.atob||(n.atob=function(e){var n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,o,a=0,s=0,u="";o=n.charAt(s++);~o&&(i=a%4?64*i+o:o,a++%4)?u+=String.fromCharCode(255&i>>(-2*a&6)):0)o=r.indexOf(o);return u})}()}),ei=void 0;ei="undefined"==typeof global?window:global;var ni={set:r,get:i};ni.set("btoa",ti.btoa),ni.set("atob",ti.atob),ni.set("Promise",Zr);var ri=void 0;ri="function"==typeof Object.assign?Object.assign:function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");var e=Object(t),n=[].slice.call(arguments,1);return n.length>0&&n.forEach(function(t){if(void 0!==t&&null!==t){var n=void 0;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}),e};var ii=ri,oi=void 0;oi=Array.prototype.includes?function(t){var e=[].slice.call(arguments,1);return Array.prototype.includes.apply(t,e)}:function(t,e){var n=Object(t),r=parseInt(n.length,10)||0;if(0===r)return!1;var i=parseInt(arguments[2],10)||0,o=void 0;for(i>=0?o=i:(o=r+i,o<0&&(o=0));o<r;){var a=n[o];if(e===a||e!==e&&a!==a)return!0;o++}return!1};var ai=oi,si=s({constructor:function(){},static:{extend:function(t){return s(t,this)}}}),ui=si.extend({constructor:function(){},debug:u("debug"),info:u("info"),warn:u("warn"),error:u("error")}),ci=new ui,fi=si.extend({constructor:function(t){var e=this;Object.keys(this.deprecatedProperties).forEach(function(n){if(t.hasOwnProperty(n)){var r=e.deprecatedProperties[n],i=e[r];i(t[n],t)}}),this.requiredProperties.forEach(function(n){if(!t.hasOwnProperty(n))throw new Error("new Config() requires the option '"+n+"'");e[n]=t[n]}),this.optionalProperties.forEach(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})},deprecatedProperties:{apiKey:"transformApiKey",myShopifyDomain:"transformMyShopifyDomain"},transformMyShopifyDomain:function(t,e){ci.warn("Config - ","myShopifyDomain is deprecated, please use domain and provide the full shop domain."),e.domain=t+".myshopify.com"},transformApiKey:function(t,e){ci.warn("Config - ","apiKey is deprecated, please use accessToken instead."),e.accessToken=t},requiredProperties:["accessToken","appId","domain"],optionalProperties:["ajaxHeaders"],accessToken:"",apiKey:"",appId:"",domain:"",myShopifyDomain:"",ajaxHeaders:{}}),li="v0.7.1-66ba4e4",hi=si.extend({constructor:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.attrs=t,ii(this,e)},attrs:null,serializer:null,adapter:null,shopClient:null}),pi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments),this.selected=this.values[0]}},{name:{get:function(){return this.attrs.name},configurable:!0,enumerable:!0},values:{get:function(){return this.attrs.values},configurable:!0,enumerable:!0},selected:{get:function(){return this._selected},set:function(t){if(!ai(this.values,t))throw new Error("Invalid option selection for "+this.name+".");return this._selected=t,t},configurable:!0,enumerable:!0}})),di=[{name:"pico",dimension:"16x16"},{name:"icon",dimension:"32x32"},{name:"thumb",dimension:"50x50"},{name:"small",dimension:"100x100"},{name:"compact",dimension:"160x160"},{name:"medium",dimension:"240x240"},{name:"large",dimension:"480x480"},{name:"grande",dimension:"600x600"},{name:"1024x1024",dimension:"1024x1024"},{name:"2048x2048",dimension:"2048x2048"}],mi=si.extend(Object.defineProperties({constructor:function(t){var e=this;Object.keys(t).forEach(function(n){e[n]=t[n]})}},{variants:{get:function(){var t=this.src,e=t.lastIndexOf("."),n=t.slice(0,e),r=t.slice(e);return di.forEach(function(t){t.src=n+"_"+t.name+r}),di},configurable:!0,enumerable:!0}})),vi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)},checkoutUrl:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.config,n="https://"+e.domain+"/cart",r=this.id+":"+parseInt(t,10),i="access_token="+e.accessToken+"&_fd=0";return n+"/"+r+"?"+i}},{id:{get:function(){return this.attrs.variant.id},configurable:!0,enumerable:!0},productId:{get:function(){return this.attrs.product.id},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.variant.title},configurable:!0,enumerable:!0},productTitle:{get:function(){return this.attrs.product.title},configurable:!0,enumerable:!0},compareAtPrice:{get:function(){return this.attrs.variant.compare_at_price},configurable:!0,enumerable:!0},price:{get:function(){return this.attrs.variant.price},configurable:!0,enumerable:!0},formattedPrice:{get:function(){return this.attrs.variant.formatted_price},configurable:!0,enumerable:!0},grams:{get:function(){return this.attrs.variant.grams},configurable:!0,enumerable:!0},optionValues:{get:function(){return this.attrs.variant.option_values},configurable:!0,enumerable:!0},available:{get:function(){return this.attrs.variant.available},configurable:!0,enumerable:!0},image:{get:function(){var t=this.id,e=this.attrs.product.images,n=e[0],r=e.filter(function(e){return e.variant_ids.indexOf(t)!==-1})[0],i=r||n;return i?new mi(i):null},configurable:!0,enumerable:!0},imageVariants:{get:function(){return this.image?this.image.variants:[]},configurable:!0,enumerable:!0}})),yi=function(t){return t.reduce(function(t,e){return t.indexOf(e)<0&&t.push(e),t},[])},gi="https://widgets.shopifyapps.com/assets/no-image.svg",bi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)}},{id:{get:function(){return this.attrs.product_id},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.title},configurable:!0,enumerable:!0},description:{get:function(){return this.attrs.body_html},configurable:!0,enumerable:!0},images:{get:function(){return this.attrs.images.map(function(t){return new mi(t)})},configurable:!0,enumerable:!0},memoized:{get:function(){return this._memoized=this._memoized||{},this._memoized},configurable:!0,enumerable:!0},options:{get:function(){if(this.memoized.options)return this.memoized.options;var t=this.attrs.options,e=this.variants;return this.memoized.options=t.map(function(t){var n=t.name,r=e.reduce(function(e,n){var r=n.optionValues.filter(function(e){return e.name===t.name})[0];return e.push(r.value),e},[]),i=yi(r);return new pi({name:n,values:i})}),this.memoized.options},configurable:!0,enumerable:!0},variants:{get:function(){var t=this;return this.attrs.variants.map(function(e){return new vi({variant:e,product:t},{config:t.config})})},configurable:!0,enumerable:!0},selections:{get:function(){return this.options.map(function(t){return t.selected})},configurable:!0,enumerable:!0},selectedVariant:{get:function(){var t=this.selections.join(" / ");return this.variants.filter(function(e){return e.title===t})[0]||null},configurable:!0,enumerable:!0},selectedVariantImage:{get:function(){return this.selectedVariant?this.selectedVariant.image:null},configurable:!0,enumerable:!0}})),wi=si.extend({constructor:function(t){this.config=t},rootKeyForType:function(t){return t.slice(0,-1)+"_listing";
2
+ },models:{collections:hi,products:bi},modelForType:function(t){return this.models[t]},deserializeSingle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e[this.rootKeyForType(t)],i=this.modelFromAttrs(t,r,n);return i},deserializeMultiple:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n[this.rootKeyForType(t)+"s"];return i.map(function(n){var i=e.modelFromAttrs(t,n,r);return i})},modelFromAttrs:function(t,e,n){var r=this.modelForType(t);return n.config=this.config,new r(e,n)}}),_i=si.extend(Object.defineProperties({ajax:d,constructor:function(t){this.config=t},pathForType:function(t){return"/"+t.slice(0,-1)+"_listings"},buildUrl:function(t,e,n){switch(t){case"multiple":return this.buildMultipleUrl(e,n);case"single":return this.buildSingleUrl(e,n);default:return""}},buildMultipleUrl:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=""+this.baseUrl+this.pathForType(t),r=Object.keys(e);if(r.length>0){var i=r.map(function(t){var n=void 0;return n=Array.isArray(e[t])?e[t].join(","):e[t],t+"="+encodeURIComponent(n)}).join("&");return n+"?"+i}return n},buildSingleUrl:function(t,e){return""+this.baseUrl+this.pathForType(t)+"/"+e},fetchMultiple:function(){var t=this.buildUrl.apply(this,["multiple"].concat(Array.prototype.slice.call(arguments)));return this.ajax("GET",t,{headers:this.headers}).then(function(t){return t.json})},fetchSingle:function(){var t=this.buildUrl.apply(this,["single"].concat(Array.prototype.slice.call(arguments)));return this.ajax("GET",t,{headers:this.headers}).then(function(t){return t.json})}},{base64AccessToken:{get:function(){return btoa(this.config.accessToken)},configurable:!0,enumerable:!0},baseUrl:{get:function(){var t=this.config,e=t.domain,n=t.appId;return"https://"+e+"/api/apps/"+n},configurable:!0,enumerable:!0},headers:{get:function(){return ii({},{Authorization:"Basic "+this.base64AccessToken,"Content-Type":"application/json","X-SDK-Variant":"javascript","X-SDK-Version":li},this.config.ajaxHeaders)},configurable:!0,enumerable:!0}})),Oi="shopify-buy-uuid",xi=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)}},{id:{get:function(){return this.attrs[Oi]},configurable:!0,enumerable:!0},variant_id:{get:function(){return this.attrs.variant_id},configurable:!0,enumerable:!0},product_id:{get:function(){return this.attrs.product_id},configurable:!0,enumerable:!0},image:{get:function(){return this.attrs.image?new mi(this.attrs.image):null},configurable:!0,enumerable:!0},imageVariants:{get:function(){return this.image?this.image.variants:[]},configurable:!0,enumerable:!0},title:{get:function(){return this.attrs.title},configurable:!0,enumerable:!0},quantity:{get:function(){return this.attrs.quantity},set:function(t){var e=parseInt(t,10);if(e<0)throw new Error("Quantities must be positive");if(e!==parseFloat(t))throw new Error("Quantities must be whole numbers");return this.attrs.quantity=e,this.attrs.quantity},configurable:!0,enumerable:!0},properties:{get:function(){return this.attrs.properties||{}},set:function(t){return this.attrs.properties=t||{},t},configurable:!0,enumerable:!0},variant_title:{get:function(){return this.attrs.variant_title},configurable:!0,enumerable:!0},price:{get:function(){return this.attrs.price},configurable:!0,enumerable:!0},compare_at_price:{get:function(){return this.attrs.compare_at_price},configurable:!0,enumerable:!0},line_price:{get:function(){return(this.quantity*parseFloat(this.price)).toFixed(2)},configurable:!0,enumerable:!0},grams:{get:function(){return this.attrs.grams},configurable:!0,enumerable:!0}})),ji="shopify-buy."+Date.now(),Ti={writable:!0,configurable:!0,enumerable:!0,value:null},Pi=0,Si={},Ai={},Ei=hi.extend(Object.defineProperties({constructor:function(){this.super.apply(this,arguments)},addVariants:function(){return ci.warn("CartModel - ","addVariants is deprecated, please use createLineItemsFromVariants instead"),this.createLineItemsFromVariants.apply(this,arguments)},createLineItemsFromVariants:function(){var t=[].concat(Array.prototype.slice.call(arguments)).map(function(t){var e={image:t.variant.image,image_variants:t.variant.imageVariants,variant_id:t.variant.id,product_id:t.variant.productId,title:t.variant.productTitle,quantity:parseInt(t.quantity,10),properties:t.properties||{},variant_title:t.variant.title,price:t.variant.price,compare_at_price:t.variant.compareAtPrice,grams:t.variant.grams};return v(e),e}),n=this.attrs.line_items;n.push.apply(n,e(t));var r=n.reduce(function(t,e){var n=t.filter(function(t){return t.variant_id===e.variant_id&&y(t.properties,e.properties)})[0];return n?n.quantity=n.quantity+e.quantity:t.push(e),t},[]);return this.attrs.line_items=r.reduce(function(t,e){return e.quantity>=1&&t.push(e),t},[]),this.updateModel()},updateLineItem:function(t,e){if(e<1)return this.removeLineItem(t);var n=this.lineItems.filter(function(e){return e.id===t})[0];return n?(n.quantity=e,this.updateModel()):new Promise(function(e,n){n(new Error("line item with id: "+t+" not found in cart#"+this.id))})},removeLineItem:function(t){var e=this.lineItems.length,n=this.lineItems.filter(function(e){return e.id!==t}),r=n.length;return r<e?(this.attrs.line_items=n.map(function(t){return t.attrs}),this.updateModel()):new Promise(function(e,n){n(new Error("line item with id: "+t+" not found in cart#"+this.id))})},clearLineItems:function(){return this.attrs.line_items=[],this.updateModel()},updateModel:function(){var t=this;return this.shopClient.update("carts",this).then(function(e){return ii(t.attrs,e.attrs),t})}},{id:{get:function(){return this.attrs[Oi]},configurable:!0,enumerable:!0},lineItems:{get:function(){return(this.attrs.line_items||[]).map(function(t){return new xi(t)})},configurable:!0,enumerable:!0},lineItemCount:{get:function(){return this.lineItems.reduce(function(t,e){return t+e.quantity},0)},configurable:!0,enumerable:!0},subtotal:{get:function(){var t=this.lineItems.reduce(function(t,e){return t+parseFloat(e.line_price)},0);return t.toFixed(2)},configurable:!0,enumerable:!0},checkoutUrl:{get:function(){var t=this.config,e="https://"+t.domain+"/cart",n=ni.get("ga"),r=this.lineItems.map(function(t){return t.variant_id+":"+t.quantity}),i="access_token="+t.accessToken+"&_fd=0";if("function"==typeof n){var o=void 0;n(function(t){o=t.get("linkerParam")}),o&&(i+="&"+o)}return e+"/"+r+"?"+i},configurable:!0,enumerable:!0}})),Ii=si.extend({constructor:function(t){this.config=t},rootKeyForType:function(t){return t.slice(0,-1)},modelForType:function(){return Ei},deserializeSingle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e[this.rootKeyForType(t)],i=this.modelFromAttrs(t,r,n);return i},modelFromAttrs:function(t,e,n){var r=this.modelForType(t);return n.config=this.config,new r(e,n)},serialize:function(t,e){var n=this.rootKeyForType(t),r={},i=ii({},e.attrs);return r[n]=i,delete i.attributes,Object.keys(i).forEach(function(t){var e=i[t];(null===e||"string"==typeof e&&0===e.length)&&delete i[t]}),r}}),Fi=hi.extend(Object.defineProperties({constructor:function(t){if(Object.keys(t).indexOf("referenceId")<0)throw new Error("Missing key referenceId of reference. References to null are not allowed");this.super.apply(this,arguments)}},{id:{get:function(){return this.attrs[Oi]},configurable:!0,enumerable:!0},referenceId:{get:function(){return this.attrs.referenceId},set:function(t){return this.attrs.referenceId=t,t},configurable:!0,enumerable:!0}})),ki=si.extend({constructor:function(t){this.config=t},modelForType:function(){return Fi},deserializeSingle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.modelForType(t);return new r(e,n)},serialize:function(t,e){var n=ii({},e.attrs);return n}}),Ci=si.extend({constructor:function(){this.localStorageAvailable=this.storageAvailable("localStorage"),this.cache={}},setItem:function(t,e){return this.localStorageAvailable?localStorage.setItem(t,JSON.stringify(e)):this.cache[t]=e,e},getItem:function(t){if(!this.localStorageAvailable)return this.cache[t]||null;var e=localStorage.getItem(t);try{return JSON.parse(e)}catch(t){return null}},storageAvailable:function(t){try{var e=ni.get(t),n="__storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(t){return!1}}}),Ri=si.extend({constructor:function(){this.store=new Ci},idKeyForType:function(){return Oi},fetchSingle:function(t,e){var n=this;return new Promise(function(r,i){var o=n.store.getItem(n.storageKey(t,e));return null===o?void i(new Error(t+"#"+e+" not found")):void r(o)})},create:function(t,e){var n=this;return new Promise(function(r){var i=n.identify(e);n.store.setItem(n.storageKey(t,i),e),r(e)})},update:function(t,e,n){var r=this;return new Promise(function(i){r.store.setItem(r.storageKey(t,e),n),i(n)})},storageKey:function(t,e){return t+"."+e},identify:function(t){var e=Object.keys(t);return v(1===e.length&&"object"===b(t[e[0]])?t[e[0]]:t)}}),zi=si.extend(Object.defineProperties({constructor:function(t){this.config=t,this.serializers={products:wi,collections:wi,carts:Ii,references:ki},this.adapters={products:_i,collections:_i,carts:Ri,references:Ri}},config:null,fetchAll:function(t){var e=this,n=new this.adapters[t](this.config);return n.fetchMultiple(t).then(function(r){return e.deserialize(t,r,n,null,{multiple:!0})})},fetch:function(t,e){var n=this,r=new this.adapters[t](this.config);return r.fetchSingle(t,e).then(function(e){return n.deserialize(t,e,r,null,{single:!0})})},fetchQuery:function(t,e){var n=this,r=new this.adapters[t](this.config);return r.fetchMultiple(t,e).then(function(e){return n.deserialize(t,e,r,null,{multiple:!0})})},create:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new this.adapters[t](this.config),i=new this.serializers[t](this.config),o=i.modelForType(t),a=new o(n,{shopClient:this}),s=i.serialize(t,a);return r.create(t,s).then(function(n){return e.deserialize(t,n,r,i,{single:!0})})},update:function(t,e){var n=this,r=e.adapter,i=e.serializer,o=i.serialize(t,e),a=e.attrs[r.idKeyForType(t)];return r.update(t,a,o).then(function(e){return n.deserialize(t,e,r,i,{single:!0})})},deserialize:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=r||new this.serializers[t](this.config),a={shopClient:this,adapter:n,serializer:o,type:t},s=void 0;return s=i.multiple?o.deserializeMultiple(t,e,a):o.deserializeSingle(t,e,a)},createCart:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={line_items:[]},n={};return ii(n,e),ii(n,t),this.create("carts",n)},updateCart:function(t){return this.update("carts",t)},fetchCart:g("one","carts"),fetchAllProducts:g("all","products"),fetchAllCollections:g("all","collections"),fetchProduct:g("one","products"),fetchCollection:g("one","collections"),fetchQueryProducts:g("query","products"),fetchQueryCollections:g("query","collections"),fetchRecentCart:function(){var t=this;return this.fetch("references",this.config.domain+".recent-cart").then(function(e){var n=e.referenceId;return t.fetchCart(n)}).catch(function(){return t.createCart().then(function(e){var n={referenceId:e.id};return n[Oi]=t.config.domain+".recent-cart",t.create("references",n),e})})}},{serializers:{get:function(){return ii({},this.shadowedSerializers)},set:function(t){this.shadowedSerializers=ii({},t)},configurable:!0,enumerable:!0},adapters:{get:function(){return ii({},this.shadowedAdapters)},set:function(t){this.shadowedAdapters=ii({},t)},configurable:!0,enumerable:!0}}));if(l()){var Mi=require,Ui=Mi("node-fetch");ni.set("fetch",Ui),ni.set("Response",Ui.Response)}l()&&ni.set("btoa",function(t){return new Buffer(t).toString("base64")});var qi={ShopClient:zi,Config:fi,version:li,NO_IMAGE_URI:gi,buildClient:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new this.Config(t);return new this.ShopClient(e)}};t.exports=qi});
@@ -0,0 +1,2 @@
1
+ var gdjs;(l=>{class p{static set(e,o,t){const n=e.getGame();n.shopifyClients||(n.shopifyClients={}),n.shopifyClients[o]=t}static get(e,o){const t=e.getGame();return t.shopifyClients||(t.shopifyClients={}),t.shopifyClients[o]}}l.ShopifyClientsManager=p;let y;(e=>{let h;(n=>(n.buildClient=function(a,c,g,f,i){if(typeof ShopifyBuy>"u")return;const r=new ShopifyBuy.Config({accessToken:i,domain:g,appId:f}),s=ShopifyBuy.buildClient(r);p.set(a,c,s)},n.getCheckoutUrlForProduct=function(a,c,g,f,i,r,s){s.setString(""),r.setString(""),p.get(a,c).fetchProduct(g).then(function(u){if(i<0||i>=u.variants.length){s.setString("The product has no variant.");return}const C=u.variants[i].checkoutUrl(f);r.setString(C)},function(u){s.setString("Unable to get the product that was requested.")})}))(h=e.shopify||={})})(y=l.evtTools||={})})(gdjs||={});
2
+ //# sourceMappingURL=shopifytools.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/Shopify/shopifytools.ts"],
4
+ "sourcesContent": ["namespace gdjs {\n export interface RuntimeGame {\n shopifyClients: { [name: string]: any };\n }\n declare var ShopifyBuy: any;\n\n export class ShopifyClientsManager {\n static set(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n name: string,\n shopifyClient\n ) {\n const game = instanceContainer.getGame();\n if (!game.shopifyClients) {\n game.shopifyClients = {};\n }\n game.shopifyClients[name] = shopifyClient;\n }\n\n static get(instanceContainer: gdjs.RuntimeInstanceContainer, name: string) {\n const game = instanceContainer.getGame();\n if (!game.shopifyClients) {\n game.shopifyClients = {};\n }\n return game.shopifyClients[name];\n }\n }\n\n export namespace evtTools {\n export namespace shopify {\n export const buildClient = function (\n instanceContainer: gdjs.RuntimeInstanceContainer,\n name: string,\n domain: string,\n appId: string,\n accessToken: string\n ) {\n if (typeof ShopifyBuy === 'undefined') {\n return;\n }\n const config = new ShopifyBuy.Config({\n accessToken: accessToken,\n domain: domain,\n appId: appId,\n });\n const shopifyClient = ShopifyBuy.buildClient(config);\n ShopifyClientsManager.set(instanceContainer, name, shopifyClient);\n };\n\n export const getCheckoutUrlForProduct = function (\n instanceContainer: gdjs.RuntimeInstanceContainer,\n name: string,\n productId: string,\n quantity: number,\n variantIndex: number,\n successVariable: gdjs.Variable,\n errorVariable: gdjs.Variable\n ) {\n errorVariable.setString('');\n successVariable.setString('');\n const shopifyClient = ShopifyClientsManager.get(\n instanceContainer,\n name\n );\n shopifyClient.fetchProduct(productId).then(\n function (product) {\n if (variantIndex < 0 || variantIndex >= product.variants.length) {\n errorVariable.setString('The product has no variant.');\n return;\n }\n const variant = product.variants[variantIndex];\n const checkoutURL = variant.checkoutUrl(quantity);\n successVariable.setString(checkoutURL);\n },\n function (error) {\n errorVariable.setString(\n 'Unable to get the product that was requested.'\n );\n }\n );\n };\n }\n }\n}\n"],
5
+ "mappings": "AAAA,IAAU,MAAAA,GAAV,CAMS,MAAMC,CAAsB,CACjC,OAAO,IACLC,EACAC,EACAC,EACA,CACA,MAAMC,EAAOH,EAAkB,QAAQ,EAClCG,EAAK,iBACRA,EAAK,eAAiB,CAAC,GAEzBA,EAAK,eAAeF,CAAI,EAAIC,CAC9B,CAEA,OAAO,IAAIF,EAAkDC,EAAc,CACzE,MAAME,EAAOH,EAAkB,QAAQ,EACvC,OAAKG,EAAK,iBACRA,EAAK,eAAiB,CAAC,GAElBA,EAAK,eAAeF,CAAI,CACjC,CACF,CApBOH,EAAM,sBAAAC,EAsBN,IAAUK,MAAV,CACE,IAAUC,OACFA,EAAA,YAAc,SACzBL,EACAC,EACAK,EACAC,EACAC,EACA,CACA,GAAI,OAAO,WAAe,IACxB,OAEF,MAAMC,EAAS,IAAI,WAAW,OAAO,CACnC,YAAaD,EACb,OAAQF,EACR,MAAOC,CACT,CAAC,EACKL,EAAgB,WAAW,YAAYO,CAAM,EACnDV,EAAsB,IAAIC,EAAmBC,EAAMC,CAAa,CAClE,EAEaG,EAAA,yBAA2B,SACtCL,EACAC,EACAS,EACAC,EACAC,EACAC,EACAC,EACA,CACAA,EAAc,UAAU,EAAE,EAC1BD,EAAgB,UAAU,EAAE,EACNd,EAAsB,IAC1CC,EACAC,CACF,EACc,aAAaS,CAAS,EAAE,KACpC,SAAUK,EAAS,CACjB,GAAIH,EAAe,GAAKA,GAAgBG,EAAQ,SAAS,OAAQ,CAC/DD,EAAc,UAAU,6BAA6B,EACrD,MACF,CAEA,MAAME,EADUD,EAAQ,SAASH,CAAY,EACjB,YAAYD,CAAQ,EAChDE,EAAgB,UAAUG,CAAW,CACvC,EACA,SAAUC,EAAO,CACfH,EAAc,UACZ,+CACF,CACF,CACF,CACF,IAnDeT,EAAAD,EAAA,gBADFA,EAAAN,EAAA,iBA5BT",
6
+ "names": ["gdjs", "ShopifyClientsManager", "instanceContainer", "name", "shopifyClient", "game", "evtTools", "shopify", "domain", "appId", "accessToken", "config", "productId", "quantity", "variantIndex", "successVariable", "errorVariable", "product", "checkoutURL", "error"]
7
+ }
@@ -0,0 +1,92 @@
1
+ // @flow
2
+ /**
3
+ * This is a declaration of an extension for GDevelop 5.
4
+ *
5
+ * ℹ️ Changes in this file are watched and automatically imported if the editor
6
+ * is running. You can also manually run `node import-GDJS-Runtime.js` (in newIDE/app/scripts).
7
+ *
8
+ * The file must be named "JsExtension.js", otherwise GDevelop won't load it.
9
+ * ⚠️ If you make a change and the extension is not loaded, open the developer console
10
+ * and search for any errors.
11
+ *
12
+ * More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
13
+ */
14
+
15
+ /*::
16
+ // Import types to allow Flow to do static type checking on this file.
17
+ // Extensions declaration are typed using Flow (like the editor), but the files
18
+ // for the game engine are checked with TypeScript annotations.
19
+ import { type ObjectsRenderingService, type ObjectsEditorService } from '../JsExtensionTypes.flow.js'
20
+ */
21
+
22
+ module.exports = {
23
+ createExtension: function (
24
+ _ /*: (string) => string */,
25
+ gd /*: libGDevelop */
26
+ ) {
27
+ const extension = new gd.PlatformExtension();
28
+ extension
29
+ .setExtensionInformation(
30
+ 'SpatialSound',
31
+ _('Spatial sound'),
32
+ _(
33
+ 'Allow positioning sounds in a 3D space. The stereo system of the device is used to simulate the position of the sound and to give the impression that the sound is located somewhere around the player.'
34
+ ),
35
+ 'Arthur Pacaud (arthuro555)',
36
+ 'MIT'
37
+ )
38
+ .setCategory('Audio');
39
+ extension
40
+ .addInstructionOrExpressionGroupMetadata(_('Spatial sound'))
41
+ .setIcon('res/actions/son24.png');
42
+
43
+ extension
44
+ .addAction(
45
+ 'SetSoundPosition',
46
+ _('Set position of sound'),
47
+ _(
48
+ "Sets the spatial position of a sound. When a sound is at a distance of 1 to the listener, it's heard at 100% volume. Then, it follows an *inverse distance model*. At a distance of 2, it's heard at 50%, and at a distance of 4 it's heard at 25%."
49
+ ),
50
+ _(
51
+ 'Set position of sound on channel _PARAM1_ to position _PARAM2_, _PARAM3_, _PARAM4_'
52
+ ),
53
+ '',
54
+ 'res/actions/son24.png',
55
+ 'res/actions/son.png'
56
+ )
57
+ .addCodeOnlyParameter('currentScene', '')
58
+ .addParameter('expression', _('Channel'), '', false)
59
+ .addParameter('expression', _('X position'), '', false)
60
+ .addParameter('expression', _('Y position'), '', false)
61
+ .addParameter('expression', _('Z position'), '', false)
62
+ .getCodeExtraInformation()
63
+ .setIncludeFile('Extensions/SpatialSound/howler.spatial.min.js')
64
+ .addIncludeFile('Extensions/SpatialSound/spatialsoundtools.js')
65
+ .setFunctionName('gdjs.evtTools.spatialSound.setSoundPosition');
66
+
67
+ extension
68
+ .addAction(
69
+ 'SetListenerPosition',
70
+ _('Set position of the listener'),
71
+ _('Sets the spatial position of the listener/player.'),
72
+ _('Set the listener position to _PARAM0_, _PARAM1_, _PARAM2_'),
73
+ '',
74
+ 'res/actions/son24.png',
75
+ 'res/actions/son.png'
76
+ )
77
+ .addParameter('expression', _('X position'), '', false)
78
+ .addParameter('expression', _('Y position'), '', false)
79
+ .addParameter('expression', _('Z position'), '', false)
80
+ .getCodeExtraInformation()
81
+ .setIncludeFile('Extensions/SpatialSound/howler.spatial.min.js')
82
+ .setFunctionName('Howler.pos');
83
+
84
+ return extension;
85
+ },
86
+ runExtensionSanityTests: function (
87
+ gd /*: libGDevelop */,
88
+ extension /*: gdPlatformExtension*/
89
+ ) {
90
+ return [];
91
+ },
92
+ };
@@ -0,0 +1,2 @@
1
+ /*! howler.js v2.2.3 | Spatial Plugin | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */
2
+ !function(){"use strict";HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var n=this;if(!n.ctx||!n.ctx.listener)return n;for(var t=n._howls.length-1;t>=0;t--)n._howls[t].stereo(e);return n},HowlerGlobal.prototype.pos=function(e,n,t){var r=this;return r.ctx&&r.ctx.listener?(n="number"!=typeof n?r._pos[1]:n,t="number"!=typeof t?r._pos[2]:t,"number"!=typeof e?r._pos:(r._pos=[e,n,t],void 0!==r.ctx.listener.positionX?(r.ctx.listener.positionX.setTargetAtTime(r._pos[0],Howler.ctx.currentTime,.1),r.ctx.listener.positionY.setTargetAtTime(r._pos[1],Howler.ctx.currentTime,.1),r.ctx.listener.positionZ.setTargetAtTime(r._pos[2],Howler.ctx.currentTime,.1)):r.ctx.listener.setPosition(r._pos[0],r._pos[1],r._pos[2]),r)):r},HowlerGlobal.prototype.orientation=function(e,n,t,r,o,i){var a=this;if(!a.ctx||!a.ctx.listener)return a;var s=a._orientation;return n="number"!=typeof n?s[1]:n,t="number"!=typeof t?s[2]:t,r="number"!=typeof r?s[3]:r,o="number"!=typeof o?s[4]:o,i="number"!=typeof i?s[5]:i,"number"!=typeof e?s:(a._orientation=[e,n,t,r,o,i],void 0!==a.ctx.listener.forwardX?(a.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),a.ctx.listener.forwardY.setTargetAtTime(n,Howler.ctx.currentTime,.1),a.ctx.listener.forwardZ.setTargetAtTime(t,Howler.ctx.currentTime,.1),a.ctx.listener.upX.setTargetAtTime(r,Howler.ctx.currentTime,.1),a.ctx.listener.upY.setTargetAtTime(o,Howler.ctx.currentTime,.1),a.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):a.ctx.listener.setOrientation(e,n,t,r,o,i),a)},Howl.prototype.init=function(e){return function(n){var t=this;return t._orientation=n.orientation||[1,0,0],t._stereo=n.stereo||null,t._pos=n.pos||null,t._pannerAttr={coneInnerAngle:void 0!==n.coneInnerAngle?n.coneInnerAngle:360,coneOuterAngle:void 0!==n.coneOuterAngle?n.coneOuterAngle:360,coneOuterGain:void 0!==n.coneOuterGain?n.coneOuterGain:0,distanceModel:void 0!==n.distanceModel?n.distanceModel:"inverse",maxDistance:void 0!==n.maxDistance?n.maxDistance:1e4,panningModel:void 0!==n.panningModel?n.panningModel:"HRTF",refDistance:void 0!==n.refDistance?n.refDistance:1,rolloffFactor:void 0!==n.rolloffFactor?n.rolloffFactor:1},t._onstereo=n.onstereo?[{fn:n.onstereo}]:[],t._onpos=n.onpos?[{fn:n.onpos}]:[],t._onorientation=n.onorientation?[{fn:n.onorientation}]:[],e.call(this,n)}}(Howl.prototype.init),Howl.prototype.stereo=function(n,t){var r=this;if(!r._webAudio)return r;if("loaded"!==r._state)return r._queue.push({event:"stereo",action:function(){r.stereo(n,t)}}),r;var o=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===t){if("number"!=typeof n)return r._stereo;r._stereo=n,r._pos=[n,0,0]}for(var i=r._getSoundIds(t),a=0;a<i.length;a++){var s=r._soundById(i[a]);if(s){if("number"!=typeof n)return s._stereo;s._stereo=n,s._pos=[n,0,0],s._node&&(s._pannerAttr.panningModel="equalpower",s._panner&&s._panner.pan||e(s,o),"spatial"===o?void 0!==s._panner.positionX?(s._panner.positionX.setValueAtTime(n,Howler.ctx.currentTime),s._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),s._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):s._panner.setPosition(n,0,0):s._panner.pan.setValueAtTime(n,Howler.ctx.currentTime)),r._emit("stereo",s._id)}}return r},Howl.prototype.pos=function(n,t,r,o){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"pos",action:function(){i.pos(n,t,r,o)}}),i;if(t="number"!=typeof t?0:t,r="number"!=typeof r?-.5:r,void 0===o){if("number"!=typeof n)return i._pos;i._pos=[n,t,r]}for(var a=i._getSoundIds(o),s=0;s<a.length;s++){var p=i._soundById(a[s]);if(p){if("number"!=typeof n)return p._pos;p._pos=[n,t,r],p._node&&(p._panner&&!p._panner.pan||e(p,"spatial"),void 0!==p._panner.positionX?(p._panner.positionX.setValueAtTime(n,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(t,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(r,Howler.ctx.currentTime)):p._panner.setPosition(n,t,r)),i._emit("pos",p._id)}}return i},Howl.prototype.orientation=function(n,t,r,o){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"orientation",action:function(){i.orientation(n,t,r,o)}}),i;if(t="number"!=typeof t?i._orientation[1]:t,r="number"!=typeof r?i._orientation[2]:r,void 0===o){if("number"!=typeof n)return i._orientation;i._orientation=[n,t,r]}for(var a=i._getSoundIds(o),s=0;s<a.length;s++){var p=i._soundById(a[s]);if(p){if("number"!=typeof n)return p._orientation;p._orientation=[n,t,r],p._node&&(p._panner||(p._pos||(p._pos=i._pos||[0,0,-.5]),e(p,"spatial")),void 0!==p._panner.orientationX?(p._panner.orientationX.setValueAtTime(n,Howler.ctx.currentTime),p._panner.orientationY.setValueAtTime(t,Howler.ctx.currentTime),p._panner.orientationZ.setValueAtTime(r,Howler.ctx.currentTime)):p._panner.setOrientation(n,t,r)),i._emit("orientation",p._id)}}return i},Howl.prototype.pannerAttr=function(){var n,t,r,o=this,i=arguments;if(!o._webAudio)return o;if(0===i.length)return o._pannerAttr;if(1===i.length){if("object"!=typeof i[0])return r=o._soundById(parseInt(i[0],10)),r?r._pannerAttr:o._pannerAttr;n=i[0],void 0===t&&(n.pannerAttr||(n.pannerAttr={coneInnerAngle:n.coneInnerAngle,coneOuterAngle:n.coneOuterAngle,coneOuterGain:n.coneOuterGain,distanceModel:n.distanceModel,maxDistance:n.maxDistance,refDistance:n.refDistance,rolloffFactor:n.rolloffFactor,panningModel:n.panningModel}),o._pannerAttr={coneInnerAngle:void 0!==n.pannerAttr.coneInnerAngle?n.pannerAttr.coneInnerAngle:o._coneInnerAngle,coneOuterAngle:void 0!==n.pannerAttr.coneOuterAngle?n.pannerAttr.coneOuterAngle:o._coneOuterAngle,coneOuterGain:void 0!==n.pannerAttr.coneOuterGain?n.pannerAttr.coneOuterGain:o._coneOuterGain,distanceModel:void 0!==n.pannerAttr.distanceModel?n.pannerAttr.distanceModel:o._distanceModel,maxDistance:void 0!==n.pannerAttr.maxDistance?n.pannerAttr.maxDistance:o._maxDistance,refDistance:void 0!==n.pannerAttr.refDistance?n.pannerAttr.refDistance:o._refDistance,rolloffFactor:void 0!==n.pannerAttr.rolloffFactor?n.pannerAttr.rolloffFactor:o._rolloffFactor,panningModel:void 0!==n.pannerAttr.panningModel?n.pannerAttr.panningModel:o._panningModel})}else 2===i.length&&(n=i[0],t=parseInt(i[1],10));for(var a=o._getSoundIds(t),s=0;s<a.length;s++)if(r=o._soundById(a[s])){var p=r._pannerAttr;p={coneInnerAngle:void 0!==n.coneInnerAngle?n.coneInnerAngle:p.coneInnerAngle,coneOuterAngle:void 0!==n.coneOuterAngle?n.coneOuterAngle:p.coneOuterAngle,coneOuterGain:void 0!==n.coneOuterGain?n.coneOuterGain:p.coneOuterGain,distanceModel:void 0!==n.distanceModel?n.distanceModel:p.distanceModel,maxDistance:void 0!==n.maxDistance?n.maxDistance:p.maxDistance,refDistance:void 0!==n.refDistance?n.refDistance:p.refDistance,rolloffFactor:void 0!==n.rolloffFactor?n.rolloffFactor:p.rolloffFactor,panningModel:void 0!==n.panningModel?n.panningModel:p.panningModel};var c=r._panner;c?(c.coneInnerAngle=p.coneInnerAngle,c.coneOuterAngle=p.coneOuterAngle,c.coneOuterGain=p.coneOuterGain,c.distanceModel=p.distanceModel,c.maxDistance=p.maxDistance,c.refDistance=p.refDistance,c.rolloffFactor=p.rolloffFactor,c.panningModel=p.panningModel):(r._pos||(r._pos=o._pos||[0,0,-.5]),e(r,"spatial"))}return o},Sound.prototype.init=function(e){return function(){var n=this,t=n._parent;n._orientation=t._orientation,n._stereo=t._stereo,n._pos=t._pos,n._pannerAttr=t._pannerAttr,e.call(this),n._stereo?t.stereo(n._stereo):n._pos&&t.pos(n._pos[0],n._pos[1],n._pos[2],n._id)}}(Sound.prototype.init),Sound.prototype.reset=function(e){return function(){var n=this,t=n._parent;return n._orientation=t._orientation,n._stereo=t._stereo,n._pos=t._pos,n._pannerAttr=t._pannerAttr,n._stereo?t.stereo(n._stereo):n._pos?t.pos(n._pos[0],n._pos[1],n._pos[2],n._id):n._panner&&(n._panner.disconnect(0),n._panner=void 0,t._refreshBuffer(n)),e.call(this)}}(Sound.prototype.reset);var e=function(e,n){n=n||"spatial","spatial"===n?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,void 0!==e._panner.positionX?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),void 0!==e._panner.orientationX?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}}();
@@ -0,0 +1,2 @@
1
+ var gdjs;(n=>{let t;(s=>{let a;(r=>{const i=new n.Logger("Spatial Sound");r.setSoundPosition=(g,e,p,c,l)=>{const o=g.getScene().getSoundManager().getSoundOnChannel(e);o?o.setSpatialPosition(p,c,l):i.error(`Cannot set the spatial position of a non-existing sound on channel ${e}.`)}})(a=s.spatialSound||={})})(t=n.evtTools||={})})(gdjs||={});
2
+ //# sourceMappingURL=spatialsoundtools.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/SpatialSound/spatialsoundtools.ts"],
4
+ "sourcesContent": ["namespace gdjs {\n export namespace evtTools {\n export namespace spatialSound {\n const logger = new gdjs.Logger('Spatial Sound');\n export const setSoundPosition = (\n instanceContainer: gdjs.RuntimeInstanceContainer,\n channel: integer,\n x: float,\n y: float,\n z: float\n ) => {\n // TODO EBO The position must be transform to the scene position when it comes from a custom object.\n const sound = instanceContainer\n .getScene()\n .getSoundManager()\n .getSoundOnChannel(channel);\n if (sound) sound.setSpatialPosition(x, y, z);\n else\n logger.error(\n `Cannot set the spatial position of a non-existing sound on channel ${channel}.`\n );\n };\n }\n }\n}\n"],
5
+ "mappings": "AAAA,IAAU,MAAAA,GAAV,CACS,IAAUC,MAAV,CACE,IAAUC,MAAV,CACL,MAAMC,EAAS,IAAIH,EAAK,OAAO,eAAe,EACjCE,EAAA,iBAAmB,CAC9BE,EACAC,EACAC,EACAC,EACAC,IACG,CAEH,MAAMC,EAAQL,EACX,SAAS,EACT,gBAAgB,EAChB,kBAAkBC,CAAO,EACxBI,EAAOA,EAAM,mBAAmBH,EAAGC,EAAGC,CAAC,EAEzCL,EAAO,MACL,sEAAsEE,CAAO,GAC/E,CACJ,IAnBeH,EAAAD,EAAA,qBADFA,EAAAD,EAAA,iBADT",
6
+ "names": ["gdjs", "evtTools", "spatialSound", "logger", "instanceContainer", "channel", "x", "y", "z", "sound"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var gdjs;(r=>{let t;(i=>{let a;(e=>{let o=null;e.isMobile=()=>r.evtTools.common.isMobile(),e.isNativeMobileApp=()=>typeof window<"u"&&window.cordova,e.isNativeDesktopApp=n=>!!n.getGame().getRenderer().getElectron();const u=()=>(0,e.isMobile)()?!0:!!navigator.maxTouchPoints&&navigator.maxTouchPoints>2;e.hasTouchScreen=()=>o!==null?o:o=u(),e.isWebGLSupported=n=>n.getGame().getRenderer().isWebGLSupported(),e.isPreview=n=>n.getGame().isPreview()})(a=i.systemInfo||={})})(t=r.evtTools||={})})(gdjs||={});
2
+ //# sourceMappingURL=systeminfotools.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/SystemInfo/systeminfotools.ts"],
4
+ "sourcesContent": ["/*\n * GDevelop - SystemInfo Extension\n * Copyright (c) 2016-present Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n export namespace evtTools {\n export namespace systemInfo {\n let cachedHasTouchScreen: boolean | null = null;\n\n /**\n * Check if the game runs on a mobile device (iPhone, iPad, Android).\n * Note that the distinction between what is a mobile device and what is not\n * is becoming blurry. If you use this for mobile controls,\n * prefer to check if the device has touchscreen support.\n */\n export const isMobile = (): boolean => {\n return gdjs.evtTools.common.isMobile();\n };\n\n /**\n * Check if the game is running as a native mobile app - which in the case\n * of an exported GDevelop game means: running packaged inside Cordova/Capacitor.js.\n *\n * Note: this could be improved to also detect running inside an embedded webview.\n *\n * @returns true if running inside Cordova (or Capacitor.js).\n */\n export const isNativeMobileApp = (): boolean => {\n return typeof window !== 'undefined' && (window as any).cordova;\n };\n\n /**\n * Check if the game is running as a native desktop app - which in the case\n * of an exported GDevelop game means: running packaged inside Electron.\n *\n * @param instanceContainer The current scene.\n * @returns true if running inside Electron.\n */\n export const isNativeDesktopApp = (\n instanceContainer: gdjs.RuntimeInstanceContainer\n ): boolean => {\n return !!instanceContainer.getGame().getRenderer().getElectron();\n };\n\n const checkHasTouchScreen = (): boolean => {\n // First check if the device is mobile, as all mobile devices have a touchscreen\n // and some older browsers don't have support for `navigator.maxTouchPoints`\n if (isMobile()) {\n return true;\n }\n return !!navigator.maxTouchPoints && navigator.maxTouchPoints > 2;\n };\n\n /**\n * Check if the device has a touchscreen\n */\n export const hasTouchScreen = () => {\n if (cachedHasTouchScreen !== null) {\n return cachedHasTouchScreen;\n }\n return (cachedHasTouchScreen = checkHasTouchScreen());\n };\n\n /**\n * Check if the the device supports WebGL.\n * @returns true if WebGL is supported\n */\n export const isWebGLSupported = (\n instanceContainer: gdjs.RuntimeInstanceContainer\n ): boolean => {\n return instanceContainer.getGame().getRenderer().isWebGLSupported();\n };\n\n /**\n * Check if the game is running as a preview, launched from an editor.\n * @param instanceContainer The current container.\n * @returns true if the game is running as a preview.\n */\n export const isPreview = (\n instanceContainer: gdjs.RuntimeInstanceContainer\n ): boolean => {\n return instanceContainer.getGame().isPreview();\n };\n }\n }\n}\n"],
5
+ "mappings": "AAIA,IAAU,MAAAA,GAAV,CACS,IAAUC,MAAV,CACE,IAAUC,MAAV,CACL,IAAIC,EAAuC,KAQ9BD,EAAA,SAAW,IACfF,EAAK,SAAS,OAAO,SAAS,EAW1BE,EAAA,kBAAoB,IACxB,OAAO,OAAW,KAAgB,OAAe,QAU7CA,EAAA,mBACXE,GAEO,CAAC,CAACA,EAAkB,QAAQ,EAAE,YAAY,EAAE,YAAY,EAGjE,MAAMC,EAAsB,OAGtBH,EAAA,UAAS,EACJ,GAEF,CAAC,CAAC,UAAU,gBAAkB,UAAU,eAAiB,EAMrDA,EAAA,eAAiB,IACxBC,IAAyB,KACpBA,EAEDA,EAAuBE,EAAoB,EAOxCH,EAAA,iBACXE,GAEOA,EAAkB,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAQvDF,EAAA,UACXE,GAEOA,EAAkB,QAAQ,EAAE,UAAU,IA3EhCF,EAAAD,EAAA,mBADFA,EAAAD,EAAA,iBADT",
6
+ "names": ["gdjs", "evtTools", "systemInfo", "cachedHasTouchScreen", "instanceContainer", "checkHasTouchScreen"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var gdjs;(i=>{class d{_object;_pressHandler;_upHandler;_downHandler;constructor(n){this._object=n,this._pressHandler=function(e){if(!n.isActivated())return;e=e||window.event;const t=e.which||e.keyCode,r=String.fromCharCode(t);return r!==void 0&&t!==8&&n.setString(n.getString()+r),e.preventDefault&&e.preventDefault(),!1},this._upHandler=function(e){return n.isActivated()?(e=e||window.event,(e.which||e.keyCode)===8&&n.setString(n.getString().slice(0,-1)),e.preventDefault&&e.preventDefault(),!1):void 0},this._downHandler=function(e){if(e=e||window.event,(e.which||e.keyCode)===8)return e.preventDefault&&e.preventDefault(),!1},document.addEventListener("keypress",this._pressHandler),document.addEventListener("keyup",this._upHandler),document.addEventListener("keydown",this._downHandler)}onDestroy(){document.removeEventListener("keypress",this._pressHandler),document.removeEventListener("keyup",this._upHandler),document.removeEventListener("keydown",this._downHandler)}updateString(){}activate(n){}}i.TextEntryRuntimeObjectRenderer=d})(gdjs||={});
2
+ //# sourceMappingURL=textentryruntimeobject-pixi-renderer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/TextEntryObject/textentryruntimeobject-pixi-renderer.ts"],
4
+ "sourcesContent": ["namespace gdjs {\n class TextEntryRuntimeObjectPixiRenderer {\n _object: gdjs.TextEntryRuntimeObject;\n _pressHandler: any;\n _upHandler: any;\n _downHandler: any;\n\n constructor(runtimeObject: gdjs.TextEntryRuntimeObject) {\n this._object = runtimeObject;\n this._pressHandler = function (evt) {\n if (!runtimeObject.isActivated()) {\n return;\n }\n evt = evt || window.event;\n const charCode = evt.which || evt.keyCode;\n const charTyped = String.fromCharCode(charCode);\n if (\n charTyped !== undefined &&\n //Skip some non displayable characters\n charCode !== 8\n ) {\n //On Firefox, backspace is considered as a character\n runtimeObject.setString(runtimeObject.getString() + charTyped);\n }\n if (evt.preventDefault) {\n evt.preventDefault();\n }\n return false;\n };\n this._upHandler = function (evt) {\n if (!runtimeObject.isActivated()) {\n return;\n }\n evt = evt || window.event;\n const charCode = evt.which || evt.keyCode;\n if (charCode === 8) {\n //Backspace\n runtimeObject.setString(runtimeObject.getString().slice(0, -1));\n }\n if (evt.preventDefault) {\n evt.preventDefault();\n }\n return false;\n };\n // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value.\n this._downHandler = function (evt) {\n evt = evt || window.event;\n const charCode = evt.which || evt.keyCode;\n\n //Prevent backspace from going to the previous page\n if (charCode === 8) {\n if (evt.preventDefault) {\n evt.preventDefault();\n }\n return false;\n }\n };\n document.addEventListener('keypress', this._pressHandler);\n document.addEventListener('keyup', this._upHandler);\n document.addEventListener('keydown', this._downHandler);\n }\n\n onDestroy() {\n document.removeEventListener('keypress', this._pressHandler);\n document.removeEventListener('keyup', this._upHandler);\n document.removeEventListener('keydown', this._downHandler);\n }\n\n updateString(): void {\n //Nothing to do.\n }\n\n activate(enable) {\n //Nothing to do.\n }\n }\n\n export const TextEntryRuntimeObjectRenderer = TextEntryRuntimeObjectPixiRenderer;\n export type TextEntryRuntimeObjectRenderer = TextEntryRuntimeObjectPixiRenderer;\n}\n"],
5
+ "mappings": "AAAA,IAAU,MAAAA,GAAV,CACE,MAAMC,CAAmC,CACvC,QACA,cACA,WACA,aAEA,YAAYC,EAA4C,CACtD,KAAK,QAAUA,EACf,KAAK,cAAgB,SAAUC,EAAK,CAClC,GAAI,CAACD,EAAc,YAAY,EAC7B,OAEFC,EAAMA,GAAO,OAAO,MACpB,MAAMC,EAAWD,EAAI,OAASA,EAAI,QAC5BE,EAAY,OAAO,aAAaD,CAAQ,EAC9C,OACEC,IAAc,QAEdD,IAAa,GAGbF,EAAc,UAAUA,EAAc,UAAU,EAAIG,CAAS,EAE3DF,EAAI,gBACNA,EAAI,eAAe,EAEd,EACT,EACA,KAAK,WAAa,SAAUA,EAAK,CAC/B,OAAKD,EAAc,YAAY,GAG/BC,EAAMA,GAAO,OAAO,OACHA,EAAI,OAASA,EAAI,WACjB,GAEfD,EAAc,UAAUA,EAAc,UAAU,EAAE,MAAM,EAAG,EAAE,CAAC,EAE5DC,EAAI,gBACNA,EAAI,eAAe,EAEd,IAXL,MAYJ,EAEA,KAAK,aAAe,SAAUA,EAAK,CAKjC,GAJAA,EAAMA,GAAO,OAAO,OACHA,EAAI,OAASA,EAAI,WAGjB,EACf,OAAIA,EAAI,gBACNA,EAAI,eAAe,EAEd,EAEX,EACA,SAAS,iBAAiB,WAAY,KAAK,aAAa,EACxD,SAAS,iBAAiB,QAAS,KAAK,UAAU,EAClD,SAAS,iBAAiB,UAAW,KAAK,YAAY,CACxD,CAEA,WAAY,CACV,SAAS,oBAAoB,WAAY,KAAK,aAAa,EAC3D,SAAS,oBAAoB,QAAS,KAAK,UAAU,EACrD,SAAS,oBAAoB,UAAW,KAAK,YAAY,CAC3D,CAEA,cAAqB,CAErB,CAEA,SAASG,EAAQ,CAEjB,CACF,CAEaN,EAAA,+BAAiCC,IA7EtC",
6
+ "names": ["gdjs", "TextEntryRuntimeObjectPixiRenderer", "runtimeObject", "evt", "charCode", "charTyped", "enable"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var gdjs;(t=>{class n extends t.RuntimeObject{_str="";_activated=!0;_renderer;constructor(e,r){super(e,r),this._renderer=new t.TextEntryRuntimeObjectRenderer(this),this.onCreated()}updateFromObjectData(e,r){return!0}onDestroyFromScene(e){super.onDestroyFromScene(e),this._renderer.onDestroy&&this._renderer.onDestroy()}update(e){this._renderer.getString&&(this._str=this._renderer.getString())}getString(){return this._str}setString(e){this._str=e,this._renderer.updateString()}isActivated(){return this._activated}activate(e){this._activated=e,this._renderer.activate(this._activated)}}t.TextEntryRuntimeObject=n,t.registerObject("TextEntryObject::TextEntry",t.TextEntryRuntimeObject)})(gdjs||={});
2
+ //# sourceMappingURL=textentryruntimeobject.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../GDevelop/Extensions/TextEntryObject/textentryruntimeobject.ts"],
4
+ "sourcesContent": ["/*\n * GDevelop JS Platform\n * 2013 Florian Rival (Florian.Rival@gmail.com)\n */\nnamespace gdjs {\n /**\n * The TextEntryRuntimeObject allows to capture text typed on the keyboard.\n */\n export class TextEntryRuntimeObject extends gdjs.RuntimeObject {\n _str: string = '';\n _activated: boolean = true;\n _renderer: gdjs.TextEntryRuntimeObjectRenderer;\n\n /**\n * @param instanceContainer The container the object belongs to.\n * @param textEntryObjectData The initial properties of the object\n */\n constructor(\n instanceContainer: gdjs.RuntimeInstanceContainer,\n textEntryObjectData: ObjectData\n ) {\n super(instanceContainer, textEntryObjectData);\n this._renderer = new gdjs.TextEntryRuntimeObjectRenderer(this);\n\n // *ALWAYS* call `this.onCreated()` at the very end of your object constructor.\n this.onCreated();\n }\n\n updateFromObjectData(oldObjectData, newObjectData): boolean {\n // Nothing to update.\n return true;\n }\n\n onDestroyFromScene(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n super.onDestroyFromScene(instanceContainer);\n if (this._renderer.onDestroy) {\n this._renderer.onDestroy();\n }\n }\n\n update(instanceContainer: gdjs.RuntimeInstanceContainer): void {\n if ((this._renderer as any).getString) {\n this._str = (this._renderer as any).getString();\n }\n }\n\n getString(): string {\n return this._str;\n }\n\n setString(str: string): void {\n this._str = str;\n this._renderer.updateString();\n }\n\n isActivated(): boolean {\n return this._activated;\n }\n\n activate(enable: boolean) {\n this._activated = enable;\n this._renderer.activate(this._activated);\n }\n }\n gdjs.registerObject(\n 'TextEntryObject::TextEntry',\n gdjs.TextEntryRuntimeObject\n );\n}\n"],
5
+ "mappings": "AAIA,IAAU,MAAAA,GAAV,CAIS,MAAMC,UAA+BD,EAAK,aAAc,CAC7D,KAAe,GACf,WAAsB,GACtB,UAMA,YACEE,EACAC,EACA,CACA,MAAMD,EAAmBC,CAAmB,EAC5C,KAAK,UAAY,IAAIH,EAAK,+BAA+B,IAAI,EAG7D,KAAK,UAAU,CACjB,CAEA,qBAAqBI,EAAeC,EAAwB,CAE1D,MAAO,EACT,CAEA,mBAAmBH,EAAwD,CACzE,MAAM,mBAAmBA,CAAiB,EACtC,KAAK,UAAU,WACjB,KAAK,UAAU,UAAU,CAE7B,CAEA,OAAOA,EAAwD,CACxD,KAAK,UAAkB,YAC1B,KAAK,KAAQ,KAAK,UAAkB,UAAU,EAElD,CAEA,WAAoB,CAClB,OAAO,KAAK,IACd,CAEA,UAAUI,EAAmB,CAC3B,KAAK,KAAOA,EACZ,KAAK,UAAU,aAAa,CAC9B,CAEA,aAAuB,CACrB,OAAO,KAAK,UACd,CAEA,SAASC,EAAiB,CACxB,KAAK,WAAaA,EAClB,KAAK,UAAU,SAAS,KAAK,UAAU,CACzC,CACF,CAvDOP,EAAM,uBAAAC,EAwDbD,EAAK,eACH,6BACAA,EAAK,sBACP,IA/DQ",
6
+ "names": ["gdjs", "TextEntryRuntimeObject", "instanceContainer", "textEntryObjectData", "oldObjectData", "newObjectData", "str", "enable"]
7
+ }