Commit 4066646b authored by rockyl's avatar rockyl

整合tslib

parent fbb51781
var __extends;var __assign;var __rest;var __decorate;var __param;var __metadata;var __awaiter;var __generator;var __exportStar;var __values;var __read;var __spread;var __spreadArrays;var __await;var __asyncGenerator;var __asyncDelegator;var __asyncValues;var __makeTemplateObject;var __importStar;var __importDefault;(function(factory){var root=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd){define("tslib",["exports"],function(exports){factory(createExporter(root,createExporter(exports)))})}else{if(typeof module==="object"&&typeof module.exports==="object"){factory(createExporter(root,createExporter(module.exports)))}else{factory(createExporter(root))}}function createExporter(exports,previous){if(exports!==root){if(typeof Object.create==="function"){Object.defineProperty(exports,"__esModule",{value:true})}else{exports.__esModule=true}}return function(id,v){return exports[id]=previous?previous(id,v):v}}})(function(exporter){var extendStatics=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(d,b){d.__proto__=b})||function(d,b){for(var p in b){if(b.hasOwnProperty(p)){d[p]=b[p]}}};__extends=function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s){if(Object.prototype.hasOwnProperty.call(s,p)){t[p]=s[p]}}}return t};__rest=function(s,e){var t={};for(var p in s){if(Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0){t[p]=s[p]}}if(s!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++){if(e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])){t[p[i]]=s[p[i]]}}}return t};__decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function"){r=Reflect.decorate(decorators,target,key,desc)}else{for(var i=decorators.length-1;i>=0;i--){if(d=decorators[i]){r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r}}}return c>3&&r&&Object.defineProperty(target,key,r),r};__param=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__metadata=function(metadataKey,metadataValue){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function"){return Reflect.metadata(metadataKey,metadataValue)}};__awaiter=function(thisArg,_arguments,P,generator){return new (P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};__generator=function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1){throw t[1]}return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f){throw new TypeError("Generator is already executing.")}while(_){try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done){return t}if(y=0,t){op=[op[0]&2,t.value]}switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||(op[1]>t[0]&&op[1]<t[3]))){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break}if(t[2]){_.ops.pop()}_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}}if(op[0]&5){throw op[1]}return{value:op[0]?op[1]:void 0,done:true}
}};__exportStar=function(m,exports){for(var p in m){if(!exports.hasOwnProperty(p)){exports[p]=m[p]}}};__values=function(o){var m=typeof Symbol==="function"&&o[Symbol.iterator],i=0;if(m){return m.call(o)}return{next:function(){if(o&&i>=o.length){o=void 0}return{value:o&&o[i++],done:!o}}}};__read=function(o,n){var m=typeof Symbol==="function"&&o[Symbol.iterator];if(!m){return o}var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-->0)&&!(r=i.next()).done){ar.push(r.value)}}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"])){m.call(i)}}finally{if(e){throw e.error}}}return ar};__spread=function(){for(var ar=[],i=0;i<arguments.length;i++){ar=ar.concat(__read(arguments[i]))}return ar};__spreadArrays=function(){for(var s=0,i=0,il=arguments.length;i<il;i++){s+=arguments[i].length}for(var r=Array(s),k=0,i=0;i<il;i++){for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++){r[k]=a[j]}}return r};__await=function(v){return this instanceof __await?(this.v=v,this):new __await(v)};__asyncGenerator=function(thisArg,_arguments,generator){if(!Symbol.asyncIterator){throw new TypeError("Symbol.asyncIterator is not defined.")}var g=generator.apply(thisArg,_arguments||[]),i,q=[];return i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i;function verb(n){if(g[n]){i[n]=function(v){return new Promise(function(a,b){q.push([n,v,a,b])>1||resume(n,v)})}}}function resume(n,v){try{step(g[n](v))}catch(e){settle(q[0][3],e)}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r)}function fulfill(value){resume("next",value)}function reject(value){resume("throw",value)}function settle(f,v){if(f(v),q.shift(),q.length){resume(q[0][0],q[0][1])}}};__asyncDelegator=function(o){var i,p;return i={},verb("next"),verb("throw",function(e){throw e}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(n,f){i[n]=o[n]?function(v){return(p=!p)?{value:__await(o[n](v)),done:n==="return"}:f?f(v):v}:f}};__asyncValues=function(o){if(!Symbol.asyncIterator){throw new TypeError("Symbol.asyncIterator is not defined.")}var m=o[Symbol.asyncIterator],i;return m?m.call(o):(o=typeof __values==="function"?__values(o):o[Symbol.iterator](),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(n){i[n]=o[n]&&function(v){return new Promise(function(resolve,reject){v=o[n](v),settle(resolve,reject,v.done,v.value)})}}function settle(resolve,reject,d,v){Promise.resolve(v).then(function(v){resolve({value:v,done:d})},reject)}};__makeTemplateObject=function(cooked,raw){if(Object.defineProperty){Object.defineProperty(cooked,"raw",{value:raw})}else{cooked.raw=raw}return cooked};__importStar=function(mod){if(mod&&mod.__esModule){return mod}var result={};if(mod!=null){for(var k in mod){if(Object.hasOwnProperty.call(mod,k)){result[k]=mod[k]}}}result["default"]=mod;return result};__importDefault=function(mod){return(mod&&mod.__esModule)?mod:{"default":mod}};exporter("__extends",__extends);exporter("__assign",__assign);exporter("__rest",__rest);exporter("__decorate",__decorate);exporter("__param",__param);exporter("__metadata",__metadata);exporter("__awaiter",__awaiter);exporter("__generator",__generator);exporter("__exportStar",__exportStar);exporter("__values",__values);exporter("__read",__read);exporter("__spread",__spread);exporter("__spreadArrays",__spreadArrays);exporter("__await",__await);exporter("__asyncGenerator",__asyncGenerator);exporter("__asyncDelegator",__asyncDelegator);exporter("__asyncValues",__asyncValues);exporter("__makeTemplateObject",__makeTemplateObject);exporter("__importStar",__importStar);exporter("__importDefault",__importDefault)});
var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: __decorate,__param: __param,__metadata: __metadata,__awaiter: __awaiter,__generator: __generator,__exportStar: __exportStar,__values: __values,__read: __read,__spread: __spread,__spreadArrays: __spreadArrays,__await: __await,__asyncGenerator: __asyncGenerator,__asyncDelegator: __asyncDelegator,__asyncValues: __asyncValues,__makeTemplateObject: __makeTemplateObject,__importStar: __importStar,__importDefault: __importDefault};
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.engine = {}));
}(this, function (exports) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('tslib')) :
typeof define === 'function' && define.amd ? define(['exports', 'tslib'], factory) :
(global = global || self, factory(global.engine = {}, global.tslib));
}(this, function (exports, tslib_1) { 'use strict';
var HashObject = (function () {
function HashObject() {
......@@ -102,7 +32,7 @@
}());
var Event = (function (_super) {
__extends(Event, _super);
tslib_1.__extends(Event, _super);
function Event(type) {
var _this = _super.call(this) || this;
_this.type = "";
......@@ -154,7 +84,7 @@
}(HashObject));
var EventDispatcher = (function (_super) {
__extends(EventDispatcher, _super);
tslib_1.__extends(EventDispatcher, _super);
function EventDispatcher() {
var _this = _super.call(this) || this;
_this.eventTypes = {};
......@@ -357,7 +287,7 @@
}());
var ObservablePoint = (function (_super) {
__extends(ObservablePoint, _super);
tslib_1.__extends(ObservablePoint, _super);
function ObservablePoint(cb, scope, x, y) {
if (x === void 0) { x = 0; }
if (y === void 0) { y = 0; }
......@@ -420,7 +350,7 @@
}(HashObject));
var Point = (function (_super) {
__extends(Point, _super);
tslib_1.__extends(Point, _super);
function Point(x, y) {
if (x === void 0) { x = 0; }
if (y === void 0) { y = 0; }
......@@ -614,7 +544,7 @@
var DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;
var Matrix = (function (_super) {
__extends(Matrix, _super);
tslib_1.__extends(Matrix, _super);
function Matrix(a, b, c, d, tx, ty) {
if (a === void 0) { a = 1; }
if (b === void 0) { b = 0; }
......@@ -884,7 +814,7 @@
}(HashObject));
var Transform = (function (_super) {
__extends(Transform, _super);
tslib_1.__extends(Transform, _super);
function Transform() {
var _this = _super.call(this) || this;
var s = _this;
......@@ -984,7 +914,7 @@
}(HashObject));
var Rectangle = (function (_super) {
__extends(Rectangle, _super);
tslib_1.__extends(Rectangle, _super);
function Rectangle(x, y, width, height) {
if (x === void 0) { x = 0; }
if (y === void 0) { y = 0; }
......@@ -1185,7 +1115,7 @@
}(HashObject));
var DisplayObject = (function (_super) {
__extends(DisplayObject, _super);
tslib_1.__extends(DisplayObject, _super);
function DisplayObject() {
var _this = _super.call(this) || this;
_this.mouseEnabled = true;
......@@ -1603,7 +1533,7 @@
}());
var MouseEvent = (function (_super) {
__extends(MouseEvent, _super);
tslib_1.__extends(MouseEvent, _super);
function MouseEvent(type) {
var _this = _super.call(this, type) || this;
_this.clientX = 0;
......@@ -1681,10 +1611,12 @@
};
AdjustProxy.prototype.onAddedToStage = function (e) {
this._host.parent.addEventListener(Event.RESIZE, this.onResize, this);
this._host.addEventListener(Event.RESIZE, this.onResize, this);
this._host.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, this);
};
AdjustProxy.prototype.onRemovedFromStage = function (e) {
this._host.parent.removeEventListener(Event.RESIZE, this.onResize);
this._host.removeEventListener(Event.RESIZE, this.onResize, this);
this._host.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
};
AdjustProxy.prototype.setFrom = function (adjustProxy) {
......@@ -1928,6 +1860,197 @@
return result;
}
var rotateLeft = function (lValue, iShiftBits) {
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
};
var addUnsigned = function (lX, lY) {
var lX4, lY4, lX8, lY8, lResult;
lX8 = (lX & 0x80000000);
lY8 = (lY & 0x80000000);
lX4 = (lX & 0x40000000);
lY4 = (lY & 0x40000000);
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
if (lX4 & lY4)
return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
if (lX4 | lY4) {
if (lResult & 0x40000000)
return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
else
return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
}
else {
return (lResult ^ lX8 ^ lY8);
}
};
var F = function (x, y, z) {
return (x & y) | ((~x) & z);
};
var G = function (x, y, z) {
return (x & z) | (y & (~z));
};
var H = function (x, y, z) {
return (x ^ y ^ z);
};
var I = function (x, y, z) {
return (y ^ (x | (~z)));
};
var FF = function (a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var GG = function (a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var HH = function (a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var II = function (a, b, c, d, x, s, ac) {
a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
return addUnsigned(rotateLeft(a, s), b);
};
var convertToWordArray = function (string) {
var lWordCount;
var lMessageLength = string.length;
var lNumberOfWordsTempOne = lMessageLength + 8;
var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
var lWordArray = Array(lNumberOfWords - 1);
var lBytePosition = 0;
var lByteCount = 0;
while (lByteCount < lMessageLength) {
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
lByteCount++;
}
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
lBytePosition = (lByteCount % 4) * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
return lWordArray;
};
var wordToHex = function (lValue) {
var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount;
for (lCount = 0; lCount <= 3; lCount++) {
lByte = (lValue >>> (lCount * 8)) & 255;
WordToHexValueTemp = "0" + lByte.toString(16);
WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
}
return WordToHexValue;
};
var uTF8Encode = function (string) {
string = string.replace(/\x0d\x0a/g, "\x0a");
var output = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
output += String.fromCharCode(c);
}
else if ((c > 127) && (c < 2048)) {
output += String.fromCharCode((c >> 6) | 192);
output += String.fromCharCode((c & 63) | 128);
}
else {
output += String.fromCharCode((c >> 12) | 224);
output += String.fromCharCode(((c >> 6) & 63) | 128);
output += String.fromCharCode((c & 63) | 128);
}
}
return output;
};
function md5(string) {
var k, AA, BB, CC, DD, a, b, c, d;
var S11 = 7, S12 = 12, S13 = 17, S14 = 22;
var S21 = 5, S22 = 9, S23 = 14, S24 = 20;
var S31 = 4, S32 = 11, S33 = 16, S34 = 23;
var S41 = 6, S42 = 10, S43 = 15, S44 = 21;
string = uTF8Encode(string);
var x = convertToWordArray(string);
a = 0x67452301;
b = 0xEFCDAB89;
c = 0x98BADCFE;
d = 0x10325476;
for (k = 0; k < x.length; k += 16) {
AA = a;
BB = b;
CC = c;
DD = d;
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
a = addUnsigned(a, AA);
b = addUnsigned(b, BB);
c = addUnsigned(c, CC);
d = addUnsigned(d, DD);
}
var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
return tempValue.toLowerCase();
}
var scriptDefs = {};
function applyScript(ctor) {
ctor.prototype.applyScripts = function () {
......@@ -2002,7 +2125,7 @@
ScriptsProxy.prototype.add = function (name, options, disabled) {
var def = scriptDefs[name];
if (!def) {
console.warn('script def not exists');
console.warn("script[" + name + "] def not exists");
return;
}
var script = new def();
......@@ -2080,7 +2203,7 @@
}
var DataCenter = (function (_super) {
__extends(DataCenter, _super);
tslib_1.__extends(DataCenter, _super);
function DataCenter() {
var _this = _super.call(this) || this;
_this.store = {};
......@@ -2189,6 +2312,7 @@
}
}
var linkScheme = 'link://';
var Process = (function () {
function Process() {
}
......@@ -2225,9 +2349,9 @@
}
};
Process.prototype.execute = function (args) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var metaConfig, meta, result, p, i, li, key, scriptResult, subProcessResult;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
metaConfig = this._config.meta;
......@@ -2239,7 +2363,7 @@
return [2];
}
{
console.log("execute process [" + (this._config.alias || meta.name || meta.id) + "]");
console.log("[" + this._vm.id + "] execute process [" + (this._config.alias || meta.name || meta.id) + "]");
}
if (!meta.isDivider) return [3, 6];
p = void 0;
......@@ -2279,9 +2403,9 @@
});
};
Process.prototype._executeMetaScript = function (type, payload, meta) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var result, metaConfig, func, globalContext;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
result = {
......@@ -2292,7 +2416,16 @@
if (!metaConfig) return [3, 3];
this.updateProps(this._config.props = {}, payload, this._originProps, this._meta.props);
if (!metaConfig.script) return [3, 2];
func = void 0;
if (metaConfig.script.indexOf(linkScheme) === 0) {
func = this._vm.getScript(metaConfig.script.replace(linkScheme, ''));
}
else {
func = new Function('args', 'props', 'target', 'global', 'vm', warpAsyncScript(metaConfig.script));
}
if (!func) {
console.log();
}
globalContext = this._vm.globalContext;
return [4, func(payload, this._config.props, this._target, globalContext, this._vm)];
case 1:
......@@ -2308,9 +2441,9 @@
});
};
Process.prototype._executeSubProcess = function (type, payload) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var result, _a, sub, subEntry;
return __generator(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {
case 0:
result = {
......@@ -2329,9 +2462,9 @@
});
};
Process.prototype._executeNextProcess = function (type, payload) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var result, output, nextPids;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
result = { type: type, payload: payload };
......@@ -2441,16 +2574,17 @@
function VM() {
}
VM.prototype.setup = function (context) {
var processMetaLibs = context.processMetaLibs, globalContext = context.globalContext, target = context.target;
var processMetaLibs = context.processMetaLibs, globalContext = context.globalContext, target = context.target, scriptMap = context.scriptMap;
this._processMetaLibs = processMetaLibs;
this._globalContext = globalContext;
this._target = target;
this._id = ID_INK++;
this._scriptMap = scriptMap;
};
VM.prototype.executeProcess = function (sequence, id, parentProcess, args) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var process;
return __generator(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
process = new Process();
......@@ -2476,6 +2610,9 @@
}
}
};
VM.prototype.getScript = function (hash) {
return this._scriptMap[hash];
};
Object.defineProperty(VM.prototype, "globalContext", {
get: function () {
return this._globalContext;
......@@ -2495,6 +2632,7 @@
var processMetaLibs = [];
var globalContext = {};
var scriptMap = {};
function setProcessMetaLibs() {
var metaContexts = [];
for (var _i = 0; _i < arguments.length; _i++) {
......@@ -2511,6 +2649,9 @@
globalContext[key] = context[key];
}
}
function setScriptMap(_scriptMap) {
scriptMap = _scriptMap;
}
function executeBehavior(sequence, subEntry, target, args) {
if (subEntry === void 0) { subEntry = 'main'; }
var vm = new VM();
......@@ -2518,12 +2659,13 @@
processMetaLibs: processMetaLibs,
globalContext: globalContext,
target: target,
scriptMap: scriptMap,
});
vm.executeProcess(sequence, subEntry, null, args)
.then(function (result) {
console.log('result:', result);
console.log("[" + vm.id + "] result:", result);
}, function (e) {
console.log('terminate:', e);
console.log("[" + vm.id + "] terminate:", e);
});
}
......@@ -2540,7 +2682,7 @@
var DATA_CENTER_EVENT = 'DATA_CENTER_EVENT';
function applyEvents(ctor) {
ctor.prototype.applyEvents = function () {
var eventsProxy = this.eventsProxy = new EventsProxy();
var eventsProxy = this.eventsProxy = new EventsProxy(this);
for (var k in eventsMapping) {
this.addEventListener(k, eventsProxy.onEvent, eventsProxy);
}
......@@ -2548,12 +2690,14 @@
};
}
var EventsProxy = (function (_super) {
__extends(EventsProxy, _super);
function EventsProxy() {
return _super.call(this) || this;
tslib_1.__extends(EventsProxy, _super);
function EventsProxy(host) {
var _this = _super.call(this) || this;
_this.host = host;
return _this;
}
EventsProxy.prototype.start = function () {
this.invoke('init', this);
this.invoke('init', this.host);
};
EventsProxy.prototype.invoke = function (name, target, payload) {
if (this.eventsConfig) {
......@@ -2561,7 +2705,7 @@
if (eventConfig) {
executeBehavior({
main: eventConfig.behaviors[0],
}, 'main', target);
}, 'main', target, payload);
}
}
};
......@@ -2572,7 +2716,7 @@
}
};
EventsProxy.prototype.onDateCenterEvent = function (e) {
this.invoke('datacenter', this, e.data);
this.invoke('data-center', this.host, e.data);
};
EventsProxy.prototype.destroy = function () {
};
......@@ -2602,7 +2746,7 @@
}
var Container = (function (_super) {
__extends(Container, _super);
tslib_1.__extends(Container, _super);
function Container() {
var _this = _super.call(this) || this;
_this.mouseChildren = true;
......@@ -2981,7 +3125,7 @@
}
};
var Container_1;
Container = Container_1 = __decorate([
Container = Container_1 = tslib_1.__decorate([
afterConstructor,
applyAutoAdjust,
applyScript,
......@@ -2992,7 +3136,7 @@
Container.prototype.containerUpdateTransform = Container.prototype.updateTransform;
var FloatDisplay = (function (_super) {
__extends(FloatDisplay, _super);
tslib_1.__extends(FloatDisplay, _super);
function FloatDisplay() {
var _this = _super.call(this) || this;
_this.htmlElement = null;
......@@ -3262,7 +3406,7 @@
var tempMatrix = new Matrix();
var SystemRenderer = (function (_super) {
__extends(SystemRenderer, _super);
tslib_1.__extends(SystemRenderer, _super);
function SystemRenderer(options) {
var _this = _super.call(this) || this;
_this.options = options;
......@@ -3549,7 +3693,7 @@
}
var CanvasMaskManager = (function (_super) {
__extends(CanvasMaskManager, _super);
tslib_1.__extends(CanvasMaskManager, _super);
function CanvasMaskManager(renderer) {
var _this = _super.call(this) || this;
_this._instanceType = "CanvasMaskManager";
......@@ -3743,7 +3887,7 @@
}());
var CanvasRenderer = (function (_super) {
__extends(CanvasRenderer, _super);
tslib_1.__extends(CanvasRenderer, _super);
function CanvasRenderer(options) {
var _this = _super.call(this, options) || this;
_this._instanceType = "CanvasRenderer";
......@@ -4088,7 +4232,7 @@
}
var BaseTexture = (function (_super) {
__extends(BaseTexture, _super);
tslib_1.__extends(BaseTexture, _super);
function BaseTexture(source, scaleMode) {
if (scaleMode === void 0) { scaleMode = exports.SCALE_MODES.LINEAR; }
var _this = _super.call(this) || this;
......@@ -4368,7 +4512,7 @@
}());
var Texture = (function (_super) {
__extends(Texture, _super);
tslib_1.__extends(Texture, _super);
function Texture(baseTexture, frame, orig, trim, rotate, anchor) {
var _this = _super.call(this) || this;
_this._instanceType = "Texture";
......@@ -4615,7 +4759,7 @@
var indices = new Uint16Array([0, 1, 2, 0, 2, 3]);
var Sprite = (function (_super) {
__extends(Sprite, _super);
tslib_1.__extends(Sprite, _super);
function Sprite(texture) {
var _this = _super.call(this) || this;
_this._instanceType = "Sprite";
......@@ -5758,7 +5902,7 @@
var TICK = 0;
var BatchRenderer = (function (_super) {
__extends(BatchRenderer, _super);
tslib_1.__extends(BatchRenderer, _super);
function BatchRenderer(renderer) {
var _this = _super.call(this, renderer) || this;
_this.vertSize = 6;
......@@ -6584,7 +6728,7 @@
var CONTEXT_UID = 0;
var WebglRenderer = (function (_super) {
__extends(WebglRenderer, _super);
tslib_1.__extends(WebglRenderer, _super);
function WebglRenderer(options) {
var _this = _super.call(this, options) || this;
_this.plugins = {};
......@@ -6596,7 +6740,7 @@
_this.htmlElement.addEventListener('webglcontextrestored', _this.handleContextRestored, false);
var contextOptions = {
alpha: _this.transparent,
antialias: _this.options.antialias,
antialias: !!_this.options.antialias,
premultipliedAlpha: true,
stencil: true,
preserveDrawingBuffer: _this.options.preserveDrawingBuffer,
......@@ -6822,7 +6966,7 @@
return requestAnimationFrame;
}());
var Stage = (function (_super) {
__extends(Stage, _super);
tslib_1.__extends(Stage, _super);
function Stage(rootDivId, desW, desH, frameRate, scaleMode, renderType, transparent, bgColor) {
if (rootDivId === void 0) { rootDivId = "cusEngine"; }
if (desW === void 0) { desW = 750; }
......@@ -6876,8 +7020,6 @@
s.rootDiv = div;
s.setFrameRate(frameRate);
s._scaleMode = scaleMode;
s.anchorX = desW >> 1;
s.anchorY = desH >> 1;
var canvas = document.createElement("canvas");
s.rootDiv.appendChild(canvas);
canvas.id = "cusCanvas";
......@@ -7262,14 +7404,10 @@
var divW = s.divWidth * devicePixelRatio;
var desH = s.desHeight;
var desW = s.desWidth;
s.anchorX = desW >> 1;
s.anchorY = desH >> 1;
var isDivH = divH > divW;
var isDesH = desH > desW;
var scaleY = 1;
var scaleX = 1;
s.x = (divW - desW) >> 1;
s.y = (divH - desH) >> 1;
if (s.autoSteering) {
if (isDesH != isDivH) {
var d = divH;
......@@ -7393,7 +7531,7 @@
}(Container));
var GraphicsData = (function (_super) {
__extends(GraphicsData, _super);
tslib_1.__extends(GraphicsData, _super);
function GraphicsData(shape, fillStyle, lineStyle, matrix) {
if (fillStyle === void 0) { fillStyle = null; }
if (lineStyle === void 0) { lineStyle = null; }
......@@ -7425,7 +7563,7 @@
}(HashObject));
var BaseRenderTexture = (function (_super) {
__extends(BaseRenderTexture, _super);
tslib_1.__extends(BaseRenderTexture, _super);
function BaseRenderTexture(width, height, scaleMode) {
if (width === void 0) { width = 100; }
if (height === void 0) { height = 100; }
......@@ -7461,7 +7599,7 @@
}(BaseTexture));
var RenderTexture = (function (_super) {
__extends(RenderTexture, _super);
tslib_1.__extends(RenderTexture, _super);
function RenderTexture(baseRenderTexture, frame) {
var _this = _super.call(this, baseRenderTexture, frame) || this;
_this.valid = true;
......@@ -8425,7 +8563,7 @@
}());
var LineStyle = (function (_super) {
__extends(LineStyle, _super);
tslib_1.__extends(LineStyle, _super);
function LineStyle() {
return _super !== null && _super.apply(this, arguments) || this;
}
......@@ -8554,7 +8692,7 @@
fillCommands[exports.SHAPES.RECT] = buildRectangle;
fillCommands[exports.SHAPES.RREC] = buildRoundedRectangle;
var Graphics = (function (_super) {
__extends(Graphics, _super);
tslib_1.__extends(Graphics, _super);
function Graphics() {
var _this = _super.call(this) || this;
_this.batchTint = -1;
......@@ -9430,7 +9568,7 @@
}());
var Shape = (function (_super) {
__extends(Shape, _super);
tslib_1.__extends(Shape, _super);
function Shape() {
var _this = _super.call(this) || this;
_this._command = [];
......@@ -10039,7 +10177,9 @@
}
function urlJoin(url, query) {
if (query) {
return url + (url.indexOf('?') < 0 ? '?' : '') + (url[url.length - 1] === '&' ? '' : '&') + query;
url += url.indexOf('?') < 0 ? '?' : '';
url += url[url.length - 1] === '?' ? '' : '&';
return url + query;
}
else {
return url;
......@@ -10047,7 +10187,7 @@
}
var Loader = (function (_super) {
__extends(Loader, _super);
tslib_1.__extends(Loader, _super);
function Loader() {
var _this = _super.call(this) || this;
_this.caches = {};
......@@ -10133,7 +10273,7 @@
var padding = 10;
var TextField = (function (_super) {
__extends(TextField, _super);
tslib_1.__extends(TextField, _super);
function TextField() {
var _this = _super.call(this) || this;
_this._textAlpha = 1;
......@@ -10144,7 +10284,7 @@
_this._text = "";
_this._font = "Arial";
_this._size = 12;
_this._fillColor = "#ffffff";
_this._fillColor = "#000";
_this._strokeColor = "#ffffff";
_this._stroke = 0;
_this._italic = false;
......@@ -10573,7 +10713,7 @@
}(Sprite));
var InputText = (function (_super) {
__extends(InputText, _super);
tslib_1.__extends(InputText, _super);
function InputText(inputType) {
if (inputType === void 0) { inputType = 0; }
var _this = _super.call(this) || this;
......@@ -10770,7 +10910,7 @@
}(FloatDisplay));
var EditableText = (function (_super) {
__extends(EditableText, _super);
tslib_1.__extends(EditableText, _super);
function EditableText() {
var _this = _super.call(this) || this;
_this._prompt = "";
......@@ -10871,7 +11011,7 @@
}(TextField));
var ScrollContainer = (function (_super) {
__extends(ScrollContainer, _super);
tslib_1.__extends(ScrollContainer, _super);
function ScrollContainer(maxDistance, isVertical, isFull) {
if (isVertical === void 0) { isVertical = true; }
if (isFull === void 0) { isFull = false; }
......@@ -11099,7 +11239,7 @@
}(Container));
var ScrollList = (function (_super) {
__extends(ScrollList, _super);
tslib_1.__extends(ScrollList, _super);
function ScrollList(itemClassName, itemWidth, itemHeight, vW, vH, isVertical, cols) {
if (isVertical === void 0) { isVertical = true; }
if (cols === void 0) { cols = 1; }
......@@ -11259,7 +11399,7 @@
}(ScrollContainer));
var Button = (function (_super) {
__extends(Button, _super);
tslib_1.__extends(Button, _super);
function Button(tUp, tDown, tDisable) {
var _this = _super.call(this, tUp) || this;
_this._clicked = false;
......@@ -11895,7 +12035,7 @@
}());
var StackContainer = (function (_super) {
__extends(StackContainer, _super);
tslib_1.__extends(StackContainer, _super);
function StackContainer(mutex) {
if (mutex === void 0) { mutex = true; }
var _this = _super.call(this) || this;
......@@ -12040,7 +12180,7 @@
});
var ShapeBase = (function (_super) {
__extends(ShapeBase, _super);
tslib_1.__extends(ShapeBase, _super);
function ShapeBase() {
var _this = _super.call(this) || this;
_this.__fieldDirty = true;
......@@ -12072,19 +12212,19 @@
};
ShapeBase.prototype.redraw = function () {
};
__decorate([
tslib_1.__decorate([
dirtyFieldDetector
], ShapeBase.prototype, "fillColor", void 0);
__decorate([
tslib_1.__decorate([
dirtyFieldDetector
], ShapeBase.prototype, "strokeColor", void 0);
__decorate([
tslib_1.__decorate([
dirtyFieldDetector
], ShapeBase.prototype, "strokeWidth", void 0);
return ShapeBase;
}(Shape));
var Rect = (function (_super) {
__extends(Rect, _super);
tslib_1.__extends(Rect, _super);
function Rect() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.borderRadius = 0;
......@@ -12099,13 +12239,13 @@
this.drawRect(0, 0, width, height);
}
};
__decorate([
tslib_1.__decorate([
dirtyFieldDetector
], Rect.prototype, "borderRadius", void 0);
return Rect;
}(ShapeBase));
var Circle$1 = (function (_super) {
__extends(Circle, _super);
tslib_1.__extends(Circle, _super);
function Circle() {
return _super !== null && _super.apply(this, arguments) || this;
}
......@@ -12120,7 +12260,7 @@
var assetScheme = 'asset://';
var Image$1 = (function (_super) {
__extends(Image, _super);
tslib_1.__extends(Image, _super);
function Image() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._escapes = [];
......@@ -12161,6 +12301,7 @@
this.updateSource();
};
Image.prototype._setSource = function (value) {
if (value !== this._source) {
var matchResult = value.match(ESCAPE_REG_EXP);
if (matchResult) {
this.unregisterEvents();
......@@ -12180,6 +12321,8 @@
else {
this._setSourceDirect(value);
}
this.dispatchEvent(Event.RESIZE);
}
};
Image.prototype.unregisterEvents = function () {
for (var _i = 0, _a = this._registeredEvents; _i < _a.length; _i++) {
......@@ -12195,7 +12338,7 @@
}(Sprite));
var Label = (function (_super) {
__extends(Label, _super);
tslib_1.__extends(Label, _super);
function Label() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._escapes = [];
......@@ -12203,6 +12346,7 @@
return _this;
}
Label.prototype._setText = function (value) {
if (value !== this._text) {
var matchResult = value.match(ESCAPE_REG_EXP);
if (matchResult) {
this.unregisterEvents();
......@@ -12222,6 +12366,8 @@
else {
_super.prototype._setText.call(this, value);
}
this.dispatchEvent(Event.RESIZE);
}
};
Label.prototype.unregisterEvents = function () {
for (var _i = 0, _a = this._registeredEvents; _i < _a.length; _i++) {
......@@ -12250,7 +12396,7 @@
'removeChildren',
];
var ScrollView = (function (_super) {
__extends(ScrollView, _super);
tslib_1.__extends(ScrollView, _super);
function ScrollView() {
var _this = _super.call(this) || this;
for (var _i = 0, proxyMethods_1 = proxyMethods; _i < proxyMethods_1.length; _i++) {
......@@ -12317,30 +12463,6 @@
}
}
var customMap = {};
function registerCustomModule(config) {
var id = config.id, code = config.code;
customMap[id] = importCJSCode(code, true);
}
function registerCustomModuleFromConfig(config) {
if (config) {
for (var _i = 0, config_1 = config; _i < config_1.length; _i++) {
var item = config_1[_i];
registerCustomModule(item);
}
}
}
function addCustomModule(id, container, options) {
var creator = customMap[id];
if (creator) {
var instance = creator(options);
if (instance) {
container.addChild(instance);
return instance;
}
}
}
var template = "\n<div style=\"\nposition: absolute;\nleft: 0;\nright: 0;\ntop: 0;\nbottom: 0;\ndisplay: flex;\ndisplay: -webkit-flex;\njustify-content: center;\n-webkit-justify-content: center;\nalign-items: center;\n-webkit-align-items: center;\n\">\n<img src=\"//yun.duiba.com.cn/editor/zeroing/assets/loading.gif\"\n</div>\n";
var container = document.createElement('div');
container.innerHTML = template;
......@@ -12357,7 +12479,7 @@
}
var GameStage = (function (_super) {
__extends(GameStage, _super);
tslib_1.__extends(GameStage, _super);
function GameStage(stage) {
var _this = _super.call(this) || this;
_this._viewCache = {};
......@@ -12403,7 +12525,7 @@
configurable: true
});
GameStage.prototype.launch = function (config, onAssetsProgress, onAssetsComplete) {
return __awaiter(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
function p() {
loaded++;
onAssetsProgress && onAssetsProgress(loaded, total);
......@@ -12412,7 +12534,7 @@
}
}
var assets, customs, loaded, total, _i, customs_1, custom, _a, customs_2, custom;
return __generator(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {
case 0:
this._config = config;
......@@ -12457,8 +12579,6 @@
var _a = this._config, _b = _a.options, entrySceneView = _b.entrySceneView, env = _b.env, dataMapping = _a.dataMapping, processes = _a.processes, builtinProcesses = _a.builtinProcesses, scripts = _a.scripts, customs = _a.customs;
Stage.addUpdateObj(Tween);
injectEnv(env);
registerScripts(scripts);
registerCustomModuleFromConfig(customs);
this.dataCenter.registerDataMapping(dataMapping);
setProcessMetaLibs(processes, builtinProcesses);
var sceneEntry = this.instantiateView(entrySceneView);
......@@ -12509,6 +12629,33 @@
return GameStage;
}(Container));
var customMap = {};
function registerCustomModule(id, def) {
customMap[id] = def;
}
function registerCustomCodeModule(config) {
var id = config.id, code = config.code;
registerCustomModule(id, importCJSCode(code, true));
}
function registerCustomModuleFromConfig(config) {
if (config) {
for (var _i = 0, config_1 = config; _i < config_1.length; _i++) {
var item = config_1[_i];
registerCustomCodeModule(item);
}
}
}
function addCustomModule(id, container, options) {
var creator = customMap[id];
if (creator) {
var instance = creator(options);
if (instance) {
container.addChild(instance);
return instance;
}
}
}
function launch(url, onAssetsProgress, onAssetsComplete) {
return new Promise(function (resolve, reject) {
globalLoader.loadJson(function (s, payload) {
......@@ -12594,6 +12741,7 @@
exports.dirtyFieldDetector = dirtyFieldDetector;
exports.dirtyFieldTrigger = dirtyFieldTrigger;
exports.env = env;
exports.executeBehavior = executeBehavior;
exports.fieldChanged = fieldChanged;
exports.findVariable = findVariable;
exports.getDataByPath = getDataByPath;
......@@ -12612,15 +12760,20 @@
exports.launch = launch;
exports.launchWithConfig = launchWithConfig;
exports.linkedFlag = linkedFlag;
exports.md5 = md5;
exports.nodeScheme = nodeScheme;
exports.obj2query = obj2query;
exports.objClone = objClone;
exports.osType = osType;
exports.propertyParse = propertyParse;
exports.registerCustomCodeModule = registerCustomCodeModule;
exports.registerCustomModule = registerCustomModule;
exports.registerCustomModuleFromConfig = registerCustomModuleFromConfig;
exports.registerScriptDef = registerScriptDef;
exports.registerScripts = registerScripts;
exports.setGlobalContext = setGlobalContext;
exports.setProcessMetaLibs = setProcessMetaLibs;
exports.setScriptMap = setScriptMap;
exports.sin = sin;
exports.toDisplayDataURL = toDisplayDataURL;
exports.trimChar = trimChar;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,8 +6,7 @@
"types": "index.d.ts",
"dependencies": {
"glob": "^7.1.6",
"rollup-plugin-typescript": "^1.0.1",
"tslib": "^1.10.0"
"rollup-plugin-typescript": "^1.0.1"
},
"devDependencies": {
"dts-bundle": "^0.7.3",
......@@ -26,7 +25,7 @@
},
"scripts": {
"build-webpack": "webpack",
"rollup": "rollup -c -o dist/engine.js",
"rollup": "rollup -c -o dist/engine.js --environment BUILD:production",
"rollup:debug": "rollup -c -m ",
"rename": "node scripts/rename-hash.js dist/engine.js",
"build": "rm -rf dist&&yarn rollup && yarn rename",
......
......@@ -7,28 +7,37 @@ const commonjs = require('rollup-plugin-commonjs');
const progress = require('rollup-plugin-progress');
const typescript = require('rollup-plugin-typescript');
const {uglify} = require('rollup-plugin-uglify');
const fs = require('fs');
export default {
const tslibWrapper = 'var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: __decorate,__param: __param,__metadata: __metadata,__awaiter: __awaiter,__generator: __generator,__exportStar: __exportStar,__values: __values,__read: __read,__spread: __spread,__spreadArrays: __spreadArrays,__await: __await,__asyncGenerator: __asyncGenerator,__asyncDelegator: __asyncDelegator,__asyncValues: __asyncValues,__makeTemplateObject: __makeTemplateObject,__importStar: __importStar,__importDefault: __importDefault};'
const tslibCode = fs.readFileSync(__dirname + '/scripts/tslib.min.js');
const options = {
input: 'src/index.ts',
output: [
{
file: `debug/engine.js`,
format: 'umd',
name: 'engine',
globals: {
tslib: 'tslib'
},
banner: tslibCode + '\n' + tslibWrapper,
}
],
plugins: [
progress(),
resolve({
//only: [/^\.{0,2}\//],
}),
resolve({}),
typescript({
//useTsconfigDeclarationDir: true,
}),
commonjs(),
//uglify({}),
],
onwarn: function(){
}
external: ['tslib'],
};
if(process.env.BUILD === 'production'){
options.plugins.push(uglify({}));
}
export default options;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global global, define, System, Reflect, Promise */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __spreadArrays;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
(function (factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
}
else if (typeof module === "object" && typeof module.exports === "object") {
factory(createExporter(root, createExporter(module.exports)));
}
else {
factory(createExporter(root));
}
function createExporter(exports, previous) {
if (exports !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports, "__esModule", { value: true });
}
else {
exports.__esModule = true;
}
}
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
}
})
(function (exporter) {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
__extends = function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
__decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param = function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
__metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
};
__awaiter = function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
__exportStar = function (m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
};
__values = function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
};
__read = function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
__spread = function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
};
__spreadArrays = function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
__await = function (v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
};
__asyncGenerator = function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
__asyncDelegator = function (o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
};
__asyncValues = function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
__makeTemplateObject = function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
__importStar = function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
__importDefault = function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
exporter("__extends", __extends);
exporter("__assign", __assign);
exporter("__rest", __rest);
exporter("__decorate", __decorate);
exporter("__param", __param);
exporter("__metadata", __metadata);
exporter("__awaiter", __awaiter);
exporter("__generator", __generator);
exporter("__exportStar", __exportStar);
exporter("__values", __values);
exporter("__read", __read);
exporter("__spread", __spread);
exporter("__spreadArrays", __spreadArrays);
exporter("__await", __await);
exporter("__asyncGenerator", __asyncGenerator);
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
});
var __extends;var __assign;var __rest;var __decorate;var __param;var __metadata;var __awaiter;var __generator;var __exportStar;var __values;var __read;var __spread;var __spreadArrays;var __await;var __asyncGenerator;var __asyncDelegator;var __asyncValues;var __makeTemplateObject;var __importStar;var __importDefault;(function(factory){var root=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd){define("tslib",["exports"],function(exports){factory(createExporter(root,createExporter(exports)))})}else{if(typeof module==="object"&&typeof module.exports==="object"){factory(createExporter(root,createExporter(module.exports)))}else{factory(createExporter(root))}}function createExporter(exports,previous){if(exports!==root){if(typeof Object.create==="function"){Object.defineProperty(exports,"__esModule",{value:true})}else{exports.__esModule=true}}return function(id,v){return exports[id]=previous?previous(id,v):v}}})(function(exporter){var extendStatics=Object.setPrototypeOf||({__proto__:[]} instanceof Array&&function(d,b){d.__proto__=b})||function(d,b){for(var p in b){if(b.hasOwnProperty(p)){d[p]=b[p]}}};__extends=function(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s){if(Object.prototype.hasOwnProperty.call(s,p)){t[p]=s[p]}}}return t};__rest=function(s,e){var t={};for(var p in s){if(Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0){t[p]=s[p]}}if(s!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++){if(e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])){t[p[i]]=s[p[i]]}}}return t};__decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function"){r=Reflect.decorate(decorators,target,key,desc)}else{for(var i=decorators.length-1;i>=0;i--){if(d=decorators[i]){r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r}}}return c>3&&r&&Object.defineProperty(target,key,r),r};__param=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__metadata=function(metadataKey,metadataValue){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function"){return Reflect.metadata(metadataKey,metadataValue)}};__awaiter=function(thisArg,_arguments,P,generator){return new (P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};__generator=function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1){throw t[1]}return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f){throw new TypeError("Generator is already executing.")}while(_){try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done){return t}if(y=0,t){op=[op[0]&2,t.value]}switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||(op[1]>t[0]&&op[1]<t[3]))){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break}if(t[2]){_.ops.pop()}_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}}if(op[0]&5){throw op[1]}return{value:op[0]?op[1]:void 0,done:true}
}};__exportStar=function(m,exports){for(var p in m){if(!exports.hasOwnProperty(p)){exports[p]=m[p]}}};__values=function(o){var m=typeof Symbol==="function"&&o[Symbol.iterator],i=0;if(m){return m.call(o)}return{next:function(){if(o&&i>=o.length){o=void 0}return{value:o&&o[i++],done:!o}}}};__read=function(o,n){var m=typeof Symbol==="function"&&o[Symbol.iterator];if(!m){return o}var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-->0)&&!(r=i.next()).done){ar.push(r.value)}}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"])){m.call(i)}}finally{if(e){throw e.error}}}return ar};__spread=function(){for(var ar=[],i=0;i<arguments.length;i++){ar=ar.concat(__read(arguments[i]))}return ar};__spreadArrays=function(){for(var s=0,i=0,il=arguments.length;i<il;i++){s+=arguments[i].length}for(var r=Array(s),k=0,i=0;i<il;i++){for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++){r[k]=a[j]}}return r};__await=function(v){return this instanceof __await?(this.v=v,this):new __await(v)};__asyncGenerator=function(thisArg,_arguments,generator){if(!Symbol.asyncIterator){throw new TypeError("Symbol.asyncIterator is not defined.")}var g=generator.apply(thisArg,_arguments||[]),i,q=[];return i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i;function verb(n){if(g[n]){i[n]=function(v){return new Promise(function(a,b){q.push([n,v,a,b])>1||resume(n,v)})}}}function resume(n,v){try{step(g[n](v))}catch(e){settle(q[0][3],e)}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r)}function fulfill(value){resume("next",value)}function reject(value){resume("throw",value)}function settle(f,v){if(f(v),q.shift(),q.length){resume(q[0][0],q[0][1])}}};__asyncDelegator=function(o){var i,p;return i={},verb("next"),verb("throw",function(e){throw e}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(n,f){i[n]=o[n]?function(v){return(p=!p)?{value:__await(o[n](v)),done:n==="return"}:f?f(v):v}:f}};__asyncValues=function(o){if(!Symbol.asyncIterator){throw new TypeError("Symbol.asyncIterator is not defined.")}var m=o[Symbol.asyncIterator],i;return m?m.call(o):(o=typeof __values==="function"?__values(o):o[Symbol.iterator](),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(n){i[n]=o[n]&&function(v){return new Promise(function(resolve,reject){v=o[n](v),settle(resolve,reject,v.done,v.value)})}}function settle(resolve,reject,d,v){Promise.resolve(v).then(function(v){resolve({value:v,done:d})},reject)}};__makeTemplateObject=function(cooked,raw){if(Object.defineProperty){Object.defineProperty(cooked,"raw",{value:raw})}else{cooked.raw=raw}return cooked};__importStar=function(mod){if(mod&&mod.__esModule){return mod}var result={};if(mod!=null){for(var k in mod){if(Object.hasOwnProperty.call(mod,k)){result[k]=mod[k]}}}result["default"]=mod;return result};__importDefault=function(mod){return(mod&&mod.__esModule)?mod:{"default":mod}};exporter("__extends",__extends);exporter("__assign",__assign);exporter("__rest",__rest);exporter("__decorate",__decorate);exporter("__param",__param);exporter("__metadata",__metadata);exporter("__awaiter",__awaiter);exporter("__generator",__generator);exporter("__exportStar",__exportStar);exporter("__values",__values);exporter("__read",__read);exporter("__spread",__spread);exporter("__spreadArrays",__spreadArrays);exporter("__await",__await);exporter("__asyncGenerator",__asyncGenerator);exporter("__asyncDelegator",__asyncDelegator);exporter("__asyncValues",__asyncValues);exporter("__makeTemplateObject",__makeTemplateObject);exporter("__importStar",__importStar);exporter("__importDefault",__importDefault)});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment