-
Notifications
You must be signed in to change notification settings - Fork 0
/
as3vm-0.3.3.min.js
120 lines (120 loc) · 57.3 KB
/
as3vm-0.3.3.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/**
* as3vm is (C) 2012 uxebu Inc.
*
* No permission or right to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software is granted.
* All rights reserved to the copyright holders.
*/
(function(){function La(a,b,c){if(b.hasOptionalParameters)return c.option.map(function(b){return a.getConstant(b.kind,b.value)})}function Ma(a,b){return b.map(function(b){return 0===b?"*":a.multinames[b]})}function Na(a,b,c){if(b.hasParameterNames)return c.map(function(b){return a.strings[b]})}function ba(a){this.name=a}function ca(a){this.name=a}function da(a){this.name=a}function ea(a){this.name=a}function fa(a){this.name=a}function ga(a){this.name=a}function ha(a){this.name=a}function h(a,b){this.namespace=
a;this.name=b}function u(a){this.name=a}function v(){}function k(a,b){this.namespaceSet=a;this.name=b}function w(a){this.namespaceSet=a}function n(a,b){this.type=a;this.parameter=b}function pa(a,b,c){if(!c.hasOwnProperty("__interfaces__")){var d=c.__proto__;c.__interfaces__=d&&d.__interfaces__?d.__interfaces__.slice():[]}c.__interfaces__.push(b);b.__interfaces__&&b.__interfaces__.forEach(function(b){pa(a,b,c)});var e=b.prototype;Object.getOwnPropertyNames(e).forEach(function(a){var b=Object.getOwnPropertyDescriptor(e,
a);if((b=b&&(b.value||b.get||b.set))&&b.__isMethod__)b=qa.parse(a),a=b.name,b=b.toProperty(),a=Oa(a),Object.defineProperty(c,b,a)})}function Pa(a,b,c,d){var e=function(){};b.createObjectFromTraits(d.traits,e.prototype,c.scope);e.__interfaces__=d.interfaces.map(function(d){return ia(a,b,c,d)});e.__is__=function(a){return a&&a.__interfaces__&&-1!==a.__interfaces__.indexOf(e)};return e}function Qa(a,b){var c;a.abcs.some(function(a){return a.instances.some(function(a){if(b.match(a.name))return c=a,!0})});
return c}function ia(a,b,c,d){if(ja.__has__(d))return ja.__get__(d);var e=a.getType(d);if(e)a=qa.parse(e.__name__);else{var f=Qa(a,d);if(!f)throw new TypeError("Cannot find interface "+d);e=Pa(a,b,c,f);a=f.name}ja.__set__(a,e);return e}function Oa(a){return{get:function(){return this[a]},set:function(b){this[a]=b}}}function ka(a){this.namespaces=a}function W(){}function Ra(a,b){for(var c={},d,e,f,g;a&&a.__traits__;){if(a.hasOwnProperty("__traits__")){d=0;for(g=a.__traits__;e=g[d];d+=1)e.isSlot&&(f=
e.name.toProperty(),e=b.coerceTraitValue(e),c[f]=null===e?Sa:void 0===e?Ta:0===e?Ua:e!==e?Va:{value:e,writable:!0})}a=Object.getPrototypeOf(a)}return c}function ra(a){for(var b=a,a=!1;!a;)a=Object.getOwnPropertyNames(b).some(function(a){a=b[a];return!a||!a.__method__?void 0:a.__method__===this.vm.currentMethod},this),b=b.__proto__;return b}function Wa(a){Object.defineProperties(a,{__deleteProperty__:{enumerable:!1,value:function(a){return a.deleteFrom(this)},writable:!1},__get__:{enumerable:!1,value:function(a){return a.getFrom(this)},
writable:!1},__getUnbound__:{enumerable:!1,value:function(a){return a.getUnboundFrom(this)},writable:!1},__has__:{enumerable:!1,value:function(a){return a.inObject(this)},writable:!1},__set__:{enumerable:!1,value:function(a,c){a.setIn(this,c)},writable:!1}})}function Xa(a){var b=Ya.exports.tools.expando;Object.defineProperties(a,{__deleteProperty__:{enumerable:!1,value:function(a){if(isNaN(Number(a.name)))return Object.prototype.__deleteProperty__.call(this,a);delete this[b].data[a.name]},writable:!1},
__get__:{enumerable:!1,value:function(a){if(isNaN(Number(a.name)))return Object.prototype.__get__.call(this,a);if(!this.__has__(a))throw RangeError("Error #1125: The index is ouf of range");return this[b].data[a.name]},writable:!1},__has__:{enumerable:!1,value:function(a){return isNaN(Number(a.name))?Object.prototype.__get__.call(this,a):this[b].data.hasOwnProperty(a.name)},writable:!1},__set__:{enumerable:!1,value:function(a,b){if(isNaN(Number(a.name)))return Object.prototype.__set__.call(this,a,
b);this.__setIndex__.call(this,a.name,b)},writable:!1}})}function sa(a,b,c){c=c||[];Object.keys(a).forEach(function(d){var e=a[d];e&&"undefined"!==typeof e.__isNamespace__?sa(e,b,c.concat(d)):(e&&e.__isBuiltIn__&&e.prototype&&Za(e),d=la.fromStrings(c.join("."),d),e&&e.__isClass__&&Object.defineProperties(e,{__name__:{value:d.name},__qualifiedName__:{value:d.toString()}}),b.__set__(d,e))})}function $a(a){return Object.getOwnPropertyNames(a.prototype).filter(ab).filter(function(b){return"function"===
typeof a.prototype[b]})}function ab(a){return"constructor"!==a&&0!==a.indexOf("__")}function Za(a){$a(a).forEach(function(b){var c=a.prototype[b],b=la.fromStrings("http://adobe.com/AS3/2006/builtin",b);Object.defineProperty(a.prototype,b.toProperty(),{enumerable:!1,value:c})})}function ta(a){this.global=a.global;this.scopes=a.scopes.slice(0)}function A(a){this.global=a;this.localOffset=0;this.scopes=[]}function ua(a,b){this.global=bb(b);this.hooks={};this.abcs=a.map(function(a){return a(this)},this);
var c=this;Object.defineProperty(this.global,"__has__",{value:function(a){c.abcs.some(function(b){return b.hasType(a)});if(a.isTypename){if(c.getType(a.type)!==this.Vector)throw new TypeError("Error #1010: Unable to create non-Vector<T> types");var b=this.VectorFactory(c.getType(a.parameter)),f=a.toString();Object.defineProperties(b,{__name__:{value:f},__qualifiedName__:{value:f}});this.__set__(a,b)}return Object.prototype.__has__.call(this,a)}})}function X(a){return"string"===typeof a?cb.QName.fromSymbolClass(a):
a}function va(){var a=function(a,c,d,e){this.name=a;this.slotId=c;this.typeName=d;this.value=e};a.create=function(b,c,d,e){var d=e.slot_id,f=e.type_name,g=e.vkind,e=e.vindex,q,h;0!==f&&(q=b.multinames[f]);g&&(h=b.getConstant(g,e));return new a(c,d,q,h)};return a}function B(a,b,c){this.name=a;this.slotId=b;this.klass=c}function Y(a,b,c){this.name=a;this.slotId=b;this.method=c}function C(a,b,c,d){this.name=a;this.dispatchId=b;this.value=this.method=c;d&&(this.isFinal=d.isFinal,this.isOverride=d.isOverride)}
function D(a,b,c,d){this.name=a;this.dispatchId=b;this.value=this.method=c;d&&(this.isFinal=d.isFinal,this.isOverride=d.isOverride)}function E(a,b,c,d){this.name=a;this.dispatchId=b;this.value=this.method=c;d&&(this.isFinal=d.isFinal,this.isOverride=d.isOverride)}function db(a,b){return b.map(function(b){return eb.create(a,b)})}function fb(a,b){return b["interface"].map(function(b){return a.multinames[b]})}function gb(a,b){return b.map(function(b){return hb.create(a,b)})}function ib(a,b){return b.map(function(b){return jb.create(a,
b)})}function kb(a,b){return b.map(function(b){return lb.create(a,b)})}function wa(a,b,c,d){this.abcFile=b;this.currentMethod=(this.body=c)?c.code:{};this.signature=d;this.toplevel=a}function mb(a,b,c,d){var e=c.parameters.length;c.optionalParameters&&ma.setDefaults(b,c.optionalParameters,e);c.needsRestArguments&&(b=ma.convertRest(b,e));b=b.map(function(a,b){return d.coerce(c.parameters[b],a)});c.needsArguments&&(b=b.slice(0,c.parameters.length).concat([b.slice(0)]));return ma.toRegisters(a,b)}function Z(a,
b,c){this.abcFile=a;this.executed=!1;this.method=b;this.traits=c;this.scope=new nb(this.abcFile.toplevel.global)}function ob(a,b){return b.map(function(b){return pb.create(a,b)})}function x(a,b,c){this.toplevel=a;this.version={major:b.major_version,minor:b.minor_version};this.strings=b.constant_pool.string;this.integers=b.constant_pool.integer.map(Number);this.uintegers=b.constant_pool.uinteger.map(Number);this.doubles=b.constant_pool["double"].map(Number);this.namespaces=qb(this,b.constant_pool.namespace);
this.namespaceSets=rb(this,b.constant_pool.ns_set);this.multinames=sb(this,b.constant_pool.multiname);tb(this);this.methodSignatures=ub(this,b.method_info);this.methodBodies=vb(this,b.method_body_info);this.methods=wb(this,c);this.classes=xb(this,b.class_info);this.instances=yb(this,b.instance_info);this.scripts=zb(this,b.script_info)}function qb(a,b){return[null].concat(b.slice(1).map(function(b){return Ab.create(a,b)}))}function rb(a,b){return[null].concat(b.slice(1).map(function(b){return Bb.create(a,
b)}))}function sb(a,b){return[null].concat(b.slice(1).map(function(b){return Cb.create(a,b)}))}function tb(a){a.multinames.slice(1).filter(function(a){return a.isTypename}).forEach(function(b){b.resolveType(a)})}function ub(a,b){return b.map(function(b){return Db.create(a,b)})}function vb(a,b){return b.map(function(b){return Eb.create(a,b)})}function wb(a,b){b&&a.methodBodies.forEach(function(a,d){a.code=b[d];b[d].methodBody=a});return a.methodSignatures.map(function(b){var d=a.getMethodBodyBySignature(b);
return new Fb(a.toplevel,a,d,b)})}function xb(a,b){return b.map(function(b){return Gb.create(a,b)})}function yb(a,b){return b.map(function(b){return Hb.create(a,b)})}function zb(a,b){return b.map(function(b){return Ib.create(a,b)})}function t(a){return this.namespaces[a]}var y={},xa={DefaultValue:function(a,b){if("String"===b){if("function"==typeof a.toString){var c=a.toString();if(null==c||"string"==typeof c||"boolean"==typeof c||"number"==typeof c)return c}if("function"==typeof a.valueOf&&(c=a.valueOf(),
null==c||"string"==typeof c||"boolean"==typeof c||"number"==typeof c))return c;throw new TypeError("Ecma.DefaultValue: unable to get the default value for hint String");}if("Number"===b||!b){if("function"==typeof a.valueOf&&(c=a.valueOf(),null==c||"string"==typeof c||"boolean"==typeof c||"number"==typeof c)||"function"==typeof a.toString&&(c=a.toString(),null==c||"string"==typeof c||"boolean"==typeof c||"number"==typeof c))return c;throw new TypeError("Ecma.DefaultValue: unable to get the default value for hint Number");
}throw Error("WTF? hint should always be Number or String");},ToPrimitive:function(a,b){return null==a||"object"!=typeof a?a:xa.DefaultValue(a,b)},ToNumber:function(a){return+a},ToBoolean:function(a){return!!a},ToInt32:function(a){return a|0},ToString:function(a){return""+a},ToUint32:function(a){return a>>>0},Type:function(a){return void 0===a?"undefined":null===a?"null":"boolean"==typeof a?"boolean":"number"==typeof a?"number":"string"==typeof a?"string":"object"}};y.module$exports=xa;y.module$exports&&
(y=y.module$exports);var F={},i=y;F.module$exports={explicitlyCoerce:function(a,b,c){var d=!1;switch(typeof a){case "undefined":a=null;break;case "string":b!=c.Object&&b!=c.String&&(d="string");break;case "number":b!=c.Object&&b!=c.Number&&(d="number");break;case "boolean":b!=c.Object&&b!=c.Boolean&&(d="boolean");break;case "object":case "function":case "xml":null!==a&&(a instanceof b||(d="object"))}if(d)throw new TypeError("Error #1034: Value of type "+d+" can not be coerced to target type");return a},
applyClassCoercion:function(a,b,c,d){if(b.__isClass__){var e=null;switch(b instanceof d.Error?d.Error:b){case d.Boolean:case d.String:case d.Number:case d.RegExp:case d["int"]:case d.uint:case d.Function:case d.Error:case d.Namespace:e=b.apply(a,c);break;case d.Array:if(1==c.length&&"number"==typeof c[0]){d=c[0];if(d%1)throw new RangeError("Error #1005: new Array does not accept a single fraction number for initialization");if(0>d)throw new RangeError("Error #1005: new Array does not accept a single negative number for initialization");
if(isNaN(d))throw new RangeError("Error #1005: new Array does not accept a NaN for initialization");}e=b.apply(a,c);break;default:if(1!=c.length)throw new TypeError("Error #1112: Argument count mismatch on class coercion. Expected 1, got "+c.length);e=this.explicitlyCoerce(c[0],b,d)}return e}console.warn("as3vm/coerce.js:applyClassCoercion:please report this error to peter and how/where you got it")},safeCoercion:function(a,b,c,d){switch(d){case "string":return c(i.ToString(a),i.ToString(b));case "number":return c(i.ToNumber(a),
i.ToNumber(b));case "boolean":return c(i.ToBoolean(a),i.ToBoolean(b));case "add":return a=i.ToPrimitive(a),b=i.ToPrimitive(b),"string"==typeof a||"string"==typeof b?c(i.ToString(a),i.ToString(b),c):c(i.ToNumber(a),i.ToNumber(b),c);case "equals":return this.coerceForEquals(a,b,c)}if(d&&"compare"!=d)throw"op.js: safeCoercion: unexpected hint ["+d+"]";return this.coerceForComparison(a,b,c)},coerceForComparison:function(a,b,c){var a=i.ToPrimitive(a,"Number"),b=i.ToPrimitive(b,"Number"),d=i.Type(a),e=
i.Type(b);if("string"!=d||"string"!=e)a=i.ToNumber(a),b=i.ToNumber(b);return c(a,b)},coerceForEquals:function(a,b,c){if(a===b)return c(a,b);var d=i.Type(a),e=i.Type(b);return d===e||null==a&&null==b?c(a,b):"number"==d&&"string"==e?this._coerceForEquals(a,i.ToNumber(b),c):"string"==d&&"number"==e||"boolean"==d?this._coerceForEquals(i.ToNumber(a),b,c):"boolean"==e?this._coerceForEquals(a,i.ToNumber(b),c):("number"==d||"string"==d)&&"object"==e?this._coerceForEquals(a,i.ToPrimitive(b),c):"object"==d&&
("number"==e||"string"==e)?this._coerceForEquals(i.ToPrimitive(a),b,c):!1}};F.module$exports&&(F=F.module$exports);var r={};r.module$exports=Function("return this")();r.module$exports&&(r=r.module$exports);var G={},Jb=r;G.module$exports={create:function(a,b){var c=Jb.exports.tools.hitch,d=c(a,b);Object.defineProperties(d,{__isMethodClosure__:{value:!0},apply:{value:c(d,d.apply)},call:{value:c(d,d.call)}});return d},shouldCreate:function(a,b){return b&&b.__isMethod__}};G.module$exports&&(G=G.module$exports);
var H={},ya={create:function(a,b){var c=Ma(a,b.param_type),d=a.multinames[b.return_type],e;e=b.name;e=0!==e?a.strings[e]:void 0;var f={needsArguments:!!(b.flags&1),needsActivation:!!(b.flags&2),needsRestArguments:!!(b.flags&4),hasOptionalParameters:!!(b.flags&8),usesDxns:!!(b.flags&64),hasParameterNames:!!(b.flags&128)},g=La(a,f,b.options),q=Na(a,f,b.param_names);return new Kb(c,d,e,f,g,q)}},Kb=ya.MethodSignature=function(a,b,c,d,e,f){this.parameters=a;this.returnType=b;this.name=c;this.needsArguments=
d.needsArguments;this.needsActivation=d.needsActivation;this.needsRestArguments=d.needsRestArguments;this.usesDxns=d.usesDxns;this.optionalParameters=e;this.parameterNames=f};H.module$exports=ya;H.module$exports&&(H=H.module$exports);var z={};ba.prototype={isPublicNamespace:function(){return""===this.name},match:function(a){return this.name===a.name},toString:function(){return this.name}};ca.prototype={isPublicNamespace:function(){return""===this.name},match:function(a){return this.name===a.name},
toString:function(){return this.name}};da.prototype={isPublicNamespace:function(){return!1},match:function(a){return this.name===a.name},toString:function(){return this.name}};ea.prototype={isPublicNamespace:function(){return!1},match:function(a){return this.name===a.name},toString:function(){return this.name}};fa.prototype={isPublicNamespace:function(){return!1},match:function(a){return this.name===a.name},toString:function(){return this.name}};ga.prototype={isPublicNamespace:function(){return!1},
match:function(a){return this.name===a.name},toString:function(){return this.name}};ha.prototype={isPublicNamespace:function(){return!1},match:function(a){return this.name===a.name},toString:function(){return this.name}};var Lb={8:ba,22:ca,23:da,24:ea,25:fa,26:ga,5:ha};z.module$exports={create:function(a,b){var c=b.name;return new Lb[b.kind](0!==c?a.strings[c]:"")},Namespace:ba,PackageNamespace:ca,PackageInternalNamespace:da,ProtectedNamespace:ea,ExplicitNamespace:fa,StaticProtectedNamespace:ga,PrivateNamespace:ha};
z.module$exports&&(z=z.module$exports);var m={},za=G,Aa=z;h.create=function(a,b){return new h(a.namespaces[b.ns],a.strings[b.name])};h.fromStrings=function(a,b){var c=""===a?new Aa.PackageNamespace(""):new Aa.Namespace(a);return new h(c,b)};h.fromSymbolClass=function(a){var b=a.split("."),a=b.pop(),b=b.join(".");return h.fromStrings(b,a)};h.parse=function(a){var b=a.split("\u03bb"),a=b.pop(),b=b.join("\u03bb");return h.fromStrings(b,a)};h.prototype.deleteFrom=function(a){var b=this.toProperty(),c=
Object.getOwnPropertyDescriptor(a,b);return c&&c.configurable?delete a[b]:!1};h.prototype.getFrom=function(a){var b=this.getUnboundFrom(a);za.shouldCreate(a,b)&&(b=za.create(a,b),this.setIn(a,b,{}));return b};h.prototype.getUnboundFrom=function(a){var b=this.toProperty();return a[b]};h.prototype.inObject=function(a){return this.toProperty()in Object(a)};h.prototype.isPublic=function(){return this.namespace.isPublicNamespace()};h.prototype.match=function(a){return this.name===a.name&&this.namespace.match(a.namespace)};
h.prototype.resolve=function(){return this};h.prototype.setIn=function(a,b,c){c?(c.value=b,Object.defineProperty(a,this.toProperty(),c)):a[this.toProperty()]=b};h.prototype.toProperty=function(){return this.isPublic()?this.name:this.namespace.name+"\u03bb"+this.name};h.prototype.toString=function(){return this.isPublic()?this.name:this.namespace+"."+this.name};u.create=function(a,b){return new u(a.strings[b.name])};u.prototype.resolve=function(a){a=a.pop();return new h(a,this.name)};v.create=function(){return new v};
v.prototype.resolve=function(a){var b=a.pop(),a=a.pop();return new h(a,b)};k.create=function(a,b){return new k(a.namespaceSets[b.ns_set],a.strings[b.name])};k.prototype.deleteFrom=function(a){var b=!0;this.qnames().some(function(c){if(c.inObject(a))return b=c.deleteFrom(a),!0});return b};k.prototype.getFrom=function(a){var b;this.qnames().some(function(c){if(c.inObject(a))return b=c.getFrom(a),!0},this);return b};k.prototype.getUnboundFrom=function(a){var b;this.qnames().some(function(c){if(c.inObject(a))return b=
c.getUnboundFrom(a),!0},this);return b};k.prototype.inObject=function(a){return this.qnames().some(function(b){return b.inObject(a)})};k.prototype.match=function(a){return this.name===a.name&&this.namespaceSet.match(a.namespace)};k.prototype.resolve=function(){return this};k.prototype.setIn=function(a,b,c){if(!this.qnames().some(function(d){if(d.inObject(a)||d.isPublic())return d.setIn(a,b,c),!0}))throw new TypeError("Cannot find property '"+this+"' in object");};k.prototype.toString=function(){return this.namespaceSet+
"."+this.name};k.prototype.qnames=function(){return this.namespaceSet.namespaces.map(function(a){return new h(a,this.name)},this)};w.create=function(a,b){return new w(a.namespaceSets[b.ns_set])};w.prototype.resolve=function(a){a=a.pop();return new k(this.namespaceSet,a)};n.create=function(a,b){var c=new n;c.typeIndex=b.type;c.parameterIndex=b.param;return c};n.prototype=Object.create(h.prototype);n.prototype.isPublic=function(){return!0};n.prototype.isTypename=!0;n.prototype.resolveType=function(a){this.type=
a.multinames[this.typeIndex];this.parameter=a.multinames[this.parameterIndex]};n.prototype.toProperty=function(){return this.type.toProperty()+"$"+this.parameter.toProperty()};n.prototype.toString=function(){return this.type+"$"+this.parameter};var Mb={7:h,13:h,15:u,16:u,17:v,18:v,9:k,14:k,27:w,28:w,29:n};m.module$exports={Multiname:k,MultinameL:w,QName:h,RTQName:u,RTQNameL:v,Typename:n,create:function(a,b){var c=b.kind,d=Mb[c];if(!d)throw Error("Encountered unknown kind... ["+c+"]");return d.create(a,
b.data)}};m.module$exports&&(m=m.module$exports);var I={},qa=m.QName,ja={};I.module$exports={applyInterfaces:function(a,b,c,d,e){d.forEach(function(d){d=ia(a,b,c,d);pa(a,d,e)})},getInterface:ia};I.module$exports&&(I=I.module$exports);var J={};ka.prototype={match:function(a){return this.namespaces.some(function(b){return b.name===a.name})},toString:function(){return"{"+this.namespaces.map(function(a){return a.toString()}).join(", ")+"}"}};J.module$exports={create:function(a,b){var c=b.ns.map(function(b){return a.namespaces[b]});
return new ka(c)},NamespaceSet:ka};J.module$exports&&(J=J.module$exports);var K={},j=y,Ba=I,Nb=r,na=m,Ca=F,l=na.QName,Ob=na.Typename,Pb=Ba.applyInterfaces,Qb=Ba.getInterface,Sa={value:null,writable:!0},Ta={value:void 0,writable:!0},Ua={value:0,writable:!0},Va={value:0/0,writable:!0},Da=function(a){this.vm=a;this.abcFile=a.abcFile;this.toplevel=a.toplevel};Da.prototype={bkpt:function(){throw Error("Not implemented");},nop:function(){},"throw":function(){throw this.vm.stack.pop();},setsuper:function(a){var b=
this.vm.stack.pop(),a=this.vm.getMultinameByIndex(a),c=this.vm.stack.pop();Object.getOwnPropertyDescriptor(c.constructor.__super__,a.toProperty()).set.call(c,b)},getsuper:function(a){var a=this.vm.getMultinameByIndex(a),b=this.vm.stack.pop();if(null===b)throw new TypeError("Error #1009: Unable to generate super from null");if(void 0===b)throw new TypeError("Error #1010: Unable to generate super from undefined");this.vm.stack.push(Object.getOwnPropertyDescriptor(b.constructor.__super__,a.toProperty()).get.call(b))},
dxns:function(){throw Error("Not implemented");},dxnslate:function(){throw Error("Not implemented");},kill:function(a){this.vm.localRegisters[a]=void 0},label:W,lf32x4:function(){throw Error("Not implemented");},sf32x4:function(){throw Error("Not implemented");},ifnlt:function(a){var b=!this.safeCoercion(this._lessthan);b&&(this.vm.nextLabel=a);return b},ifnle:function(a){var b=!this.safeCoercion(this._lessequals);b&&(this.vm.nextLabel=a);return b},ifngt:function(a){var b=!this.safeCoercion(this._greaterthan);
b&&(this.vm.nextLabel=a);return b},ifnge:function(a){var b=!this.safeCoercion(this._greaterequals);b&&(this.vm.nextLabel=a);return b},jump:function(a){this.vm.nextLabel=a},iftrue:function(a){var b=!!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},iffalse:function(a){var b=!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifeq:function(a){var b=this.safeCoercion(this._equals,"equals");b&&(this.vm.nextLabel=a);return b},ifne:function(a){var b=!this.safeCoercion(this._equals,"equals");b&&
(this.vm.nextLabel=a);return b},iflt:function(a){var b=this.safeCoercion(this._lessthan);b&&(this.vm.nextLabel=a);return b},ifle:function(a){var b=this.safeCoercion(this._lessequals);b&&(this.vm.nextLabel=a);return b},ifgt:function(a){var b=this.safeCoercion(this._greaterthan);b&&(this.vm.nextLabel=a);return b},ifge:function(a){var b=this.safeCoercion(this._greaterequals);b&&(this.vm.nextLabel=a);return b},ifstricteq:function(a){this.strictequals();var b=this.vm.stack.pop();b&&(this.vm.nextLabel=
a);return b},ifstrictne:function(a){this.strictequals();var b=!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},x1b:function(){throw Error("Not implemented");},pushwith:function(){var a=this.vm.stack.pop();if(null===a)throw new TypeError("Error #1009: with can not use null");if(void 0===a)throw new TypeError("Error #1010: with can not use undefined");this.vm.scope.push(a)},popscope:function(){this.vm.scope.pop()},nextname:function(){var a=this.vm.stack.pop()-1;this.vm.stack.push(this.vm.stack.pop().__nextName__(a))},
hasnext:function(){throw Error("Not implemented");},pushnull:function(){this.vm.stack.push(null)},pushundefined:function(){this.vm.stack.push(void 0)},nextvalue:function(){var a=this.vm.toplevel.getType(l.fromStrings("","XML")),b=this.vm.toplevel.getType(l.fromStrings("","XMLList")),c=this.vm.stack.pop()-1,d=this.vm.stack.pop();if("[object Array]"===Object.prototype.toString.call(d)||d instanceof a||d instanceof b)d=d[c]||"";else if(d&&"[object Object]"===Object.prototype.toString.call(d))a=Object.keys(d)[c],
d=d[a]||"";else throw Error("nextvalue is not implemented for non-object/non-array types");this.vm.stack.push(d)},pushbyte:function(a){this.vm.stack.push(a<<24>>24)},pushshort:function(a){this.vm.stack.push(a&65535)},pushtrue:function(){this.vm.stack.push(!0)},pushfalse:function(){this.vm.stack.push(!1)},pushnan:function(){this.vm.stack.push(NaN)},pop:function(){this.vm.stack.pop()},dup:function(){var a=this.vm.stack;a.push(a[a.length-1])},swap:function(){var a=this.vm.stack,b=a.pop(),c=a.pop();a.push(b,
c)},pushstring:function(a){this.vm.stack.push(this.abcFile.strings[a])},pushint:function(a){this.vm.stack.push(this.abcFile.integers[a])},pushuint:function(a){this.vm.stack.push(this.abcFile.uintegers[a])},pushdouble:function(a){this.vm.stack.push(this.abcFile.doubles[a])},pushscope:function(){var a=this.vm.stack.pop();if(null===a)throw new TypeError("Error #1009: scope can not be null");if(void 0===a)throw new TypeError("Error #1010: scope can not be undefined");this.vm.scope.push(a)},pushnamespace:function(a){this.vm.stack.push(this.abcFile.namespaces[a])},
hasnext2:function(a,b){var c=this.vm.localRegisters[b],d=this.vm.localRegisters[a];if(d){var e=d.__nextIndex__(c),c=d.__nextObject__(c);this.vm.localRegisters[b]=e;this.vm.localRegisters[a]=c;this.vm.stack.push(0!==e)}else this.vm.stack.push(!1)},li8:function(){throw Error("Not implemented");},li16:function(){throw Error("Not implemented");},li32:function(){throw Error("Not implemented");},lf32:function(){throw Error("Not implemented");},lf64:function(){throw Error("Not implemented");},si8:function(){throw Error("Not implemented");
},si16:function(){throw Error("Not implemented");},si32:function(){throw Error("Not implemented");},sf32:function(){throw Error("Not implemented");},sf64:function(){throw Error("Not implemented");},newfunction:function(a){this.vm.stack.push(this.abcFile.methods[a].toFunction(this.vm.scope))},_call:function(a,b,c){b.__isClass__?this.vm.stack.push(Ca.applyClassCoercion(a,b,c,this.vm.toplevel.global)):(this.nativeFunctionCallValidation(a,b,c),this.vm.stack.push(b.apply(a,c)))},nativeFunctionCallValidation:function(a,
b,c){var d=this.vm.toplevel.global,e=d.Number;if(b==e.prototype.valueOf&&!(a instanceof Number))throw new TypeError("Error #1004: Method was Number.prototype.valueOf invoked on an incompatible object");if(b==e.prototype.toString&&0<c.length){if(isNaN(c[0]))throw new RangeError("Error #1003: The radix argument for Number#toString must be between 2 and 36, was NaN");if(2>c[0]||36<c[0])throw new RangeError("Error #1003: The radix argument for Number#toString must be between 2 and 36, was ["+c[0]+"]");
if(0!=c[0]%1)throw new RangeError("Error #1003: The radix argument for Number#toString must be an integer, was ["+c[0]+"]");}if(b==e.prototype.toPrecision&&0<c.length){if(isNaN(c[0]))throw new RangeError("Error #1002: The precision argument for Number#toPrecision must be between 0 and 20, was NaN");if(2>c[0]||36<c[0])throw new RangeError("Error #1002: The precision argument for Number#toPrecision must be between 0 and 20, was ["+c[0]+"]");if(0!=c[0]%1)throw new RangeError("Error #1002: The precision argument for Number#toPrecision must be an integer between 0 and 20, was ["+
c[0]+"]");}if(b==d.Function.prototype.apply&&1<c.length&&!(c[1]instanceof Array))throw new TypeError("Error #1116: second argument to Function.prototype.apply must be an array");if(b==d.Math)throw new TypeError("Error #1075: Math is not a function");},call:function(a){var a=this.vm.getArgsFromStack(a),b=this.vm.stack.pop(),c=this.vm.stack.pop();if("function"!=typeof c)throw new TypeError("Error #1006: cannot call a non-function");this._call(b,c,a)},construct:function(a){var a=this.vm.getArgsFromStack(a),
b=this.vm.stack.pop();if(null===b)throw new TypeError("Error #1007: Constructor instantiation attempted on null");if(void 0===b)throw new TypeError("Error #1007: Constructor instantiation attempted on undefined");if("object"!=typeof b&&"function"!=typeof b)throw new TypeError("Error #1041: Constructor instantiation attempted on a primitive");if(!(b instanceof Function))throw new TypeError("Error #1007: Constructor instantiation attempted on a non-constructor");this.vm.stack.push(this.vm.construct(b,
a))},callmethod:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();o.assertProperObject(e,d);var f=e.__getUnbound__(d);o.assertProperMethod(f,d);this.vm.stack.push(this.vm.wrap(f).apply(e,c))},callstatic:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.stack.pop();if(null===d)throw new TypeError("Error #1009: Cannot call static null");if(void 0===d)throw new TypeError("Error #1010: Cannot call static undefined");var e=this.abcFile.methods[a].toFunction(this.vm.scope);
o.assertProperMethod(e,na);this.vm.stack.push(this.vm.wrap(e).apply(d,c))},callsuper:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();if(null===e)throw new TypeError("Error #1009: Cannot call super null");if(void 0===e)throw new TypeError("Error #1010: Cannot call super undefined");d=ra.call(this,e).__getUnbound__(d);if(null===d)throw new ReferenceError("Error #1070: Cannot call missing super method");if(void 0===d)throw new ReferenceError("Error #1070: Cannot call missing super method");
this.vm.stack.push(d.apply(e,c))},callproperty:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();o.assertProperObject(e,d);var f=e.__getUnbound__(d);o.assertProperMethod(f,d);this._call(e,f,c)},returnvoid:function(){this.vm.returnValue=void 0},returnvalue:function(){this.vm.returnValue=this.vm.stack.pop()},constructsuper:function(a){var a=this.vm.getArgsFromStack(a),b=this.vm.stack.pop();if(null===b)throw new TypeError("Error #1009: Cannot constructsuper on null");
if(void 0===b)throw new TypeError("Error #1010: Cannot constructsuper on undefined");var c=this.vm.toplevel.getType(this.vm.currentMethod.instance.superName);this.vm.validateConstruct(c,a);c.apply(b,a)},constructprop:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();if(null===e)throw new TypeError("Error #1009: Null object can not have constructor properties");if(void 0===e)throw new TypeError("Error #1010: Undefined object can not have constructor properties");
d=e.__get__(d);if(d==this.vm.toplevel.global.Array&&1==c.length&&"number"==typeof c[0]){e=c[0];if(e%1)throw new RangeError("Error #1005: new Array does not accept a single fraction number for initialization");if(0>e)throw new RangeError("Error #1005: new Array does not accept a single negative number for initialization");if(isNaN(e))throw new RangeError("Error #1005: new Array does not accept a NaN for initialization");}this.vm.stack.push(this.vm.construct(d,c))},callproplex:function(a,b){var c=this.vm.getArgsFromStack(b),
d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();o.assertProperObject(e,d);e=e.__getUnbound__(d);o.assertProperMethod(e,d);this.vm.stack.push(e.apply(null,c))},callsupervoid:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();if(null===e)throw new TypeError("Error #1009: Cannot call supervoid null");if(void 0===e)throw new TypeError("Error #1010: Cannot call supervoid undefined");d=ra.call(this,e).__getUnbound__(d);if(null===d)throw new ReferenceError("Error #1070: Cannot call missing super method");
if(void 0===d)throw new ReferenceError("Error #1070: Cannot call missing super method");d.apply(e,c)},callpropvoid:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();o.assertProperObject(e,d);var f=e.__getUnbound__(d);o.assertProperMethod(f,d);f.apply(e,c)},sxi1:function(){throw Error("Not implemented");},sxi8:function(){throw Error("Not implemented");},sxi16:function(){throw Error("Not implemented");},applytype:function(a){if(0>=a)throw Error("VerifyError: Vectors require at least one type argument");
if(1<a)throw new TypeError("Error #1128: Incorrect number of type parameters");a=this.vm.stack.pop();if(void 0===a)throw new TypeError("Error #1010: Unable to create Vector of undefined");if(null!==a&&!a.__isClass__)throw Error("VerifyError: Expecting a class...");if(this.vm.stack.pop()!==this.toplevel.global.Vector)throw new TypeError("Error #1010: Unable to create non-Vector<T> types");this.vm.stack.push(this.vm.toplevel.getType(new Ob(l.fromStrings("__AS3__.vec","Vector"),l.fromSymbolClass(a?a.__qualifiedName__:
"Object"))))},newobject:function(a){for(var b={};a--;){var c=this.vm.stack.pop(),d=this.vm.stack.pop();b[d]=c}this.vm.stack.push(b)},newarray:function(a){this.vm.stack.push(this.vm.stack.splice(-a,a))},newactivation:function(){this.vm.stack.push(this.vm.abcFile.createObjectFromTraits(this.vm.body.traits))},newclass:function(a){var b=this.vm,c=b.abcFile,d=b.toplevel,e=b.stack.pop(),f=this.abcFile.instances[a],a=this.abcFile.classes[a],g;f.isInterface?g=Qb(d,c,b,f.name):(g=f.initializer.toFunction(b.scope),
g.__capturedScope__.push(g),g.__super__=e.prototype,e=g.prototype=Object.create(e.prototype),c.createObjectFromTraits(a.traits,g,b.scope),c.createObjectFromTraits(f.traits,e,b.scope,g,{skipSlots:!0}),Pb(d,c,b,f.interfaces,g.prototype),f.initializer.currentMethod.instance=f,a.initializer.toFunction(b.scope).apply(g),Object.defineProperties(e,{constructor:{value:g},__slotDescriptors__:{value:Ra(e,c)}}));Object.defineProperties(g,{__isClass__:{value:!0},__name__:{value:f.name.name},__qualifiedName__:{value:f.name.toString()},
displayName:{value:f.name.name}});b.stack.push(g)},getdescendants:function(a){var b=this.vm.toplevel.getType(l.fromStrings("","XML")),c=this.vm.toplevel.getType(l.fromStrings("","XMLList")),a=this.vm.getMultinameByIndex(a),d=this.vm.stack.pop();if(!(d instanceof b)||!(d instanceof c))throw new TypeError("Error #1016: Object is not of type XML or XMLList");this.vm.stack.push(d.descendants(a.name))},newcatch:function(a){this.vm.stack.push(this.vm.getExceptionHandlerByIndex(a).createCatchScope())},findpropstrict:function(a){this.vm.stack.push(this.vm.scope.strictFind(this.vm.getMultinameByIndex(a)))},
findproperty:function(a){this.vm.stack.push(this.vm.scope.find(this.vm.getMultinameByIndex(a),!0))},finddef:function(){throw Error("Not implemented");},getlex:function(a){this.vm.op.findpropstrict(a);this.vm.op.getproperty(a)},setproperty:function(a){var b=this.vm,c=b.stack.pop(),a=b.getMultinameByIndex(a),b=b.stack.pop();if(null===b)throw new TypeError("Error #1009: Unable to set property on null");if(void 0===b)throw new TypeError("Error #1010: Unable to set property on undefined");b.__set__(a,
c)},getlocal:function(a){this.vm.stack.push(this.vm.localRegisters[a])},setlocal:function(a){this.vm.localRegisters[a]=this.vm.stack.pop()},getglobalscope:function(){this.vm.stack.push(this.toplevel.global)},getscopeobject:function(a){this.vm.stack.push(this.vm.scope.get(a))},getproperty:function(a){var b=this.vm,a=b.getMultinameByIndex(a),c=b.stack.pop();if(null===c)throw new TypeError("Error #1009: Unable to get property from null");if(void 0===c)throw new TypeError("Error #1010: Unable to get property from undefined");
a=c.__get__(a);b.stack.push(a)},getouterscope:function(){throw Error("Not implemented");},initproperty:function(a){var b=this.vm.stack.pop(),a=this.vm.getMultinameByIndex(a),c=this.vm.stack.pop();if(null===c)throw new TypeError("Error #1009: Unable to init null");if(void 0===c)throw new TypeError("Error #1010: Unable to init undefined");c.__set__(a,b)},deleteproperty:function(a){var a=this.vm.getMultinameByIndex(a),b=this.vm.stack.pop();if(null===b)throw new ReferenceError("Error #1009: Cannot delete from null object");
if(void 0===b)throw new ReferenceError("Error #1010: Cannot delete from undefined object");this.vm.stack.push(b.__deleteProperty__(a))},getslot:function(a){var b=this.vm.stack.pop();if(null===b)throw new TypeError("Error #1009: Unable to get slot on null");if(void 0===b)throw new TypeError("Error #1010: Unable to get slot on undefined");this.vm.stack.push(b.__get__(b.__slots__[a].name))},setslot:function(a){var b=this.vm.stack.pop(),c=this.vm.stack.pop();if(null===c)throw new TypeError("Error #1009: Unable to set slot on null");
if(void 0===c)throw new TypeError("Error #1010: Unable to set slot on undefined");c.__set__(c.__slots__[a].name,b)},getglobalslot:function(){throw Error("Not implemented");},setglobalslot:function(){throw Error("Not implemented");},convert_s:function(){var a=this.vm.stack.pop();null!=a&&(a=""+a);this.vm.stack.push(a)},esc_xelem:function(){this.vm.stack.push(this.vm.stack.pop().toXmlString())},esc_xattr:function(){throw Error("Not implemented");},convert_i:function(){var a=this.vm.stack.pop(),a=j.ToInt32(a);
this.vm.stack.push(a)},convert_u:function(){this.vm.stack.push(j.ToUint32(this.vm.stack.pop()))},convert_d:function(){this.vm.stack.push(+this.vm.stack.pop())},convert_b:function(){var a=this.vm.stack.pop();this.vm.stack.push(Boolean(a))},convert_o:function(){var a=this.vm.stack.pop();if(null===a)throw new TypeError("Error #1009: Unable to convert null to an object");if(void 0===a)throw new TypeError("Error #1010: Unable to convert undefined to an object");var b=typeof a;if("object"!=b&&"function"!=
b)throw new TypeError("Error #1034: Convert_o only passes objects, this wasnt one");this.vm.stack.push(a)},checkfilter:function(){var a=this.vm.toplevel.getType(l.fromStrings("","XML")),b=this.vm.toplevel.getType(l.fromStrings("","XMLList")),c=this.vm.stack.pop();if(!(c instanceof a)&&!(c instanceof b))throw new TypeError("Error #1123: Object is not of type XML or XMLList");this.vm.stack.push(c)},coerce:function(a){var a=this.vm.toplevel.getType(this.vm.getMultinameByIndex(a)),b=this.vm.stack.pop();
this.vm.stack.push(Ca.explicitlyCoerce(b,a))},coerce_b:function(){throw Error("Not implemented");},coerce_a:function(){},coerce_i:function(){throw Error("Not implemented");},coerce_d:function(){throw Error("Not implemented");},coerce_s:function(){var a=this.vm.stack.pop();null==a?this.vm.stack.push(null):this.vm.stack.push(""+a)},astype:function(){throw Error("Not implemented");},astypelate:function(){var a=this.vm.stack.pop(),b=this.vm.stack.pop();if(!a||!a.__isClass__&&!a.__isInterface__)throw new TypeError("Error #1040: Expecting a class in as check");
var c=this.vm.toplevel.global;a===c.Class&&b.__isClass__?this.vm.stack.push(b):"string"==typeof b?a==c.String||a==c.Object?this.vm.stack.push(b):this.vm.stack.push(null):"number"==typeof b?a==c.Number||a==c.Object?this.vm.stack.push(b):a==c["int"]?0===b%1&&b>=c["int"].MIN_VALUE&&b<=c["int"].MAX_VALUE?this.vm.stack.push(b):this.vm.stack.push(null):a==c.uint?0===b%1&&0<=b&&b<=c.uint.MAX_VALUE?this.vm.stack.push(b):this.vm.stack.push(null):this.vm.stack.push(null):"boolean"==typeof b?a==c.Boolean||a==
c.Object?this.vm.stack.push(b):this.vm.stack.push(null):this.vm.stack.push(b&&b instanceof a?b:null)},coerce_u:function(){throw Error("Not implemented");},coerce_o:function(){var a=this.vm.stack[this.vm.stack.length-1];if(null===a)throw new TypeError("Error #1009: Unable to coerce null to an object");if(void 0===a)throw new TypeError("Error #1010: Unable to coerce undefined to an object");},negate:function(){this.vm.stack.push(-j.ToNumber(this.vm.stack.pop()))},increment:function(){this.vm.stack.push(j.ToNumber(this.vm.stack.pop())+
1)},inclocal:function(){throw Error("Not implemented");},decrement:function(){this.vm.stack.push(j.ToNumber(this.vm.stack.pop())-1)},declocal:function(){throw Error("Not implemented");},"typeof":function(){var a=this.vm.toplevel.getType(l.fromStrings("","int")),b=this.vm.toplevel.getType(l.fromStrings("","uint")),c=this.vm.toplevel.getType(l.fromStrings("","XML")),d=this.vm.toplevel.getType(l.fromStrings("","XMLList")),e=this.vm.stack,f=e.pop();void 0===f?e.push("undefined"):null===f?e.push("object"):
"boolean"==typeof f||f instanceof Boolean?e.push("boolean"):"number"==typeof f||f instanceof Number?e.push("number"):f instanceof a?e.push("number"):f instanceof b?e.push("number"):"string"==typeof f||f instanceof String?e.push("string"):"function"==typeof f?e.push("function"):f instanceof c||f instanceof d?e.push("xml"):e.push("object")},not:function(){this.vm.stack.push(!this.vm.stack.pop())},bitnot:function(){this.vm.stack.push(~this.vm.stack.pop())},lookupswitch:function(a,b,c){var d=this.vm.stack.pop();
this.vm.nextLabel=isNaN(d)||0>d||d>a?b:arguments[d+2]},_add:function(a,b){return a+b},add:function(){this.vm.stack.push(this.safeCoercion(this._add,"add"))},_subtract:function(a,b){return a-b},subtract:function(){this.vm.stack.push(this.safeCoercion(this._subtract,"number"))},_multiply:function(a,b){return a*b},multiply:function(){this.vm.stack.push(this.safeCoercion(this._multiply,"number"))},_divide:function(a,b){return a/b},divide:function(){this.vm.stack.push(this.safeCoercion(this._divide,"number"))},
_modulo:function(a,b){return a%b},modulo:function(){this.vm.stack.push(this.safeCoercion(this._modulo,"number"))},_lshift:function(a,b){return a<<b},lshift:function(){this.vm.stack.push(this.safeCoercion(this._lshift,"number"))},_rshift:function(a,b){return a>>b},rshift:function(){this.vm.stack.push(this.safeCoercion(this._rshift,"number"))},_urshift:function(a,b){return a>>>b},urshift:function(){this.vm.stack.push(this.safeCoercion(this._urshift,"number"))},_bitand:function(a,b){return a&b},bitand:function(){this.vm.stack.push(this.safeCoercion(this._bitand,
"number"))},_bitor:function(a,b){return a|b},bitor:function(){this.vm.stack.push(this.safeCoercion(this._bitor,"number"))},_bitxor:function(a,b){return a^b},bitxor:function(){this.vm.stack.push(this.safeCoercion(this._bitxor,"number"))},_equals:function(a,b){return a==b},equals:function(){this.vm.stack.push(this.safeCoercion(this._equals,"equals"))},strictequals:function(){var a=this.vm.stack.pop(),b=this.vm.stack.pop();"string"==typeof b&&a instanceof String?this.vm.stack.push(b===a.valueOf()):"string"==
typeof a&&b instanceof String?this.vm.stack.push(a===b.valueOf()):"number"==typeof b&&a instanceof Number?this.vm.stack.push(b===a.valueOf()):"number"==typeof a&&b instanceof Number?this.vm.stack.push(a===b.valueOf()):"boolean"==typeof b&&a instanceof Boolean?this.vm.stack.push(b===a.valueOf()):"boolean"==typeof a&&b instanceof Boolean?this.vm.stack.push(a===b.valueOf()):b instanceof String&&a instanceof String?this.vm.stack.push(b.toString()==a.toString()):b instanceof Number&&a instanceof Number?
this.vm.stack.push(b.valueOf()==a.valueOf()):b instanceof Boolean&&a instanceof Boolean?this.vm.stack.push(b.valueOf()==a.valueOf()):b instanceof Date&&a instanceof Date?this.vm.stack.push(b.valueOf()==a.valueOf()):this.vm.stack.push(b===a)},_lessthan:function(a,b){return a<b},lessthan:function(){this.vm.stack.push(this.safeCoercion(this._lessthan))},_lessequals:function(a,b){return a<=b},lessequals:function(){this.vm.stack.push(this.safeCoercion(this._lessequals))},_greaterthan:function(a,b){return a>
b},greaterthan:function(){this.vm.stack.push(this.safeCoercion(this._greaterthan))},_greaterequals:function(a,b){return a>=b},greaterequals:function(){this.vm.stack.push(this.safeCoercion(this._greaterequals))},"instanceof":function(){var a=this.vm.stack.pop(),b=this.vm.stack.pop();if(!a||"object"!=typeof a&&"function"!=typeof a)throw new TypeError("Error #1040: Expecting an object in instanceof check, but got "+a);a===this.vm.toplevel.global.Class&&b.__isClass__?this.vm.stack.push(!0):this.vm.stack.push(b instanceof
a)},istype:function(){throw Error("Not implemented");},istypelate:function(){var a=this.vm.stack.pop(),b=this.vm.stack.pop();if(a.__is__)this.vm.stack.push(!!a.__is__(b));else{switch(typeof a){case "string":case "number":case "boolean":throw new TypeError("Error #1009: Invalid type on rhs, does not have required properties");}if("function"!=typeof a)throw new TypeError("Error #1041: Expecting a class in istypelate check, but got "+b);var c=null,d=this.toplevel.global;if("string"==typeof b&&(a==d.String||
a==d.Object))c=!0;else if("boolean"==typeof b&&(a==d.Boolean||a==d.Object))c=!0;else if("number"==typeof b)if(a==d.Number||a==d.Object)c=!0;else if(0==b%1){var e=d["int"];a==e?c=b>=e.MIN_VALUE&&b<=e.MAX_VALUE:(d=d.uint,a==d&&(c=b>=d.MIN_VALUE&&b<=d.MAX_VALUE))}null===c&&(c=b instanceof a);this.vm.stack.push(c)}},"in":function(){var a=this.vm.stack.pop(),b=this.vm.stack.pop(),c=Nb.exports.tools.expando;a[c]&&a[c].has?this.vm.stack.push(a.__has__(l.fromStrings("",b))):this.vm.stack.push(j.ToString(b)in
Object(a))},increment_i:function(){this.vm.stack.push(j.ToInt32(this.vm.stack.pop())+1)},decrement_i:function(){this.vm.stack.push(j.ToInt32(this.vm.stack.pop())-1)},inclocal_i:function(a){var b=this.vm.localRegisters;b[a]=j.ToInt32(b[a])+1},declocal_i:function(a){var b=this.vm.localRegisters;b[a]=j.ToInt32(b[a])-1},negate_i:function(){throw Error("Not implemented");},_add_i:function(a,b){a=j.ToUint32(a);b=j.ToUint32(b);return a+b>>>0},add_i:function(){this.vm.stack.push(this.safeCoercion(this._add_i,
"number"))},_subtract_i:function(a,b){a=j.ToUint32(a);b=j.ToUint32(b);return a-b>>>0},subtract_i:function(){this.vm.stack.push(this.safeCoercion(this._subtract_i,"number"))},_multiply_i:function(a,b){a=j.ToUint32(a);b=j.ToUint32(b);return a*b>>>0},multiply_i:function(){this.vm.stack.push(this.safeCoercion(this._multiply_i,"number"))},getlocal0:function(){this.vm.stack.push(this.vm.localRegisters[0])},getlocal1:function(){this.vm.stack.push(this.vm.localRegisters[1])},getlocal2:function(){this.vm.stack.push(this.vm.localRegisters[2])},
getlocal3:function(){this.vm.stack.push(this.vm.localRegisters[3])},setlocal0:function(){this.vm.localRegisters[0]=this.vm.stack.pop()},setlocal1:function(){this.vm.localRegisters[1]=this.vm.stack.pop()},setlocal2:function(){this.vm.localRegisters[2]=this.vm.stack.pop()},setlocal3:function(){this.vm.localRegisters[3]=this.vm.stack.pop()},debug:W,debugline:W,debugfile:W,bkptline:function(){throw Error("Not implemented");},timestamp:function(){throw Error("Not implemented");},safeCoercion:function(a){var b=
this.vm.stack.pop(),c=this.vm.stack.pop();return a(c,b)}};var o={assertProperObject:function(a,b){if(null===a)throw new TypeError("Error #1009: Cannot call method '"+b+"' of null");if("undefined"===typeof a)throw new TypeError("Error #1010: Cannot call method '"+b+"' of undefined");},assertProperMethod:function(a,b){if(null===a)throw new TypeError("Error #1009: Cannot call null property '"+b+"'");if("undefined"===typeof a)throw new TypeError("Error #1010: Cannot call undefined property '"+b+"'");
if(!1===a)throw new TypeError("(AS3) Cannot call false property '"+b+"'");}};K.module$exports=Da;K.module$exports&&(K=K.module$exports);var $={module$exports:{convertRest:function(a,b){var c=a.slice(0,b),d=a.slice(b);c.push(d);return c},setDefaults:function(a,b,c){var d=c-b.length;b.forEach(function(b,c){var g=d+c;g in a||(a[g]=b)})},toRegisters:function(a,b){return[a].concat(b)}}};$.module$exports&&($=$.module$exports);var L={},Ya=r;L.module$exports={addToBuiltins:function(a){a.Object.prototype.__get__||
(Wa(a.Object.prototype),a.Vector&&Xa(a.Vector.prototype))}};L.module$exports&&(L=L.module$exports);var M={},Rb=L,la=m.QName;M.module$exports=function(a,b){var b=b||{},c=b.map||{};Rb.addToBuiltins(a);sa(a,c);c.__set__(la.fromStrings("__AS3__.vec","Vector"),c.Vector);return c};M.module$exports&&(M=M.module$exports);var N={};ta.prototype={push:function(a){this.scopes.push(a);this.localOffset++},toScope:function(){return A.fromCapturedScope(this)}};A.fromCapturedScope=function(a){var b=new A(a.global);
b.scopes=a.scopes.slice(0);b.localOffset=a.scopes.length;return b};A.prototype={global:null,localOffset:null,scopes:null,capture:function(){return new ta(this)},clear:function(){this.localOffset=0;this.scopes=[]},find:function(a){(a=this._find(a))||(a=this.global);return a},_find:function(a){var b;this.scopes.slice().reverse().some(function(c){if(c.__has__(a))return b=c,!0});return!b&&this.global.__has__(a)?this.global:b},get:function(a){var b=this.localOffset+a;if(!(b in this.scopes))throw Error("Cannot get scope object at index "+
a);return this.scopes[b]},pop:function(){if(this.scopes.length===this.localOffset)throw Error("Cannot pop empty scope stack");return this.scopes.pop()},push:function(a){this.scopes.push(a)},strictFind:function(a){var b=this._find(a);if(!b)throw new ReferenceError("Error #1065: Variable/property not defined: "+a);return b}};N.module$exports=A;N.module$exports&&(N=N.module$exports);var O={},bb=M,cb=m;ua.prototype={getPreConstructorHook:function(a){a=X(a);return this.hooks.__get__(a)},getType:function(a){a=
X(a);if(!this.global.__has__(a))throw new TypeError("Cannot find type "+a);return this.global.__get__(a)},hasPreConstructorHook:function(a){a=X(a);return this.hooks.__has__(a)},runAbc:function(a){return this.abcs[a].run()},setPreConstructorHook:function(a,b){a=X(a);this.hooks.__set__(a,b)}};O.module$exports=ua;O.module$exports&&(O=O.module$exports);var p={},Ea=va(),oa=va();oa.prototype.isSlot=!0;B.create=function(a,b,c,d){return new B(b,d.slot_id,a.classes[d.classi])};B.prototype.isClass=!0;Y.create=
function(a,b,c,d){return new Y(b,d.slot_id,a.methods[d["function"]])};C.create=function(a,b,c,d){return new C(b,d.disp_id,a.methods[d.method],{isFinal:!!(c&1),isOverride:!!(c&2)})};C.prototype={isMethod:!0,toInterfaceDescriptor:function(a){return{get:function(){return this[a]}}}};D.create=function(a,b,c,d){return new D(b,d.disp_id,a.methods[d.method],{isFinal:!!(c&1),isOverride:!!(c&2)})};D.prototype={isGetter:!0,toInterfaceDescriptor:function(a){return{configurable:!0,get:function(){var b=Object.getOwnPropertyDescriptor(this.constructor.prototype,
a).get;return b()}}}};E.create=function(a,b,c,d){return new E(b,d.disp_id,a.methods[d.method],{isFinal:!!(c&1),isOverride:!!(c&2)})};E.prototype={isSetter:!0,toInterfaceDescriptor:function(a){return{configurable:!0,set:function(b){var c=Object.getOwnPropertyDescriptor(this.constructor.prototype,a).set;c(b)}}}};var Sb={"0":oa,1:C,2:D,3:E,4:B,5:Y,6:Ea};p.module$exports={ConstTrait:Ea,ClassTrait:B,FunctionTrait:Y,GetterTrait:D,MethodTrait:C,SetterTrait:E,SlotTrait:oa,create:function(a,b){return Sb[b.kind&
15].create(a,a.multinames[b.name],b.kind>>>4,b.data)}};p.module$exports&&(p=p.module$exports);var P={},eb=p,Fa={create:function(a,b){var c=a.methods[b.cinit],d=db(a,b.trait);return new Tb(c,d)}},Tb=Fa.Class=function(a,b){this.initializer=a;this.traits=b};P.module$exports=Fa;P.module$exports&&(P=P.module$exports);var Q={},Ub=m,Vb=p,Ga={create:function(a,b){return new s(a,b.from,b.to,b.target,0===b.exc_type?s.ANY_TYPENAME:a.multinames[b.exc_type],a.multinames[b.var_name])}},s=Ga.Exception=function(a,
b,c,d,e,f){this.abcFile=a;this.from=b;this.to=c;this.target=d;this.typeName=e;this.varName=f};s.ANY_TYPENAME=Ub.QName.fromStrings("","Object");s.prototype.createCatchScope=function(){return!this.varName?{}:this.abcFile.createObjectFromTraits([new Vb.SlotTrait(this.varName,1,this.typeName)])};s.prototype.handles=function(a,b){if(this.handlesAny())return!0;var c=a.__get__(this.typeName);return c instanceof Function&&b instanceof c};s.prototype.handlesAny=function(){return this.typeName===s.ANY_TYPENAME};
s.prototype.isRelatedTo=function(a){return this.from===a.from&&this.to===a.to};Q.module$exports=Ga;Q.module$exports&&(Q=Q.module$exports);var R={},hb=p,Ha={create:function(a,b){var c=a.multinames[b.name],d;d=0!==b.super_name?a.multinames[b.super_name]:void 0;var e={isSealed:!!(b.flags&1),isFinal:!!(b.flags&2),isInterface:!!(b.flags&4),hasProtectedNamespace:!!(b.flags&8)},f;f=e.hasProtectedNamespace?a.namespaces[b.protectedNs]:void 0;var g=fb(a,b),q=a.methods[b.iinit],h=gb(a,b.trait);return new Wb(c,
d,e,f,g,q,h)}},Wb=Ha.Instance=function(a,b,c,d,e,f,g){this.name=a;this.superName=b;this.isSealed=c.isSealed;this.isFinal=c.isFinal;this.isInterface=c.isInterface;this.protectedNamespace=d;this.interfaces=e;this.initializer=f;this.traits=g};R.module$exports=Ha;R.module$exports&&(R=R.module$exports);var S={},jb=Q,lb=p,Ia={create:function(a,b){var c=a.methodSignatures[b.method],d=b.max_stack,e=b.local_count,f=b.init_scope_depth,g=b.max_scope_depth,q=b.code,h=ib(a,b.exception),i=kb(a,b.trait);return new Xb(c,
d,e,f,g,q,h,i)}},Xb=Ia.MethodBody=function(a,b,c,d,e,f,g,h){this.signature=a;this.maxStack=b;this.localCount=c;this.initScopeDepth=d;this.maxScopeDepth=e;this.code=f;this.exceptions=g;this.traits=h};S.module$exports=Ia;S.module$exports&&(S=S.module$exports);var T={},Yb=K,Zb=m,ma=$,$b=Array.prototype.slice;wa.prototype={toFunction:function(a){var b=a.capture(),c=this,a=function(){var a=Object.create(c);a.localRegisters=mb(this,$b.call(arguments),a.getSignature(),a);a.nextLabel="start";a.op=new Yb(a);
a.registeredExceptions=[];a.scope=b.toScope();a.stack=[];(function f(){try{a.currentMethod(a)}catch(b){a.tryHandlingException(b,f)}})();return a.coerceReturnValue(a.returnValue)};a.__capturedScope__=b;a.__method__=this.currentMethod;return a},coerce:function(a,b){if(!a||"*"===a)return b;var c=this.toplevel,d="void"===a.toString()?void 0:c.getType(a),c=c.global;switch(d){case c.String:case c.Object:return null===b||void 0===b?null:d(b);case c.Boolean:case c.Number:case c.int:case c.uint:return d(b);
case void 0:if(void 0===b)return;break;default:if(b instanceof d)return b;if(null===b||void 0===b)return null;if("function"===typeof d.__is__&&d.__is__(b))return b}throw new TypeError("Error #1034: unable to convert value to "+a);},coerceReturnValue:function(a){return this.coerce(this.getReturnTypeName(),a)},construct:function(a,b){this.validateConstruct(a,b);return this._construct(a,b)},_construct:function(a,b){var b=b||[],c=b.length,d,e,f=a.prototype||Object.prototype,g=f.__slotDescriptors__||void 0,
h=a.__qualifiedName__;h&&(e=this.toplevel.hasPreConstructorHook(h)&&this.toplevel.getPreConstructorHook(h));if(g||e||7<c)d=Object.create(f,g),e&&e(d),c=a.apply(d,b),Object(c)===c&&(d=c);else switch(c){case 0:d=new a;break;case 1:d=new a(b[0]);break;case 2:d=new a(b[0],b[1]);break;case 3:d=new a(b[0],b[1],b[2]);break;case 4:d=new a(b[0],b[1],b[2],b[3]);break;case 5:d=new a(b[0],b[1],b[2],b[3],b[4]);break;case 6:d=new a(b[0],b[1],b[2],b[3],b[4],b[5]);break;case 7:d=new a(b[0],b[1],b[2],b[3],b[4],b[5],
b[6])}Object.defineProperty(d,"constructor",{value:a});return d},validateConstruct:function(a,b){if(!a||!(a instanceof Function)){if(a&&a.__isClass__)throw Error("Oh dear, we need to handle the non-function __isClass__ cases explicitly, `new` wont work");throw new TypeError("Error 1041: (vm.validateConstruct) Expected function to be a constructor");}if(a.__isMethodClosure__)throw new TypeError("Error #1064: Cannot call method closure as constructor");if(a==this.toplevel.global.Array&&1==b.length&&
"number"==typeof b[0]){if(0>b[0]||0!=b[0]%1)throw new RangeError("Error #1005: Given initial array length is not a positive integer");if(isNaN(b[0]))throw new RangeError("Error #1005: Given initial array length index is NaN");}if(a==this.toplevel.global.Math)throw new TypeError("Error #1076: Math is not a constructor");if(a==this.toplevel.global.Function&&b.length)throw new EvalError("Error #1066: The form function('function body') is not supported");},deregisterException:function(a){a=this.registeredExceptions.indexOf(this.currentMethod.methodBody.exceptions[a]);
-1!==a&&this.registeredExceptions.splice(a,1)},findExceptionHandler:function(a){var b;this.registeredExceptions.slice().reverse().some(function(c){if(c.handles(this.toplevel.global,a))return this.removeRelatedExceptionHandlers(c),b=c,!0},this);return b},getArgsFromStack:function(a){var b=this.stack.splice(-a,a);if(b.length!==a)throw new (this.toplevel.getType(Zb.QName.fromStrings("","ArgumentError")))("Error #2001: Insufficient arguments on stack");return b},getMethodTraits:function(){return this.body.traits},
getMultinameByIndex:function(a){return this.abcFile.multinames[a].resolve(this.stack)},getSignature:function(){return this.signature},getReturnTypeName:function(){return this.signature.returnType},getExceptionHandlerByIndex:function(a){return this.currentMethod.methodBody.exceptions[a]},"goto":function(){if(1E5<++this.loopProtection)throw Error("Runaway loop protection (vm.js:goto)");return this.nextLabel},handleException:function(a,b,c){this.nextLabel=b.targetLabel;this.scope.clear();this.stack=
[a];c()},removeRelatedExceptionHandlers:function(a){this.registeredExceptions=this.registeredExceptions.filter(function(b){return!a.isRelatedTo(b)})},registerException:function(a,b){var c=this.currentMethod.methodBody.exceptions[a];c.targetLabel=b;this.registeredExceptions.push(c)},tryHandlingException:function(a,b){var c=this.findExceptionHandler(a);if(c)this.handleException(a,c,b);else throw this.uncaughtErrorThrown=a,a;}};T.module$exports=wa;T.module$exports&&(T=T.module$exports);var U={},nb=N,
pb=p;Z.create=function(a,b){var c=a.methods[b.init],d=ob(a,b.trait);return new Z(a,c,d)};Z.prototype={run:function(){if(!this.executed)return this.executed=!0,this.global=this.abcFile.createObjectFromTraits(this.traits,this.abcFile.toplevel.global,this.scope),this.method.toFunction(this.scope).call(this.global)}};U.module$exports=Z;U.module$exports&&(U=U.module$exports);var V={},Fb=T,Gb=P,Hb=R,Eb=S,Db=H,Cb=m,Ab=z,Bb=J,Ib=U;x.constantKindGetters={1:function(a){return this.strings[a]},3:function(a){return this.integers[a]},
4:function(a){return this.uintegers[a]},6:function(a){return this.doubles[a]},10:function(){return!1},11:function(){return!0},12:function(){return null},"0":function(){},8:t,22:t,23:t,24:t,25:t,26:t,5:t};x.prototype={coerceTraitValue:function(a){if(!a.typeName)return a.value;switch(a.typeName.name){case "Object":case "String":if(!a.value)return null;case "Boolean":case "Number":case "int":case "uint":return(0,this.toplevel.global[a.typeName.name])(a.value)}},createObjectFromTraits:function(a,b,c,
d,e){var b=b||{},f=b.__traits__;f?b.__traits__=f.concat(a):Object.defineProperties(b,{__traits__:{value:a,writable:!0},__slots__:{value:[]}});var g=!(!e||!e.skipSlots);a.forEach(function(a){var e=this.coerceTraitValue(a),f=0;"slotId"in a&&(b.__slots__[a.slotId||++f]=a);if("dispatchId"in a){e=e.toFunction(c);d&&e.__capturedScope__.push(d);Object.defineProperty(e,"__isMethod__",{enumerable:!1,value:!0,writable:!1});var f={configurable:!0},h=a.isGetter?"get":a.isSetter?"set":"value";f[h]=e;"value"===
h&&(f.writable=!0);Object.defineProperty(b,a.name.toProperty(),f)}else(!g||!a.isSlot)&&Object.defineProperty(b,a.name.toProperty(),{value:e,writable:!0})},this);return b},getConstant:function(a,b){if(!(a in x.constantKindGetters))throw Error("Cannot get unknown constant kind from abcFile: "+a);return x.constantKindGetters[a].call(this,b)},getMethodBodyBySignature:function(a){var b;this.methodBodies.some(function(c){if(c.signature===a)return b=c,!0});return b},hasType:function(a){var b;this.scripts.some(function(c){c.traits.some(function(d){if(d.name.name===
a.name)return b=c,!0})});return b&&!b.executed?(b.run(),!0):!1},run:function(){this.scripts.slice(-1)[0].run()}};x.getMethodNameByIndex=function(a,b){for(var c,d=a.methods[b],e=0;e<a.classes.length;++e){var f=a.classes[e],g=a.instances[e];f.initializer===d&&(c=g.name.name+"_$StaticInitializer$");g.initializer===d&&(c=g.name.name+"_$Constructor$");f.traits.some(function(a){if(a.method===d)return c=g.name.name+"_"+a.name.name+"_$StaticMethod$",!0});g.traits.some(function(a){if(a.method===d)return c=
g.name.name+"_"+a.name.name,!0});if(c)break}return c};V.module$exports=x;V.module$exports&&(V=V.module$exports);var aa={},Ja=r,Ka={AbcFile:V,TopLevel:O,multiname:m};"undefined"!==typeof Ja.exports&&(Ja.exports.as3vm=Ka);aa.module$exports=Ka;aa.module$exports&&(aa=aa.module$exports)})();