window.__require = function e(t, n, r) {
  function s(o, u) {
    if (!n[o]) {
      if (!t[o]) {
        var b = o.split("/");
        b = b[b.length - 1];
        if (!t[b]) {
          var a = "function" == typeof __require && __require;
          if (!u && a) return a(b, !0);
          if (i) return i(b, !0);
          throw new Error("Cannot find module '" + o + "'");
        }
        o = b;
      }
      var f = n[o] = {
        exports: {}
      };
      t[o][0].call(f.exports, function(e) {
        var n = t[o][1][e];
        return s(n || e);
      }, f, f.exports, e, t, n, r);
    }
    return n[o].exports;
  }
  var i = "function" == typeof __require && __require;
  for (var o = 0; o < r.length; o++) s(r[o]);
  return s;
}({
  BaseUI: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "ad4bbohXptKULlxZpEyZSMZ", "BaseUI");
    "use strict";
    cc.Class({
      extends: cc.Component,
      onLoad: function onLoad() {
        this.nodeDict = {};
        this.linkWidget(this.node);
      },
      linkWidget: function linkWidget(node) {
        var children = node.children;
        for (var i = 0; i < children.length; i++) {
          var nodeName = children[i].name;
          if ("$" !== nodeName.substring(0, 1)) {
            this.linkWidget(children[i]);
            continue;
          }
          var realName = nodeName.substring(1);
          if (this.nodeDict[realName]) {
            cc.error("\u8282\u70b9\u540d\u5b57\u91cd\u590d!" + realName);
            this.linkWidget(children[i]);
            continue;
          }
          var isUI = false;
          this.nodeDict[realName] = children[i];
          if ("btnUI" === nodeName.substring(1, 6)) {
            children[i].on("click", this.buttonListener, this);
            isUI = true;
          } else if ("btn" === nodeName.substring(1, 4)) {
            children[i].on("click", this.buttonListener, this);
            isUI = false;
          } else "ui" === nodeName.substring(1, 3) && (isUI = true);
          children[i].name = realName;
          this.nodeDict[realName] = children[i];
          isUI || this.linkWidget(children[i]);
        }
      },
      getNodeByName: function getNodeByName(name) {
        return this.nodeDict[name];
      },
      buttonListener: function buttonListener(button) {}
    });
    cc._RF.pop();
  }, {} ],
  DefaultData: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9b844KF3tJMdKFPoUXrWdpo", "DefaultData");
    "use strict";
    exports.__esModule = true;
    exports.DefaultData = void 0;
    var DefaultData = {
      haveCover: false,
      coverType: "Image",
      coverImage: "",
      coverAudio: "",
      coverText: "",
      coverDragonBone: {
        skeJsonData: {
          url: ""
        },
        texJsonData: {
          url: ""
        },
        texPngData: {
          url: ""
        }
      },
      titleAudio: "",
      titleText: "",
      titleTextColor: "A",
      pageList: [ {
        pageType: "Image",
        pageAudio: "https://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3",
        pageText: "",
        pageImage: "",
        textColor: "A",
        pageDragonBone: {
          skeJsonData: {
            url: "http://staging-teach.cdn.ireadabc.com/b4fbbfdb7228802154092f714e028c2c.json",
            name: "1_ske.json"
          },
          texJsonData: {
            url: "http://staging-teach.cdn.ireadabc.com/0e419cc03b5ebedcf1a5c796a2c39437.json",
            name: "1_tex.json"
          },
          texPngData: {
            url: "http://staging-teach.cdn.ireadabc.com/b69d4cccd46630d1d144ae1abfa66bdb.png",
            name: "1_tex.png"
          }
        }
      }, {
        pageType: "Image",
        pageAudio: "https://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3",
        pageText: "",
        pageImage: "",
        textColor: "A",
        pageDragonBone: {
          skeJsonData: {
            url: "https://staging-teach.cdn.ireadabc.com/d4d848c9a32e3296cfa1bacb22753ea9.json",
            name: "OP_SB1_459612_U1L4_22(1)_ske.json"
          },
          texJsonData: {
            url: "https://staging-teach.cdn.ireadabc.com/4c06cdcf08b155ecc47f2236ad6e7cc2.json",
            name: "OP_SB1_459612_U1L4_22(1)_tex.json"
          },
          texPngData: {
            url: "https://staging-teach.cdn.ireadabc.com/d244e99b4376dc91e069a3f22b965051.png",
            name: "OP_SB1_459612_U1L4_22(1)_tex.png"
          }
        }
      }, {
        pageType: "Image",
        pageAudio: "https://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3",
        pageText: "",
        pageImage: "",
        textColor: "A",
        pageDragonBone: {
          skeJsonData: {
            url: "https://staging-teach.cdn.ireadabc.com/727efd64e18fe99cdfc78b801c0c93b6.json",
            name: "OP_SB1_459612_U1L4_24(1)_ske.json"
          },
          texJsonData: {
            url: "https://staging-teach.cdn.ireadabc.com/6997187f2b4a787a48fee73abb90e95d.json",
            name: "OP_SB1_459612_U1L4_24(1)_tex.json"
          },
          texPngData: {
            url: "https://staging-teach.cdn.ireadabc.com/23eaa25a8c7d6a29c775f3ad6adddbf9.png",
            name: "OP_SB1_459612_U1L4_24(1)_tex.png"
          }
        }
      }, {
        pageType: "Image",
        pageAudio: "https://staging-teach.cdn.ireadabc.com/2990d622ec2940841a0741d7b64a3c50.mp3",
        pageText: "",
        pageImage: "",
        textColor: "A",
        pageDragonBone: {
          skeJsonData: {
            url: "https://staging-teach.cdn.ireadabc.com/11afe1cee9c37fcfe26af6496ddfe21a.json",
            name: "OP_SB1_459612_U1L4_26(1)_ske.json"
          },
          texJsonData: {
            url: "https://staging-teach.cdn.ireadabc.com/06d1ce99efc8268a582419bde11671b1.json",
            name: "OP_SB1_459612_U1L4_26(1)_tex.json"
          },
          texPngData: {
            url: "https://staging-teach.cdn.ireadabc.com/e315f97f50ed6698dee354c6d5290da5.png",
            name: "OP_SB1_459612_U1L4_26(1)_tex.png"
          }
        }
      } ]
    };
    exports.DefaultData = DefaultData;
    cc._RF.pop();
  }, {} ],
  EventMgr: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "1be932YNPdN868qHa6IUyoA", "EventMgr");
    "use strict";
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var EventMgr = function() {
      function EventMgr() {
        this.es = {};
      }
      EventMgr.prototype.on = function(eventName, cb, target) {
        this.es[eventName] || (this.es[eventName] = []);
        this.es[eventName].push({
          cb: cb,
          once: false,
          target: target
        });
      };
      EventMgr.prototype.once = function(eventName, cb, target) {
        this.es[eventName] || (this.es[eventName] = []);
        this.es[eventName].push({
          cb: cb,
          once: true,
          target: target
        });
      };
      EventMgr.prototype.emit = function(eventName, params) {
        var listeners = this.es[eventName] || [];
        var l = listeners.length;
        for (var i = 0; i < l; i++) {
          var _a = listeners[i], cb = _a.cb, once = _a.once, target = _a.target;
          var args = [ eventName, params ];
          cb.apply(target, args);
          if (once) {
            listeners.splice(i, 1);
            i--;
            l--;
          }
        }
      };
      EventMgr.prototype.off = function(eventName, cb, target) {
        if (void 0 === eventName) this.es = {}; else if (void 0 === cb) delete this.es[eventName]; else if (null === cb) {
          if (!target) return;
          var listeners = this.es[eventName] || [];
          var l = listeners.length;
          for (var i = 0; i < l; i++) if (listeners[i].target === target) {
            listeners.splice(i, 1);
            i--;
            l--;
          }
        } else {
          var listeners = this.es[eventName] || [];
          var l = listeners.length;
          for (var i = 0; i < l; i++) if (listeners[i].cb === cb && listeners[i].target === target) {
            listeners.splice(i, 1);
            i--;
            l--;
          }
        }
      };
      return EventMgr;
    }();
    exports.default = new EventMgr();
    cc._RF.pop();
  }, {} ],
  ItemPage: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "7f42357OrpEersTkWS/ZJPG", "ItemPage");
    "use strict";
    var _require = require("./utils"), loadSpine = _require.loadSpine;
    var colorMap = {
      A: [ "#1f356b", "#ffffff", "#bd2c37" ],
      B: [ "#fff8d0", "#000000", "#ffb93b" ]
    };
    cc.Class({
      extends: require("BaseUI"),
      properties: {
        dragonBone: dragonBones.ArmatureDisplay,
        skeleton: sp.Skeleton
      },
      onLoad: function onLoad() {
        this._super();
        this.sprImage = this.nodeDict.sprImage.getComponent(cc.Sprite);
        this.labText = this.nodeDict.labText.getComponent(cc.RichText);
        this.labTextTitle = this.nodeDict.labTextTitle.getComponent(cc.RichText);
      },
      init: function init(data, isCover, pageIndex) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          _this.data = data;
          _this.data.pageType = "spine";
          _this.pageIndex = pageIndex;
          _this.isCover = isCover;
          _this.labText.string = "";
          _this.labTextTitle.string = "";
          "spine" == _this.data.pageDragonBone.animType ? _this.loadSpineAnim().then(function() {
            resolve("");
          }) : _this.loadDragonBoneAnim().then(function() {
            resolve("");
          });
        });
      },
      playSpine: function playSpine() {
        var _this2 = this;
        return new Promise(function(resolve, reject) {
          if ("spine" == _this2.data.pageDragonBone.animType) {
            var skeleton = _this2.skeleton;
            skeleton.setToSetupPose();
            setTimeout(function() {
              skeleton.setAnimation(0, _this2.animationName, false);
              skeleton.setCompleteListener(function() {
                GameData.isPlaying = false;
                resolve("");
              });
            }, 1);
          } else {
            _this2.dragonBone.playAnimation(_this2.animationName, 1);
            _this2.dragonBone.on(dragonBones.EventObject.COMPLETE, function(evt) {
              GameData.isPlaying = false;
              resolve("");
            });
          }
        });
      },
      playAudio: function playAudio() {
        var _this3 = this;
        this.data.pageAudio && cc.assetManager.loadRemote(this.data.pageAudio, null, function(err, clip) {
          _this3.audioID = cc.audioEngine.play(clip, false, 1);
          _this3.audioDuration = cc.audioEngine.getDuration(_this3.audioID);
        });
      },
      stopAudio: function stopAudio() {
        cc.audioEngine.stop(this.audioID);
        this.unschedule(this.chengeTextColor);
        GameData.isPlaying = false;
      },
      loadBg: function loadBg() {
        var _this4 = this;
        var url = this.data.pageImage;
        if (!url) return;
        cc.assetManager.loadRemote(url, function(error, texture) {
          error && console.log(error);
          _this4.sprImage.spriteFrame = new cc.SpriteFrame(texture);
          _this4.setBgScale();
        });
      },
      loadSpineAnim: function loadSpineAnim() {
        var _this5 = this;
        return new Promise(function(resolve, reject) {
          var tex = _this5.data.pageDragonBone.texPngData.url;
          var atlas = _this5.data.pageDragonBone.texJsonData.url;
          var ske = _this5.data.pageDragonBone.skeJsonData.url;
          loadSpine(_this5.skeleton, _this5.data.pageDragonBone.texPngData.name, {
            tex: tex,
            atlas: atlas,
            ske: ske
          }).then(function(_ref) {
            var width = _ref.width, height = _ref.height;
            _this5.skeleton.node.width = width;
            _this5.skeleton.node.height = height;
            resolve("");
            _this5.animationName = _this5.skeleton.animationNames[0];
            console.log("width: ", _this5.skeleton.node.width);
            console.log("height~~~: ", _this5.skeleton.node.height);
            console.log("this.skeleton.node: ", _this5.skeleton.node);
            _this5.setSpineScale(_this5.skeleton.node, _this5.skeleton.node);
          });
        });
      },
      loadDragonBoneAnim: function loadDragonBoneAnim() {
        var _this6 = this;
        return new Promise(function(resolve, reject) {
          var imageUrl = _this6.data.pageDragonBone.texPngData.url;
          var skeUrl = _this6.data.pageDragonBone.skeJsonData.url;
          var atlasUrl = _this6.data.pageDragonBone.texJsonData.url;
          cc.assetManager.loadAny([ {
            url: atlasUrl,
            ext: ".txt"
          }, {
            url: skeUrl,
            ext: ".txt"
          } ], function(error, assets) {
            if (error) return resolve("");
            "" == imageUrl && console.log(_this6.data);
            cc.assetManager.loadRemote(imageUrl, function(error, texture) {
              if (error) return resolve("");
              var atlas = new dragonBones.DragonBonesAtlasAsset();
              atlas._uuid = atlasUrl;
              atlas.atlasJson = assets[0];
              atlas.texture = texture;
              var asset = new dragonBones.DragonBonesAsset();
              asset._uuid = skeUrl;
              asset.dragonBonesJson = assets[1];
              _this6.dragonBone.dragonAtlasAsset = atlas;
              _this6.dragonBone.dragonAsset = asset;
              var data = asset._dragonBonesJsonData.armature[0];
              if (!data) return resolve("");
              _this6.dragonBone.armatureName = data.name;
              _this6.animationName = data.animation[0].name;
              _this6.dragonBone.animationName = _this6.animationName;
              console.log("data.canvas:", data.canvas);
              _this6.setSpineScale(data.canvas, _this6.dragonBone.node);
              return resolve("");
            });
          });
        });
      },
      setBgScale: function setBgScale() {
        var bgWidth = 382;
        var bgHeight = 540;
        if (this.nodeDict.sprImage.width != bgWidth || this.nodeDict.sprImage.height != bgHeight) {
          var designScale = bgWidth / bgHeight;
          var scale = this.nodeDict.sprImage.width / this.nodeDict.sprImage.height;
          this.nodeDict.sprImage.scale = scale > designScale ? bgWidth / this.nodeDict.sprImage.width : bgHeight / this.nodeDict.sprImage.height;
        }
      },
      setSpineScale: function setSpineScale(size, node) {
        if (!size) return;
        var bgWidth = 482;
        var bgHeight = 489;
        if (size.width != bgWidth || size.height != bgHeight) {
          var designScale = bgWidth / bgHeight;
          var scale = size.width / size.height;
          node.scale = scale > designScale ? bgWidth / size.width : bgHeight / size.height;
        }
      }
    });
    cc._RF.pop();
  }, {
    "./utils": "utils",
    BaseUI: "BaseUI"
  } ],
  NodeFitScreen: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2c0c3WgsglIe407Cu8vF6pN", "NodeFitScreen");
    "use strict";
    var FitType = {
      Scale: 0,
      FullScreen: 1,
      FitMode: 2,
      FullHeight: 3,
      FullWidth: 4
    };
    var designSize = cc.size(1280, 720);
    cc.Class({
      extends: cc.Component,
      properties: {
        FitType: {
          type: cc.Enum(FitType),
          default: 0
        }
      },
      onLoad: function onLoad() {
        cc.view.on("canvas-resize", this.refreshFit, this);
        this.refreshFit();
      },
      onDestroy: function onDestroy() {
        cc.view.off("canvas-resize", this.refreshFit, this);
      },
      refreshFit: function refreshFit() {
        if (this.FitType == FitType.Scale) {
          var winSize = cc.view.getVisibleSize();
          console.log(winSize);
          console.log(this.node.width, this.node.height);
          if (this.node.width >= winSize.width && this.node.height >= winSize.height) return;
          var scale1 = winSize.width / this.node.width;
          var scale2 = winSize.height / this.node.height;
          this.node.scale = scale1 > scale2 ? scale1 : scale2;
        } else if (this.FitType == FitType.FullScreen) {
          var visiblesize = cc.view.getVisibleSize();
          this.node.width = visiblesize.width;
          this.node.height = visiblesize.height;
        } else if (this.FitType == FitType.FullHeight) {
          var _visiblesize = cc.view.getVisibleSize();
          var scale = _visiblesize.width / this.node.width;
          this.node.width = scale * this.node.width;
          this.node.height = scale * this.node.height;
        } else if (this.FitType == FitType.FullWidth) {
          var _visiblesize2 = cc.view.getVisibleSize();
          var _scale = _visiblesize2.height / this.node.height;
          this.node.width = _scale * this.node.width;
          this.node.height = _scale * this.node.height;
        } else {
          var wsize = cc.view.getFrameSize();
          var scaleW = wsize.width / designSize.width;
          var scaleH = wsize.height / designSize.height;
          var pCanvas = this.node.getComponent(cc.Canvas);
          if (pCanvas) if (scaleW > scaleH) {
            pCanvas.fitHeight = true;
            pCanvas.fitWidth = false;
          } else {
            pCanvas.fitHeight = false;
            pCanvas.fitWidth = true;
          } else console.error("fitmode\u6a21\u5f0f\u53ea\u80fd\u7528\u5728canvas\u8282\u70b9\u4e0a");
        }
      }
    });
    cc._RF.pop();
  }, {} ],
  OP13: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f0fbdUPvrVHsbHaxYd/uuAF", "OP13");
    "use strict";
    var _DefaultData = require("../script/DefaultData");
    var _utils = require("../script/utils");
    var saveKey = "DataKey_Cocos_FT14";
    var BaseUI = require("BaseUI");
    var POS = {
      LeftPage: {
        x: -239,
        y: -5
      },
      RightPage: {
        x: 239,
        y: -5
      }
    };
    cc.Class({
      extends: BaseUI,
      properties: {
        testPanel: cc.Node,
        touchPanel: cc.Node,
        audTurnPage: cc.AudioClip,
        pfbItemPage: cc.Prefab,
        pfbItemTurnPage: cc.Prefab,
        pfbItemTurnPage2: cc.Prefab,
        tipFirst: cc.Node,
        tipLast: cc.Node,
        capture: require("capture_to_web")
      },
      onLoad: function onLoad() {
        this._timeoutIds = [];
        this._intervalIds = [];
        this._super();
        this.initNodes();
        this.initSceneData();
        this.initSize();
      },
      initNodes: function initNodes() {},
      onEnable: function onEnable() {},
      onDisable: function onDisable() {},
      _resList: null,
      initSceneData: function initSceneData() {
        this._resList = [];
        window.GameData = {};
      },
      _designSize: null,
      _frameSize: null,
      _mapScaleMin: null,
      _mapScaleMax: null,
      _cocosScale: null,
      initSize: function initSize() {},
      start: function start() {
        var _this = this;
        this.getData(function(data) {
          console.log("data:", data);
          _this.data = data;
          data && _this.preloadItem();
        });
      },
      getData: function getData(cb) {
        var _this2 = this;
        if (window.courseware) {
          var getData = window.courseware.getData;
          getData(function(data) {
            data = data || _this2.getDefaultData();
            cb && cb(data);
          }, saveKey);
        } else cb && cb(this.getDefaultData());
      },
      getDefaultData: function getDefaultData() {
        var data = _DefaultData.DefaultData;
        return {
          haveCover: false,
          coverType: "Image",
          coverImage: "",
          coverAudio: "",
          coverText: "",
          coverDragonBone: {
            skeJsonData: {
              url: ""
            },
            texJsonData: {
              url: ""
            },
            texPngData: {
              url: ""
            }
          },
          titleAudio: "",
          titleText: "",
          titleTextColor: "A",
          pageList: [ {
            pageType: "Image",
            pageAudio: "http://staging-teach.cdn.ireadabc.com/cc5b1a8730bc275ecac85185d5ce2c5b.mp3",
            pageText: "",
            pageImage: "",
            textColor: "A",
            pageDragonBone: {
              skeJsonData: {
                url: "http://staging-teach.cdn.ireadabc.com/679fed26daa464819d553de6331b3552.json",
                name: "alien-pro.json"
              },
              texJsonData: {
                url: "http://staging-teach.cdn.ireadabc.com/65d8214c6b5c5d0496e17adb0408276a.atlas",
                name: "alien-pro.atlas"
              },
              texPngData: {
                url: "http://staging-teach.cdn.ireadabc.com/a319b372899239325b90bb4ec07b4970.png",
                name: "alien-pro.png"
              },
              animType: "spine"
            }
          }, {
            pageType: "Image",
            pageAudio: "http://staging-teach.cdn.ireadabc.com/fd877ad376fdffdb0dfc62122065a78f.mp3",
            pageText: "",
            pageImage: "",
            textColor: "A",
            pageDragonBone: {
              skeJsonData: {
                url: "http://staging-teach.cdn.ireadabc.com/d1f859d3fba84bd03565e543c986fb28.json",
                name: "6_4_ske.json"
              },
              texJsonData: {
                url: "http://staging-teach.cdn.ireadabc.com/70f96e1cc7f013e27ed1952c503fb750.json",
                name: "6_4_tex.json"
              },
              texPngData: {
                url: "http://staging-teach.cdn.ireadabc.com/b06f9b90018a6eb0175a01e355b9ced6.png",
                name: "6_4_tex.png"
              },
              animType: "dragonBone"
            }
          }, {
            pageType: "Image",
            pageAudio: "http://staging-teach.cdn.ireadabc.com/dff6748c93f6bf3de8cb7105fa9ba5de.mp3",
            pageText: "",
            pageImage: "",
            textColor: "A",
            pageDragonBone: {
              skeJsonData: {
                url: "http://staging-teach.cdn.ireadabc.com/a278a56fe77dfade7366829e9c65c815.json",
                name: "6_3_ske.json"
              },
              texJsonData: {
                url: "http://staging-teach.cdn.ireadabc.com/96680527a570cec4d7c9818c91ec434a.json",
                name: "6_3_tex.json"
              },
              texPngData: {
                url: "http://staging-teach.cdn.ireadabc.com/5c441810b0a5bc73248c50d8c32b4899.png",
                name: "6_3_tex.png"
              },
              animType: "dragonBone"
            }
          } ]
        };
      },
      preloadItem: function preloadItem() {
        this.addPreloadItem();
        this.preload();
      },
      addPreloadItem: function addPreloadItem() {
        this._resList.push({
          url: this.data.coverImage
        });
        this._resList.push({
          url: this.data.coverDragonBone.skeJsonData.url
        });
        this._resList.push({
          url: this.data.coverDragonBone.texJsonData.url
        });
        this._resList.push({
          url: this.data.coverDragonBone.texPngData.url
        });
        this._resList.push({
          url: this.data.titleAudio
        });
        for (var i = 0; i < this.data.pageList.length; i++) {
          this._resList.push({
            url: this.data.pageList[i].pageAudio
          });
          this._resList.push({
            url: this.data.pageList[i].pageImage
          });
          this._resList.push({
            url: this.data.pageList[i].pageDragonBone.skeJsonData.url
          });
          this._resList.push({
            url: this.data.pageList[i].pageDragonBone.texJsonData.url
          });
          this._resList.push({
            url: this.data.pageList[i].pageDragonBone.texPngData.url
          });
        }
      },
      preload: function preload() {
        var _this3 = this;
        cc.assetManager.loadAny(this._resList, null, null, function(err, data) {
          if (window && window["air"]) {
            window.air.onCourseInScreen = function(next) {
              _this3.loadEnd();
              next();
            };
            window.air.hideAirClassLoading();
          } else _this3.loadEnd();
          cc.debug.setDisplayStats(false);
        });
      },
      loadEnd: function loadEnd() {
        this.initDataBoot();
        this.initData();
        this.initEvent();
        this.startGame();
      },
      initDataBoot: function initDataBoot() {
        GameData.pageIndex = 0;
        this.pageList = [];
        this._turnLeft = false;
        this._turnRight = false;
        this._angle = 0;
      },
      onTouchLeft: function onTouchLeft() {
        var _this4 = this;
        return new Promise(function(resolve, reject) {
          if (_this4.verletRender) return resolve("");
          if (GameData.isPlaying) return resolve("");
          GameData.isPlaying = true;
          var page = _this4.pageList[GameData.pageIndex];
          var itemPage = page.getComponent("ItemPage");
          itemPage.playAudio();
          itemPage.playSpine().then(function() {
            resolve("");
          });
        });
      },
      onTouchRight: function onTouchRight() {
        var _this5 = this;
        return new Promise(function(resolve, reject) {
          if (_this5.verletRender) return resolve("");
          if (GameData.isPlaying) return resolve("");
          var page = _this5.pageList[GameData.pageIndex + 1];
          if (!page) {
            (0, _utils.onHomeworkFinish)();
            return resolve("");
          }
          GameData.isPlaying = true;
          var itemPage = page.getComponent("ItemPage");
          itemPage.playAudio();
          itemPage.playSpine().then(function() {
            _this5.pageList.length - GameData.pageIndex <= 2 && (0, _utils.onHomeworkFinish)();
            resolve("");
          });
        });
      },
      initData: function initData() {
        this.data.haveCover = false;
        GameData.audioCount = 0;
        this.initTitle();
      },
      initEvent: function initEvent() {
        this.touchPanel.on(cc.Node.EventType.TOUCH_END, this.onTouchPanel, this);
      },
      cons: function cons(data) {
        console.log(this.touchPanel._touchListener.swallowTouches + "  |  btn->" + data);
      },
      startGame: function startGame() {
        var _this6 = this;
        this.initPageUI();
        this.initArrowBtn();
        this.initPages().then(function() {
          _this6.updateBtnStatus();
          _this6.autoPlay();
        });
      },
      initArrowBtn: function initArrowBtn() {
        var _this7 = this;
        var lastBtn = this.lastBtn = cc.find("Canvas/left_arrow");
        var nextBtn = this.nextBtn = cc.find("Canvas/right_arrow");
        lastBtn.on("touchstart", function() {
          var isSuccess = _this7.onTouchPanelLeft();
          isSuccess && (0, _utils.jelly)(lastBtn);
        });
        nextBtn.on("touchstart", function() {
          var isSuccess = _this7.onTouchPanelRight();
          isSuccess && (0, _utils.jelly)(nextBtn);
        });
      },
      checkShowArrowBtn: function checkShowArrowBtn() {
        var _this8 = this;
        setTimeout(function() {
          _this8.lastBtn.active = !_this8.nodeDict.btnLast.children[1].active;
          _this8.nextBtn.active = !_this8.nodeDict.btnNext.children[1].active;
        }, 220);
      },
      autoPlay: function autoPlay() {
        var _this9 = this;
        this.inited = false;
        this.onTouchLeft().then(function() {
          _this9.onTouchRight().then(function() {
            _this9.inited = true;
            _this9.isTruning = false;
          });
        });
      },
      initTitle: function initTitle() {},
      initPageUI: function initPageUI() {
        if (this.data.haveCover) {
          this.nodeDict.nodUI1.active = false;
          this.nodeDict.nodUI2.active = true;
        } else {
          this.nodeDict.nodUI1.active = true;
          this.nodeDict.nodUI2.active = false;
        }
      },
      initPages: function initPages() {
        var _this10 = this;
        return new Promise(function(resolve, reject) {
          _this10.pageIndex = 0;
          if (0 === _this10.data.pageList.length) return resolve("");
          var count = _this10.data.pageList.length;
          var node = cc.instantiate(_this10.pfbItemPage);
          node.parent = _this10.nodeDict.nodPages;
          var itemPage = node.getComponent("ItemPage");
          itemPage.init(_this10.data.pageList[0], false, _this10.pageIndex).then(function() {
            count--;
            if (0 == count) return resolve("");
          });
          _this10.pageList.push(node);
          _this10.pageIndex++;
          node.zIndex = -1;
          node.x = POS.LeftPage.x;
          node.y = POS.LeftPage.y;
          for (var i = 1; i < _this10.data.pageList.length; i++) {
            var _node = cc.instantiate(_this10.pfbItemPage);
            _node.parent = _this10.nodeDict.nodPages;
            var _itemPage = _node.getComponent("ItemPage");
            _itemPage.init(_this10.data.pageList[i], false, _this10.pageIndex).then(function() {
              count--;
              if (0 == count) return resolve("");
            });
            _this10.pageList.push(_node);
            _node.x = POS.RightPage.x;
            _node.y = POS.RightPage.y;
            _this10.pageIndex++;
            _node.zIndex = -1 - i;
          }
          _this10.resetPages();
        });
      },
      onTouchPanel: function onTouchPanel(e) {
        if (!this.inited) return;
        var evt = e;
        var target = e.target;
        var touches = evt.getTouches();
        var startPoint = touches[0].getStartLocation();
        var point = touches[0].getLocation();
        var moveX = point.x - startPoint.x;
        Math.abs(moveX) < 50 ? this.onTouchPanelClick(target, point) : moveX > 0 ? this.onTouchPanelLeft() : this.onTouchPanelRight();
      },
      onTouchPanelClick: function onTouchPanelClick(target, point) {
        var pointXY = new cc.Vec2(point.x - 640, point.y - 360);
        var leftPanel = this.nodeDict.nodLeftPage;
        var rightPanel = this.nodeDict.nodRightPage;
        var rectLeft = new cc.Rect(leftPanel.position.x, leftPanel.position.y, leftPanel.width, leftPanel.height);
        var rectRight = new cc.Rect(rightPanel.position.x, rightPanel.position.y, rightPanel.width, rightPanel.height);
        this.contains(rectLeft, pointXY) ? this.onTouchLeftAni() : this.contains(rectRight, pointXY) && this.onTouchRightAni();
      },
      contains: function contains(rect, point) {
        var mx = Math.abs(point.x - rect.x);
        var my = Math.abs(point.y - rect.y);
        return 2 * mx <= rect.width && 2 * my <= rect.height;
      },
      onTouchLeftAni: function onTouchLeftAni() {
        this.onTouchLeft();
      },
      onTouchRightAni: function onTouchRightAni() {
        this.onTouchRight();
      },
      onTouchPanelLeft: function onTouchPanelLeft() {
        var _this11 = this;
        if (this.isTruning) return false;
        if (GameData.isPlaying) return false;
        this.onTurnLast();
        this._timeoutIds.push(setTimeout(function() {
          _this11.autoPlay();
        }, 1e3));
        return true;
      },
      onTouchPanelRight: function onTouchPanelRight() {
        var _this12 = this;
        if (this.isTruning) return false;
        if (GameData.isPlaying) return false;
        this.onTurnNext();
        this._timeoutIds.push(setTimeout(function() {
          _this12.autoPlay();
        }, 1e3));
        return true;
      },
      playAudioEntrer: function playAudioEntrer() {
        var _this13 = this;
        GameData.audioCount++;
        var id = cc.audioEngine.play(this.audEnter, false, 1);
        cc.audioEngine.setFinishCallback(id, function() {
          GameData.audioCount--;
          _this13.playAudioQuestion();
        });
      },
      playAudioPage: function playAudioPage(isBtn, cb) {
        var _this14 = this;
        GameData.audioCount++;
        var url = this.data.questionList[GameData.questionIndex].pageAudio;
        cc.assetManager.loadRemote(url, null, function(err, clip) {
          if (err) {
            console.log(err);
            _this14.startStepDone();
            return;
          }
          var id = cc.audioEngine.play(clip, false, 1);
          cc.audioEngine.setFinishCallback(id, function() {
            GameData.audioCount--;
            cb && cb();
            isBtn || _this14.startStepDone();
          });
        });
      },
      playAudioQuestion: function playAudioQuestion() {
        var _this15 = this;
        GameData.audioCount++;
        var url = this.data.questionAudio;
        cc.assetManager.loadRemote(url, null, function(err, clip) {
          if (err) {
            console.log(err);
            return;
          }
          var id = cc.audioEngine.play(clip, false, 1);
          cc.audioEngine.setFinishCallback(id, function() {
            GameData.audioCount--;
            _this15.playAudioPage();
          });
        });
      },
      updateBtnStatus: function updateBtnStatus() {
        GameData.pageIndex <= 0 ? this.nodeDict.btnLast.children[1].active = true : this.nodeDict.btnLast.children[1].active = false;
        GameData.pageIndex >= this.data.pageList.length - 2 ? this.nodeDict.btnNext.children[1].active = true : this.nodeDict.btnNext.children[1].active = false;
        this.checkShowArrowBtn();
      },
      checkCover: function checkCover() {
        if (!this.data.haveCover) return;
        if (-1 === GameData.pageIndex) {
          this.nodeDict.nodUI1.active = false;
          this.nodeDict.nodUI2.active = true;
        }
      },
      playAudioTurnPage: function playAudioTurnPage() {
        GameData.audioCount++;
        var id = cc.audioEngine.play(this.audTurnPage, false, 1);
        cc.audioEngine.setFinishCallback(id, function() {
          GameData.audioCount--;
        });
      },
      onTurnLast: function onTurnLast() {
        var _this16 = this;
        if (GameData.pageIndex <= 0) {
          this.tipAni(this.tipFirst);
          return;
        }
        this.isTruning = true;
        if (this.verletRender) {
          this.verletRender.node.destroy();
          this.verletRender = null;
        }
        this.playAudioTurnPage();
        this._angle = 0;
        var page0 = this.pageList[GameData.pageIndex + 1];
        var page1 = this.pageList[GameData.pageIndex];
        cc.tween(page1).to(1, {
          opacity: 0
        }).start();
        var page2 = this.pageList[GameData.pageIndex - 1];
        if (page2) {
          page2.opacity = 0;
          page2.x = POS.RightPage.x;
          page0 && cc.tween(page0).to(1, {
            opacity: 0
          }).start();
          cc.tween(page2).to(1, {
            opacity: 255
          }).call(function() {
            _this16.resetPages();
          }).start();
        }
        var page3 = this.pageList[GameData.pageIndex - 2];
        if (page3) {
          page3.opacity = 0;
          cc.tween(page3).to(1, {
            opacity: 255
          }).call(function() {}).start();
        }
        GameData.pageIndex -= 2;
        this.updateBtnStatus();
      },
      onTurnNext: function onTurnNext() {
        var _this17 = this;
        if (GameData.pageIndex >= this.data.pageList.length - 2) {
          this.tipAni(this.tipLast);
          return;
        }
        this.isTruning = true;
        if (this.verletRender) {
          this.resetPages();
          this.verletRender.node.destroy();
          this.verletRender = null;
        }
        this.playAudioTurnPage();
        this.nodeDict.nodUI1.active = true;
        this.nodeDict.nodUI2.active = false;
        this._angle = 0;
        var page0 = this.pageList[GameData.pageIndex];
        var page1 = this.pageList[GameData.pageIndex + 1];
        cc.tween(page1).to(1, {
          opacity: 0
        }).start();
        var page2 = this.pageList[GameData.pageIndex + 2];
        if (page2) {
          page2.opacity = 0;
          page2.x = POS.LeftPage.x;
          cc.tween(page0).to(1, {
            opacity: 0
          }).start();
          cc.tween(page2).to(1, {
            opacity: 255
          }).call(function() {
            _this17.resetPages();
          }).start();
        }
        var page3 = this.pageList[GameData.pageIndex + 3];
        page3 && (page3.opacity = 255);
        GameData.pageIndex += 2;
        this.updateBtnStatus();
      },
      tipAni: function tipAni(node) {
        node.active = true;
        node.opacity = 0;
        cc.tween(node).to(.5, {
          opacity: 255
        }).delay(.5).to(.5, {
          opacity: 0
        }).call(function() {
          node.active = false;
        }).start();
      },
      buttonListener: function buttonListener(button) {
        if (this.isTruning) return;
        "btnLast" == button.node.name ? this.onTurnLast() : "btnNext" == button.node.name ? this.onTurnNext() : "btnTitle" == button.node.name && this.playTitleAudio();
      },
      resetPages: function resetPages() {
        for (var i = 0; i < this.pageList.length; i++) this.pageList[i].opacity = 0;
        this.pageList[GameData.pageIndex] && (this.pageList[GameData.pageIndex].opacity = 255);
        this.pageList[GameData.pageIndex + 1] && (this.pageList[GameData.pageIndex + 1].opacity = 255);
      },
      update: function update(dt) {
        var _this18 = this;
        var anglePerDt = 180;
        if (this._turnLeft) {
          this._angle += dt * anglePerDt;
          if (this._angle > 180) {
            this._angle = 180;
            this._turnLeft = false;
            cc.tween(this.verletRender.node).call(function() {
              _this18.resetPages();
            }).to(.5, {
              opacity: 0
            }).call(function() {
              if (_this18.verletRender) {
                _this18.verletRender.node.destroy();
                _this18.verletRender = null;
              }
            }).start();
          }
          this.verletRender.updateAngle(this._angle);
        }
        if (this._turnRight) {
          this._angle -= dt * anglePerDt;
          if (this._angle < 0) {
            this._angle = 0;
            this._turnRight = false;
            cc.tween(this.nodeDict.sprPage).call(function() {
              _this18.resetPages();
            }).to(.5, {
              opacity: 0
            }).call(function() {
              if (_this18.verletRender) {
                _this18.verletRender.node.destroy();
                _this18.verletRender = null;
              }
            }).start();
          }
          this.verletRender.updateAngle(this._angle);
        }
      },
      playTitleAudio: function playTitleAudio() {
        var _this19 = this;
        GameData.audioCount++;
        var url = this.data.titleAudio;
        cc.audioEngine.stop(this.titleAudioId);
        cc.assetManager.loadRemote(url, null, function(err, clip) {
          if (err) {
            console.log(err);
            return;
          }
          _this19.titleAudioId = cc.audioEngine.play(clip, false, 1);
          cc.audioEngine.setFinishCallback(_this19.titleAudioId, function() {
            if (!cc.isValid(_this19)) return;
            GameData.audioCount--;
          });
        });
      },
      _timeoutIds: null,
      _intervalIds: null,
      onDestroy: function onDestroy() {
        this._timeoutIds.forEach(function(id) {
          clearTimeout(id);
        });
        this._intervalIds.forEach(function(id) {
          clearInterval(id);
        });
      }
    });
    cc._RF.pop();
  }, {
    "../script/DefaultData": "DefaultData",
    "../script/utils": "utils",
    BaseUI: "BaseUI",
    capture_to_web: "capture_to_web"
  } ],
  bezier_assembler: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "b57a5V1gv9Nz4po2YAT64Bx", "bezier_assembler");
    "use strict";
    var __extends = this && this.__extends || function() {
      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) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var page_effect_assembler_base_1 = require("./page_effect_assembler_base");
    var gfx = cc.gfx;
    var vfmtPosUvColorFront = new gfx.VertexFormat([ {
      name: gfx.ATTR_POSITION,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_UV0,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_COLOR,
      type: gfx.ATTR_TYPE_UINT8,
      num: 4,
      normalize: true
    }, {
      name: "a_isFront",
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 1
    } ]);
    var BezierAssembler = function(_super) {
      __extends(BezierAssembler, _super);
      function BezierAssembler() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.angle = 0;
        return _this;
      }
      BezierAssembler.prototype.updateRenderData = function(comp) {
        if (comp) {
          var pointNum = comp.getPointCount();
          if (pointNum < 2) return;
          var node = comp.node;
          var height = node.height;
          var width = node.width;
          var posX = -width * node.anchorX;
          var posY = -height * node.anchorY;
          var ctrlPosData = this._getCtrlPosByAngle(width);
          var startPos = ctrlPosData.startPos;
          var endPos = ctrlPosData.endPos;
          var ctrlPos1 = ctrlPosData.ctrlPos1;
          var ctrlPos2 = ctrlPosData.ctrlPos2;
          var bezierPosList = [];
          bezierPosList[0] = startPos;
          var realWidth = 0;
          var lastU = 0;
          var nextU = 0;
          var floatsPerVert = this.floatsPerVert;
          var verts = this.renderData.vDatas[0];
          var dstOffset = 0;
          for (var i = 1; i < pointNum; i++) {
            var isTail = i === pointNum - 1;
            var lastBezierPos = bezierPosList[i - 1];
            var nextBezierPos = this._getBezierPos(i / (pointNum - 1), startPos, endPos, ctrlPos1, ctrlPos2);
            var fixedData = this._fixWidth(lastBezierPos, nextBezierPos, width, realWidth, isTail);
            var gapWidth = fixedData.gapWidth;
            nextBezierPos = fixedData.nextBezierPos;
            realWidth += gapWidth;
            bezierPosList[i] = nextBezierPos;
            var gapU = gapWidth / width;
            nextU = lastU + gapU;
            dstOffset = floatsPerVert * (i - 1) * 4;
            verts[dstOffset] = posX + lastBezierPos.x;
            verts[dstOffset + 1] = posY + lastBezierPos.y;
            verts[dstOffset + 2] = lastU;
            verts[dstOffset + 3] = 1;
            dstOffset += floatsPerVert;
            verts[dstOffset] = posX + nextBezierPos.x;
            verts[dstOffset + 1] = posY + nextBezierPos.y;
            verts[dstOffset + 2] = nextU;
            verts[dstOffset + 3] = 1;
            dstOffset += floatsPerVert;
            verts[dstOffset] = posX + lastBezierPos.x;
            verts[dstOffset + 1] = posY + height + lastBezierPos.y;
            verts[dstOffset + 2] = lastU;
            verts[dstOffset + 3] = 0;
            dstOffset += floatsPerVert;
            verts[dstOffset] = posX + nextBezierPos.x;
            verts[dstOffset + 1] = posY + height + nextBezierPos.y;
            verts[dstOffset + 2] = nextU;
            verts[dstOffset + 3] = 0;
            lastU = nextU;
          }
          this.updateColor(comp, null);
          this.updateIsFront(comp, 5);
        }
      };
      BezierAssembler.prototype.init = function(comp) {
        _super.prototype.init.call(this, comp);
        var segmentCount = comp.getPointCount() - 1;
        this.verticesCount = 4 * segmentCount;
        this.indicesCount = 6 * segmentCount;
        this.floatsPerVert = 6;
        this.initData();
      };
      BezierAssembler.prototype.getVfmt = function() {
        return vfmtPosUvColorFront;
      };
      BezierAssembler.prototype._getCtrlPosByAngle = function(width) {
        var startPos = new cc.Vec2(0, 0);
        var endPos = null;
        var ctrlPos1 = null;
        var ctrlPos2 = null;
        var rad = this.angle * Math.PI / 180;
        var per = 2 * rad / Math.PI;
        if (this.angle <= 90) {
          var endPosX = width * (1 - Math.pow(per, 3));
          var endPosY = width / 4 * (1 - Math.pow(1 - per, 4));
          endPos = new cc.Vec2(endPosX, endPosY);
          var ctrlPosX = width * (1 - .25 * per);
          var ctrlPos1Y = 1 * width / 16 * per;
          var ctrlPos2Y = 3 * width / 16 * per;
          ctrlPos1 = new cc.Vec2(ctrlPosX, ctrlPos1Y);
          ctrlPos2 = new cc.Vec2(ctrlPosX, ctrlPos2Y);
        } else {
          per -= 1;
          var endPosX = -width * (1 - Math.pow(1 - per, 3));
          var endPosY = width / 4 * (1 - Math.pow(per, 4));
          endPos = new cc.Vec2(endPosX, endPosY);
          var ctrlPos1X = 3 * width / 4 * (1 - per);
          var ctrlPos2X = 3 * width / 4 * Math.pow(1 - per, 3);
          var ctrlPos1Y = 1 * width / 16 * (1 - per);
          var ctrlPos2Y = 3 * width / 16 * (1 - Math.pow(per, 4));
          ctrlPos1 = new cc.Vec2(ctrlPos1X, ctrlPos1Y);
          ctrlPos2 = new cc.Vec2(ctrlPos2X, ctrlPos2Y);
        }
        return {
          startPos: startPos,
          endPos: endPos,
          ctrlPos1: ctrlPos1,
          ctrlPos2: ctrlPos2
        };
      };
      BezierAssembler.prototype._fixWidth = function(lastBezierPos, nextBezierPos, width, realWidth, isTail) {
        var deltaVector = nextBezierPos.sub(lastBezierPos);
        var gapWidth = deltaVector.mag();
        var curWidth = realWidth + gapWidth;
        if (isTail) {
          gapWidth = width - realWidth;
          var direction = deltaVector.normalize();
          nextBezierPos = lastBezierPos.add(direction.mul(gapWidth));
        } else if (curWidth >= width) {
          var delta = curWidth - width;
          gapWidth -= 1.1 * delta;
          gapWidth = Math.max(0, gapWidth);
          var direction = deltaVector.normalize();
          nextBezierPos = lastBezierPos.add(direction.mul(gapWidth));
        }
        return {
          gapWidth: gapWidth,
          nextBezierPos: nextBezierPos
        };
      };
      BezierAssembler.prototype._getBezierPos = function(t, startPos, endPos, ctrlPos1, ctrlPos2) {
        startPos = startPos.mul(Math.pow(1 - t, 3));
        ctrlPos1 = ctrlPos1.mul(3 * t * Math.pow(1 - t, 2));
        ctrlPos2 = ctrlPos2.mul(3 * (1 - t) * Math.pow(t, 2));
        endPos = endPos.mul(Math.pow(t, 3));
        return startPos.add(ctrlPos1.add(ctrlPos2.add(endPos)));
      };
      return BezierAssembler;
    }(page_effect_assembler_base_1.default);
    exports.default = BezierAssembler;
    cc._RF.pop();
  }, {
    "./page_effect_assembler_base": "page_effect_assembler_base"
  } ],
  bezier_render: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "faf27AoK/ZCOrghpYoEK7kY", "bezier_render");
    "use strict";
    var __extends = this && this.__extends || function() {
      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) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (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;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var bezier_assembler_1 = require("./bezier_assembler");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var BezierRender = function(_super) {
      __extends(BezierRender, _super);
      function BezierRender() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.textureList = [];
        _this.pointsCount = 10;
        _this._initedMaterial = false;
        return _this;
      }
      BezierRender.prototype.onEnable = function() {
        _super.prototype.onEnable.call(this);
        this.init();
      };
      BezierRender.prototype.init = function() {
        this._initedMaterial || this.updateMaterial();
        this.setVertsDirty();
      };
      BezierRender.prototype._resetAssembler = function() {
        var assembler = this._assembler = new bezier_assembler_1.default();
        assembler.init(this);
      };
      BezierRender.prototype._updateMaterial = function() {
        var material = this.getMaterial(0);
        if (material) {
          material.define("CC_USE_MODEL", 1);
          if (2 === this.textureList.length) {
            material.setProperty("texture0", this.textureList[0]);
            material.setProperty("texture1", this.textureList[1]);
          }
        }
      };
      BezierRender.prototype.updateMaterial = function() {
        if (2 === this.textureList.length) {
          this._updateMaterial();
          this._initedMaterial = true;
          return;
        }
      };
      BezierRender.prototype.getPointCount = function() {
        return this.pointsCount;
      };
      BezierRender.prototype.updateAngle = function(angle) {
        if (!this._assembler) return;
        this._assembler.angle = angle;
        this._assembler.updateRenderData(this);
      };
      __decorate([ property({
        type: [ cc.Texture2D ],
        displayName: "\u7eb9\u7406"
      }) ], BezierRender.prototype, "textureList", void 0);
      __decorate([ property({
        displayName: "\u6bcf\u6761\u8fb9\u4e0a\u7684\u9876\u70b9\u6570\u91cf"
      }) ], BezierRender.prototype, "pointsCount", void 0);
      BezierRender = __decorate([ ccclass ], BezierRender);
      return BezierRender;
    }(cc.RenderComponent);
    exports.default = BezierRender;
    cc._RF.pop();
  }, {
    "./bezier_assembler": "bezier_assembler"
  } ],
  capture_to_web: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "23c70ZolwFBWpdwEfbCLBDn", "capture_to_web");
    "use strict";
    cc.Class({
      extends: cc.Component,
      start: function start() {},
      doCapture: function doCapture(nodeCapture, isTurn) {
        var nodeCamera = new cc.Node();
        nodeCamera.parent = cc.find("Canvas");
        var camera = nodeCamera.addComponent(cc.Camera);
        var position = nodeCapture.getPosition();
        var width = nodeCapture.width;
        var height = nodeCapture.height;
        isTurn && (nodeCapture.scaleX = -1);
        camera.alignWithScreen = false;
        camera.ortho = true;
        camera.orthoSize = height / 2;
        var texture = new cc.RenderTexture();
        texture.initWithSize(width, height, cc.gfx.RB_FMT_S8);
        camera.targetTexture = texture;
        var canvas = document.createElement("canvas");
        canvas.width = width;
        canvas.height = height;
        var ctx = canvas.getContext("2d");
        nodeCapture.setPosition(cc.Vec2.ZERO);
        camera.render(nodeCapture);
        nodeCapture.setPosition(position);
        var data = texture.readPixels();
        var rowBytes = 4 * width;
        for (var row = 0; row < height; row++) {
          var srow = height - 1 - row;
          var imageData = ctx.createImageData(width, 1);
          var start = srow * width * 4;
          for (var i = 0; i < rowBytes; i++) imageData.data[i] = data[start + i];
          ctx.putImageData(imageData, 0, row);
        }
        var dataURL = canvas.toDataURL("image/png");
        var img = document.createElement("img");
        img.src = dataURL;
        nodeCamera.destroy();
        var texture2D = new cc.Texture2D();
        texture2D.initWithElement(img);
        var spriteFrame = new cc.SpriteFrame();
        spriteFrame.setTexture(texture2D);
        var node = new cc.Node();
        var sprite = node.addComponent(cc.Sprite);
        sprite.spriteFrame = spriteFrame;
        nodeCapture.scaleX = 1;
        return spriteFrame;
      }
    });
    cc._RF.pop();
  }, {} ],
  page_effect_assembler_base: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f59dfvtcmxPmrcnbzPGsWOM", "page_effect_assembler_base");
    "use strict";
    var __extends = this && this.__extends || function() {
      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) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var PageEffectAssemblerBase = function(_super) {
      __extends(PageEffectAssemblerBase, _super);
      function PageEffectAssemblerBase() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.verticesCount = 4;
        _this.indicesCount = 6;
        _this.floatsPerVert = 5;
        _this.colorOffset = 4;
        _this.renderData = null;
        return _this;
      }
      Object.defineProperty(PageEffectAssemblerBase.prototype, "verticesFloats", {
        get: function() {
          return this.verticesCount * this.floatsPerVert;
        },
        enumerable: false,
        configurable: true
      });
      PageEffectAssemblerBase.prototype.getBuffer = function() {
        return cc.renderer._handle.getBuffer("mesh", this.getVfmt());
      };
      PageEffectAssemblerBase.prototype.getVfmt = function() {
        return null;
      };
      PageEffectAssemblerBase.prototype.updateColor = function(comp, color) {
        var uintVerts = this.renderData.uintVDatas[0];
        if (!uintVerts) return;
        color = null != color ? color : comp.node.color._val;
        var floatsPerVert = this.floatsPerVert;
        var colorOffset = this.colorOffset;
        for (var i = colorOffset, l = uintVerts.length; i < l; i += floatsPerVert) uintVerts[i] = color;
      };
      PageEffectAssemblerBase.prototype.updateIsFront = function(comp, dataOffset) {
        var verts = this.renderData.vDatas[0];
        var index = 0;
        var floatsPerVert = this.floatsPerVert;
        for (var i = 0, n = this.verticesCount; i < n; ++i) {
          index = i * floatsPerVert;
          var isFirstVert = i % 2 === 0;
          var firstVertX = isFirstVert ? verts[index] : verts[index - floatsPerVert];
          var secondVertX = isFirstVert ? verts[index + floatsPerVert] : verts[index];
          var isFront = firstVertX < secondVertX ? 1 : 0;
          verts[index + dataOffset] = isFront;
        }
      };
      PageEffectAssemblerBase.prototype.initData = function() {
        this.renderData = new cc.RenderData();
        this.renderData.init(this);
        var data = this.renderData;
        data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());
        var indices = data.iDatas[0];
        var count = indices.length / 6;
        for (var i = 0, idx = 0; i < count; i++) {
          var vertextID = 4 * i;
          indices[idx++] = vertextID;
          indices[idx++] = vertextID + 1;
          indices[idx++] = vertextID + 2;
          indices[idx++] = vertextID + 1;
          indices[idx++] = vertextID + 3;
          indices[idx++] = vertextID + 2;
        }
      };
      PageEffectAssemblerBase.prototype.fillBuffers = function(comp, renderer) {
        var renderData = this.renderData;
        var vData = renderData.vDatas[0];
        var iData = renderData.iDatas[0];
        var buffer = this.getBuffer();
        var offsetInfo = buffer.request(this.verticesCount, this.indicesCount);
        var vertexOffset = offsetInfo.byteOffset >> 2, vbuf = buffer._vData;
        vData.length + vertexOffset > vbuf.length ? vbuf.set(vData.subarray(0, vbuf.length - vertexOffset), vertexOffset) : vbuf.set(vData, vertexOffset);
        var ibuf = buffer._iData, indiceOffset = offsetInfo.indiceOffset, vertexId = offsetInfo.vertexOffset;
        for (var i = 0, l = iData.length; i < l; i++) ibuf[indiceOffset++] = vertexId + iData[i];
      };
      return PageEffectAssemblerBase;
    }(cc.Assembler);
    exports.default = PageEffectAssemblerBase;
    cc._RF.pop();
  }, {} ],
  runtime: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4fe3e8A+sVO1K9kA9Rr3Qhh", "runtime");
    "use strict";
    !function(global) {
      var Op = Object.prototype;
      var hasOwn = Op.hasOwnProperty;
      var undefined;
      var $Symbol = "function" === typeof Symbol ? Symbol : {};
      var iteratorSymbol = $Symbol.iterator || "@@iterator";
      var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
      var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
      var inModule = "object" === typeof module;
      var runtime = global.regeneratorRuntime;
      if (runtime) {
        inModule && (module.exports = runtime);
        return;
      }
      runtime = global.regeneratorRuntime = inModule ? module.exports : {};
      function wrap(innerFn, outerFn, self, tryLocsList) {
        var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
        var generator = Object.create(protoGenerator.prototype);
        var context = new Context(tryLocsList || []);
        generator._invoke = makeInvokeMethod(innerFn, self, context);
        return generator;
      }
      runtime.wrap = wrap;
      function tryCatch(fn, obj, arg) {
        try {
          return {
            type: "normal",
            arg: fn.call(obj, arg)
          };
        } catch (err) {
          return {
            type: "throw",
            arg: err
          };
        }
      }
      var GenStateSuspendedStart = "suspendedStart";
      var GenStateSuspendedYield = "suspendedYield";
      var GenStateExecuting = "executing";
      var GenStateCompleted = "completed";
      var ContinueSentinel = {};
      function Generator() {}
      function GeneratorFunction() {}
      function GeneratorFunctionPrototype() {}
      var IteratorPrototype = {};
      IteratorPrototype[iteratorSymbol] = function() {
        return this;
      };
      var getProto = Object.getPrototypeOf;
      var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
      NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
      var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
      GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
      GeneratorFunctionPrototype.constructor = GeneratorFunction;
      GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
      function defineIteratorMethods(prototype) {
        [ "next", "throw", "return" ].forEach(function(method) {
          prototype[method] = function(arg) {
            return this._invoke(method, arg);
          };
        });
      }
      runtime.isGeneratorFunction = function(genFun) {
        var ctor = "function" === typeof genFun && genFun.constructor;
        return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
      };
      runtime.mark = function(genFun) {
        if (Object.setPrototypeOf) Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); else {
          genFun.__proto__ = GeneratorFunctionPrototype;
          toStringTagSymbol in genFun || (genFun[toStringTagSymbol] = "GeneratorFunction");
        }
        genFun.prototype = Object.create(Gp);
        return genFun;
      };
      runtime.awrap = function(arg) {
        return {
          __await: arg
        };
      };
      function AsyncIterator(generator) {
        function invoke(method, arg, resolve, reject) {
          var record = tryCatch(generator[method], generator, arg);
          if ("throw" !== record.type) {
            var result = record.arg;
            var value = result.value;
            if (value && "object" === typeof value && hasOwn.call(value, "__await")) return Promise.resolve(value.__await).then(function(value) {
              invoke("next", value, resolve, reject);
            }, function(err) {
              invoke("throw", err, resolve, reject);
            });
            return Promise.resolve(value).then(function(unwrapped) {
              result.value = unwrapped;
              resolve(result);
            }, reject);
          }
          reject(record.arg);
        }
        var previousPromise;
        function enqueue(method, arg) {
          function callInvokeWithMethodAndArg() {
            return new Promise(function(resolve, reject) {
              invoke(method, arg, resolve, reject);
            });
          }
          return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
        }
        this._invoke = enqueue;
      }
      defineIteratorMethods(AsyncIterator.prototype);
      AsyncIterator.prototype[asyncIteratorSymbol] = function() {
        return this;
      };
      runtime.AsyncIterator = AsyncIterator;
      runtime.async = function(innerFn, outerFn, self, tryLocsList) {
        var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
        return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
      };
      function makeInvokeMethod(innerFn, self, context) {
        var state = GenStateSuspendedStart;
        return function invoke(method, arg) {
          if (state === GenStateExecuting) throw new Error("Generator is already running");
          if (state === GenStateCompleted) {
            if ("throw" === method) throw arg;
            return doneResult();
          }
          context.method = method;
          context.arg = arg;
          while (true) {
            var delegate = context.delegate;
            if (delegate) {
              var delegateResult = maybeInvokeDelegate(delegate, context);
              if (delegateResult) {
                if (delegateResult === ContinueSentinel) continue;
                return delegateResult;
              }
            }
            if ("next" === context.method) context.sent = context._sent = context.arg; else if ("throw" === context.method) {
              if (state === GenStateSuspendedStart) {
                state = GenStateCompleted;
                throw context.arg;
              }
              context.dispatchException(context.arg);
            } else "return" === context.method && context.abrupt("return", context.arg);
            state = GenStateExecuting;
            var record = tryCatch(innerFn, self, context);
            if ("normal" === record.type) {
              state = context.done ? GenStateCompleted : GenStateSuspendedYield;
              if (record.arg === ContinueSentinel) continue;
              return {
                value: record.arg,
                done: context.done
              };
            }
            if ("throw" === record.type) {
              state = GenStateCompleted;
              context.method = "throw";
              context.arg = record.arg;
            }
          }
        };
      }
      function maybeInvokeDelegate(delegate, context) {
        var method = delegate.iterator[context.method];
        if (method === undefined) {
          context.delegate = null;
          if ("throw" === context.method) {
            if (delegate.iterator["return"]) {
              context.method = "return";
              context.arg = undefined;
              maybeInvokeDelegate(delegate, context);
              if ("throw" === context.method) return ContinueSentinel;
            }
            context.method = "throw";
            context.arg = new TypeError("The iterator does not provide a 'throw' method");
          }
          return ContinueSentinel;
        }
        var record = tryCatch(method, delegate.iterator, context.arg);
        if ("throw" === record.type) {
          context.method = "throw";
          context.arg = record.arg;
          context.delegate = null;
          return ContinueSentinel;
        }
        var info = record.arg;
        if (!info) {
          context.method = "throw";
          context.arg = new TypeError("iterator result is not an object");
          context.delegate = null;
          return ContinueSentinel;
        }
        if (!info.done) return info;
        context[delegate.resultName] = info.value;
        context.next = delegate.nextLoc;
        if ("return" !== context.method) {
          context.method = "next";
          context.arg = undefined;
        }
        context.delegate = null;
        return ContinueSentinel;
      }
      defineIteratorMethods(Gp);
      Gp[toStringTagSymbol] = "Generator";
      Gp[iteratorSymbol] = function() {
        return this;
      };
      Gp.toString = function() {
        return "[object Generator]";
      };
      function pushTryEntry(locs) {
        var entry = {
          tryLoc: locs[0]
        };
        1 in locs && (entry.catchLoc = locs[1]);
        if (2 in locs) {
          entry.finallyLoc = locs[2];
          entry.afterLoc = locs[3];
        }
        this.tryEntries.push(entry);
      }
      function resetTryEntry(entry) {
        var record = entry.completion || {};
        record.type = "normal";
        delete record.arg;
        entry.completion = record;
      }
      function Context(tryLocsList) {
        this.tryEntries = [ {
          tryLoc: "root"
        } ];
        tryLocsList.forEach(pushTryEntry, this);
        this.reset(true);
      }
      runtime.keys = function(object) {
        var keys = [];
        for (var key in object) keys.push(key);
        keys.reverse();
        return function next() {
          while (keys.length) {
            var key = keys.pop();
            if (key in object) {
              next.value = key;
              next.done = false;
              return next;
            }
          }
          next.done = true;
          return next;
        };
      };
      function values(iterable) {
        if (iterable) {
          var iteratorMethod = iterable[iteratorSymbol];
          if (iteratorMethod) return iteratorMethod.call(iterable);
          if ("function" === typeof iterable.next) return iterable;
          if (!isNaN(iterable.length)) {
            var i = -1, next = function next() {
              while (++i < iterable.length) if (hasOwn.call(iterable, i)) {
                next.value = iterable[i];
                next.done = false;
                return next;
              }
              next.value = undefined;
              next.done = true;
              return next;
            };
            return next.next = next;
          }
        }
        return {
          next: doneResult
        };
      }
      runtime.values = values;
      function doneResult() {
        return {
          value: undefined,
          done: true
        };
      }
      Context.prototype = {
        constructor: Context,
        reset: function reset(skipTempReset) {
          this.prev = 0;
          this.next = 0;
          this.sent = this._sent = undefined;
          this.done = false;
          this.delegate = null;
          this.method = "next";
          this.arg = undefined;
          this.tryEntries.forEach(resetTryEntry);
          if (!skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
        },
        stop: function stop() {
          this.done = true;
          var rootEntry = this.tryEntries[0];
          var rootRecord = rootEntry.completion;
          if ("throw" === rootRecord.type) throw rootRecord.arg;
          return this.rval;
        },
        dispatchException: function dispatchException(exception) {
          if (this.done) throw exception;
          var context = this;
          function handle(loc, caught) {
            record.type = "throw";
            record.arg = exception;
            context.next = loc;
            if (caught) {
              context.method = "next";
              context.arg = undefined;
            }
            return !!caught;
          }
          for (var i = this.tryEntries.length - 1; i >= 0; --i) {
            var entry = this.tryEntries[i];
            var record = entry.completion;
            if ("root" === entry.tryLoc) return handle("end");
            if (entry.tryLoc <= this.prev) {
              var hasCatch = hasOwn.call(entry, "catchLoc");
              var hasFinally = hasOwn.call(entry, "finallyLoc");
              if (hasCatch && hasFinally) {
                if (this.prev < entry.catchLoc) return handle(entry.catchLoc, true);
                if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
              } else if (hasCatch) {
                if (this.prev < entry.catchLoc) return handle(entry.catchLoc, true);
              } else {
                if (!hasFinally) throw new Error("try statement without catch or finally");
                if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
              }
            }
          }
        },
        abrupt: function abrupt(type, arg) {
          for (var i = this.tryEntries.length - 1; i >= 0; --i) {
            var entry = this.tryEntries[i];
            if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
              var finallyEntry = entry;
              break;
            }
          }
          finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
          var record = finallyEntry ? finallyEntry.completion : {};
          record.type = type;
          record.arg = arg;
          if (finallyEntry) {
            this.method = "next";
            this.next = finallyEntry.finallyLoc;
            return ContinueSentinel;
          }
          return this.complete(record);
        },
        complete: function complete(record, afterLoc) {
          if ("throw" === record.type) throw record.arg;
          if ("break" === record.type || "continue" === record.type) this.next = record.arg; else if ("return" === record.type) {
            this.rval = this.arg = record.arg;
            this.method = "return";
            this.next = "end";
          } else "normal" === record.type && afterLoc && (this.next = afterLoc);
          return ContinueSentinel;
        },
        finish: function finish(finallyLoc) {
          for (var i = this.tryEntries.length - 1; i >= 0; --i) {
            var entry = this.tryEntries[i];
            if (entry.finallyLoc === finallyLoc) {
              this.complete(entry.completion, entry.afterLoc);
              resetTryEntry(entry);
              return ContinueSentinel;
            }
          }
        },
        catch: function _catch(tryLoc) {
          for (var i = this.tryEntries.length - 1; i >= 0; --i) {
            var entry = this.tryEntries[i];
            if (entry.tryLoc === tryLoc) {
              var record = entry.completion;
              if ("throw" === record.type) {
                var thrown = record.arg;
                resetTryEntry(entry);
              }
              return thrown;
            }
          }
          throw new Error("illegal catch attempt");
        },
        delegateYield: function delegateYield(iterable, resultName, nextLoc) {
          this.delegate = {
            iterator: values(iterable),
            resultName: resultName,
            nextLoc: nextLoc
          };
          "next" === this.method && (this.arg = undefined);
          return ContinueSentinel;
        }
      };
    }(function() {
      return this;
    }() || Function("return this")());
    cc._RF.pop();
  }, {} ],
  utils: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "4dea0GAgURA97AG5TiaiGgE", "utils");
    "use strict";
    exports.__esModule = true;
    exports.getPosByAngle = getPosByAngle;
    exports.getAngleByPos = getAngleByPos;
    exports.exchangeNodePos = exchangeNodePos;
    exports.RandomInt = RandomInt;
    exports.Between = Between;
    exports.randomSortByArr = randomSortByArr;
    exports.asyncTweenTo = asyncTweenTo;
    exports.asyncTweenBy = asyncTweenBy;
    exports.asyncPlayDragonBoneAnimation = asyncPlayDragonBoneAnimation;
    exports.asyncPlayEffectByUrl = asyncPlayEffectByUrl;
    exports.jelly = jelly;
    exports.asyncDelay = asyncDelay;
    exports.showFireworks = showFireworks;
    exports.loadSpine = loadSpine;
    exports.onHomeworkFinish = onHomeworkFinish;
    function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
      try {
        var info = gen[key](arg);
        var value = info.value;
      } catch (error) {
        reject(error);
        return;
      }
      info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
    }
    function _asyncToGenerator(fn) {
      return function() {
        var self = this, args = arguments;
        return new Promise(function(resolve, reject) {
          var gen = fn.apply(self, args);
          function _next(value) {
            asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
          }
          function _throw(err) {
            asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
          }
          _next(void 0);
        });
      };
    }
    function getPosByAngle(angle, len) {
      var radian = angle * Math.PI / 180;
      var x = Math.sin(radian) * len;
      var y = Math.cos(radian) * len;
      return {
        x: x,
        y: y
      };
    }
    function getAngleByPos(px, py, mx, my) {
      var x = Math.abs(px - mx);
      var y = Math.abs(py - my);
      var z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
      var cos = y / z;
      var radina = Math.acos(cos);
      var angle = Math.floor(180 / (Math.PI / radina) * 100) / 100;
      mx > px && my > py && (angle = 180 - angle);
      mx === px && my > py && (angle = 180);
      mx > px && my === py && (angle = 90);
      mx < px && my > py && (angle = 180 + angle);
      mx < px && my === py && (angle = 270);
      mx < px && my < py && (angle = 360 - angle);
      return angle;
    }
    function exchangeNodePos(baseNode, targetNode) {
      return baseNode.convertToNodeSpaceAR(targetNode._parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y)));
    }
    function RandomInt(a, b) {
      void 0 === b && (b = 0);
      var max = Math.max(a, b);
      var min = Math.min(a, b);
      return Math.floor(Math.random() * (max - min) + min);
    }
    function Between(a, b, c) {
      return [ a, b, c ].sort(function(a, b) {
        return a - b;
      })[1];
    }
    function randomSortByArr(arr) {
      var newArr = [];
      var tmpArr = arr.concat();
      while (tmpArr.length > 0) {
        var randomIndex = Math.floor(tmpArr.length * Math.random());
        newArr.push(tmpArr[randomIndex]);
        tmpArr.splice(randomIndex, 1);
      }
      return newArr;
    }
    function asyncTweenTo(_x, _x2, _x3, _x4) {
      return _asyncTweenTo.apply(this, arguments);
    }
    function _asyncTweenTo() {
      _asyncTweenTo = _asyncToGenerator(regeneratorRuntime.mark(function _callee(node, duration, obj, ease) {
        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
           case 0:
            void 0 === ease && (ease = void 0);
            return _context.abrupt("return", new Promise(function(resolve, reject) {
              cc.tween(node).to(duration, obj, ease).call(function() {
                resolve();
              }).start();
            }));

           case 2:
           case "end":
            return _context.stop();
          }
        }, _callee);
      }));
      return _asyncTweenTo.apply(this, arguments);
    }
    function asyncTweenBy(_x5, _x6, _x7, _x8) {
      return _asyncTweenBy.apply(this, arguments);
    }
    function _asyncTweenBy() {
      _asyncTweenBy = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(node, duration, obj, ease) {
        return regeneratorRuntime.wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
           case 0:
            void 0 === ease && (ease = void 0);
            return _context2.abrupt("return", new Promise(function(resolve, reject) {
              cc.tween(node).by(duration, obj, ease).call(function() {
                resolve();
              }).start();
            }));

           case 2:
           case "end":
            return _context2.stop();
          }
        }, _callee2);
      }));
      return _asyncTweenBy.apply(this, arguments);
    }
    function asyncPlayDragonBoneAnimation(_x9, _x10, _x11, _x12) {
      return _asyncPlayDragonBoneAnimation.apply(this, arguments);
    }
    function _asyncPlayDragonBoneAnimation() {
      _asyncPlayDragonBoneAnimation = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(node, animationName, time, onFrameEvent) {
        return regeneratorRuntime.wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
           case 0:
            void 0 === time && (time = 1);
            return _context3.abrupt("return", new Promise(function(resolve, reject) {
              node.getComponent(dragonBones.ArmatureDisplay).once(dragonBones.EventObject.COMPLETE, function() {
                resolve();
              });
              node.getComponent(dragonBones.ArmatureDisplay).on(dragonBones.EventObject.FRAME_EVENT, function(_ref2) {
                var name = _ref2.name;
                onFrameEvent && "function" == typeof onFrameEvent && onFrameEvent(name);
              });
              node.getComponent(dragonBones.ArmatureDisplay).playAnimation(animationName, time);
            }));

           case 2:
           case "end":
            return _context3.stop();
          }
        }, _callee3);
      }));
      return _asyncPlayDragonBoneAnimation.apply(this, arguments);
    }
    function asyncPlayEffectByUrl(_x13, _x14) {
      return _asyncPlayEffectByUrl.apply(this, arguments);
    }
    function _asyncPlayEffectByUrl() {
      _asyncPlayEffectByUrl = _asyncToGenerator(regeneratorRuntime.mark(function _callee4(url, loop) {
        return regeneratorRuntime.wrap(function _callee4$(_context4) {
          while (1) switch (_context4.prev = _context4.next) {
           case 0:
            void 0 === loop && (loop = false);
            return _context4.abrupt("return", new Promise(function(resolve, reject) {
              cc.assetManager.loadRemote(url, function(err, clip) {
                console.log(clip);
                cc.audioEngine.playEffect(clip, loop);
                resolve();
              });
            }));

           case 2:
           case "end":
            return _context4.stop();
          }
        }, _callee4);
      }));
      return _asyncPlayEffectByUrl.apply(this, arguments);
    }
    function jelly(_x15) {
      return _jelly.apply(this, arguments);
    }
    function _jelly() {
      _jelly = _asyncToGenerator(regeneratorRuntime.mark(function _callee5(node) {
        return regeneratorRuntime.wrap(function _callee5$(_context5) {
          while (1) switch (_context5.prev = _context5.next) {
           case 0:
            return _context5.abrupt("return", new Promise(function(resolve, reject) {
              cc.tween(node).to(.1, {
                scaleX: .9,
                scaleY: 1.1
              }).to(.1, {
                scaleX: 1.1,
                scaleY: .9
              }).to(.1, {
                scaleX: 1,
                scaleY: 1
              }).call(resolve).start();
            }));

           case 1:
           case "end":
            return _context5.stop();
          }
        }, _callee5);
      }));
      return _jelly.apply(this, arguments);
    }
    function asyncDelay(_x16) {
      return _asyncDelay.apply(this, arguments);
    }
    function _asyncDelay() {
      _asyncDelay = _asyncToGenerator(regeneratorRuntime.mark(function _callee6(time) {
        return regeneratorRuntime.wrap(function _callee6$(_context6) {
          while (1) switch (_context6.prev = _context6.next) {
           case 0:
            return _context6.abrupt("return", new Promise(function(resolve, reject) {
              setTimeout(function() {
                resolve();
              }, 1e3 * time);
            }));

           case 1:
           case "end":
            return _context6.stop();
          }
        }, _callee6);
      }));
      return _asyncDelay.apply(this, arguments);
    }
    function showFireworks(_x17, _x18, _x19, _x20, _x21, _x22) {
      return _showFireworks.apply(this, arguments);
    }
    function _showFireworks() {
      _showFireworks = _asyncToGenerator(regeneratorRuntime.mark(function _callee8(baseNode, nodeList, pos, side, range, number) {
        return regeneratorRuntime.wrap(function _callee8$(_context8) {
          while (1) switch (_context8.prev = _context8.next) {
           case 0:
            void 0 === pos && (pos = cc.v2(0, 0));
            void 0 === side && (side = cc.v2(0, 100));
            void 0 === range && (range = 50);
            void 0 === number && (number = 100);
            new Array(number).fill(" ").forEach(function() {
              var _ref3 = _asyncToGenerator(regeneratorRuntime.mark(function _callee7(_, i) {
                var rabbonNode, node, rate, angle;
                return regeneratorRuntime.wrap(function _callee7$(_context7) {
                  while (1) switch (_context7.prev = _context7.next) {
                   case 0:
                    rabbonNode = new cc.Node();
                    rabbonNode.parent = baseNode;
                    rabbonNode.x = pos.x;
                    rabbonNode.y = pos.y;
                    rabbonNode.angle = 60 * Math.random() - 30;
                    node = cc.instantiate(nodeList[RandomInt(nodeList.length)]);
                    node.parent = rabbonNode;
                    node.active = true;
                    node.x = 0;
                    node.y = 0;
                    node.angle = 0;
                    rate = Math.random();
                    angle = Math.PI * (2 * Math.random() - 1);
                    _context7.next = 15;
                    return asyncTweenBy(rabbonNode, .3, {
                      x: side.x * rate + Math.cos(angle) * range * rate,
                      y: side.y * rate + Math.sin(angle) * range * rate
                    }, {
                      easing: "quadIn"
                    });

                   case 15:
                    cc.tween(rabbonNode).by(8, {
                      y: -2e3
                    }).start();
                    rabbonFall(rabbonNode);
                    _context7.next = 19;
                    return asyncDelay(Math.random());

                   case 19:
                    cc.tween(node).by(.15, {
                      x: -10,
                      angle: -10
                    }).by(.3, {
                      x: 20,
                      angle: 20
                    }).by(.15, {
                      x: -10,
                      angle: -10
                    }).union().repeatForever().start();
                    cc.tween(rabbonNode).delay(5).to(.3, {
                      opacity: 0
                    }).call(function() {
                      node.stopAllActions();
                      node.active = false;
                      node.parent = null;
                      node = null;
                    }).start();

                   case 21:
                   case "end":
                    return _context7.stop();
                  }
                }, _callee7);
              }));
              return function(_x24, _x25) {
                return _ref3.apply(this, arguments);
              };
            }());

           case 5:
           case "end":
            return _context8.stop();
          }
        }, _callee8);
      }));
      return _showFireworks.apply(this, arguments);
    }
    function rabbonFall(_x23) {
      return _rabbonFall.apply(this, arguments);
    }
    function _rabbonFall() {
      _rabbonFall = _asyncToGenerator(regeneratorRuntime.mark(function _callee9(node) {
        var time, offsetX;
        return regeneratorRuntime.wrap(function _callee9$(_context9) {
          while (1) switch (_context9.prev = _context9.next) {
           case 0:
            time = 1 + Math.random();
            offsetX = RandomInt(-200, 200) * time;
            _context9.next = 4;
            return asyncTweenBy(node, time, {
              x: offsetX,
              angle: 60 * offsetX / 200
            });

           case 4:
            rabbonFall(node);

           case 5:
           case "end":
            return _context9.stop();
          }
        }, _callee9);
      }));
      return _rabbonFall.apply(this, arguments);
    }
    function loadSpine(skeleton, picName, _ref) {
      var tex = _ref.tex, atlas = _ref.atlas, ske = _ref.ske;
      return new Promise(function(resolve, reject) {
        cc.assetManager.loadRemote(tex, function(error, texture) {
          if (error) {
            reject();
            return;
          }
          cc.assetManager.loadAny({
            url: atlas
          }, function(error, atlasJson) {
            if (error) {
              reject();
              return;
            }
            cc.assetManager.loadAny({
              url: ske
            }, function(error, dragonBonesJson) {
              if (error) {
                reject();
                return;
              }
              var asset = new sp.SkeletonData();
              asset._uuid = ske;
              asset.skeletonJson = JSON.stringify(dragonBonesJson);
              asset.atlasText = atlasJson;
              asset.textures = [ texture ];
              asset.textureNames = [ picName ];
              console.log("picName: ", picName);
              skeleton.skeletonData = asset;
              var jsonObj = dragonBonesJson;
              var animationNameObj = jsonObj.animations;
              var animationNames = [];
              for (var name in animationNameObj) {
                console.log("name~~:  ", name);
                animationNames.push(name);
              }
              console.log("skeleton.animation: ", skeleton.animation);
              skeleton.animationNames = animationNames;
              skeleton.loop = false;
              console.log("jsonObj : ", jsonObj);
              console.log("jsonObj['skeleton'] : ", jsonObj["skeleton"]);
              resolve(jsonObj["skeleton"]);
            });
          });
        });
      });
    }
    function onHomeworkFinish() {
      var middleLayer = cc.find("middleLayer");
      if (middleLayer) {
        var middleLayerComponent = middleLayer.getComponent("middleLayer");
        "student" == middleLayerComponent.role && middleLayerComponent.onHomeworkFinish(function() {});
      } else console.log("onHomeworkFinish");
    }
    cc._RF.pop();
  }, {} ],
  util: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "9aa37GzjxNHyoKspnPuKHcw", "util");
    "use strict";
    exports.__esModule = true;
    exports.getPosByAngle = getPosByAngle;
    exports.getAngleByPos = getAngleByPos;
    exports.exchangeNodePos = exchangeNodePos;
    exports.RandomInt = RandomInt;
    exports.randomSortByArr = randomSortByArr;
    exports.setSprNodeMaxLen = setSprNodeMaxLen;
    exports.localPosTolocalPos = localPosTolocalPos;
    exports.worldPosToLocalPos = worldPosToLocalPos;
    exports.getScaleRateBy2Node = getScaleRateBy2Node;
    exports.getDistance = getDistance;
    exports.playAudioByUrl = playAudioByUrl;
    exports.btnClickAnima = btnClickAnima;
    function getPosByAngle(angle, len) {
      var radian = angle * Math.PI / 180;
      var x = Math.sin(radian) * len;
      var y = Math.cos(radian) * len;
      return {
        x: x,
        y: y
      };
    }
    function getAngleByPos(px, py, mx, my) {
      var x = Math.abs(px - mx);
      var y = Math.abs(py - my);
      var z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
      var cos = y / z;
      var radina = Math.acos(cos);
      var angle = Math.floor(180 / (Math.PI / radina) * 100) / 100;
      mx > px && my > py && (angle = 180 - angle);
      mx === px && my > py && (angle = 180);
      mx > px && my === py && (angle = 90);
      mx < px && my > py && (angle = 180 + angle);
      mx < px && my === py && (angle = 270);
      mx < px && my < py && (angle = 360 - angle);
      return angle;
    }
    function exchangeNodePos(baseNode, targetNode) {
      return baseNode.convertToNodeSpaceAR(targetNode._parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y)));
    }
    function RandomInt(a, b) {
      void 0 === b && (b = 0);
      var max = Math.max(a, b);
      var min = Math.min(a, b);
      return Math.floor(Math.random() * (max - min) + min);
    }
    function randomSortByArr(arr) {
      var newArr = [];
      var tmpArr = arr.concat();
      while (tmpArr.length > 0) {
        var randomIndex = Math.floor(tmpArr.length * Math.random());
        newArr.push(tmpArr[randomIndex]);
        tmpArr.splice(randomIndex, 1);
      }
      return newArr;
    }
    function setSprNodeMaxLen(sprNode, maxW, maxH) {
      var sx = maxW / sprNode.width;
      var sy = maxH / sprNode.height;
      var s = Math.min(sx, sy);
      sprNode.scale = Math.round(1e3 * s) / 1e3;
    }
    function localPosTolocalPos(baseNode, targetNode) {
      var worldPos = targetNode.parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y));
      var localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
      return localPos;
    }
    function worldPosToLocalPos(worldPos, baseNode) {
      var localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
      return localPos;
    }
    function getScaleRateBy2Node(baseNode, targetNode, maxFlag) {
      void 0 === maxFlag && (maxFlag = true);
      var worldRect1 = targetNode.getBoundingBoxToWorld();
      var worldRect2 = baseNode.getBoundingBoxToWorld();
      var sx = worldRect1.width / worldRect2.width;
      var sy = worldRect1.height / worldRect2.height;
      return maxFlag ? Math.max(sx, sy) : Math.min(sx, sy);
    }
    function getDistance(start, end) {
      var pos = cc.v2(start.x - end.x, start.y - end.y);
      var dis = Math.sqrt(pos.x * pos.x + pos.y * pos.y);
      return dis;
    }
    function playAudioByUrl(audio_url, cb) {
      void 0 === cb && (cb = null);
      audio_url && cc.assetManager.loadRemote(audio_url, function(err, audioClip) {
        var audioId = cc.audioEngine.play(audioClip, false, .8);
        cb && cc.audioEngine.setFinishCallback(audioId, function() {
          cb();
        });
      });
    }
    function btnClickAnima(btn, time, rate) {
      void 0 === time && (time = .15);
      void 0 === rate && (rate = 1.05);
      btn.tmpScale = btn.scale;
      btn.on(cc.Node.EventType.TOUCH_START, function() {
        cc.tween(btn).to(time / 2, {
          scale: btn.scale * rate
        }).start();
      });
      btn.on(cc.Node.EventType.TOUCH_CANCEL, function() {
        cc.tween(btn).to(time / 2, {
          scale: btn.tmpScale
        }).start();
      });
      btn.on(cc.Node.EventType.TOUCH_END, function() {
        cc.tween(btn).to(time / 2, {
          scale: btn.tmpScale
        }).start();
      });
    }
    cc._RF.pop();
  }, {} ],
  verlet_assembler: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "10b30V8c/ZEs5olGN2C+NyA", "verlet_assembler");
    "use strict";
    var __extends = this && this.__extends || function() {
      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) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var page_effect_assembler_base_1 = require("./page_effect_assembler_base");
    var gfx = cc.gfx;
    var vfmtPosUvColorFront = new gfx.VertexFormat([ {
      name: gfx.ATTR_POSITION,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_UV0,
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 2
    }, {
      name: gfx.ATTR_COLOR,
      type: gfx.ATTR_TYPE_UINT8,
      num: 4,
      normalize: true
    }, {
      name: "a_isFront",
      type: gfx.ATTR_TYPE_FLOAT32,
      num: 1
    } ]);
    var VerletAssembler = function(_super) {
      __extends(VerletAssembler, _super);
      function VerletAssembler() {
        return null !== _super && _super.apply(this, arguments) || this;
      }
      VerletAssembler.prototype.init = function(comp) {
        _super.prototype.init.call(this, comp);
        var segmentCount = comp.pointsCount - 1;
        this.verticesCount = 4 * segmentCount;
        this.indicesCount = 6 * segmentCount;
        this.floatsPerVert = 6;
        this.initData();
      };
      VerletAssembler.prototype.getVfmt = function() {
        return vfmtPosUvColorFront;
      };
      VerletAssembler.prototype.updateRenderData = function(comp) {
        if (comp) {
          var pointList = comp.getPointList();
          var pointNum = pointList.length;
          if (pointNum < 2) return;
          var node = comp.node;
          var height = node.height;
          var width = node.width;
          var posX = -width * node.anchorX;
          var posY = -height * node.anchorY;
          var gapU = 1 / (pointNum - 1);
          var lastU = 0;
          var nextU = 0;
          var floatsPerVert = this.floatsPerVert;
          var verts = this.renderData.vDatas[0];
          var dstOffset = 0;
          for (var i = 1; i < pointNum; i++) {
            var lastPoint = pointList[i - 1];
            var nextPoint = pointList[i];
            nextU = lastU + gapU;
            dstOffset = floatsPerVert * (i - 1) * 4;
            verts[dstOffset] = posX + lastPoint.x;
            verts[dstOffset + 1] = posY + lastPoint.y;
            verts[dstOffset + 2] = lastU;
            verts[dstOffset + 3] = 1;
            dstOffset += floatsPerVert;
            verts[dstOffset] = posX + nextPoint.x;
            verts[dstOffset + 1] = posY + nextPoint.y;
            verts[dstOffset + 2] = nextU;
            verts[dstOffset + 3] = 1;
            dstOffset += floatsPerVert;
            verts[dstOffset] = posX + lastPoint.x;
            verts[dstOffset + 1] = posY + height + lastPoint.y;
            verts[dstOffset + 2] = lastU;
            verts[dstOffset + 3] = 0;
            dstOffset += floatsPerVert;
            verts[dstOffset] = posX + nextPoint.x;
            verts[dstOffset + 1] = posY + height + nextPoint.y;
            verts[dstOffset + 2] = nextU;
            verts[dstOffset + 3] = 0;
            lastU = nextU;
          }
          this.updateColor(comp, null);
          this.updateIsFront(comp, 5);
        }
      };
      return VerletAssembler;
    }(page_effect_assembler_base_1.default);
    exports.default = VerletAssembler;
    cc._RF.pop();
  }, {
    "./page_effect_assembler_base": "page_effect_assembler_base"
  } ],
  verlet_render: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f971b+TGNxM96cklRi+wtVI", "verlet_render");
    "use strict";
    var __extends = this && this.__extends || function() {
      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) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    }();
    var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
      var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
      if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (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;
    };
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    var verlet_assembler_1 = require("./verlet_assembler");
    var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
    var PagePoint = function() {
      function PagePoint(x, y) {
        this.oldPos = this.newPos = cc.v2(x, y);
      }
      return PagePoint;
    }();
    var VerletRender = function(_super) {
      __extends(VerletRender, _super);
      function VerletRender() {
        var _this = null !== _super && _super.apply(this, arguments) || this;
        _this.textureList = [];
        _this.pointsCount = 30;
        _this.constraintTimes = 100;
        _this.damping = .1;
        _this.gravity = 0;
        _this._initedMaterial = false;
        _this._pointList = [];
        _this._angle = 0;
        return _this;
      }
      VerletRender.prototype.onEnable = function() {
        _super.prototype.onEnable.call(this);
        this.initPointList();
        this.draw();
      };
      VerletRender.prototype._resetAssembler = function() {
        var assembler = this._assembler = new verlet_assembler_1.default();
        assembler.init(this);
      };
      VerletRender.prototype._updateMaterial = function() {
        var material = this.getMaterial(0);
        if (material) {
          material.define("CC_USE_MODEL", 1);
          if (2 === this.textureList.length) {
            material.setProperty("texture0", this.textureList[0]);
            material.setProperty("texture1", this.textureList[1]);
          }
        }
      };
      VerletRender.prototype.updateMaterial = function() {
        if (2 === this.textureList.length) {
          this._updateMaterial();
          this._initedMaterial = true;
          return;
        }
      };
      VerletRender.prototype.updateAngle = function(angle) {
        this._angle = angle;
      };
      VerletRender.prototype.getPointList = function() {
        var pointList = [];
        for (var _i = 0, _a = this._pointList; _i < _a.length; _i++) {
          var point = _a[_i];
          pointList.push(new cc.Vec2(point.newPos.x, point.newPos.y));
        }
        return pointList;
      };
      VerletRender.prototype.initPointList = function() {
        for (var i = 0; i < this.pointsCount; ++i) {
          var posX = i / (this.pointsCount - 1) * this.node.width;
          this._pointList.push(new PagePoint(posX, 0));
        }
      };
      VerletRender.prototype.update = function() {
        this.simulate();
        this.applyConstraint();
        this.draw();
      };
      VerletRender.prototype.simulate = function() {
        var gravity = cc.v2(0, this.gravity);
        for (var i = this.pointsCount - 1; i >= 1; i--) {
          var point = this._pointList[i];
          var velocity = point.newPos.sub(point.oldPos).mul(this.damping);
          point.newPos.y <= 0 && (gravity.y = Math.max(0, gravity.y));
          point.oldPos = point.newPos;
          point.newPos = point.newPos.add(velocity);
          point.newPos = point.newPos.add(gravity);
        }
      };
      VerletRender.prototype._updateEndPos = function(endPos) {
        var tailPoint = this._pointList[this.pointsCount - 1];
        tailPoint.newPos = new cc.Vec2(endPos.x, endPos.y);
      };
      VerletRender.prototype._getEndPos = function() {
        var endPos = new cc.Vec2(0, 0);
        var width = this.node.width;
        var rad = this._angle * Math.PI / 180;
        var per = 2 * rad / Math.PI;
        if (this._angle <= 90) {
          var endPosX = width * (1 - Math.pow(per, 3));
          var endPosY = 1 * width / 4 * (1 - Math.pow(1 - per, 4));
          endPos = new cc.Vec2(endPosX, endPosY);
        } else {
          per -= 1;
          var endPosX = -width * (1 - Math.pow(1 - per, 3));
          var endPosY = 1 * width / 4 * (1 - Math.pow(per, 4));
          endPos = new cc.Vec2(endPosX, endPosY);
        }
        return endPos;
      };
      VerletRender.prototype.applyConstraint = function() {
        var normalDistance = this.node.width / (this.pointsCount - 1);
        var endPos = this._getEndPos();
        for (var t = 0; t < this.constraintTimes; t++) {
          this._updateEndPos(endPos);
          for (var i = this.pointsCount - 1; i >= 1; i--) {
            var firstPoint = this._pointList[i - 1];
            var secondPoint = this._pointList[i];
            var delatPos = secondPoint.newPos.sub(firstPoint.newPos);
            var distance = delatPos.mag();
            var fixDirection = null;
            if (distance < normalDistance) fixDirection = delatPos.normalize().negate(); else {
              if (!(distance > normalDistance)) continue;
              fixDirection = delatPos.normalize();
            }
            var fixLen = Math.abs(distance - normalDistance);
            if (1 == i) {
              var fixVector = fixDirection.mul(fixLen);
              secondPoint.newPos.subSelf(fixVector);
            } else {
              var fixHalfVector = fixDirection.mul(.5 * fixLen);
              firstPoint.newPos.addSelf(fixHalfVector);
              secondPoint.newPos.subSelf(fixHalfVector);
            }
          }
        }
      };
      VerletRender.prototype.draw = function() {
        this._initedMaterial || this.updateMaterial();
        this.setVertsDirty();
      };
      __decorate([ property({
        type: [ cc.Texture2D ],
        displayName: "\u7eb9\u7406"
      }) ], VerletRender.prototype, "textureList", void 0);
      __decorate([ property({
        displayName: "\u6bcf\u6761\u8fb9\u4e0a\u7684\u9876\u70b9\u6570\u91cf"
      }) ], VerletRender.prototype, "pointsCount", void 0);
      __decorate([ property({
        displayName: "\u7ea0\u6b63\u6b21\u6570"
      }) ], VerletRender.prototype, "constraintTimes", void 0);
      __decorate([ property({
        displayName: "\u901f\u5ea6\u8870\u51cf\u7cfb\u6570"
      }) ], VerletRender.prototype, "damping", void 0);
      __decorate([ property({
        displayName: "\u91cd\u529b"
      }) ], VerletRender.prototype, "gravity", void 0);
      VerletRender = __decorate([ ccclass ], VerletRender);
      return VerletRender;
    }(cc.RenderComponent);
    exports.default = VerletRender;
    cc._RF.pop();
  }, {
    "./verlet_assembler": "verlet_assembler"
  } ]
}, {}, [ "OP13", "BaseUI", "DefaultData", "EventMgr", "ItemPage", "NodeFitScreen", "bezier_assembler", "bezier_render", "capture_to_web", "page_effect_assembler_base", "runtime", "util", "utils", "verlet_assembler", "verlet_render" ]);