@swf2es/player 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/LICENSE.third-party +51 -0
- package/README.md +38 -2
- package/dist/air-definitions.d.ts +2 -0
- package/dist/air-definitions.d.ts.map +1 -0
- package/dist/air-definitions.js +130 -0
- package/dist/air-definitions.js.map +1 -0
- package/dist/avm1/amf.d.ts +155 -0
- package/dist/avm1/amf.d.ts.map +1 -0
- package/dist/avm1/amf.js +508 -0
- package/dist/avm1/amf.js.map +1 -0
- package/dist/avm1/avm1.d.ts +448 -0
- package/dist/avm1/avm1.d.ts.map +1 -0
- package/dist/avm1/avm1.js +1305 -0
- package/dist/avm1/avm1.js.map +1 -0
- package/dist/avm1/bindings.d.ts +56 -0
- package/dist/avm1/bindings.d.ts.map +1 -0
- package/dist/avm1/bindings.js +215 -0
- package/dist/avm1/bindings.js.map +1 -0
- package/dist/avm1/classes.d.ts +33 -0
- package/dist/avm1/classes.d.ts.map +1 -0
- package/dist/avm1/classes.js +76 -0
- package/dist/avm1/classes.js.map +1 -0
- package/dist/avm1/clips.d.ts +54 -0
- package/dist/avm1/clips.d.ts.map +1 -0
- package/dist/avm1/clips.js +230 -0
- package/dist/avm1/clips.js.map +1 -0
- package/dist/avm1/compile.d.ts +8 -0
- package/dist/avm1/compile.d.ts.map +1 -0
- package/dist/avm1/compile.js +141 -0
- package/dist/avm1/compile.js.map +1 -0
- package/dist/avm1/external.d.ts +44 -0
- package/dist/avm1/external.d.ts.map +1 -0
- package/dist/avm1/external.js +80 -0
- package/dist/avm1/external.js.map +1 -0
- package/dist/avm1/focus.d.ts +68 -0
- package/dist/avm1/focus.d.ts.map +1 -0
- package/dist/avm1/focus.js +279 -0
- package/dist/avm1/focus.js.map +1 -0
- package/dist/avm1/globals/BitmapData.d.ts +30 -0
- package/dist/avm1/globals/BitmapData.d.ts.map +1 -0
- package/dist/avm1/globals/BitmapData.js +543 -0
- package/dist/avm1/globals/BitmapData.js.map +1 -0
- package/dist/avm1/globals/Button.d.ts +8 -0
- package/dist/avm1/globals/Button.d.ts.map +1 -0
- package/dist/avm1/globals/Button.js +32 -0
- package/dist/avm1/globals/Button.js.map +1 -0
- package/dist/avm1/globals/Color.d.ts +11 -0
- package/dist/avm1/globals/Color.d.ts.map +1 -0
- package/dist/avm1/globals/Color.js +116 -0
- package/dist/avm1/globals/Color.js.map +1 -0
- package/dist/avm1/globals/ExternalInterface.d.ts +20 -0
- package/dist/avm1/globals/ExternalInterface.d.ts.map +1 -0
- package/dist/avm1/globals/ExternalInterface.js +311 -0
- package/dist/avm1/globals/ExternalInterface.js.map +1 -0
- package/dist/avm1/globals/FileReference.d.ts +4 -0
- package/dist/avm1/globals/FileReference.d.ts.map +1 -0
- package/dist/avm1/globals/FileReference.js +218 -0
- package/dist/avm1/globals/FileReference.js.map +1 -0
- package/dist/avm1/globals/Key.d.ts +21 -0
- package/dist/avm1/globals/Key.d.ts.map +1 -0
- package/dist/avm1/globals/Key.js +61 -0
- package/dist/avm1/globals/Key.js.map +1 -0
- package/dist/avm1/globals/LoadVars.d.ts +39 -0
- package/dist/avm1/globals/LoadVars.d.ts.map +1 -0
- package/dist/avm1/globals/LoadVars.js +209 -0
- package/dist/avm1/globals/LoadVars.js.map +1 -0
- package/dist/avm1/globals/LocalConnection.d.ts +5 -0
- package/dist/avm1/globals/LocalConnection.d.ts.map +1 -0
- package/dist/avm1/globals/LocalConnection.js +93 -0
- package/dist/avm1/globals/LocalConnection.js.map +1 -0
- package/dist/avm1/globals/MovieClip.d.ts +156 -0
- package/dist/avm1/globals/MovieClip.d.ts.map +1 -0
- package/dist/avm1/globals/MovieClip.js +1071 -0
- package/dist/avm1/globals/MovieClip.js.map +1 -0
- package/dist/avm1/globals/MovieClipLoader.d.ts +29 -0
- package/dist/avm1/globals/MovieClipLoader.d.ts.map +1 -0
- package/dist/avm1/globals/MovieClipLoader.js +91 -0
- package/dist/avm1/globals/MovieClipLoader.js.map +1 -0
- package/dist/avm1/globals/NetConnection.d.ts +68 -0
- package/dist/avm1/globals/NetConnection.d.ts.map +1 -0
- package/dist/avm1/globals/NetConnection.js +262 -0
- package/dist/avm1/globals/NetConnection.js.map +1 -0
- package/dist/avm1/globals/PrintJob.d.ts +4 -0
- package/dist/avm1/globals/PrintJob.d.ts.map +1 -0
- package/dist/avm1/globals/PrintJob.js +38 -0
- package/dist/avm1/globals/PrintJob.js.map +1 -0
- package/dist/avm1/globals/Selection.d.ts +17 -0
- package/dist/avm1/globals/Selection.d.ts.map +1 -0
- package/dist/avm1/globals/Selection.js +63 -0
- package/dist/avm1/globals/Selection.js.map +1 -0
- package/dist/avm1/globals/SharedObject.d.ts +20 -0
- package/dist/avm1/globals/SharedObject.d.ts.map +1 -0
- package/dist/avm1/globals/SharedObject.js +246 -0
- package/dist/avm1/globals/SharedObject.js.map +1 -0
- package/dist/avm1/globals/Sound.d.ts +36 -0
- package/dist/avm1/globals/Sound.d.ts.map +1 -0
- package/dist/avm1/globals/Sound.js +239 -0
- package/dist/avm1/globals/Sound.js.map +1 -0
- package/dist/avm1/globals/Stage.d.ts +7 -0
- package/dist/avm1/globals/Stage.d.ts.map +1 -0
- package/dist/avm1/globals/Stage.js +13 -0
- package/dist/avm1/globals/Stage.js.map +1 -0
- package/dist/avm1/globals/StyleSheet.d.ts +10 -0
- package/dist/avm1/globals/StyleSheet.d.ts.map +1 -0
- package/dist/avm1/globals/StyleSheet.js +206 -0
- package/dist/avm1/globals/StyleSheet.js.map +1 -0
- package/dist/avm1/globals/TextField.d.ts +44 -0
- package/dist/avm1/globals/TextField.d.ts.map +1 -0
- package/dist/avm1/globals/TextField.js +397 -0
- package/dist/avm1/globals/TextField.js.map +1 -0
- package/dist/avm1/globals/TextFormat.d.ts +19 -0
- package/dist/avm1/globals/TextFormat.d.ts.map +1 -0
- package/dist/avm1/globals/TextFormat.js +195 -0
- package/dist/avm1/globals/TextFormat.js.map +1 -0
- package/dist/avm1/globals/TextSnapshot.d.ts +6 -0
- package/dist/avm1/globals/TextSnapshot.d.ts.map +1 -0
- package/dist/avm1/globals/TextSnapshot.js +89 -0
- package/dist/avm1/globals/TextSnapshot.js.map +1 -0
- package/dist/avm1/globals/XML.d.ts +9 -0
- package/dist/avm1/globals/XML.d.ts.map +1 -0
- package/dist/avm1/globals/XML.js +397 -0
- package/dist/avm1/globals/XML.js.map +1 -0
- package/dist/avm1/globals/XMLNode.d.ts +93 -0
- package/dist/avm1/globals/XMLNode.d.ts.map +1 -0
- package/dist/avm1/globals/XMLNode.js +414 -0
- package/dist/avm1/globals/XMLNode.js.map +1 -0
- package/dist/avm1/globals/XMLSocket.d.ts +19 -0
- package/dist/avm1/globals/XMLSocket.d.ts.map +1 -0
- package/dist/avm1/globals/XMLSocket.js +206 -0
- package/dist/avm1/globals/XMLSocket.js.map +1 -0
- package/dist/avm1/globals/drawing.d.ts +8 -0
- package/dist/avm1/globals/drawing.d.ts.map +1 -0
- package/dist/avm1/globals/drawing.js +203 -0
- package/dist/avm1/globals/drawing.js.map +1 -0
- package/dist/avm1/globals/filters.d.ts +30 -0
- package/dist/avm1/globals/filters.d.ts.map +1 -0
- package/dist/avm1/globals/filters.js +636 -0
- package/dist/avm1/globals/filters.js.map +1 -0
- package/dist/avm1/globals/geom.d.ts +28 -0
- package/dist/avm1/globals/geom.d.ts.map +1 -0
- package/dist/avm1/globals/geom.js +601 -0
- package/dist/avm1/globals/geom.js.map +1 -0
- package/dist/avm1/input.d.ts +106 -0
- package/dist/avm1/input.d.ts.map +1 -0
- package/dist/avm1/input.js +484 -0
- package/dist/avm1/input.js.map +1 -0
- package/dist/avm1/keyboard.d.ts +17 -0
- package/dist/avm1/keyboard.d.ts.map +1 -0
- package/dist/avm1/keyboard.js +114 -0
- package/dist/avm1/keyboard.js.map +1 -0
- package/dist/avm1/loads.d.ts +67 -0
- package/dist/avm1/loads.d.ts.map +1 -0
- package/dist/avm1/loads.js +353 -0
- package/dist/avm1/loads.js.map +1 -0
- package/dist/avm1/net.d.ts +83 -0
- package/dist/avm1/net.d.ts.map +1 -0
- package/dist/avm1/net.js +220 -0
- package/dist/avm1/net.js.map +1 -0
- package/dist/avm1/paths.d.ts +30 -0
- package/dist/avm1/paths.d.ts.map +1 -0
- package/dist/avm1/paths.js +105 -0
- package/dist/avm1/paths.js.map +1 -0
- package/dist/avm1/pointer.d.ts +113 -0
- package/dist/avm1/pointer.d.ts.map +1 -0
- package/dist/avm1/pointer.js +513 -0
- package/dist/avm1/pointer.js.map +1 -0
- package/dist/avm1/queue.d.ts +106 -0
- package/dist/avm1/queue.d.ts.map +1 -0
- package/dist/avm1/queue.js +304 -0
- package/dist/avm1/queue.js.map +1 -0
- package/dist/avm1/sound.d.ts +36 -0
- package/dist/avm1/sound.d.ts.map +1 -0
- package/dist/avm1/sound.js +107 -0
- package/dist/avm1/sound.js.map +1 -0
- package/dist/avm1/swf.d.ts +90 -0
- package/dist/avm1/swf.d.ts.map +1 -0
- package/dist/avm1/swf.js +142 -0
- package/dist/avm1/swf.js.map +1 -0
- package/dist/avm1/timers.d.ts +49 -0
- package/dist/avm1/timers.d.ts.map +1 -0
- package/dist/avm1/timers.js +114 -0
- package/dist/avm1/timers.js.map +1 -0
- package/dist/bitmap/bitmap.d.ts +231 -0
- package/dist/bitmap/bitmap.d.ts.map +1 -0
- package/dist/bitmap/bitmap.js +628 -0
- package/dist/bitmap/bitmap.js.map +1 -0
- package/dist/bitmap/draw.d.ts +11 -0
- package/dist/bitmap/draw.d.ts.map +1 -0
- package/dist/bitmap/draw.js +69 -0
- package/dist/bitmap/draw.js.map +1 -0
- package/dist/bitmap/dxt.d.ts +5 -0
- package/dist/bitmap/dxt.d.ts.map +1 -0
- package/dist/bitmap/dxt.js +12 -0
- package/dist/bitmap/dxt.js.map +1 -0
- package/dist/bitmap/filters.d.ts +82 -0
- package/dist/bitmap/filters.d.ts.map +1 -0
- package/dist/bitmap/filters.js +657 -0
- package/dist/bitmap/filters.js.map +1 -0
- package/dist/bitmap/images.d.ts +30 -0
- package/dist/bitmap/images.d.ts.map +1 -0
- package/dist/bitmap/images.js +241 -0
- package/dist/bitmap/images.js.map +1 -0
- package/dist/bitmap/kernel.d.ts +12 -0
- package/dist/bitmap/kernel.d.ts.map +1 -0
- package/dist/bitmap/kernel.js +66 -0
- package/dist/bitmap/kernel.js.map +1 -0
- package/dist/bitmap/ops.d.ts +144 -0
- package/dist/bitmap/ops.d.ts.map +1 -0
- package/dist/bitmap/ops.js +1240 -0
- package/dist/bitmap/ops.js.map +1 -0
- package/dist/bitmap/pixel-bender.d.ts +89 -0
- package/dist/bitmap/pixel-bender.d.ts.map +1 -0
- package/dist/bitmap/pixel-bender.js +912 -0
- package/dist/bitmap/pixel-bender.js.map +1 -0
- package/dist/bitmap/png.d.ts +4 -0
- package/dist/bitmap/png.d.ts.map +1 -0
- package/dist/bitmap/png.js +140 -0
- package/dist/bitmap/png.js.map +1 -0
- package/dist/bitmap/turbulence.d.ts +17 -0
- package/dist/bitmap/turbulence.d.ts.map +1 -0
- package/dist/bitmap/turbulence.js +90 -0
- package/dist/bitmap/turbulence.js.map +1 -0
- package/dist/clock.d.ts +60 -0
- package/dist/clock.d.ts.map +1 -0
- package/dist/clock.js +183 -0
- package/dist/clock.js.map +1 -0
- package/dist/display/bitmapobject.d.ts +18 -0
- package/dist/display/bitmapobject.d.ts.map +1 -0
- package/dist/display/bitmapobject.js +26 -0
- package/dist/display/bitmapobject.js.map +1 -0
- package/dist/display/bounds.d.ts +59 -0
- package/dist/display/bounds.d.ts.map +1 -0
- package/dist/display/bounds.js +521 -0
- package/dist/display/bounds.js.map +1 -0
- package/dist/display/buttonobject.d.ts +76 -0
- package/dist/display/buttonobject.d.ts.map +1 -0
- package/dist/display/buttonobject.js +306 -0
- package/dist/display/buttonobject.js.map +1 -0
- package/dist/display/color.d.ts +9 -0
- package/dist/display/color.d.ts.map +1 -0
- package/dist/display/color.js +41 -0
- package/dist/display/color.js.map +1 -0
- package/dist/display/container.d.ts +49 -0
- package/dist/display/container.d.ts.map +1 -0
- package/dist/display/container.js +151 -0
- package/dist/display/container.js.map +1 -0
- package/dist/display/display.d.ts +11 -0
- package/dist/display/display.d.ts.map +1 -0
- package/dist/display/display.js +15 -0
- package/dist/display/display.js.map +1 -0
- package/dist/display/displayobject.d.ts +363 -0
- package/dist/display/displayobject.d.ts.map +1 -0
- package/dist/display/displayobject.js +665 -0
- package/dist/display/displayobject.js.map +1 -0
- package/dist/display/drawing.d.ts +111 -0
- package/dist/display/drawing.d.ts.map +1 -0
- package/dist/display/drawing.js +614 -0
- package/dist/display/drawing.js.map +1 -0
- package/dist/display/filters.d.ts +99 -0
- package/dist/display/filters.d.ts.map +1 -0
- package/dist/display/filters.js +286 -0
- package/dist/display/filters.js.map +1 -0
- package/dist/display/geometry.d.ts +37 -0
- package/dist/display/geometry.d.ts.map +1 -0
- package/dist/display/geometry.js +190 -0
- package/dist/display/geometry.js.map +1 -0
- package/dist/display/gradients.d.ts +29 -0
- package/dist/display/gradients.d.ts.map +1 -0
- package/dist/display/gradients.js +118 -0
- package/dist/display/gradients.js.map +1 -0
- package/dist/display/graphicsdata.d.ts +41 -0
- package/dist/display/graphicsdata.d.ts.map +1 -0
- package/dist/display/graphicsdata.js +593 -0
- package/dist/display/graphicsdata.js.map +1 -0
- package/dist/display/instantiate.d.ts +15 -0
- package/dist/display/instantiate.d.ts.map +1 -0
- package/dist/display/instantiate.js +72 -0
- package/dist/display/instantiate.js.map +1 -0
- package/dist/display/matrix3d.d.ts +68 -0
- package/dist/display/matrix3d.d.ts.map +1 -0
- package/dist/display/matrix3d.js +374 -0
- package/dist/display/matrix3d.js.map +1 -0
- package/dist/display/morph.d.ts +17 -0
- package/dist/display/morph.d.ts.map +1 -0
- package/dist/display/morph.js +227 -0
- package/dist/display/morph.js.map +1 -0
- package/dist/display/movieclip.d.ts +115 -0
- package/dist/display/movieclip.d.ts.map +1 -0
- package/dist/display/movieclip.js +681 -0
- package/dist/display/movieclip.js.map +1 -0
- package/dist/display/perspective.d.ts +35 -0
- package/dist/display/perspective.d.ts.map +1 -0
- package/dist/display/perspective.js +194 -0
- package/dist/display/perspective.js.map +1 -0
- package/dist/display/plane.d.ts +52 -0
- package/dist/display/plane.d.ts.map +1 -0
- package/dist/display/plane.js +142 -0
- package/dist/display/plane.js.map +1 -0
- package/dist/display/scale9.d.ts +78 -0
- package/dist/display/scale9.d.ts.map +1 -0
- package/dist/display/scale9.js +237 -0
- package/dist/display/scale9.js.map +1 -0
- package/dist/display/shapeobject.d.ts +53 -0
- package/dist/display/shapeobject.d.ts.map +1 -0
- package/dist/display/shapeobject.js +132 -0
- package/dist/display/shapeobject.js.map +1 -0
- package/dist/display/shapes.d.ts +146 -0
- package/dist/display/shapes.d.ts.map +1 -0
- package/dist/display/shapes.js +408 -0
- package/dist/display/shapes.js.map +1 -0
- package/dist/display/stretch.d.ts +42 -0
- package/dist/display/stretch.d.ts.map +1 -0
- package/dist/display/stretch.js +192 -0
- package/dist/display/stretch.js.map +1 -0
- package/dist/display/textobjects.d.ts +98 -0
- package/dist/display/textobjects.d.ts.map +1 -0
- package/dist/display/textobjects.js +223 -0
- package/dist/display/textobjects.js.map +1 -0
- package/dist/display/timeline.d.ts +252 -0
- package/dist/display/timeline.d.ts.map +1 -0
- package/dist/display/timeline.js +472 -0
- package/dist/display/timeline.js.map +1 -0
- package/dist/display/value-lists.d.ts +10 -0
- package/dist/display/value-lists.d.ts.map +1 -0
- package/dist/display/value-lists.js +41 -0
- package/dist/display/value-lists.js.map +1 -0
- package/dist/display/videoobject.d.ts +7 -0
- package/dist/display/videoobject.d.ts.map +1 -0
- package/dist/display/videoobject.js +7 -0
- package/dist/display/videoobject.js.map +1 -0
- package/dist/display/walk.d.ts +45 -0
- package/dist/display/walk.d.ts.map +1 -0
- package/dist/display/walk.js +128 -0
- package/dist/display/walk.js.map +1 -0
- package/dist/files.d.ts +77 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +335 -0
- package/dist/files.js.map +1 -0
- package/dist/hosts.d.ts +406 -0
- package/dist/hosts.d.ts.map +1 -0
- package/dist/hosts.js +208 -0
- package/dist/hosts.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/input/activation.d.ts +12 -0
- package/dist/input/activation.d.ts.map +1 -0
- package/dist/input/activation.js +57 -0
- package/dist/input/activation.js.map +1 -0
- package/dist/input/avm1.d.ts +22 -0
- package/dist/input/avm1.d.ts.map +1 -0
- package/dist/input/avm1.js +83 -0
- package/dist/input/avm1.js.map +1 -0
- package/dist/input/canvas.d.ts +19 -0
- package/dist/input/canvas.d.ts.map +1 -0
- package/dist/input/canvas.js +64 -0
- package/dist/input/canvas.js.map +1 -0
- package/dist/input/context-menu.d.ts +16 -0
- package/dist/input/context-menu.d.ts.map +1 -0
- package/dist/input/context-menu.js +64 -0
- package/dist/input/context-menu.js.map +1 -0
- package/dist/input/keyboard.d.ts +138 -0
- package/dist/input/keyboard.d.ts.map +1 -0
- package/dist/input/keyboard.js +459 -0
- package/dist/input/keyboard.js.map +1 -0
- package/dist/input/pointer.d.ts +186 -0
- package/dist/input/pointer.d.ts.map +1 -0
- package/dist/input/pointer.js +864 -0
- package/dist/input/pointer.js.map +1 -0
- package/dist/input/text-editor.d.ts +47 -0
- package/dist/input/text-editor.d.ts.map +1 -0
- package/dist/input/text-editor.js +320 -0
- package/dist/input/text-editor.js.map +1 -0
- package/dist/input/touch.d.ts +41 -0
- package/dist/input/touch.d.ts.map +1 -0
- package/dist/input/touch.js +210 -0
- package/dist/input/touch.js.map +1 -0
- package/dist/localconnection.d.ts +34 -0
- package/dist/localconnection.d.ts.map +1 -0
- package/dist/localconnection.js +91 -0
- package/dist/localconnection.js.map +1 -0
- package/dist/media/audio.d.ts +67 -0
- package/dist/media/audio.d.ts.map +1 -0
- package/dist/media/audio.js +377 -0
- package/dist/media/audio.js.map +1 -0
- package/dist/media/dynamic-sound.d.ts +10 -0
- package/dist/media/dynamic-sound.d.ts.map +1 -0
- package/dist/media/dynamic-sound.js +91 -0
- package/dist/media/dynamic-sound.js.map +1 -0
- package/dist/media/extract.d.ts +41 -0
- package/dist/media/extract.d.ts.map +1 -0
- package/dist/media/extract.js +136 -0
- package/dist/media/extract.js.map +1 -0
- package/dist/media/mp3.d.ts +19 -0
- package/dist/media/mp3.d.ts.map +1 -0
- package/dist/media/mp3.js +153 -0
- package/dist/media/mp3.js.map +1 -0
- package/dist/media/sounds.d.ts +157 -0
- package/dist/media/sounds.d.ts.map +1 -0
- package/dist/media/sounds.js +508 -0
- package/dist/media/sounds.js.map +1 -0
- package/dist/media/streaming-audio.d.ts +3 -0
- package/dist/media/streaming-audio.d.ts.map +1 -0
- package/dist/media/streaming-audio.js +134 -0
- package/dist/media/streaming-audio.js.map +1 -0
- package/dist/player.d.ts +169 -0
- package/dist/player.d.ts.map +1 -0
- package/dist/player.js +617 -0
- package/dist/player.js.map +1 -0
- package/dist/playerglobal/air/net/WebSocket.d.ts +4 -0
- package/dist/playerglobal/air/net/WebSocket.d.ts.map +1 -0
- package/dist/playerglobal/air/net/WebSocket.js +251 -0
- package/dist/playerglobal/air/net/WebSocket.js.map +1 -0
- package/dist/playerglobal/air-library.d.ts +6 -0
- package/dist/playerglobal/air-library.d.ts.map +1 -0
- package/dist/playerglobal/air-library.js +9 -0
- package/dist/playerglobal/air-library.js.map +1 -0
- package/dist/playerglobal/context3d/context.d.ts +5 -0
- package/dist/playerglobal/context3d/context.d.ts.map +1 -0
- package/dist/playerglobal/context3d/context.js +472 -0
- package/dist/playerglobal/context3d/context.js.map +1 -0
- package/dist/playerglobal/context3d/errors.d.ts +11 -0
- package/dist/playerglobal/context3d/errors.d.ts.map +1 -0
- package/dist/playerglobal/context3d/errors.js +101 -0
- package/dist/playerglobal/context3d/errors.js.map +1 -0
- package/dist/playerglobal/context3d/lifecycle.d.ts +61 -0
- package/dist/playerglobal/context3d/lifecycle.d.ts.map +1 -0
- package/dist/playerglobal/context3d/lifecycle.js +342 -0
- package/dist/playerglobal/context3d/lifecycle.js.map +1 -0
- package/dist/playerglobal/context3d/readback.d.ts +21 -0
- package/dist/playerglobal/context3d/readback.d.ts.map +1 -0
- package/dist/playerglobal/context3d/readback.js +56 -0
- package/dist/playerglobal/context3d/readback.js.map +1 -0
- package/dist/playerglobal/context3d/resources.d.ts +5 -0
- package/dist/playerglobal/context3d/resources.d.ts.map +1 -0
- package/dist/playerglobal/context3d/resources.js +298 -0
- package/dist/playerglobal/context3d/resources.js.map +1 -0
- package/dist/playerglobal/context3d.d.ts +6 -0
- package/dist/playerglobal/context3d.d.ts.map +1 -0
- package/dist/playerglobal/context3d.js +96 -0
- package/dist/playerglobal/context3d.js.map +1 -0
- package/dist/playerglobal/flash/accessibility/Accessibility.d.ts +4 -0
- package/dist/playerglobal/flash/accessibility/Accessibility.d.ts.map +1 -0
- package/dist/playerglobal/flash/accessibility/Accessibility.js +22 -0
- package/dist/playerglobal/flash/accessibility/Accessibility.js.map +1 -0
- package/dist/playerglobal/flash/crypto/generateRandomBytes.d.ts +3 -0
- package/dist/playerglobal/flash/crypto/generateRandomBytes.d.ts.map +1 -0
- package/dist/playerglobal/flash/crypto/generateRandomBytes.js +33 -0
- package/dist/playerglobal/flash/crypto/generateRandomBytes.js.map +1 -0
- package/dist/playerglobal/flash/data/EncryptedLocalStore.d.ts +4 -0
- package/dist/playerglobal/flash/data/EncryptedLocalStore.d.ts.map +1 -0
- package/dist/playerglobal/flash/data/EncryptedLocalStore.js +62 -0
- package/dist/playerglobal/flash/data/EncryptedLocalStore.js.map +1 -0
- package/dist/playerglobal/flash/desktop/Clipboard.d.ts +9 -0
- package/dist/playerglobal/flash/desktop/Clipboard.d.ts.map +1 -0
- package/dist/playerglobal/flash/desktop/Clipboard.js +174 -0
- package/dist/playerglobal/flash/desktop/Clipboard.js.map +1 -0
- package/dist/playerglobal/flash/desktop/NativeApplication.d.ts +6 -0
- package/dist/playerglobal/flash/desktop/NativeApplication.d.ts.map +1 -0
- package/dist/playerglobal/flash/desktop/NativeApplication.js +180 -0
- package/dist/playerglobal/flash/desktop/NativeApplication.js.map +1 -0
- package/dist/playerglobal/flash/display/AVM1Movie.d.ts +3 -0
- package/dist/playerglobal/flash/display/AVM1Movie.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/AVM1Movie.js +20 -0
- package/dist/playerglobal/flash/display/AVM1Movie.js.map +1 -0
- package/dist/playerglobal/flash/display/Bitmap.d.ts +4 -0
- package/dist/playerglobal/flash/display/Bitmap.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Bitmap.js +59 -0
- package/dist/playerglobal/flash/display/Bitmap.js.map +1 -0
- package/dist/playerglobal/flash/display/BitmapData.d.ts +10 -0
- package/dist/playerglobal/flash/display/BitmapData.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/BitmapData.js +634 -0
- package/dist/playerglobal/flash/display/BitmapData.js.map +1 -0
- package/dist/playerglobal/flash/display/DisplayObject.d.ts +8 -0
- package/dist/playerglobal/flash/display/DisplayObject.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/DisplayObject.js +615 -0
- package/dist/playerglobal/flash/display/DisplayObject.js.map +1 -0
- package/dist/playerglobal/flash/display/DisplayObjectContainer.d.ts +4 -0
- package/dist/playerglobal/flash/display/DisplayObjectContainer.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/DisplayObjectContainer.js +225 -0
- package/dist/playerglobal/flash/display/DisplayObjectContainer.js.map +1 -0
- package/dist/playerglobal/flash/display/Graphics.d.ts +8 -0
- package/dist/playerglobal/flash/display/Graphics.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Graphics.js +346 -0
- package/dist/playerglobal/flash/display/Graphics.js.map +1 -0
- package/dist/playerglobal/flash/display/InteractiveObject.d.ts +12 -0
- package/dist/playerglobal/flash/display/InteractiveObject.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/InteractiveObject.js +88 -0
- package/dist/playerglobal/flash/display/InteractiveObject.js.map +1 -0
- package/dist/playerglobal/flash/display/Loader.d.ts +4 -0
- package/dist/playerglobal/flash/display/Loader.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Loader.js +80 -0
- package/dist/playerglobal/flash/display/Loader.js.map +1 -0
- package/dist/playerglobal/flash/display/LoaderInfo.d.ts +8 -0
- package/dist/playerglobal/flash/display/LoaderInfo.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/LoaderInfo.js +129 -0
- package/dist/playerglobal/flash/display/LoaderInfo.js.map +1 -0
- package/dist/playerglobal/flash/display/MovieClip.d.ts +4 -0
- package/dist/playerglobal/flash/display/MovieClip.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/MovieClip.js +195 -0
- package/dist/playerglobal/flash/display/MovieClip.js.map +1 -0
- package/dist/playerglobal/flash/display/NativeWindow.d.ts +8 -0
- package/dist/playerglobal/flash/display/NativeWindow.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/NativeWindow.js +246 -0
- package/dist/playerglobal/flash/display/NativeWindow.js.map +1 -0
- package/dist/playerglobal/flash/display/Shader.d.ts +4 -0
- package/dist/playerglobal/flash/display/Shader.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Shader.js +27 -0
- package/dist/playerglobal/flash/display/Shader.js.map +1 -0
- package/dist/playerglobal/flash/display/ShaderData.d.ts +7 -0
- package/dist/playerglobal/flash/display/ShaderData.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/ShaderData.js +86 -0
- package/dist/playerglobal/flash/display/ShaderData.js.map +1 -0
- package/dist/playerglobal/flash/display/ShaderInput.d.ts +20 -0
- package/dist/playerglobal/flash/display/ShaderInput.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/ShaderInput.js +65 -0
- package/dist/playerglobal/flash/display/ShaderInput.js.map +1 -0
- package/dist/playerglobal/flash/display/ShaderJob.d.ts +4 -0
- package/dist/playerglobal/flash/display/ShaderJob.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/ShaderJob.js +182 -0
- package/dist/playerglobal/flash/display/ShaderJob.js.map +1 -0
- package/dist/playerglobal/flash/display/ShaderParameter.d.ts +4 -0
- package/dist/playerglobal/flash/display/ShaderParameter.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/ShaderParameter.js +24 -0
- package/dist/playerglobal/flash/display/ShaderParameter.js.map +1 -0
- package/dist/playerglobal/flash/display/Shape.d.ts +4 -0
- package/dist/playerglobal/flash/display/Shape.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Shape.js +14 -0
- package/dist/playerglobal/flash/display/Shape.js.map +1 -0
- package/dist/playerglobal/flash/display/SimpleButton.d.ts +4 -0
- package/dist/playerglobal/flash/display/SimpleButton.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/SimpleButton.js +104 -0
- package/dist/playerglobal/flash/display/SimpleButton.js.map +1 -0
- package/dist/playerglobal/flash/display/Sprite.d.ts +4 -0
- package/dist/playerglobal/flash/display/Sprite.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Sprite.js +85 -0
- package/dist/playerglobal/flash/display/Sprite.js.map +1 -0
- package/dist/playerglobal/flash/display/Stage.d.ts +4 -0
- package/dist/playerglobal/flash/display/Stage.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Stage.js +232 -0
- package/dist/playerglobal/flash/display/Stage.js.map +1 -0
- package/dist/playerglobal/flash/display/Stage3D.d.ts +4 -0
- package/dist/playerglobal/flash/display/Stage3D.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/Stage3D.js +55 -0
- package/dist/playerglobal/flash/display/Stage3D.js.map +1 -0
- package/dist/playerglobal/flash/display/shaders.d.ts +45 -0
- package/dist/playerglobal/flash/display/shaders.d.ts.map +1 -0
- package/dist/playerglobal/flash/display/shaders.js +229 -0
- package/dist/playerglobal/flash/display/shaders.js.map +1 -0
- package/dist/playerglobal/flash/events/Event.d.ts +4 -0
- package/dist/playerglobal/flash/events/Event.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/Event.js +59 -0
- package/dist/playerglobal/flash/events/Event.js.map +1 -0
- package/dist/playerglobal/flash/events/EventDispatcher.d.ts +11 -0
- package/dist/playerglobal/flash/events/EventDispatcher.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/EventDispatcher.js +104 -0
- package/dist/playerglobal/flash/events/EventDispatcher.js.map +1 -0
- package/dist/playerglobal/flash/events/GestureEvent.d.ts +4 -0
- package/dist/playerglobal/flash/events/GestureEvent.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/GestureEvent.js +35 -0
- package/dist/playerglobal/flash/events/GestureEvent.js.map +1 -0
- package/dist/playerglobal/flash/events/HTTPStatusEvent.d.ts +3 -0
- package/dist/playerglobal/flash/events/HTTPStatusEvent.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/HTTPStatusEvent.js +9 -0
- package/dist/playerglobal/flash/events/HTTPStatusEvent.js.map +1 -0
- package/dist/playerglobal/flash/events/KeyboardEvent.d.ts +4 -0
- package/dist/playerglobal/flash/events/KeyboardEvent.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/KeyboardEvent.js +52 -0
- package/dist/playerglobal/flash/events/KeyboardEvent.js.map +1 -0
- package/dist/playerglobal/flash/events/MouseEvent.d.ts +11 -0
- package/dist/playerglobal/flash/events/MouseEvent.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/MouseEvent.js +60 -0
- package/dist/playerglobal/flash/events/MouseEvent.js.map +1 -0
- package/dist/playerglobal/flash/events/PressAndTapGestureEvent.d.ts +4 -0
- package/dist/playerglobal/flash/events/PressAndTapGestureEvent.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/PressAndTapGestureEvent.js +31 -0
- package/dist/playerglobal/flash/events/PressAndTapGestureEvent.js.map +1 -0
- package/dist/playerglobal/flash/events/TimerEvent.d.ts +4 -0
- package/dist/playerglobal/flash/events/TimerEvent.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/TimerEvent.js +17 -0
- package/dist/playerglobal/flash/events/TimerEvent.js.map +1 -0
- package/dist/playerglobal/flash/events/TouchEvent.d.ts +4 -0
- package/dist/playerglobal/flash/events/TouchEvent.d.ts.map +1 -0
- package/dist/playerglobal/flash/events/TouchEvent.js +46 -0
- package/dist/playerglobal/flash/events/TouchEvent.js.map +1 -0
- package/dist/playerglobal/flash/external/ExternalInterface.d.ts +4 -0
- package/dist/playerglobal/flash/external/ExternalInterface.d.ts.map +1 -0
- package/dist/playerglobal/flash/external/ExternalInterface.js +74 -0
- package/dist/playerglobal/flash/external/ExternalInterface.js.map +1 -0
- package/dist/playerglobal/flash/filesystem/File.d.ts +22 -0
- package/dist/playerglobal/flash/filesystem/File.d.ts.map +1 -0
- package/dist/playerglobal/flash/filesystem/File.js +341 -0
- package/dist/playerglobal/flash/filesystem/File.js.map +1 -0
- package/dist/playerglobal/flash/filesystem/FileStream.d.ts +4 -0
- package/dist/playerglobal/flash/filesystem/FileStream.d.ts.map +1 -0
- package/dist/playerglobal/flash/filesystem/FileStream.js +454 -0
- package/dist/playerglobal/flash/filesystem/FileStream.js.map +1 -0
- package/dist/playerglobal/flash/filesystem/paths.d.ts +43 -0
- package/dist/playerglobal/flash/filesystem/paths.d.ts.map +1 -0
- package/dist/playerglobal/flash/filesystem/paths.js +157 -0
- package/dist/playerglobal/flash/filesystem/paths.js.map +1 -0
- package/dist/playerglobal/flash/filesystem/writes.d.ts +36 -0
- package/dist/playerglobal/flash/filesystem/writes.d.ts.map +1 -0
- package/dist/playerglobal/flash/filesystem/writes.js +144 -0
- package/dist/playerglobal/flash/filesystem/writes.js.map +1 -0
- package/dist/playerglobal/flash/filters/BevelFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/BevelFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/BevelFilter.js +5 -0
- package/dist/playerglobal/flash/filters/BevelFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/BitmapFilter.d.ts +33 -0
- package/dist/playerglobal/flash/filters/BitmapFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/BitmapFilter.js +206 -0
- package/dist/playerglobal/flash/filters/BitmapFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/BlurFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/BlurFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/BlurFilter.js +5 -0
- package/dist/playerglobal/flash/filters/BlurFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/ColorMatrixFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/ColorMatrixFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/ColorMatrixFilter.js +12 -0
- package/dist/playerglobal/flash/filters/ColorMatrixFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/ConvolutionFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/ConvolutionFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/ConvolutionFilter.js +27 -0
- package/dist/playerglobal/flash/filters/ConvolutionFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/DisplacementMapFilter.d.ts +12 -0
- package/dist/playerglobal/flash/filters/DisplacementMapFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/DisplacementMapFilter.js +52 -0
- package/dist/playerglobal/flash/filters/DisplacementMapFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/DropShadowFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/DropShadowFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/DropShadowFilter.js +5 -0
- package/dist/playerglobal/flash/filters/DropShadowFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/GlowFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/GlowFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/GlowFilter.js +5 -0
- package/dist/playerglobal/flash/filters/GlowFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/GradientBevelFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/GradientBevelFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/GradientBevelFilter.js +5 -0
- package/dist/playerglobal/flash/filters/GradientBevelFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/GradientGlowFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/GradientGlowFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/GradientGlowFilter.js +5 -0
- package/dist/playerglobal/flash/filters/GradientGlowFilter.js.map +1 -0
- package/dist/playerglobal/flash/filters/ShaderFilter.d.ts +4 -0
- package/dist/playerglobal/flash/filters/ShaderFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/filters/ShaderFilter.js +54 -0
- package/dist/playerglobal/flash/filters/ShaderFilter.js.map +1 -0
- package/dist/playerglobal/flash/geom/Matrix3D.d.ts +4 -0
- package/dist/playerglobal/flash/geom/Matrix3D.d.ts.map +1 -0
- package/dist/playerglobal/flash/geom/Matrix3D.js +362 -0
- package/dist/playerglobal/flash/geom/Matrix3D.js.map +1 -0
- package/dist/playerglobal/flash/geom/PerspectiveProjection.d.ts +13 -0
- package/dist/playerglobal/flash/geom/PerspectiveProjection.d.ts.map +1 -0
- package/dist/playerglobal/flash/geom/PerspectiveProjection.js +123 -0
- package/dist/playerglobal/flash/geom/PerspectiveProjection.js.map +1 -0
- package/dist/playerglobal/flash/geom/Transform.d.ts +13 -0
- package/dist/playerglobal/flash/geom/Transform.d.ts.map +1 -0
- package/dist/playerglobal/flash/geom/Transform.js +246 -0
- package/dist/playerglobal/flash/geom/Transform.js.map +1 -0
- package/dist/playerglobal/flash/geom/Utils3D.d.ts +4 -0
- package/dist/playerglobal/flash/geom/Utils3D.d.ts.map +1 -0
- package/dist/playerglobal/flash/geom/Utils3D.js +86 -0
- package/dist/playerglobal/flash/geom/Utils3D.js.map +1 -0
- package/dist/playerglobal/flash/globalization/Collator.d.ts +4 -0
- package/dist/playerglobal/flash/globalization/Collator.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/Collator.js +150 -0
- package/dist/playerglobal/flash/globalization/Collator.js.map +1 -0
- package/dist/playerglobal/flash/globalization/CurrencyFormatter.d.ts +4 -0
- package/dist/playerglobal/flash/globalization/CurrencyFormatter.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/CurrencyFormatter.js +273 -0
- package/dist/playerglobal/flash/globalization/CurrencyFormatter.js.map +1 -0
- package/dist/playerglobal/flash/globalization/CurrencyParseResult.d.ts +4 -0
- package/dist/playerglobal/flash/globalization/CurrencyParseResult.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/CurrencyParseResult.js +22 -0
- package/dist/playerglobal/flash/globalization/CurrencyParseResult.js.map +1 -0
- package/dist/playerglobal/flash/globalization/DateTimeFormatter.d.ts +4 -0
- package/dist/playerglobal/flash/globalization/DateTimeFormatter.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/DateTimeFormatter.js +464 -0
- package/dist/playerglobal/flash/globalization/DateTimeFormatter.js.map +1 -0
- package/dist/playerglobal/flash/globalization/LocaleID.d.ts +4 -0
- package/dist/playerglobal/flash/globalization/LocaleID.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/LocaleID.js +145 -0
- package/dist/playerglobal/flash/globalization/LocaleID.js.map +1 -0
- package/dist/playerglobal/flash/globalization/NumberFormatter.d.ts +67 -0
- package/dist/playerglobal/flash/globalization/NumberFormatter.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/NumberFormatter.js +445 -0
- package/dist/playerglobal/flash/globalization/NumberFormatter.js.map +1 -0
- package/dist/playerglobal/flash/globalization/NumberParseResult.d.ts +3 -0
- package/dist/playerglobal/flash/globalization/NumberParseResult.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/NumberParseResult.js +23 -0
- package/dist/playerglobal/flash/globalization/NumberParseResult.js.map +1 -0
- package/dist/playerglobal/flash/globalization/StringTools.d.ts +4 -0
- package/dist/playerglobal/flash/globalization/StringTools.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/StringTools.js +60 -0
- package/dist/playerglobal/flash/globalization/StringTools.js.map +1 -0
- package/dist/playerglobal/flash/globalization/locale.d.ts +62 -0
- package/dist/playerglobal/flash/globalization/locale.d.ts.map +1 -0
- package/dist/playerglobal/flash/globalization/locale.js +191 -0
- package/dist/playerglobal/flash/globalization/locale.js.map +1 -0
- package/dist/playerglobal/flash/media/Camera.d.ts +4 -0
- package/dist/playerglobal/flash/media/Camera.d.ts.map +1 -0
- package/dist/playerglobal/flash/media/Camera.js +90 -0
- package/dist/playerglobal/flash/media/Camera.js.map +1 -0
- package/dist/playerglobal/flash/media/Microphone.d.ts +4 -0
- package/dist/playerglobal/flash/media/Microphone.d.ts.map +1 -0
- package/dist/playerglobal/flash/media/Microphone.js +127 -0
- package/dist/playerglobal/flash/media/Microphone.js.map +1 -0
- package/dist/playerglobal/flash/media/Sound.d.ts +16 -0
- package/dist/playerglobal/flash/media/Sound.d.ts.map +1 -0
- package/dist/playerglobal/flash/media/Sound.js +544 -0
- package/dist/playerglobal/flash/media/Sound.js.map +1 -0
- package/dist/playerglobal/flash/media/SoundMixer.d.ts +4 -0
- package/dist/playerglobal/flash/media/SoundMixer.d.ts.map +1 -0
- package/dist/playerglobal/flash/media/SoundMixer.js +75 -0
- package/dist/playerglobal/flash/media/SoundMixer.js.map +1 -0
- package/dist/playerglobal/flash/media/SoundTransform.d.ts +4 -0
- package/dist/playerglobal/flash/media/SoundTransform.d.ts.map +1 -0
- package/dist/playerglobal/flash/media/SoundTransform.js +41 -0
- package/dist/playerglobal/flash/media/SoundTransform.js.map +1 -0
- package/dist/playerglobal/flash/media/Video.d.ts +4 -0
- package/dist/playerglobal/flash/media/Video.d.ts.map +1 -0
- package/dist/playerglobal/flash/media/Video.js +44 -0
- package/dist/playerglobal/flash/media/Video.js.map +1 -0
- package/dist/playerglobal/flash/net/FileFilter.d.ts +4 -0
- package/dist/playerglobal/flash/net/FileFilter.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/FileFilter.js +28 -0
- package/dist/playerglobal/flash/net/FileFilter.js.map +1 -0
- package/dist/playerglobal/flash/net/FileReference.d.ts +4 -0
- package/dist/playerglobal/flash/net/FileReference.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/FileReference.js +198 -0
- package/dist/playerglobal/flash/net/FileReference.js.map +1 -0
- package/dist/playerglobal/flash/net/LocalConnection.d.ts +5 -0
- package/dist/playerglobal/flash/net/LocalConnection.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/LocalConnection.js +168 -0
- package/dist/playerglobal/flash/net/LocalConnection.js.map +1 -0
- package/dist/playerglobal/flash/net/NetConnection.d.ts +4 -0
- package/dist/playerglobal/flash/net/NetConnection.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/NetConnection.js +156 -0
- package/dist/playerglobal/flash/net/NetConnection.js.map +1 -0
- package/dist/playerglobal/flash/net/SharedObject.d.ts +4 -0
- package/dist/playerglobal/flash/net/SharedObject.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/SharedObject.js +300 -0
- package/dist/playerglobal/flash/net/SharedObject.js.map +1 -0
- package/dist/playerglobal/flash/net/Socket.d.ts +4 -0
- package/dist/playerglobal/flash/net/Socket.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/Socket.js +283 -0
- package/dist/playerglobal/flash/net/Socket.js.map +1 -0
- package/dist/playerglobal/flash/net/URLRequest.d.ts +4 -0
- package/dist/playerglobal/flash/net/URLRequest.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/URLRequest.js +94 -0
- package/dist/playerglobal/flash/net/URLRequest.js.map +1 -0
- package/dist/playerglobal/flash/net/URLStream.d.ts +4 -0
- package/dist/playerglobal/flash/net/URLStream.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/URLStream.js +147 -0
- package/dist/playerglobal/flash/net/URLStream.js.map +1 -0
- package/dist/playerglobal/flash/net/XMLSocket.d.ts +4 -0
- package/dist/playerglobal/flash/net/XMLSocket.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/XMLSocket.js +15 -0
- package/dist/playerglobal/flash/net/XMLSocket.js.map +1 -0
- package/dist/playerglobal/flash/net/local-modern.d.ts +4 -0
- package/dist/playerglobal/flash/net/local-modern.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/local-modern.js +143 -0
- package/dist/playerglobal/flash/net/local-modern.js.map +1 -0
- package/dist/playerglobal/flash/net/local-values.d.ts +6 -0
- package/dist/playerglobal/flash/net/local-values.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/local-values.js +218 -0
- package/dist/playerglobal/flash/net/local-values.js.map +1 -0
- package/dist/playerglobal/flash/net/navigateToURL.d.ts +4 -0
- package/dist/playerglobal/flash/net/navigateToURL.d.ts.map +1 -0
- package/dist/playerglobal/flash/net/navigateToURL.js +30 -0
- package/dist/playerglobal/flash/net/navigateToURL.js.map +1 -0
- package/dist/playerglobal/flash/profiler/Telemetry.d.ts +3 -0
- package/dist/playerglobal/flash/profiler/Telemetry.d.ts.map +1 -0
- package/dist/playerglobal/flash/profiler/Telemetry.js +26 -0
- package/dist/playerglobal/flash/profiler/Telemetry.js.map +1 -0
- package/dist/playerglobal/flash/sensors/Accelerometer.d.ts +3 -0
- package/dist/playerglobal/flash/sensors/Accelerometer.d.ts.map +1 -0
- package/dist/playerglobal/flash/sensors/Accelerometer.js +13 -0
- package/dist/playerglobal/flash/sensors/Accelerometer.js.map +1 -0
- package/dist/playerglobal/flash/system/ApplicationDomain.d.ts +4 -0
- package/dist/playerglobal/flash/system/ApplicationDomain.d.ts.map +1 -0
- package/dist/playerglobal/flash/system/ApplicationDomain.js +70 -0
- package/dist/playerglobal/flash/system/ApplicationDomain.js.map +1 -0
- package/dist/playerglobal/flash/system/Capabilities.d.ts +4 -0
- package/dist/playerglobal/flash/system/Capabilities.d.ts.map +1 -0
- package/dist/playerglobal/flash/system/Capabilities.js +164 -0
- package/dist/playerglobal/flash/system/Capabilities.js.map +1 -0
- package/dist/playerglobal/flash/system/FSCommandHost.d.ts +4 -0
- package/dist/playerglobal/flash/system/FSCommandHost.d.ts.map +1 -0
- package/dist/playerglobal/flash/system/FSCommandHost.js +18 -0
- package/dist/playerglobal/flash/system/FSCommandHost.js.map +1 -0
- package/dist/playerglobal/flash/system/Security.d.ts +4 -0
- package/dist/playerglobal/flash/system/Security.d.ts.map +1 -0
- package/dist/playerglobal/flash/system/Security.js +47 -0
- package/dist/playerglobal/flash/system/Security.js.map +1 -0
- package/dist/playerglobal/flash/system/SecurityDomain.d.ts +4 -0
- package/dist/playerglobal/flash/system/SecurityDomain.d.ts.map +1 -0
- package/dist/playerglobal/flash/system/SecurityDomain.js +22 -0
- package/dist/playerglobal/flash/system/SecurityDomain.js.map +1 -0
- package/dist/playerglobal/flash/system/System.d.ts +4 -0
- package/dist/playerglobal/flash/system/System.d.ts.map +1 -0
- package/dist/playerglobal/flash/system/System.js +74 -0
- package/dist/playerglobal/flash/system/System.js.map +1 -0
- package/dist/playerglobal/flash/system/Worker.d.ts +6 -0
- package/dist/playerglobal/flash/system/Worker.d.ts.map +1 -0
- package/dist/playerglobal/flash/system/Worker.js +113 -0
- package/dist/playerglobal/flash/system/Worker.js.map +1 -0
- package/dist/playerglobal/flash/text/Font.d.ts +8 -0
- package/dist/playerglobal/flash/text/Font.d.ts.map +1 -0
- package/dist/playerglobal/flash/text/Font.js +96 -0
- package/dist/playerglobal/flash/text/Font.js.map +1 -0
- package/dist/playerglobal/flash/text/StaticText.d.ts +3 -0
- package/dist/playerglobal/flash/text/StaticText.d.ts.map +1 -0
- package/dist/playerglobal/flash/text/StaticText.js +17 -0
- package/dist/playerglobal/flash/text/StaticText.js.map +1 -0
- package/dist/playerglobal/flash/text/StyleSheet.d.ts +9 -0
- package/dist/playerglobal/flash/text/StyleSheet.d.ts.map +1 -0
- package/dist/playerglobal/flash/text/StyleSheet.js +66 -0
- package/dist/playerglobal/flash/text/StyleSheet.js.map +1 -0
- package/dist/playerglobal/flash/text/TextField.d.ts +4 -0
- package/dist/playerglobal/flash/text/TextField.d.ts.map +1 -0
- package/dist/playerglobal/flash/text/TextField.js +708 -0
- package/dist/playerglobal/flash/text/TextField.js.map +1 -0
- package/dist/playerglobal/flash/text/TextRenderer.d.ts +4 -0
- package/dist/playerglobal/flash/text/TextRenderer.d.ts.map +1 -0
- package/dist/playerglobal/flash/text/TextRenderer.js +78 -0
- package/dist/playerglobal/flash/text/TextRenderer.js.map +1 -0
- package/dist/playerglobal/flash/text/engine/FontDescription.d.ts +4 -0
- package/dist/playerglobal/flash/text/engine/FontDescription.d.ts.map +1 -0
- package/dist/playerglobal/flash/text/engine/FontDescription.js +142 -0
- package/dist/playerglobal/flash/text/engine/FontDescription.js.map +1 -0
- package/dist/playerglobal/flash/text/engine/TabStop.d.ts +4 -0
- package/dist/playerglobal/flash/text/engine/TabStop.d.ts.map +1 -0
- package/dist/playerglobal/flash/text/engine/TabStop.js +47 -0
- package/dist/playerglobal/flash/text/engine/TabStop.js.map +1 -0
- package/dist/playerglobal/flash/trace/Trace.d.ts +3 -0
- package/dist/playerglobal/flash/trace/Trace.d.ts.map +1 -0
- package/dist/playerglobal/flash/trace/Trace.js +18 -0
- package/dist/playerglobal/flash/trace/Trace.js.map +1 -0
- package/dist/playerglobal/flash/ui/ContextMenu.d.ts +4 -0
- package/dist/playerglobal/flash/ui/ContextMenu.d.ts.map +1 -0
- package/dist/playerglobal/flash/ui/ContextMenu.js +18 -0
- package/dist/playerglobal/flash/ui/ContextMenu.js.map +1 -0
- package/dist/playerglobal/flash/ui/GameInput.d.ts +4 -0
- package/dist/playerglobal/flash/ui/GameInput.d.ts.map +1 -0
- package/dist/playerglobal/flash/ui/GameInput.js +20 -0
- package/dist/playerglobal/flash/ui/GameInput.js.map +1 -0
- package/dist/playerglobal/flash/ui/Keyboard.d.ts +3 -0
- package/dist/playerglobal/flash/ui/Keyboard.d.ts.map +1 -0
- package/dist/playerglobal/flash/ui/Keyboard.js +28 -0
- package/dist/playerglobal/flash/ui/Keyboard.js.map +1 -0
- package/dist/playerglobal/flash/ui/Mouse.d.ts +4 -0
- package/dist/playerglobal/flash/ui/Mouse.d.ts.map +1 -0
- package/dist/playerglobal/flash/ui/Mouse.js +128 -0
- package/dist/playerglobal/flash/ui/Mouse.js.map +1 -0
- package/dist/playerglobal/flash/ui/Multitouch.d.ts +4 -0
- package/dist/playerglobal/flash/ui/Multitouch.d.ts.map +1 -0
- package/dist/playerglobal/flash/ui/Multitouch.js +47 -0
- package/dist/playerglobal/flash/ui/Multitouch.js.map +1 -0
- package/dist/playerglobal/flash/utils/ByteArray.d.ts +5 -0
- package/dist/playerglobal/flash/utils/ByteArray.d.ts.map +1 -0
- package/dist/playerglobal/flash/utils/ByteArray.js +156 -0
- package/dist/playerglobal/flash/utils/ByteArray.js.map +1 -0
- package/dist/playerglobal/flash/utils/Timer.d.ts +4 -0
- package/dist/playerglobal/flash/utils/Timer.d.ts.map +1 -0
- package/dist/playerglobal/flash/utils/Timer.js +26 -0
- package/dist/playerglobal/flash/utils/Timer.js.map +1 -0
- package/dist/playerglobal/flash/xml/XMLDocument.d.ts +4 -0
- package/dist/playerglobal/flash/xml/XMLDocument.d.ts.map +1 -0
- package/dist/playerglobal/flash/xml/XMLDocument.js +75 -0
- package/dist/playerglobal/flash/xml/XMLDocument.js.map +1 -0
- package/dist/playerglobal/index.d.ts +6 -0
- package/dist/playerglobal/index.d.ts.map +1 -0
- package/dist/playerglobal/index.js +225 -0
- package/dist/playerglobal/index.js.map +1 -0
- package/dist/playerglobal/libraries.d.ts +5 -0
- package/dist/playerglobal/libraries.d.ts.map +1 -0
- package/dist/playerglobal/libraries.js +11 -0
- package/dist/playerglobal/libraries.js.map +1 -0
- package/dist/playerglobal/playerglobal-library.d.ts +3 -0
- package/dist/playerglobal/playerglobal-library.d.ts.map +1 -0
- package/dist/playerglobal/playerglobal-library.js +23 -0
- package/dist/playerglobal/playerglobal-library.js.map +1 -0
- package/dist/playerglobal/toplevel.d.ts +14 -0
- package/dist/playerglobal/toplevel.d.ts.map +1 -0
- package/dist/playerglobal/toplevel.js +123 -0
- package/dist/playerglobal/toplevel.js.map +1 -0
- package/dist/scene/advanced.d.ts +28 -0
- package/dist/scene/advanced.d.ts.map +1 -0
- package/dist/scene/advanced.js +182 -0
- package/dist/scene/advanced.js.map +1 -0
- package/dist/scene/context-menu.d.ts +16 -0
- package/dist/scene/context-menu.d.ts.map +1 -0
- package/dist/scene/context-menu.js +230 -0
- package/dist/scene/context-menu.js.map +1 -0
- package/dist/scene/fills.d.ts +45 -0
- package/dist/scene/fills.d.ts.map +1 -0
- package/dist/scene/fills.js +39 -0
- package/dist/scene/fills.js.map +1 -0
- package/dist/scene/filter-layers.d.ts +99 -0
- package/dist/scene/filter-layers.d.ts.map +1 -0
- package/dist/scene/filter-layers.js +352 -0
- package/dist/scene/filter-layers.js.map +1 -0
- package/dist/scene/filters.d.ts +47 -0
- package/dist/scene/filters.d.ts.map +1 -0
- package/dist/scene/filters.js +314 -0
- package/dist/scene/filters.js.map +1 -0
- package/dist/scene/hidden.d.ts +8 -0
- package/dist/scene/hidden.d.ts.map +1 -0
- package/dist/scene/hidden.js +33 -0
- package/dist/scene/hidden.js.map +1 -0
- package/dist/scene/lines.d.ts +87 -0
- package/dist/scene/lines.d.ts.map +1 -0
- package/dist/scene/lines.js +242 -0
- package/dist/scene/lines.js.map +1 -0
- package/dist/scene/masks.d.ts +32 -0
- package/dist/scene/masks.d.ts.map +1 -0
- package/dist/scene/masks.js +136 -0
- package/dist/scene/masks.js.map +1 -0
- package/dist/scene/paints.d.ts +86 -0
- package/dist/scene/paints.d.ts.map +1 -0
- package/dist/scene/paints.js +282 -0
- package/dist/scene/paints.js.map +1 -0
- package/dist/scene/parts.d.ts +57 -0
- package/dist/scene/parts.d.ts.map +1 -0
- package/dist/scene/parts.js +156 -0
- package/dist/scene/parts.js.map +1 -0
- package/dist/scene/pixel-bender-glsl.d.ts +32 -0
- package/dist/scene/pixel-bender-glsl.d.ts.map +1 -0
- package/dist/scene/pixel-bender-glsl.js +618 -0
- package/dist/scene/pixel-bender-glsl.js.map +1 -0
- package/dist/scene/planes.d.ts +89 -0
- package/dist/scene/planes.d.ts.map +1 -0
- package/dist/scene/planes.js +177 -0
- package/dist/scene/planes.js.map +1 -0
- package/dist/scene/pointer.d.ts +18 -0
- package/dist/scene/pointer.d.ts.map +1 -0
- package/dist/scene/pointer.js +245 -0
- package/dist/scene/pointer.js.map +1 -0
- package/dist/scene/shapes.d.ts +56 -0
- package/dist/scene/shapes.d.ts.map +1 -0
- package/dist/scene/shapes.js +300 -0
- package/dist/scene/shapes.js.map +1 -0
- package/dist/scene/stale-shapes.d.ts +18 -0
- package/dist/scene/stale-shapes.d.ts.map +1 -0
- package/dist/scene/stale-shapes.js +39 -0
- package/dist/scene/stale-shapes.js.map +1 -0
- package/dist/scene/strokes.d.ts +20 -0
- package/dist/scene/strokes.d.ts.map +1 -0
- package/dist/scene/strokes.js +111 -0
- package/dist/scene/strokes.js.map +1 -0
- package/dist/scene/text-items.d.ts +48 -0
- package/dist/scene/text-items.d.ts.map +1 -0
- package/dist/scene/text-items.js +206 -0
- package/dist/scene/text-items.js.map +1 -0
- package/dist/scene/text.d.ts +98 -0
- package/dist/scene/text.d.ts.map +1 -0
- package/dist/scene/text.js +249 -0
- package/dist/scene/text.js.map +1 -0
- package/dist/scene/view.d.ts +277 -0
- package/dist/scene/view.d.ts.map +1 -0
- package/dist/scene/view.js +1185 -0
- package/dist/scene/view.js.map +1 -0
- package/dist/scripting/clipboard.d.ts +61 -0
- package/dist/scripting/clipboard.d.ts.map +1 -0
- package/dist/scripting/clipboard.js +147 -0
- package/dist/scripting/clipboard.js.map +1 -0
- package/dist/scripting/code.d.ts +294 -0
- package/dist/scripting/code.d.ts.map +1 -0
- package/dist/scripting/code.js +901 -0
- package/dist/scripting/code.js.map +1 -0
- package/dist/scripting/evaluate.d.ts +38 -0
- package/dist/scripting/evaluate.d.ts.map +1 -0
- package/dist/scripting/evaluate.js +145 -0
- package/dist/scripting/evaluate.js.map +1 -0
- package/dist/scripting/events.d.ts +69 -0
- package/dist/scripting/events.d.ts.map +1 -0
- package/dist/scripting/events.js +173 -0
- package/dist/scripting/events.js.map +1 -0
- package/dist/scripting/handover.d.ts +76 -0
- package/dist/scripting/handover.d.ts.map +1 -0
- package/dist/scripting/handover.js +183 -0
- package/dist/scripting/handover.js.map +1 -0
- package/dist/scripting/lazy.d.ts +9 -0
- package/dist/scripting/lazy.d.ts.map +1 -0
- package/dist/scripting/lazy.js +39 -0
- package/dist/scripting/lazy.js.map +1 -0
- package/dist/scripting/lifecycle.d.ts +90 -0
- package/dist/scripting/lifecycle.d.ts.map +1 -0
- package/dist/scripting/lifecycle.js +273 -0
- package/dist/scripting/lifecycle.js.map +1 -0
- package/dist/scripting/loads.d.ts +220 -0
- package/dist/scripting/loads.d.ts.map +1 -0
- package/dist/scripting/loads.js +861 -0
- package/dist/scripting/loads.js.map +1 -0
- package/dist/scripting/sha256.d.ts +5 -0
- package/dist/scripting/sha256.d.ts.map +1 -0
- package/dist/scripting/sha256.js +96 -0
- package/dist/scripting/sha256.js.map +1 -0
- package/dist/scripting/symbols.d.ts +74 -0
- package/dist/scripting/symbols.d.ts.map +1 -0
- package/dist/scripting/symbols.js +349 -0
- package/dist/scripting/symbols.js.map +1 -0
- package/dist/scripting/timers.d.ts +145 -0
- package/dist/scripting/timers.d.ts.map +1 -0
- package/dist/scripting/timers.js +435 -0
- package/dist/scripting/timers.js.map +1 -0
- package/dist/scripting/workers.d.ts +138 -0
- package/dist/scripting/workers.d.ts.map +1 -0
- package/dist/scripting/workers.js +924 -0
- package/dist/scripting/workers.js.map +1 -0
- package/dist/scripting.d.ts +486 -0
- package/dist/scripting.d.ts.map +1 -0
- package/dist/scripting.js +1019 -0
- package/dist/scripting.js.map +1 -0
- package/dist/stage.d.ts +3 -0
- package/dist/stage.d.ts.map +1 -0
- package/dist/stage.js +5 -0
- package/dist/stage.js.map +1 -0
- package/dist/text/csm.d.ts +34 -0
- package/dist/text/csm.d.ts.map +1 -0
- package/dist/text/csm.js +114 -0
- package/dist/text/csm.js.map +1 -0
- package/dist/text/css.d.ts +9 -0
- package/dist/text/css.d.ts.map +1 -0
- package/dist/text/css.js +168 -0
- package/dist/text/css.js.map +1 -0
- package/dist/text/fonts.d.ts +23 -0
- package/dist/text/fonts.d.ts.map +1 -0
- package/dist/text/fonts.js +98 -0
- package/dist/text/fonts.js.map +1 -0
- package/dist/text/layout.d.ts +79 -0
- package/dist/text/layout.d.ts.map +1 -0
- package/dist/text/layout.js +394 -0
- package/dist/text/layout.js.map +1 -0
- package/dist/text/saffron.d.ts +121 -0
- package/dist/text/saffron.d.ts.map +1 -0
- package/dist/text/saffron.js +442 -0
- package/dist/text/saffron.js.map +1 -0
- package/dist/text/static.d.ts +33 -0
- package/dist/text/static.d.ts.map +1 -0
- package/dist/text/static.js +110 -0
- package/dist/text/static.js.map +1 -0
- package/dist/text/text.d.ts +69 -0
- package/dist/text/text.d.ts.map +1 -0
- package/dist/text/text.js +432 -0
- package/dist/text/text.js.map +1 -0
- package/dist/workers/protocol.d.ts +128 -0
- package/dist/workers/protocol.d.ts.map +1 -0
- package/dist/workers/protocol.js +2 -0
- package/dist/workers/protocol.js.map +1 -0
- package/dist/workers/thread.d.ts +15 -0
- package/dist/workers/thread.d.ts.map +1 -0
- package/dist/workers/thread.js +160 -0
- package/dist/workers/thread.js.map +1 -0
- package/dist/workers/wire.d.ts +53 -0
- package/dist/workers/wire.d.ts.map +1 -0
- package/dist/workers/wire.js +199 -0
- package/dist/workers/wire.js.map +1 -0
- package/package.json +55 -3
- package/src/air-definitions.ts +129 -0
- package/src/avm1/amf.ts +564 -0
- package/src/avm1/avm1.ts +1652 -0
- package/src/avm1/bindings.ts +257 -0
- package/src/avm1/classes.ts +85 -0
- package/src/avm1/clips.ts +305 -0
- package/src/avm1/compile.ts +179 -0
- package/src/avm1/external.ts +99 -0
- package/src/avm1/focus.ts +342 -0
- package/src/avm1/globals/BitmapData.ts +736 -0
- package/src/avm1/globals/Button.ts +43 -0
- package/src/avm1/globals/Color.ts +138 -0
- package/src/avm1/globals/ExternalInterface.ts +402 -0
- package/src/avm1/globals/FileReference.ts +249 -0
- package/src/avm1/globals/Key.ts +102 -0
- package/src/avm1/globals/LoadVars.ts +280 -0
- package/src/avm1/globals/LocalConnection.ts +137 -0
- package/src/avm1/globals/MovieClip.ts +1365 -0
- package/src/avm1/globals/MovieClipLoader.ts +150 -0
- package/src/avm1/globals/NetConnection.ts +352 -0
- package/src/avm1/globals/PrintJob.ts +57 -0
- package/src/avm1/globals/Selection.ts +103 -0
- package/src/avm1/globals/SharedObject.ts +300 -0
- package/src/avm1/globals/Sound.ts +326 -0
- package/src/avm1/globals/Stage.ts +19 -0
- package/src/avm1/globals/StyleSheet.ts +280 -0
- package/src/avm1/globals/TextField.ts +611 -0
- package/src/avm1/globals/TextFormat.ts +250 -0
- package/src/avm1/globals/TextSnapshot.ts +128 -0
- package/src/avm1/globals/XML.ts +521 -0
- package/src/avm1/globals/XMLNode.ts +502 -0
- package/src/avm1/globals/XMLSocket.ts +267 -0
- package/src/avm1/globals/drawing.ts +253 -0
- package/src/avm1/globals/filters.ts +782 -0
- package/src/avm1/globals/geom.ts +887 -0
- package/src/avm1/input.ts +556 -0
- package/src/avm1/keyboard.ts +133 -0
- package/src/avm1/loads.ts +461 -0
- package/src/avm1/net.ts +287 -0
- package/src/avm1/paths.ts +132 -0
- package/src/avm1/pointer.ts +607 -0
- package/src/avm1/queue.ts +335 -0
- package/src/avm1/sound.ts +135 -0
- package/src/avm1/swf.ts +193 -0
- package/src/avm1/timers.ts +141 -0
- package/src/bitmap/bitmap.ts +796 -0
- package/src/bitmap/draw.ts +96 -0
- package/src/bitmap/dxt.ts +20 -0
- package/src/bitmap/filters.ts +810 -0
- package/src/bitmap/images.ts +304 -0
- package/src/bitmap/kernel.ts +77 -0
- package/src/bitmap/ops.ts +1608 -0
- package/src/bitmap/pixel-bender.ts +1089 -0
- package/src/bitmap/png.ts +152 -0
- package/src/bitmap/turbulence.ts +117 -0
- package/src/clock.ts +196 -0
- package/src/display/bitmapobject.ts +31 -0
- package/src/display/bounds.ts +702 -0
- package/src/display/buttonobject.ts +382 -0
- package/src/display/color.ts +54 -0
- package/src/display/container.ts +169 -0
- package/src/display/display.ts +28 -0
- package/src/display/displayobject.ts +823 -0
- package/src/display/drawing.ts +744 -0
- package/src/display/filters.ts +393 -0
- package/src/display/geometry.ts +237 -0
- package/src/display/gradients.ts +165 -0
- package/src/display/graphicsdata.ts +745 -0
- package/src/display/instantiate.ts +95 -0
- package/src/display/matrix3d.ts +461 -0
- package/src/display/morph.ts +275 -0
- package/src/display/movieclip.ts +771 -0
- package/src/display/perspective.ts +253 -0
- package/src/display/plane.ts +192 -0
- package/src/display/scale9.ts +321 -0
- package/src/display/shapeobject.ts +160 -0
- package/src/display/shapes.ts +602 -0
- package/src/display/stretch.ts +217 -0
- package/src/display/textobjects.ts +248 -0
- package/src/display/timeline.ts +831 -0
- package/src/display/value-lists.ts +50 -0
- package/src/display/videoobject.ts +7 -0
- package/src/display/walk.ts +169 -0
- package/src/files.ts +466 -0
- package/src/hosts.ts +645 -0
- package/src/index.ts +66 -0
- package/src/input/activation.ts +62 -0
- package/src/input/avm1.ts +102 -0
- package/src/input/canvas.ts +74 -0
- package/src/input/context-menu.ts +105 -0
- package/src/input/keyboard.ts +645 -0
- package/src/input/pointer.ts +1127 -0
- package/src/input/text-editor.ts +361 -0
- package/src/input/touch.ts +302 -0
- package/src/localconnection.ts +129 -0
- package/src/media/audio.ts +484 -0
- package/src/media/dynamic-sound.ts +118 -0
- package/src/media/extract.ts +191 -0
- package/src/media/mp3.ts +205 -0
- package/src/media/sounds.ts +735 -0
- package/src/media/streaming-audio.ts +150 -0
- package/src/player.ts +686 -0
- package/src/playerglobal/air/net/WebSocket.ts +318 -0
- package/src/playerglobal/air-library.ts +14 -0
- package/src/playerglobal/context3d/context.ts +672 -0
- package/src/playerglobal/context3d/errors.ts +116 -0
- package/src/playerglobal/context3d/lifecycle.ts +428 -0
- package/src/playerglobal/context3d/readback.ts +65 -0
- package/src/playerglobal/context3d/resources.ts +406 -0
- package/src/playerglobal/context3d.ts +111 -0
- package/src/playerglobal/flash/accessibility/Accessibility.ts +30 -0
- package/src/playerglobal/flash/crypto/generateRandomBytes.ts +38 -0
- package/src/playerglobal/flash/data/EncryptedLocalStore.ts +75 -0
- package/src/playerglobal/flash/desktop/Clipboard.ts +217 -0
- package/src/playerglobal/flash/desktop/NativeApplication.ts +241 -0
- package/src/playerglobal/flash/display/AVM1Movie.ts +24 -0
- package/src/playerglobal/flash/display/Bitmap.ts +76 -0
- package/src/playerglobal/flash/display/BitmapData.ts +963 -0
- package/src/playerglobal/flash/display/DisplayObject.ts +787 -0
- package/src/playerglobal/flash/display/DisplayObjectContainer.ts +274 -0
- package/src/playerglobal/flash/display/Graphics.ts +489 -0
- package/src/playerglobal/flash/display/InteractiveObject.ts +124 -0
- package/src/playerglobal/flash/display/Loader.ts +126 -0
- package/src/playerglobal/flash/display/LoaderInfo.ts +205 -0
- package/src/playerglobal/flash/display/MovieClip.ts +245 -0
- package/src/playerglobal/flash/display/NativeWindow.ts +313 -0
- package/src/playerglobal/flash/display/Shader.ts +39 -0
- package/src/playerglobal/flash/display/ShaderData.ts +105 -0
- package/src/playerglobal/flash/display/ShaderInput.ts +101 -0
- package/src/playerglobal/flash/display/ShaderJob.ts +234 -0
- package/src/playerglobal/flash/display/ShaderParameter.ts +36 -0
- package/src/playerglobal/flash/display/Shape.ts +19 -0
- package/src/playerglobal/flash/display/SimpleButton.ts +126 -0
- package/src/playerglobal/flash/display/Sprite.ts +115 -0
- package/src/playerglobal/flash/display/Stage.ts +298 -0
- package/src/playerglobal/flash/display/Stage3D.ts +90 -0
- package/src/playerglobal/flash/display/shaders.ts +296 -0
- package/src/playerglobal/flash/events/Event.ts +85 -0
- package/src/playerglobal/flash/events/EventDispatcher.ts +143 -0
- package/src/playerglobal/flash/events/GestureEvent.ts +49 -0
- package/src/playerglobal/flash/events/HTTPStatusEvent.ts +12 -0
- package/src/playerglobal/flash/events/KeyboardEvent.ts +75 -0
- package/src/playerglobal/flash/events/MouseEvent.ts +88 -0
- package/src/playerglobal/flash/events/PressAndTapGestureEvent.ts +48 -0
- package/src/playerglobal/flash/events/TimerEvent.ts +20 -0
- package/src/playerglobal/flash/events/TouchEvent.ts +64 -0
- package/src/playerglobal/flash/external/ExternalInterface.ts +104 -0
- package/src/playerglobal/flash/filesystem/File.ts +450 -0
- package/src/playerglobal/flash/filesystem/FileStream.ts +556 -0
- package/src/playerglobal/flash/filesystem/paths.ts +181 -0
- package/src/playerglobal/flash/filesystem/writes.ts +203 -0
- package/src/playerglobal/flash/filters/BevelFilter.ts +9 -0
- package/src/playerglobal/flash/filters/BitmapFilter.ts +237 -0
- package/src/playerglobal/flash/filters/BlurFilter.ts +8 -0
- package/src/playerglobal/flash/filters/ColorMatrixFilter.ts +15 -0
- package/src/playerglobal/flash/filters/ConvolutionFilter.ts +31 -0
- package/src/playerglobal/flash/filters/DisplacementMapFilter.ts +69 -0
- package/src/playerglobal/flash/filters/DropShadowFilter.ts +9 -0
- package/src/playerglobal/flash/filters/GlowFilter.ts +9 -0
- package/src/playerglobal/flash/filters/GradientBevelFilter.ts +8 -0
- package/src/playerglobal/flash/filters/GradientGlowFilter.ts +8 -0
- package/src/playerglobal/flash/filters/ShaderFilter.ts +75 -0
- package/src/playerglobal/flash/geom/Matrix3D.ts +468 -0
- package/src/playerglobal/flash/geom/PerspectiveProjection.ts +162 -0
- package/src/playerglobal/flash/geom/Transform.ts +335 -0
- package/src/playerglobal/flash/geom/Utils3D.ts +132 -0
- package/src/playerglobal/flash/globalization/Collator.ts +205 -0
- package/src/playerglobal/flash/globalization/CurrencyFormatter.ts +365 -0
- package/src/playerglobal/flash/globalization/CurrencyParseResult.ts +35 -0
- package/src/playerglobal/flash/globalization/DateTimeFormatter.ts +594 -0
- package/src/playerglobal/flash/globalization/LocaleID.ts +202 -0
- package/src/playerglobal/flash/globalization/NumberFormatter.ts +574 -0
- package/src/playerglobal/flash/globalization/NumberParseResult.ts +40 -0
- package/src/playerglobal/flash/globalization/StringTools.ts +78 -0
- package/src/playerglobal/flash/globalization/locale.ts +245 -0
- package/src/playerglobal/flash/media/Camera.ts +122 -0
- package/src/playerglobal/flash/media/Microphone.ts +177 -0
- package/src/playerglobal/flash/media/Sound.ts +714 -0
- package/src/playerglobal/flash/media/SoundMixer.ts +97 -0
- package/src/playerglobal/flash/media/SoundTransform.ts +61 -0
- package/src/playerglobal/flash/media/Video.ts +64 -0
- package/src/playerglobal/flash/net/FileFilter.ts +42 -0
- package/src/playerglobal/flash/net/FileReference.ts +273 -0
- package/src/playerglobal/flash/net/LocalConnection.ts +218 -0
- package/src/playerglobal/flash/net/NetConnection.ts +219 -0
- package/src/playerglobal/flash/net/SharedObject.ts +356 -0
- package/src/playerglobal/flash/net/Socket.ts +360 -0
- package/src/playerglobal/flash/net/URLRequest.ts +140 -0
- package/src/playerglobal/flash/net/URLStream.ts +203 -0
- package/src/playerglobal/flash/net/XMLSocket.ts +18 -0
- package/src/playerglobal/flash/net/local-modern.ts +164 -0
- package/src/playerglobal/flash/net/local-values.ts +245 -0
- package/src/playerglobal/flash/net/navigateToURL.ts +42 -0
- package/src/playerglobal/flash/profiler/Telemetry.ts +35 -0
- package/src/playerglobal/flash/sensors/Accelerometer.ts +15 -0
- package/src/playerglobal/flash/system/ApplicationDomain.ts +94 -0
- package/src/playerglobal/flash/system/Capabilities.ts +203 -0
- package/src/playerglobal/flash/system/FSCommandHost.ts +23 -0
- package/src/playerglobal/flash/system/Security.ts +61 -0
- package/src/playerglobal/flash/system/SecurityDomain.ts +27 -0
- package/src/playerglobal/flash/system/System.ts +96 -0
- package/src/playerglobal/flash/system/Worker.ts +147 -0
- package/src/playerglobal/flash/text/Font.ts +124 -0
- package/src/playerglobal/flash/text/StaticText.ts +21 -0
- package/src/playerglobal/flash/text/StyleSheet.ts +87 -0
- package/src/playerglobal/flash/text/TextField.ts +789 -0
- package/src/playerglobal/flash/text/TextRenderer.ts +104 -0
- package/src/playerglobal/flash/text/engine/FontDescription.ts +198 -0
- package/src/playerglobal/flash/text/engine/TabStop.ts +70 -0
- package/src/playerglobal/flash/trace/Trace.ts +25 -0
- package/src/playerglobal/flash/ui/ContextMenu.ts +26 -0
- package/src/playerglobal/flash/ui/GameInput.ts +27 -0
- package/src/playerglobal/flash/ui/Keyboard.ts +34 -0
- package/src/playerglobal/flash/ui/Mouse.ts +170 -0
- package/src/playerglobal/flash/ui/Multitouch.ts +62 -0
- package/src/playerglobal/flash/utils/ByteArray.ts +184 -0
- package/src/playerglobal/flash/utils/Timer.ts +39 -0
- package/src/playerglobal/flash/xml/XMLDocument.ts +101 -0
- package/src/playerglobal/index.ts +233 -0
- package/src/playerglobal/libraries.ts +12 -0
- package/src/playerglobal/playerglobal-library.ts +28 -0
- package/src/playerglobal/toplevel.ts +158 -0
- package/src/scene/advanced.ts +282 -0
- package/src/scene/context-menu.ts +270 -0
- package/src/scene/fills.ts +90 -0
- package/src/scene/filter-layers.ts +503 -0
- package/src/scene/filters.ts +421 -0
- package/src/scene/hidden.ts +37 -0
- package/src/scene/lines.ts +322 -0
- package/src/scene/masks.ts +195 -0
- package/src/scene/paints.ts +378 -0
- package/src/scene/parts.ts +205 -0
- package/src/scene/pixel-bender-glsl.ts +722 -0
- package/src/scene/planes.ts +260 -0
- package/src/scene/pointer.ts +278 -0
- package/src/scene/shapes.ts +386 -0
- package/src/scene/stale-shapes.ts +56 -0
- package/src/scene/strokes.ts +157 -0
- package/src/scene/text-items.ts +324 -0
- package/src/scene/text.ts +360 -0
- package/src/scene/view.ts +1591 -0
- package/src/scripting/clipboard.ts +169 -0
- package/src/scripting/code.ts +1094 -0
- package/src/scripting/evaluate.ts +178 -0
- package/src/scripting/events.ts +236 -0
- package/src/scripting/handover.ts +253 -0
- package/src/scripting/lazy.ts +67 -0
- package/src/scripting/lifecycle.ts +307 -0
- package/src/scripting/loads.ts +1112 -0
- package/src/scripting/sha256.ts +107 -0
- package/src/scripting/symbols.ts +454 -0
- package/src/scripting/timers.ts +504 -0
- package/src/scripting/workers.ts +1144 -0
- package/src/scripting.ts +1300 -0
- package/src/stage.ts +7 -0
- package/src/text/csm.ts +173 -0
- package/src/text/css.ts +198 -0
- package/src/text/fonts.ts +129 -0
- package/src/text/layout.ts +525 -0
- package/src/text/saffron.ts +539 -0
- package/src/text/static.ts +147 -0
- package/src/text/text.ts +538 -0
- package/src/workers/protocol.ts +124 -0
- package/src/workers/thread.ts +188 -0
- package/src/workers/wire.ts +263 -0
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
// The SWFs' code: each DoABC added to the compiler in the application
|
|
2
|
+
// domain its SWF loads into, compiled into a module once all of its SWF's
|
|
3
|
+
// are added, evaluated and linked into the runtime; and, by the module a
|
|
4
|
+
// stack frame is of, the domain, URL and SWF of the code that runs.
|
|
5
|
+
import { libraryLog, moduleKey } from "@swf2es/codegen";
|
|
6
|
+
import { readDoAbc, tags } from "@swf2es/format";
|
|
7
|
+
import { prepareMp3 } from "@swf2es/native/mp3";
|
|
8
|
+
import { avm2 } from "@swf2es/runtime";
|
|
9
|
+
import { decodeImages } from "../bitmap/images.js";
|
|
10
|
+
import { evaluate, evaluateFunction } from "./evaluate.js";
|
|
11
|
+
import { namesWorkerDomain, } from "./handover.js";
|
|
12
|
+
import { methodCompiler, supportsLazyCompilation } from "./lazy.js";
|
|
13
|
+
import { sha256 } from "./sha256.js";
|
|
14
|
+
export class Code {
|
|
15
|
+
s;
|
|
16
|
+
/** Each ABC's hash, by its index in the compiler; "" once its domain is dropped. */
|
|
17
|
+
hashes = [];
|
|
18
|
+
/** Whether each ABC was added as one of the player's own libraries, and its size in bytes, by its index. */
|
|
19
|
+
builtins = [];
|
|
20
|
+
sizes = [];
|
|
21
|
+
/**
|
|
22
|
+
* How many ABCs there were when the first went into a domain but the
|
|
23
|
+
* root's: the libraries. The log's entries made while there were no
|
|
24
|
+
* more are in every later module's context alike, so the cache's keys
|
|
25
|
+
* name them by a digest taken once (see moduleKey), with the compiler's
|
|
26
|
+
* epoch it was taken in.
|
|
27
|
+
*/
|
|
28
|
+
libraryCount = null;
|
|
29
|
+
floatReady = null;
|
|
30
|
+
libraryLog = null;
|
|
31
|
+
/**
|
|
32
|
+
* The compiler's application domain for each of the runtime's, by its
|
|
33
|
+
* number; the compiler's index of each ABC added into one, in order; and
|
|
34
|
+
* the findings each has been told (see add).
|
|
35
|
+
*/
|
|
36
|
+
codegenDomains = new Map([[0, 0]]);
|
|
37
|
+
codegenAbcs = new Map([[0, []]]);
|
|
38
|
+
reported = new Map();
|
|
39
|
+
/**
|
|
40
|
+
* A runtime domain let go of, by its number: no code of its SWFs is left
|
|
41
|
+
* to run, nor of its descendants', which keep it while they live. The
|
|
42
|
+
* compiler drops its domain, the ABCs in it and what they took, and so
|
|
43
|
+
* does Code. Their hashes are no module's linked ABCs, since no live
|
|
44
|
+
* domain saw them. Not if the compiler was reset since, as by another
|
|
45
|
+
* player given it: its numbers are another domain's then.
|
|
46
|
+
*/
|
|
47
|
+
domainGone = new FinalizationRegistry(({ id, epoch }) => {
|
|
48
|
+
this.forget(id, epoch);
|
|
49
|
+
});
|
|
50
|
+
/** Let go of runtime domain `id`, which the compiler of `epoch` knew. */
|
|
51
|
+
forget(id, epoch) {
|
|
52
|
+
const target = this.codegenDomains.get(id);
|
|
53
|
+
if (target === undefined) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.unmodelled();
|
|
57
|
+
this.s.codegen.dropDomain(target, epoch);
|
|
58
|
+
this.compactSoon();
|
|
59
|
+
for (const index of this.codegenAbcs.get(id) ?? []) {
|
|
60
|
+
this.hashes[index] = "";
|
|
61
|
+
}
|
|
62
|
+
this.codegenDomains.delete(id);
|
|
63
|
+
this.codegenAbcs.delete(id);
|
|
64
|
+
this.reported.delete(id);
|
|
65
|
+
this.evictable.delete(id);
|
|
66
|
+
this.revived.delete(id);
|
|
67
|
+
}
|
|
68
|
+
/** Whether a compaction is asked for and has not run yet. */
|
|
69
|
+
compacting = false;
|
|
70
|
+
/**
|
|
71
|
+
* Have the compiler reuse what dropped and evicted domains took, if that
|
|
72
|
+
* is worth a rebuild, when the page is next idle (or soon, without
|
|
73
|
+
* requestIdleCallback): a rebuild links every live ABC again, too long to
|
|
74
|
+
* do in a load's frame.
|
|
75
|
+
*/
|
|
76
|
+
compactSoon() {
|
|
77
|
+
if (this.compacting) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.compacting = true;
|
|
81
|
+
const compact = () => {
|
|
82
|
+
this.compacting = false;
|
|
83
|
+
this.s.codegen.compact();
|
|
84
|
+
};
|
|
85
|
+
const idle = globalThis
|
|
86
|
+
.requestIdleCallback;
|
|
87
|
+
if (idle) {
|
|
88
|
+
idle(compact, { timeout: 1000 });
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
setTimeout(compact, 0);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The ABCs of each domain but the root and the main SWF's, by their
|
|
96
|
+
* indices in the compiler, to revive it with once its SWF has linked and
|
|
97
|
+
* it was evicted (see link); and the domains revived so, which stay live,
|
|
98
|
+
* as something adds to them, or under them, again.
|
|
99
|
+
*/
|
|
100
|
+
evictable = new Map();
|
|
101
|
+
revived = new Set();
|
|
102
|
+
/** How many links are in progress in each domain or under it, which keep it live. */
|
|
103
|
+
linking = new Map();
|
|
104
|
+
/** Modules loaded, each under a script name of its own for Runtime.codeDomain. */
|
|
105
|
+
modules = 0;
|
|
106
|
+
/**
|
|
107
|
+
* The URLs modules were imported from. A document has one module per
|
|
108
|
+
* URL, so the same module loaded into another domain, as a SWF compiled
|
|
109
|
+
* ahead of time loaded again into a sibling of the main SWF's domain,
|
|
110
|
+
* whose context is the same, is imported from a URL of its own, by a
|
|
111
|
+
* fragment, lest its frames name the first's script and so its domain.
|
|
112
|
+
*/
|
|
113
|
+
importedUrls = new Set();
|
|
114
|
+
/** `url` absolute, as frames name it, and not yet imported by this player. */
|
|
115
|
+
uniqueUrl(url) {
|
|
116
|
+
const unique = new URL(url);
|
|
117
|
+
if (this.importedUrls.has(unique.href)) {
|
|
118
|
+
unique.hash = `swf2es-${this.importedUrls.size}`;
|
|
119
|
+
}
|
|
120
|
+
this.importedUrls.add(unique.href);
|
|
121
|
+
return unique.href;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The SWF each module's code came from, its URL and library, for codeUrl
|
|
125
|
+
* and codeLibrary: by its script name, the module's Abc, and that.
|
|
126
|
+
* Weakly: a module's code keeps its Abc for as long as it can run, and
|
|
127
|
+
* once the SWF is let go, the Abc goes, its origin and entry with it.
|
|
128
|
+
*/
|
|
129
|
+
moduleAbcs = new Map();
|
|
130
|
+
/** The script names of the libraries' modules, builtin's and playerglobal's, for callerUrl. */
|
|
131
|
+
libraryScripts = new Set();
|
|
132
|
+
/** The URLs of the SWFs whose code was ever loaded, for everUrls. */
|
|
133
|
+
loadedUrls = new Set();
|
|
134
|
+
origins = new WeakMap();
|
|
135
|
+
moduleGone = new FinalizationRegistry((script) => {
|
|
136
|
+
if (!this.moduleAbcs.get(script)?.deref()) {
|
|
137
|
+
this.moduleAbcs.delete(script);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
/**
|
|
141
|
+
* The primordial's journal of its compiler, while it may hand its
|
|
142
|
+
* modules to workers; a worker's side of it, where it was handed some
|
|
143
|
+
* (see handover.ts).
|
|
144
|
+
*/
|
|
145
|
+
recorder = null;
|
|
146
|
+
handover = null;
|
|
147
|
+
mainLinked = false;
|
|
148
|
+
constructor(s) {
|
|
149
|
+
this.s = s;
|
|
150
|
+
}
|
|
151
|
+
/** A call on the compiler that changes what it compiles to, journaled. */
|
|
152
|
+
journal(op) {
|
|
153
|
+
this.recorder?.op(op, this.s.codegen.epoch);
|
|
154
|
+
this.handover?.op(op);
|
|
155
|
+
}
|
|
156
|
+
/** ABC `index` compiled, read or imported, journaled with its module and log. */
|
|
157
|
+
recorded(index, module, log) {
|
|
158
|
+
this.recorder?.compiled(index, this.s.codegen.epoch, module, log);
|
|
159
|
+
this.handover?.op(`compile ${index}`);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* ABC `index`'s module, read from the cache, refused as it loaded and
|
|
163
|
+
* compiled again: not handed to a worker, which would fail on it too,
|
|
164
|
+
* nor any after it.
|
|
165
|
+
*/
|
|
166
|
+
refused(index) {
|
|
167
|
+
this.recorder?.forget(index);
|
|
168
|
+
this.unmodelled();
|
|
169
|
+
}
|
|
170
|
+
/** A call the journal does not follow: no module is handed past it. */
|
|
171
|
+
unmodelled() {
|
|
172
|
+
if (this.recorder) {
|
|
173
|
+
this.recorder.open = false;
|
|
174
|
+
}
|
|
175
|
+
this.handover?.stop();
|
|
176
|
+
}
|
|
177
|
+
/** What a worker is handed of this VM's modules, or null. */
|
|
178
|
+
handedModules() {
|
|
179
|
+
return this.recorder?.handed(this.hashes) ?? null;
|
|
180
|
+
}
|
|
181
|
+
/** Load the libraries the SWF's code links against (builtin, playerglobal), whose scripts run on first use. */
|
|
182
|
+
async loadLibraries(abcs) {
|
|
183
|
+
await prepareMp3();
|
|
184
|
+
const root = this.s.rt.root;
|
|
185
|
+
for (const abc of abcs) {
|
|
186
|
+
const index = await this.add(abc, true, root);
|
|
187
|
+
const ready = this.cache() ? await this.prepare([index]) : undefined;
|
|
188
|
+
const linked = this.compileAll([index], root, true, undefined, ready);
|
|
189
|
+
if (linked instanceof Promise) {
|
|
190
|
+
await linked;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (avm2.hasFloatLibrary(abcs)) {
|
|
194
|
+
this.floatReady = Promise.resolve();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/** Load the SWF's DoABCs in tag order, each run unless its lazy flag defers it to first use, then its SymbolClass. */
|
|
198
|
+
async loadSwf(swf, library) {
|
|
199
|
+
this.s.library = library;
|
|
200
|
+
this.s.symbols.addFontLibrary(library);
|
|
201
|
+
library.domain = this.s.mainDomain;
|
|
202
|
+
this.s.rt.swfVersion = swf.header.version;
|
|
203
|
+
const decoded = decodeImages(library, this.s.decodeImage);
|
|
204
|
+
const run = await this.link(swf, this.s.mainDomain, this.s.url, library);
|
|
205
|
+
await decoded;
|
|
206
|
+
run();
|
|
207
|
+
this.s.bind(swf, library);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* The SWF's DoABCs compiled and linked, in tag order: what runs them,
|
|
211
|
+
* each unless its lazy flag defers it to first use. Linking is
|
|
212
|
+
* asynchronous, running is not, so a load can run its code in a frame.
|
|
213
|
+
*/
|
|
214
|
+
async link(swf, domain, url, library) {
|
|
215
|
+
// Every DoABC added before any compiles: avmplus has a frame's ABCs all
|
|
216
|
+
// loaded before it verifies a method, so a class in the first tag may
|
|
217
|
+
// extend or name one in the last (the corpus's property_priority).
|
|
218
|
+
const abcs = swf.tags
|
|
219
|
+
.filter((tag) => tag.code === tags.DoABC || tag.code === tags.DoABC2)
|
|
220
|
+
.map((tag) => readDoAbc(swf.bytes, tag));
|
|
221
|
+
if (abcs.some(({ abc }) => {
|
|
222
|
+
const version = this.s.codegen.abcVersion(abc);
|
|
223
|
+
return version?.major === 47 && version.minor >= 16;
|
|
224
|
+
})) {
|
|
225
|
+
this.floatReady ??= this.loadLibraries([avm2.floatLibrary]);
|
|
226
|
+
await this.floatReady;
|
|
227
|
+
}
|
|
228
|
+
// Workers are handed what was compiled up to the main SWF's code, and
|
|
229
|
+
// only by a SWF that can make one: another records none of its modules.
|
|
230
|
+
const main = domain === this.s.mainDomain && !this.mainLinked;
|
|
231
|
+
if (main && !namesWorkerDomain(abcs.map(({ abc }) => abc))) {
|
|
232
|
+
this.recorder?.drop();
|
|
233
|
+
}
|
|
234
|
+
const added = [];
|
|
235
|
+
const runs = [];
|
|
236
|
+
this.pin(domain, 1);
|
|
237
|
+
try {
|
|
238
|
+
for (const { lazy, abc } of abcs) {
|
|
239
|
+
added.push({ index: await this.add(abc, false, domain), lazy });
|
|
240
|
+
}
|
|
241
|
+
// With a module cache, each module is read or compiled first, so
|
|
242
|
+
// that they all load into the runtime at once, as without one.
|
|
243
|
+
const indices = added.map((a) => a.index);
|
|
244
|
+
const ready = this.cache() ? await this.prepare(indices) : undefined;
|
|
245
|
+
// Awaited only if a module's evaluation waits, so that where none does
|
|
246
|
+
// the link goes on in the same turn, as it did before scripts.
|
|
247
|
+
const linked = this.compileAll(indices, domain, false, { url, library }, ready);
|
|
248
|
+
const modules = linked instanceof Promise ? await linked : linked;
|
|
249
|
+
if (main) {
|
|
250
|
+
this.mainLinked = true;
|
|
251
|
+
this.recorder?.freeze(this.hashes);
|
|
252
|
+
}
|
|
253
|
+
for (const [k, { lazy }] of added.entries()) {
|
|
254
|
+
const linked = modules[k];
|
|
255
|
+
if (!lazy) {
|
|
256
|
+
runs.push(() => this.s.rt.run(linked));
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
finally {
|
|
261
|
+
this.pin(domain, -1);
|
|
262
|
+
this.evict(domain);
|
|
263
|
+
}
|
|
264
|
+
return () => {
|
|
265
|
+
for (const run of runs) {
|
|
266
|
+
run();
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* An ABC added to the compiler's domain, into the application domain of
|
|
272
|
+
* the runtime's `domain`, linked against what that domain sees of those
|
|
273
|
+
* before it, with what it has found: its index among all added.
|
|
274
|
+
*/
|
|
275
|
+
async add(abc, builtin, domain) {
|
|
276
|
+
const target = this.codegenDomainOf(domain);
|
|
277
|
+
if (domain !== this.s.rt.root) {
|
|
278
|
+
const told = this.reported.get(domain.id) ?? new Set();
|
|
279
|
+
this.reported.set(domain.id, told);
|
|
280
|
+
for (const f of this.s.rt.compileUnit(domain).found) {
|
|
281
|
+
const key = JSON.stringify([f.asType, f.nsKind, f.uri, f.name, f.domain, f.index]);
|
|
282
|
+
const at = this.codegenAbcs.get(f.domain)?.[f.index];
|
|
283
|
+
if (at !== undefined && !told.has(key)) {
|
|
284
|
+
told.add(key);
|
|
285
|
+
this.journal(`found ${key} ${target} ${at}`);
|
|
286
|
+
this.s.codegen.found({ ...f, domain: target, abc: at });
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
const error = this.s.codegen.add(abc, builtin, target);
|
|
291
|
+
if (error) {
|
|
292
|
+
throw new Error(`an ABC was rejected: VerifyError #${error}`);
|
|
293
|
+
}
|
|
294
|
+
// Its bytes are checked by their hash, before a module is handed.
|
|
295
|
+
this.journal(`add ${builtin} ${target}`);
|
|
296
|
+
this.codegenAbcs.get(domain.id)?.push(this.hashes.length);
|
|
297
|
+
this.evictable.get(domain.id)?.set(this.hashes.length, abc.slice());
|
|
298
|
+
if (domain !== this.s.rt.root && this.libraryCount === null) {
|
|
299
|
+
this.libraryCount = this.hashes.length;
|
|
300
|
+
}
|
|
301
|
+
this.builtins.push(builtin);
|
|
302
|
+
this.sizes.push(abc.length);
|
|
303
|
+
this.hashes.push(await sha256(abc));
|
|
304
|
+
return this.hashes.length - 1;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* The compiler's application domain for the runtime's `domain`, live:
|
|
308
|
+
* made with its ancestors' as needed, or revived with them if evicted.
|
|
309
|
+
*/
|
|
310
|
+
codegenDomainOf(domain) {
|
|
311
|
+
let target = this.codegenDomains.get(domain.id);
|
|
312
|
+
if (target === undefined) {
|
|
313
|
+
const parent = this.codegenDomainOf(domain.parent ?? this.s.rt.root);
|
|
314
|
+
target = this.s.codegen.childDomain(parent);
|
|
315
|
+
this.journal(`domain ${parent} ${target}`);
|
|
316
|
+
this.codegenDomains.set(domain.id, target);
|
|
317
|
+
this.codegenAbcs.set(domain.id, []);
|
|
318
|
+
if (domain !== this.s.mainDomain) {
|
|
319
|
+
this.evictable.set(domain.id, new Map());
|
|
320
|
+
}
|
|
321
|
+
this.domainGone.register(domain, { id: domain.id, epoch: this.s.codegen.epoch });
|
|
322
|
+
}
|
|
323
|
+
else if (!this.s.codegen.isLive(target)) {
|
|
324
|
+
// With its evicted ancestors, all at once: one rebuild at most.
|
|
325
|
+
const abcs = new Map();
|
|
326
|
+
for (let d = domain; d; d = d.parent) {
|
|
327
|
+
const at = this.codegenDomains.get(d.id);
|
|
328
|
+
if (at === undefined || this.s.codegen.isLive(at)) {
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
for (const [index, bytes] of this.evictable.get(d.id) ?? []) {
|
|
332
|
+
abcs.set(index, bytes);
|
|
333
|
+
}
|
|
334
|
+
this.revived.add(d.id);
|
|
335
|
+
}
|
|
336
|
+
this.unmodelled();
|
|
337
|
+
this.s.codegen.reviveDomain(target, abcs);
|
|
338
|
+
}
|
|
339
|
+
return target;
|
|
340
|
+
}
|
|
341
|
+
/** Count a link in progress in `domain` (`by` 1) or one done (-1), for it and its ancestors. */
|
|
342
|
+
pin(domain, by) {
|
|
343
|
+
for (let d = domain; d; d = d.parent) {
|
|
344
|
+
const count = (this.linking.get(d.id) ?? 0) + by;
|
|
345
|
+
if (count > 0) {
|
|
346
|
+
this.linking.set(d.id, count);
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
this.linking.delete(d.id);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Evict the compiler's domain for `domain` once its SWF has linked, its
|
|
355
|
+
* ABCs compiled: what they took is reused at once, not when the runtime
|
|
356
|
+
* lets the domain go, which a garbage collection may put off for hundreds
|
|
357
|
+
* of loads. Not the root's or the main SWF's, nor one with a link in
|
|
358
|
+
* progress in it or under it, nor one revived before: an evicted domain
|
|
359
|
+
* is revived, which may link every live ABC again, when a SWF loads into
|
|
360
|
+
* it or under it, so a domain loaded into again stays.
|
|
361
|
+
*/
|
|
362
|
+
evict(domain) {
|
|
363
|
+
// Deferred bodies still need their ABCs. Domain GC drops them as usual.
|
|
364
|
+
if (this.s.lazyCompilation) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
const target = this.codegenDomains.get(domain.id);
|
|
368
|
+
if (target !== undefined &&
|
|
369
|
+
this.evictable.has(domain.id) &&
|
|
370
|
+
!this.revived.has(domain.id) &&
|
|
371
|
+
!this.linking.has(domain.id)) {
|
|
372
|
+
this.unmodelled();
|
|
373
|
+
this.s.codegen.evictDomain(target);
|
|
374
|
+
this.compactSoon();
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The modules of the ABCs at `indices`, each compiled against every ABC
|
|
379
|
+
* added so far that its domain sees, or `ready` from the host's module
|
|
380
|
+
* cache, loaded into the runtime's `domain` in order; `builtin` for the
|
|
381
|
+
* player's own libraries, a SWF's with its `origin`. Each is evaluated
|
|
382
|
+
* under a script name of its own, or imported from its URL, by which
|
|
383
|
+
* Runtime.codeDomain finds the domain of the code running. All are
|
|
384
|
+
* evaluated before any loads, as evaluating may wait (see evaluate), so
|
|
385
|
+
* that they load at once; a promise only if one waited.
|
|
386
|
+
*/
|
|
387
|
+
compileAll(indices, domain, builtin = false, origin, ready) {
|
|
388
|
+
const pending = indices.map((index, k) => this.evaluateAt(index, builtin, ready?.[k]));
|
|
389
|
+
const load = (evaluated) => indices.map((index, k) => this.loadAt(index, domain, builtin, evaluated[k], ready?.[k], origin));
|
|
390
|
+
return pending.some((e) => e instanceof Promise)
|
|
391
|
+
? Promise.all(pending).then(load)
|
|
392
|
+
: load(pending);
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* ABC `index`'s module evaluated, or imported, compiled first if not
|
|
396
|
+
* `ready`. A cached module that does not evaluate is compiled now, the
|
|
397
|
+
* domain already as its compile left it, and its entry goes, not stored
|
|
398
|
+
* again: the SWF's later modules were readied since, and the key the
|
|
399
|
+
* compile now would have is not this one. The player's own need no
|
|
400
|
+
* script the frames name, as codeDomain skips their code.
|
|
401
|
+
*/
|
|
402
|
+
evaluateAt(index, builtin, ready) {
|
|
403
|
+
const compiled = (module, lazy = !builtin && this.s.lazyCompilation && supportsLazyCompilation()) => {
|
|
404
|
+
const script = `swf2es-${++this.modules}.js`;
|
|
405
|
+
const epoch = this.s.codegen.epoch;
|
|
406
|
+
const source = module ?? this.compileNow(index, lazy);
|
|
407
|
+
const evaluated = builtin
|
|
408
|
+
? { factory: evaluateFunction(source, script), script }
|
|
409
|
+
: evaluate(source, script);
|
|
410
|
+
const mark = (value) => ({
|
|
411
|
+
...value,
|
|
412
|
+
lazy,
|
|
413
|
+
epoch,
|
|
414
|
+
});
|
|
415
|
+
return evaluated instanceof Promise ? evaluated.then(mark) : mark(evaluated);
|
|
416
|
+
};
|
|
417
|
+
if (!ready) {
|
|
418
|
+
const lazy = !builtin && this.s.lazyCompilation && supportsLazyCompilation();
|
|
419
|
+
const handed = lazy ? null : this.handover?.take(index, this.hashes);
|
|
420
|
+
if (handed) {
|
|
421
|
+
if (handed.url !== undefined) {
|
|
422
|
+
return this.importHanded(handed);
|
|
423
|
+
}
|
|
424
|
+
// Read only once taken: a worker on other ABCs never reads the SWF's.
|
|
425
|
+
const source = handed.module;
|
|
426
|
+
return typeof source === "string" || source === undefined
|
|
427
|
+
? compiled(source ?? "", false)
|
|
428
|
+
: source.text().then((text) => compiled(text, false));
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (!ready?.cached) {
|
|
432
|
+
return compiled(ready?.module, ready?.lazy ?? (!builtin && this.s.lazyCompilation && supportsLazyCompilation()));
|
|
433
|
+
}
|
|
434
|
+
if (ready.imported) {
|
|
435
|
+
return { factory: ready.imported.factory, script: ready.imported.url, cached: true };
|
|
436
|
+
}
|
|
437
|
+
const recompiled = () => {
|
|
438
|
+
this.refused(index);
|
|
439
|
+
this.discard(ready.key, ready.entry);
|
|
440
|
+
return compiled();
|
|
441
|
+
};
|
|
442
|
+
try {
|
|
443
|
+
const evaluated = compiled(ready.module, false);
|
|
444
|
+
return evaluated instanceof Promise
|
|
445
|
+
? evaluated.then((e) => ({ ...e, cached: true }), recompiled)
|
|
446
|
+
: { ...evaluated, cached: true };
|
|
447
|
+
}
|
|
448
|
+
catch {
|
|
449
|
+
return recompiled();
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* ABC `index`'s module, `evaluated`, loaded into the runtime's `domain`.
|
|
454
|
+
* A cached module that the runtime refuses before loading anything of
|
|
455
|
+
* it (its linked ABCs differ) is compiled now, as in evaluateAt, and
|
|
456
|
+
* evaluated by a Function, as a load cannot wait: on an engine whose
|
|
457
|
+
* frames name no Function's script, its code is the host's to
|
|
458
|
+
* codeDomain. One that loaded part of itself cannot be, and the load
|
|
459
|
+
* fails.
|
|
460
|
+
*/
|
|
461
|
+
loadAt(index, domain, builtin, evaluated, ready, origin) {
|
|
462
|
+
let script = evaluated.script;
|
|
463
|
+
const jit = evaluated.lazy
|
|
464
|
+
? methodCompiler(this.s, index, domain, script, evaluated.epoch)
|
|
465
|
+
: undefined;
|
|
466
|
+
const run = (factory) => this.s.rt.loadInto(domain, () => factory(this.s.rt, jit), builtin);
|
|
467
|
+
let linked;
|
|
468
|
+
if (!evaluated.cached || !ready) {
|
|
469
|
+
linked = run(evaluated.factory);
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
const loaded = domain.own.length;
|
|
473
|
+
try {
|
|
474
|
+
linked = run(evaluated.factory);
|
|
475
|
+
}
|
|
476
|
+
catch (e) {
|
|
477
|
+
this.discard(ready.key, ready.entry);
|
|
478
|
+
if (domain.own.length !== loaded) {
|
|
479
|
+
throw e;
|
|
480
|
+
}
|
|
481
|
+
this.refused(index);
|
|
482
|
+
script = `swf2es-${++this.modules}.js`;
|
|
483
|
+
linked = run(evaluateFunction(this.s.codegen.compileModule(this.hashes, index), script));
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (builtin) {
|
|
487
|
+
this.libraryScripts.add(script);
|
|
488
|
+
}
|
|
489
|
+
if (origin) {
|
|
490
|
+
const abc = linked;
|
|
491
|
+
this.moduleAbcs.set(script, new WeakRef(abc));
|
|
492
|
+
this.origins.set(abc, origin);
|
|
493
|
+
this.loadedUrls.add(origin.url);
|
|
494
|
+
this.moduleGone.register(abc, script);
|
|
495
|
+
}
|
|
496
|
+
return linked;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* ABC `index`'s module compiled now, `lazy` or whole, and journaled;
|
|
500
|
+
* with its log where it may be handed to a worker.
|
|
501
|
+
*/
|
|
502
|
+
compileNow(index, lazy) {
|
|
503
|
+
const codegen = this.s.codegen;
|
|
504
|
+
if (lazy) {
|
|
505
|
+
const module = codegen.compileLazyModule(this.hashes, index);
|
|
506
|
+
this.journal(`lazy ${index}`);
|
|
507
|
+
return module;
|
|
508
|
+
}
|
|
509
|
+
if (this.recorder?.open) {
|
|
510
|
+
const { module, log } = codegen.compileModuleLogged(this.hashes, index);
|
|
511
|
+
this.recorded(index, { text: module }, log);
|
|
512
|
+
return module;
|
|
513
|
+
}
|
|
514
|
+
const module = codegen.compileModule(this.hashes, index);
|
|
515
|
+
this.journal(`compile ${index}`);
|
|
516
|
+
return module;
|
|
517
|
+
}
|
|
518
|
+
/** A module handed by the primordial that it had imported, imported again from its URL. */
|
|
519
|
+
async importHanded(handed) {
|
|
520
|
+
const url = this.uniqueUrl(handed.url);
|
|
521
|
+
const factory = (await import(/* @vite-ignore */ /* webpackIgnore: true */ url)).default;
|
|
522
|
+
if (typeof factory !== "function") {
|
|
523
|
+
throw new Error(`swf2es: ${handed.url} is no module the player wrote`);
|
|
524
|
+
}
|
|
525
|
+
return { factory, script: url, cached: true };
|
|
526
|
+
}
|
|
527
|
+
/** The host's module cache, where it has one and the compiler has an identity to key it by. */
|
|
528
|
+
cache() {
|
|
529
|
+
return this.s.codegen.identity === null ? null : this.s.moduleCache;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* The modules of the ABCs at `indices`, in order, each from the cache if
|
|
533
|
+
* it holds one for the ABC's key, what its compile fixed in the
|
|
534
|
+
* compiler's domain replayed in its place, else compiled and given to
|
|
535
|
+
* the cache: the domain is as compiling each would have left it either
|
|
536
|
+
* way, which the next one's key names. An ABC smaller than
|
|
537
|
+
* MIN_CACHED_ABC is compiled, the cache not asked. Any error of the
|
|
538
|
+
* cache's is a miss.
|
|
539
|
+
*/
|
|
540
|
+
async prepare(indices) {
|
|
541
|
+
const cache = this.cache();
|
|
542
|
+
const ready = [];
|
|
543
|
+
await this.digestLibraries(indices[0]);
|
|
544
|
+
const smallest = cache?.minBytes ?? MIN_CACHED_ABC;
|
|
545
|
+
for (const index of indices) {
|
|
546
|
+
const lazy = !this.builtins[index] && this.s.lazyCompilation && supportsLazyCompilation();
|
|
547
|
+
if (this.sizes[index] < smallest) {
|
|
548
|
+
const module = this.compileNow(index, lazy);
|
|
549
|
+
ready.push({ module, key: null, cached: false, lazy });
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
// Read again by the key taken again if the read let another load
|
|
553
|
+
// change the compiler's domain, a few times at most.
|
|
554
|
+
let key = this.moduleKey(index);
|
|
555
|
+
let entry;
|
|
556
|
+
for (let tries = 0; cache && key !== null && tries < 3; tries++) {
|
|
557
|
+
const revision = this.s.codegen.revision();
|
|
558
|
+
const asked = key;
|
|
559
|
+
try {
|
|
560
|
+
entry = await read(cache, await sha256Text(asked), (url) => this.uniqueUrl(url));
|
|
561
|
+
}
|
|
562
|
+
catch {
|
|
563
|
+
entry = undefined;
|
|
564
|
+
}
|
|
565
|
+
if (this.s.codegen.revision() === revision) {
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
key = this.moduleKey(index);
|
|
569
|
+
if (key === asked) {
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
entry = undefined;
|
|
573
|
+
}
|
|
574
|
+
let failed = false;
|
|
575
|
+
if (key !== null && entry !== undefined) {
|
|
576
|
+
const { entry: cached, imported } = entry;
|
|
577
|
+
if (this.s.codegen.replay(cached.log, index)) {
|
|
578
|
+
this.recorded(index, cached.url === undefined ? { text: cached.module } : { url: cached.url }, cached.log);
|
|
579
|
+
ready.push({ module: cached.module, key, cached: true, entry: cached, imported });
|
|
580
|
+
continue;
|
|
581
|
+
}
|
|
582
|
+
// Done part way, the log left the domain as no compile would: the
|
|
583
|
+
// module compiled now is not that key's, and the entry goes.
|
|
584
|
+
this.unmodelled();
|
|
585
|
+
failed = true;
|
|
586
|
+
this.discard(key, cached);
|
|
587
|
+
}
|
|
588
|
+
if (lazy) {
|
|
589
|
+
ready.push({ module: this.compileNow(index, true), key, cached: false, lazy: true });
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
const { module, log } = this.s.codegen.compileModuleLogged(this.hashes, index);
|
|
593
|
+
this.recorded(index, { text: module }, log);
|
|
594
|
+
if (log !== null && !failed) {
|
|
595
|
+
this.store(key, module, log);
|
|
596
|
+
}
|
|
597
|
+
ready.push({ module, key, cached: false });
|
|
598
|
+
}
|
|
599
|
+
return ready;
|
|
600
|
+
}
|
|
601
|
+
/** Give the cache `module` and `log` under `key`'s hash, with their lengths, not waiting for it. */
|
|
602
|
+
store(key, module, log) {
|
|
603
|
+
const cache = this.cache();
|
|
604
|
+
if (cache && key !== null) {
|
|
605
|
+
const entry = { module, log, lengths: [module.length, log.length] };
|
|
606
|
+
sha256Text(key)
|
|
607
|
+
.then((k) => cache.put(k, entry))
|
|
608
|
+
.catch(() => { });
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/** Have the cache let go of `entry`, or what it holds, under `key`'s hash, not waiting for it. */
|
|
612
|
+
discard(key, entry) {
|
|
613
|
+
const cache = this.cache();
|
|
614
|
+
if (cache && key !== null) {
|
|
615
|
+
sha256Text(key)
|
|
616
|
+
.then((k) => cache.delete(k, entry))
|
|
617
|
+
.catch(() => { });
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Take the digest of the log's entries made while only the libraries
|
|
622
|
+
* were added, once a compiler's epoch, with ABC `index`, any but theirs:
|
|
623
|
+
* some hundred thousand characters of the context, which keyed into each
|
|
624
|
+
* module's key took milliseconds a module.
|
|
625
|
+
*/
|
|
626
|
+
async digestLibraries(index) {
|
|
627
|
+
const count = this.libraryCount;
|
|
628
|
+
const epoch = this.s.codegen.epoch;
|
|
629
|
+
if (count === null || index === undefined || this.libraryLog?.epoch === epoch) {
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
const digest = await sha256Text(libraryLog(this.s.codegen, index, count));
|
|
633
|
+
this.libraryLog = { epoch, digest };
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* ABC `index`'s key, as codegen's moduleKey writes it (the swf2es command
|
|
637
|
+
* keys its modules alike), the libraries' part by its digest once this
|
|
638
|
+
* compiler's epoch has one. Null where there is none.
|
|
639
|
+
*/
|
|
640
|
+
moduleKey(index) {
|
|
641
|
+
const libraries = this.libraryCount !== null && this.libraryLog?.epoch === this.s.codegen.epoch
|
|
642
|
+
? { count: this.libraryCount, digest: this.libraryLog.digest }
|
|
643
|
+
: null;
|
|
644
|
+
return moduleKey(this.s.codegen, index, { hashes: this.hashes, builtins: this.builtins }, libraries);
|
|
645
|
+
}
|
|
646
|
+
/** An ApplicationDomain object for the runtime's `domain`: a new one at each ask, as Flash's, without running its constructor. */
|
|
647
|
+
applicationDomainOf(domain) {
|
|
648
|
+
const object = this.s.rt.classNamed("flash.system::ApplicationDomain").$it.instance();
|
|
649
|
+
object.$domain = domain;
|
|
650
|
+
return object;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* The domain of the code that asks (Runtime.codeDomain): the main SWF's
|
|
654
|
+
* when no SWF's code is on the stack, only the player's.
|
|
655
|
+
*/
|
|
656
|
+
codeDomain() {
|
|
657
|
+
const domain = this.s.rt.codeDomain();
|
|
658
|
+
return domain === this.s.rt.root ? this.s.mainDomain : domain;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* The URL of the SWF whose code asks, the innermost on the stack, as
|
|
662
|
+
* Flash's code context has it; the main SWF's when only the player's is.
|
|
663
|
+
*/
|
|
664
|
+
codeUrl() {
|
|
665
|
+
return this.codeOrigin(new Error().stack)?.url ?? this.s.url;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* The URL of the SWF whose code called a gated native, for a security
|
|
669
|
+
* check; null where that cannot be told, never the main SWF's for want
|
|
670
|
+
* of better. `own` counts the player's frames between this one and the
|
|
671
|
+
* native, the native's included. See callingScript for what is read.
|
|
672
|
+
*
|
|
673
|
+
* The frame accounting assumes every call keeps its frame: an engine
|
|
674
|
+
* that elides tail calls (JavaScriptCore's proper tail calls) would drop
|
|
675
|
+
* the runtime's frames, `return f(...)` all of them, and a call through
|
|
676
|
+
* a function value would look direct. The runtime keeps its frames now,
|
|
677
|
+
* calling in no tail position, and a SWF's module names its script on
|
|
678
|
+
* JavaScriptCore too, but the libraries' modules do not there: a frame
|
|
679
|
+
* that names none may be a native's as well as a library's. So
|
|
680
|
+
* callingScript reads V8's stacks alone, and fails closed on any other
|
|
681
|
+
* engine's, until the libraries name their scripts as well.
|
|
682
|
+
*/
|
|
683
|
+
callerUrl(own) {
|
|
684
|
+
const stack = wholeStack();
|
|
685
|
+
const script = stack === null
|
|
686
|
+
? null
|
|
687
|
+
: callingScript(stack,
|
|
688
|
+
// wholeStack's frame and this one, then the player's.
|
|
689
|
+
2 + own, { isModule: (s) => this.isModule(s), isLibrary: (s) => this.libraryScripts.has(s) }, this.byNameChain());
|
|
690
|
+
if (script === null) {
|
|
691
|
+
return null;
|
|
692
|
+
}
|
|
693
|
+
const abc = this.moduleAbcs.get(script)?.deref();
|
|
694
|
+
return (abc && this.origins.get(abc)?.url) ?? null;
|
|
695
|
+
}
|
|
696
|
+
/** The runtime's frames of a call by name to a global function, measured once; null where they cannot be. */
|
|
697
|
+
byName;
|
|
698
|
+
/**
|
|
699
|
+
* The exact sites of the runtime's frames between a SWF's frame and a
|
|
700
|
+
* library's global function it calls by name, `fscommand(...)`, which
|
|
701
|
+
* reaches it as Runtime.call, then callValue, then the method closure's
|
|
702
|
+
* wrapper: found by making such a call to a probe of the player's own,
|
|
703
|
+
* so they are this build's, minified or not. Null where the probe does
|
|
704
|
+
* not see them as expected, which no call then matches.
|
|
705
|
+
*/
|
|
706
|
+
byNameChain() {
|
|
707
|
+
if (this.byName !== undefined) {
|
|
708
|
+
return this.byName;
|
|
709
|
+
}
|
|
710
|
+
let stack = null;
|
|
711
|
+
const probe = () => {
|
|
712
|
+
stack = wholeStack();
|
|
713
|
+
};
|
|
714
|
+
const holder = { proto: { [avm2.methodKey(0)]: probe } };
|
|
715
|
+
this.s.rt.call(this.s.rt.methodClosure(undefined, holder, 0), null);
|
|
716
|
+
// wholeStack, the probe, the wrapper, callValue, call, then this.
|
|
717
|
+
const sites = stack === null ? [] : avm2.frameSites(stack);
|
|
718
|
+
const here = sites[0] === undefined || sites[0] === null ? null : avm2.siteScript(sites[0]);
|
|
719
|
+
const chain = sites.slice(2, 5);
|
|
720
|
+
const valid = here !== null &&
|
|
721
|
+
chain.length === 3 &&
|
|
722
|
+
chain.every((site) => site !== null && !this.isModule(avm2.siteScript(site) ?? "")) &&
|
|
723
|
+
sites[1] !== null &&
|
|
724
|
+
avm2.siteScript(sites[1] ?? "") === here &&
|
|
725
|
+
avm2.siteScript(sites[5] ?? "") === here;
|
|
726
|
+
this.byName = valid ? chain : null;
|
|
727
|
+
return this.byName;
|
|
728
|
+
}
|
|
729
|
+
/** Whether `script` names a module the player loaded, a SWF's or a library's. */
|
|
730
|
+
isModule(script) {
|
|
731
|
+
return this.libraryScripts.has(script) || this.moduleAbcs.has(script);
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* The URLs of every SWF whose code was ever loaded in the player, the
|
|
735
|
+
* main SWF's among them: those whose code may be calling. Never fewer:
|
|
736
|
+
* an unloaded SWF's timers and closures outlive its modules, which are
|
|
737
|
+
* held weakly, and still run its code. Strings alone, so it costs little.
|
|
738
|
+
*/
|
|
739
|
+
everUrls() {
|
|
740
|
+
return [...new Set([this.s.url, ...this.loadedUrls])];
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Whom a security check asks about, `own` being the player's frames
|
|
744
|
+
* above the caller's, the native's included (callerUrl): the calling SWF's URL, or, where the
|
|
745
|
+
* caller cannot be told, every SWF's ever loaded, each of which must
|
|
746
|
+
* pass, so that a check fails closed rather than taking the main SWF's word.
|
|
747
|
+
*/
|
|
748
|
+
securityUrls(own) {
|
|
749
|
+
const caller = this.callerUrl(own + 1);
|
|
750
|
+
return caller === null ? this.everUrls() : [caller];
|
|
751
|
+
}
|
|
752
|
+
/** The SWF whose code called a playerglobal native. */
|
|
753
|
+
codeLibrary() {
|
|
754
|
+
return this.codeOrigin(new Error().stack)?.library ?? this.s.library;
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Where the innermost SWF's code on `stack` came from, if any SWF's is.
|
|
758
|
+
* The stack is the caller's: a frame more of the player's would push the
|
|
759
|
+
* SWF's out of the engine's stackTraceLimit frames sooner.
|
|
760
|
+
*/
|
|
761
|
+
codeOrigin(stack) {
|
|
762
|
+
for (const at of avm2.frameScripts(stack)) {
|
|
763
|
+
const abc = this.moduleAbcs.get(at)?.deref();
|
|
764
|
+
const origin = abc && this.origins.get(abc);
|
|
765
|
+
if (origin) {
|
|
766
|
+
return origin;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
return undefined;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* The smallest ABC, in bytes, whose module is looked for in the cache.
|
|
774
|
+
* Measured in Chrome, medians of nine, a module's key, read and replay
|
|
775
|
+
* against its compile, the libraries' digest (1.7 ms, once a player) left
|
|
776
|
+
* out: 1 KB 0.5 ms against 0.3, 2.4 KB 0.5 against 0.6, 4.3 KB 0.6
|
|
777
|
+
* against 1.0, 6.8 KB 0.9 against 1.5, 12 KB 0.9 against 2.4, 31 KB 1.5
|
|
778
|
+
* against 6.0, 128 KB 4.3 against 27, 517 KB 33 against 133. Below 8 KB
|
|
779
|
+
* the cache would save half a millisecond at most, for a read of a
|
|
780
|
+
* database that may first have to open and a write.
|
|
781
|
+
*/
|
|
782
|
+
const MIN_CACHED_ABC = 8 * 1024;
|
|
783
|
+
/**
|
|
784
|
+
* Whether `entry` is a module and a log of the lengths stored with them: a
|
|
785
|
+
* write cut short at a line's end is a shorter log. A module to import is
|
|
786
|
+
* not read, and its import is what tells whether it is whole.
|
|
787
|
+
*/
|
|
788
|
+
function whole(entry) {
|
|
789
|
+
return (typeof entry.log === "string" &&
|
|
790
|
+
Array.isArray(entry.lengths) &&
|
|
791
|
+
entry.lengths[1] === entry.log.length &&
|
|
792
|
+
(entry.url === undefined
|
|
793
|
+
? typeof entry.module === "string" && entry.lengths[0] === entry.module.length
|
|
794
|
+
: typeof entry.url === "string"));
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* What `cache` holds under `key`, if it is whole, its module imported
|
|
798
|
+
* first if it has a URL, from `unique(url)`. An entry that is not whole,
|
|
799
|
+
* or does not import, is deleted and asked for again once: a chain of
|
|
800
|
+
* caches then answers from the next that holds it (see chainCaches).
|
|
801
|
+
*/
|
|
802
|
+
async function read(cache, key, unique) {
|
|
803
|
+
for (let tries = 0; tries < 2; tries++) {
|
|
804
|
+
const entry = await cache.get(key);
|
|
805
|
+
if (entry === undefined) {
|
|
806
|
+
return undefined;
|
|
807
|
+
}
|
|
808
|
+
if (whole(entry)) {
|
|
809
|
+
if (entry.url === undefined) {
|
|
810
|
+
return { entry };
|
|
811
|
+
}
|
|
812
|
+
try {
|
|
813
|
+
const url = unique(entry.url);
|
|
814
|
+
const factory = (await import(/* @vite-ignore */ /* webpackIgnore: true */ url)).default;
|
|
815
|
+
if (typeof factory === "function") {
|
|
816
|
+
return { entry, imported: { factory, url } };
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
catch {
|
|
820
|
+
// Deleted, as an entry cut short is.
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
try {
|
|
824
|
+
await cache.delete(key, entry);
|
|
825
|
+
}
|
|
826
|
+
catch {
|
|
827
|
+
return undefined;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return undefined;
|
|
831
|
+
}
|
|
832
|
+
/** The SHA-256 of `text`'s UTF-8, a cache key of fixed length however many ABCs it names. */
|
|
833
|
+
function sha256Text(text) {
|
|
834
|
+
return sha256(new TextEncoder().encode(text));
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* The whole stack here, the engine's frame limit lifted for this capture;
|
|
838
|
+
* null where the limit cannot be lifted, as on a page that froze Error
|
|
839
|
+
* (SES lockdown), so that a check fails closed rather than throws.
|
|
840
|
+
*/
|
|
841
|
+
function wholeStack() {
|
|
842
|
+
const engine = Error;
|
|
843
|
+
const limit = engine.stackTraceLimit;
|
|
844
|
+
try {
|
|
845
|
+
engine.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
846
|
+
}
|
|
847
|
+
catch {
|
|
848
|
+
return null;
|
|
849
|
+
}
|
|
850
|
+
try {
|
|
851
|
+
return engine.stackTraceLimit === Number.POSITIVE_INFINITY ? (new Error().stack ?? null) : null;
|
|
852
|
+
}
|
|
853
|
+
finally {
|
|
854
|
+
engine.stackTraceLimit = limit;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* The script a SWF's code called a gated native from, read from a whole
|
|
859
|
+
* V8 stack: past `own` frames of the player's (none a module's, or the
|
|
860
|
+
* count is off), past the library function it called, ExternalInterface's
|
|
861
|
+
* `call` say, the next frame must be a SWF module's, the SWF calling it
|
|
862
|
+
* directly; or `byName`'s three runtime frames exactly, then a SWF's, a
|
|
863
|
+
* global function such as fscommand called by its name. Anything else
|
|
864
|
+
* there, the player's or the runtime's code calling a function value (a
|
|
865
|
+
* dispatchEvent's listener, an Array's forEach or sort, `.call`,
|
|
866
|
+
* `.apply`, `o.f()`), or a frame line it cannot read, is no one's: null.
|
|
867
|
+
* So is any other engine's stack: JavaScriptCore's, whose libraries'
|
|
868
|
+
* frames name no script, and SpiderMonkey's, which reads the same.
|
|
869
|
+
*/
|
|
870
|
+
export function callingScript(stack, own, modules, byName) {
|
|
871
|
+
// V8's frames are " at" lines, as avm2.frameSites tells them.
|
|
872
|
+
if (!stack.split("\n").some((line) => /^\s*at /.test(line))) {
|
|
873
|
+
return null;
|
|
874
|
+
}
|
|
875
|
+
const sites = avm2.frameSites(stack);
|
|
876
|
+
const scripts = sites.map((site) => (site === null ? null : avm2.siteScript(site)));
|
|
877
|
+
const swf = (script) => script !== null &&
|
|
878
|
+
script !== undefined &&
|
|
879
|
+
modules.isModule(script) &&
|
|
880
|
+
!modules.isLibrary(script);
|
|
881
|
+
if (scripts.length <= own ||
|
|
882
|
+
scripts.slice(0, own).some((script) => script === null || modules.isModule(script))) {
|
|
883
|
+
return null;
|
|
884
|
+
}
|
|
885
|
+
let at = own;
|
|
886
|
+
while (at < scripts.length && modules.isLibrary(scripts[at] ?? "")) {
|
|
887
|
+
at++;
|
|
888
|
+
}
|
|
889
|
+
if (swf(scripts[at])) {
|
|
890
|
+
return scripts[at];
|
|
891
|
+
}
|
|
892
|
+
const called = at > own;
|
|
893
|
+
if (called && byName?.every((site, i) => sites[at + i] === site)) {
|
|
894
|
+
const below = scripts[at + byName.length];
|
|
895
|
+
return swf(below) ? below : null;
|
|
896
|
+
}
|
|
897
|
+
return null;
|
|
898
|
+
}
|
|
899
|
+
/** The script each frame of a stack names, for security checks: see avm2.stackFrames. */
|
|
900
|
+
export const frameLocations = avm2.stackFrames;
|
|
901
|
+
//# sourceMappingURL=code.js.map
|